Reputation: 2633
I have two projects namely Abc and DEF. Now the project DEF has dependency of the project Abc. Daily we use the run the Jenkins build. The project Abc artifacts will be deployed to the Nexus. The Project DEF has to utilized the latest snapshot from the nexus directory which was created by the project Abc.
I should not change the project DEF pom.xml files every-time to pickup the latest build from project Abc. How can i achieve this automates process.
By the way i used the buildnumber-maven-plugin
to do the auto version increment in the project Abc.
Upvotes: 0
Views: 301
Reputation: 589
I assume you have something like this in your pom.xml of DEF
<dependency>
<groupId>some.group.id</groupId>
<artifactId>Abc</artifactId>
<version>1.00.000-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
With that, as long as both Abc and DEF are configured as Maven-Jobs in Jenkins, the CI-Server should notice every time a SNAPSHOT for Abc is built and therefore trigger a new build of DEF (unless, of course, somebody beside the CI-Server was building and deploying the SNAPSHOT to Nexus Repository, which shouldn't happen.)
If you want to enforce always using the latest Snapshot from the Nexus Repository you can add Option -U as a Maven Option.
Upvotes: 1