Setup Static Dependency

You are viewing an old version (v. 1) of this page.
The latest version is v. 5, last edited on Nov 27, 2009 (view differences | )
view page history | view next version >>

Situation

ComponentA and productA build independently as different project. ProductA uses build result of specified version of the componentA. The specified version will not change even if componentA has a new version.

Demonstration

  1. Visit the demo project productA, it is configured to be dependent on version 1.0.10 of componentA, and retrieves its build result componentA-1.0.10.jar during its build process. Hover mouse over the dependencies link in the build summary section, and you will see that current build depends on version 1.0.10 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 build finishes, examine its dependency again, and it is still using version 1.0.10 of componentA.

Resolution

  1. Visit repositories definition 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 artifacts from version 1.0.10 of componentA.
  2. Visit step definitions of productA. Two checkout steps are defined to checkout repository product-a and component-a respectively.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.