简体   繁体   中英

Jenkins One maven project dependent on another Running Issue

I am trying to schedule job on jenkins which is dependent on another Maven project, I tried everything pipeline, multiphase phase project, but I am getting below issue repetitively;

Issue

Could not resolve dependencies for project com.ctl.it.qa:Project-1:jar:1.0.0-SNAPSHOT: Failure to find com.ctl.it.qa:Projects-2:jar:1.1.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

The above error is not expected because I have already have maven project called "Projects-2". It should pickup dependency from here.

Nee to know what I am missing.

Will Appreciate for complete Solution.

Looking at the query, Jenkins should trigger in the below order
Project 1 -> Should be triggered first -> Creates Jar
(After Successful generation of jar)
Project 2 -> Trigger project2

Before automating it , try manually triggering the projects.
If you still get the current error, try Force update, so add -U along with the current goals.

mvn clean install -U

And for effectively trigger a build based on a dependent build, you could try the https://wiki.jenkins.io/display/JENKINS/Parameterized+Trigger+Plugin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM