Perry Hoekstra
Perry Hoekstra

Reputation: 202

Jenkins: Non-resolvable parent POM:

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

Answers (1)

Russ Jackson
Russ Jackson

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:

  • go to Control Panel -> Administrative Tools -> Services
  • right-click the Jenkins service and select Properties
  • on the Log On tab select 'This account' and enter the user and password you normally use to sign in to your box
  • click OK and restart the Jenkins service

Upvotes: 3

Related Questions