View Source

h1. Situation
ProductA and componentA build independently as different projects. During build process of productA, build result of specified version of componentA should be retrieved and used. This specified version will not change even if componentA has a new version.

h1. Demonstration
# Visit [latest build of productA|], and 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.
# Switch to [componentA|], and click the run button to generate a new version of componentA.
# Switch back to [productA|], and click the run button to build productA. When build finishes, examine dependency of the new build again, and it is still using version _1.0.10_ of componentA.

h1. Resolution
# 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 version _1.0.10_ of componentA.
# Visit [step setting of productA|]. Two checkout steps are defined to checkout repository _product-a_ and _component-a_ respectively.