Reputation: 202
I have a simple multi-project hierarchy:
root/
pom.xml
project-a
pom.xml
subproject-a.1
pom.xml
subproject-a.2
pom.xml
project-b
pom.xml
subproject-b.1
pom.xml
subproject-b.2
pom.xml
If I build a project (say, subproject-b.1) from the command line, the project will build find. However, from Jenkins, the same project will fail with a:
[FATAL] Non-resolvable parent POM: Could not find artifact com.foo.bob:project-b:pom:1 in releases (http://xxxx.foo.com:9080/libs-release) and 'parent.relativePath' points at wrong local POM @ line 7, column 13
Neither the root nor the project-a/project-b modules, just the subprojects. I did look at: Hudson build fail: Non-resolvable parent POM and made sure that my parent's relativePath is set to:
<relativePath>../pom.xml</relativePath>
Thoughts on what I need to add to my pom.xml in order for Maven to play well with Jenkins?
Upvotes: 4
Views: 5051
Reputation: 2102
I had the same problem - Windows 10 - after installing Jenkins on my box. I even had a separate job just to build the parent pom and push it into my local maven repo (or so I thought). Turns out my jenkins service was setup to use the local system account which was pushing artifacts to a repo in my system folder and not the normal local maven repo in user.m2\repository.
To fix:
Upvotes: 3