I have an upstream component, libraryA, I build, archive, and deploy via a 
Maven job, jobA. This works great. I have a downstream Maven job, jobB, 
that has a dependency on libraryA. This also works great, except…

 

I have a completely separate pipeline job, pipelineA specified by 
Jenkinsfile. Within that Jenkinsfile, I build a specific branch of libraryA 
I don’t want archived or deployed. In my Jenkinsfile I have 
“withMaven(mavenLocalRepo: ‘libraryA/.repository’, publisherStrategy: 
‘EXPLICIT’)”, and inside that, “sh “””[…]mvn clean package 
sonar:sonar[…]””” (Any typos here are probably the fault of my typing here 
as I did not copy-paste. There are no errors from Jenkins when executing 
these steps.) I have also tried “options: [artifactsPublisher(disabled: 
true)]” in place of “publisherStrategy: ‘EXPLICIT’” and had the same 
results. I have verified when pipelineA builds libraryA, it does NOT get 
deployed to my remote Maven repository, and I expect it not to get deployed 
there. Good.

 

So, what happens?

 

Well, if I build pipelineA followed by jobB, jobB gets its copy of libraryA 
from pipelineA, causing the build to fail. If I then run jobA, jobB 
succeeds as expected.

 
I could change the version of libraryA in the branch pipelineA builds, but 
I’d rather not do that as it’s not correct for my particular use case. What 
else could I do? What did I miss? (I do not admin this Jenkins instance, so 
my access is limited in that respect.)

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/103d4eed-cdf3-4716-9029-69365aab5246%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to