Class ContractDownloader
- java.lang.Object
-
- org.springframework.cloud.contract.stubrunner.ContractDownloader
-
public class ContractDownloader extends Object
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 Classes Modifier and Type Class Description static classContractDownloader.InclusionPropertiesHolder for updated inclusion properties, which are calculated after jar with contracts was downloaded / unpacked.
-
Constructor Summary
Constructors Constructor Description ContractDownloader(StubDownloader stubDownloader, StubConfiguration contractsJarStubConfiguration, String contractsPath, String projectGroupId, String projectArtifactId, String projectVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContractDownloader.InclusionPropertiescreateNewInclusionProperties(File contractsDirectory)After JAR with all the contracts is downloaded and unpacked - we need to get new inclusion pattern for those contracts.FileunpackAndDownloadContracts()Downloads JAR containing all the contracts.
-
-
-
Constructor Detail
-
ContractDownloader
public ContractDownloader(StubDownloader stubDownloader, StubConfiguration contractsJarStubConfiguration, String contractsPath, String projectGroupId, String projectArtifactId, String projectVersion)
-
-
Method Detail
-
unpackAndDownloadContracts
public File 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
public ContractDownloader.InclusionProperties createNewInclusionProperties(File contractsDirectory)
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.
-
-