Class ContractDownloader
java.lang.Object
org.springframework.cloud.contract.stubrunner.ContractDownloader
Downloads a JAR with contracts and sets up the plugin configuration with proper
inclusion patterns.
- Since:
- 1.0.0
- Author:
- Marcin Grzejszczak
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHolder for updated inclusion properties, which are calculated after jar with contracts was downloaded / unpacked. -
Constructor Summary
ConstructorsConstructorDescriptionContractDownloader(StubDownloader stubDownloader, StubConfiguration contractsJarStubConfiguration, String contractsPath, String projectGroupId, String projectArtifactId, String projectVersion) -
Method Summary
Modifier and TypeMethodDescriptioncreateNewInclusionProperties(File contractsDirectory) After JAR with all the contracts is downloaded and unpacked - we need to get new inclusion pattern for those contracts.Downloads JAR containing all the contracts.
-
Constructor Details
-
ContractDownloader
public ContractDownloader(StubDownloader stubDownloader, StubConfiguration contractsJarStubConfiguration, String contractsPath, String projectGroupId, String projectArtifactId, String projectVersion)
-
-
Method Details
-
unpackAndDownloadContracts
Downloads JAR containing all the contracts. The JAR with the contracts contains all the contracts for all the projects. We're interested only in its subset.- Returns:
- location of the unpacked downloaded stubs
-
createNewInclusionProperties
After JAR with all the contracts is downloaded and unpacked - we need to get new inclusion pattern for those contracts. The JAR with the contracts contains all the contracts for all the projects. We're interested only in its subset.- Parameters:
contractsDirectory- - location of the unpacked downloaded stubs.- Returns:
- new inclusion properties, calculated for those downloaded contracts.
-