Skip to main content
Version: QB70

Set up Passive Dependency

Situation

ComponentA and productA build independently as different projects. During build process of ProductA , build result of latest version of componentA should be retrieved and used.

Demonstration

  1. Visit latest build of productA. Hover mouse over the dependencies link in the build summary section, and you will see that current build of productA depends on most recent version of componentA.
  2. Switch to componentA, and click the run button to generate a new version of componentA.
  3. Switch back to productA, and click the run button to build productA. When the new build finishes, examine its dependency again, and it is now dependent on the newly generated version of componentA.

Resolution

  1. Visit repository setting of productA. There are two repositories defined: component-a and product-a . Repository product-a is used to retrieve source code of productA from SCM, while repository component-a is used to retrieve build result of componentA. Repository component-a is defined to retrieve all published jars from latest build of componentA.
  2. Visit step setting of productA. Two checkout steps are defined to checkout repository product-a and component-a respectively.