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
  • Constructor Details

  • Method Details

    • 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.