Copy artifact plugin with maven multi module project

78 views
Skip to first unread message

Jeff Storey

unread,
Jan 12, 2015, 9:03:36 PM1/12/15
to jenkins...@googlegroups.com
I have a multi-module maven project that is an upstream job, and the downstream job that it triggers uses the Copy Artifact plugin to copy the artifacts produced by the maven project. These are snapshot artifacts being generated. Jenkins automatically archives the maven artifacts, and when it does, at changes the artifact name to have a version and timestamp on it, so it looks like myproject-1.2.0-<timestamp>.war, or something like that. This happens even though my project outputs a war named myproject.war. I tried just using the Jenkins post build step to archive the artifacts (which does have the correct names) and disabling the automatic archiving of maven artifacts, but when I do this, the Copy Artifact plugin fails because it looks for the artifacts in the maven module subdirectories.

Is there a way to have the Copy Artifact plugin only copy the artifacts produced by the Jenkins post build archiving step or is there any way to have the maven archived artifacts not have the timestamp added to them?

Thank you.

Matt Wilson

unread,
Aug 10, 2016, 9:50:35 AM8/10/16
to Jenkins Users
Hey Jeff,
Did you ever figure this out?  I'm running into a very similar issue.  I've got a maven build that has a zip file artifacted.  The zip file wasn't part of any maven build, it was created post build.  Jenkins artifacts it no problem, but my downstream build refuses to find the artifact.  It looks for the zips in the module artifact space which isn't working since I don't even have module artifacting enabled.  I've been able to get this working by enabling module artifacting, but I'd rather not do that as it consumes a bunch of extra disk space...

Matt
Reply all
Reply to author
Forward
0 new messages