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.
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).