Reading parent POMs from repositories during parsing POMs phase

279 views
Skip to first unread message

David V

unread,
Jan 16, 2014, 10:00:40 PM1/16/14
to jenkins...@googlegroups.com
We are setting up an EC2 cloud of Maven build slaves. Our projects have a number of parent POMs in our Maven repository (not Maven Central). The builds for projects fail during the Parsing POMs phase.

Parsing POMs
Failed to transfer Could not find artifact com.company:root-maven-pom:pom:7.2 in central (http://repo.maven.apache.org/maven2)
ERROR: Failed to parse POMs

Our repositories are setup in a settings.xml file on the master Jenkins server. The settings.xml file also has our server credentials.

Global Settings file -> provided global settings.xml

I believe it is a problem with Jenkins' parsing POM phase. I can make any given build work by using a Pre Step phase to Invoke top-level Maven targets. I just invoke the validate goal in this phase. This successfully loads the parent POM of the project into the local Maven repository, and then the Parsing POMs phase succeeds. Then the rest of the build succeeds.

Is this a Jenkins bug with Parsing POMs? Is there a way I can work around this globally? Remembering to add a Pre-step to each build is tedious and slows down our development cycles when builds fail (we have a lot of projects).

David V

unread,
Mar 14, 2014, 9:55:33 AM3/14/14
to jenkins...@googlegroups.com
I tried setting the "Resolve Dependencies during Pom parsing" option on the Maven build. The end result is still the same - without the "mvn validate" pre-build the build fails. However, I did notice that the Parsing POMs stage is trying to use our repository. It is not using our wagon however, so the build fails. This is rather surprising because we installed the Maven wagon in our Maven lib/ext directory to ensure it is available for all builds.

[FATAL] Non-resolvable parent POM: Could not transfer artifact com.company:root-maven-pom:pom:7.2 from/to company-maven (s3://company-maven): Cannot access s3://company-maven with type default using the available connector factories: WagonRepositoryConnectorFactory and 'parent.relativePath' points at wrong local POM @ line 4, column 13

Eric B

unread,
Apr 4, 2017, 9:32:27 PM4/4/17
to Jenkins Users
3 years later, and I'm experiencing the exact same issue as you were.

Did you ever find a proper way to make this work?  Or is this a bug/limitation in the jenkins processing?
Reply all
Reply to author
Forward
0 new messages