title: jenkins - Non-resolvable parent POM for Could not find artifact and 'parent.relativePath' points at wrong local POM
body: <p>I've got a problem concerning a build in jenkins. As the title describes it is an <em>"Non-resolvable parent POM for Could not find artifact and 'parent.relativePath' points at wrong local POM"</em> problem, found often on stackoverflow, but i haven't found a matching one. So here's my problem description</p>
  
  <p>My project structure looks like this:</p>
  
  <pre><code>/root-project
   +-----------/pom.xml
  /root-project/modul-a/
   +-------------------/pom.xml
  /root-project/modul-b/
   +-------------------/pom.xml
  /root-project/modul-c/
   +-------------------/pom.xml
  </code></pre>
  
  <p>On my local machine (windows) i can build my project from / with:</p>
  
  <pre><code>mvn -f root-project/pom.xml clean install
  </code></pre>
  
  <p>having no error, even with an empty repository.</p>
  
  <p>But jenkins (linux) is not able to do this. </p>
  
  <pre><code>Gestartet durch Benutzer anonymous
  Building in workspace /opt/jenkins/jobs/Project/workspace
  Checkout:workspace / /opt/jenkins/jobs/Project/workspace - hudson.remoting.LocalChannel@33333ab9
  Using strategy: Default
  Last Built Revision: Revision acb4c7d9efd81c1c7d5bbd2f6e190d1cb0a5e359 (origin/HEAD, origin/master)
  Fetching changes from 1 remote Git repository
  Fetching upstream changes from http://repository.git
  Seen branch in repository origin/HEAD
  Seen branch in repository origin/master
  Seen branch in repository origin/version_branch
  Commencing build of Revision acb4c7d9efd81c1c7d5bbd2f6e190d1cb0a5e359 (origin/HEAD, origin/master)
  Checking out Revision acb4c7d9efd81c1c7d5bbd2f6e190d1cb0a5e359 (origin/HEAD, origin/master)
  Warning : There are multiple branch changesets here
  [workspace] $ /opt/apache-maven-3.0.4/bin/mvn -f root-project/pom.xml -e clean install javadoc:aggregate
  [INFO] Error stacktraces are turned on.
  [INFO] Scanning for projects...
  [ERROR] The build could not read 8 projects -&gt; [Help 1]
  org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
  [FATAL] Non-resolvable parent POM: Could not find artifact org.example:rootartifact:pom:1.3.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 10
  [FATAL] Non-resolvable parent POM: Could not find artifact org.example:rootartifact:pom:1.3.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 11
  //...
  at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
  at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
  at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  [ERROR]   
  [ERROR]   The project org.example:module-a:1.3.0-SNAPSHOT (/opt/jenkins/jobs/Project/workspace/root-project/module-a/pom.xml) has 1 error
  [ERROR]     Non-resolvable parent POM: Could not find artifact org.example:root-project:pom:1.3.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 10 -&gt; [Help 2]
  org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact org.example:root-project:pom:1.3.0-SNAPSHOT
  </code></pre>
  
  <p>So here's what's in my parent pom</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;org.example&lt;/groupId&gt;
  &lt;artifactId&gt;root-project&lt;/artifactId&gt;
  &lt;version&gt;1.3.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;modules&gt;
      &lt;module&gt;module-a&lt;/module&gt;
      &lt;module&gt;module-b&lt;/module&gt;
  </code></pre>
  
  <p>
        </p>
  
  <p>And an example of a module pom</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;parent&gt;
      &lt;artifactId&gt;root-project&lt;/artifactId&gt;
      &lt;groupId&gt;org.example&lt;/groupId&gt;
      &lt;version&gt;1.3.0-SNAPSHOT&lt;/version&gt;
    &lt;/parent&gt;
    &lt;artifactId&gt;module-a&lt;/artifactId&gt;
    &lt;dependencies&gt;
       //..
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>As mentioned in other entries i've tried  but it had not changed the result. Why should it, it points to the repository, where the parent has never been.
  So does somebody has a suggestion what i'm doing wrong?</p>
  
  <p>As asked here's the output of mvn help:effective-pom:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [ERROR] The build could not read 3 projects -&gt; [Help 1]
  [ERROR]   
  [ERROR]   The project org.example:modul-a:1.3.0-SNAPSHOT (/tmp/project/project-root/modul-a/pom.xml) has 1 error
  [ERROR]     Non-resolvable parent POM: Could not find artifact org.example:project:pom:1.3.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 3, column 10 -&gt; [Help 2]
  [ERROR]   
  [ERROR]   The project org.example:modul-b:1.3.0-SNAPSHOT (/tmp/project/project-root/modul-b/pom.xml) has 1 error
  [ERROR]     Non-resolvable parent POM: Could not find artifact org.example:project:pom:1.3.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -&gt; [Help 2]
  [ERROR]   
  [ERROR]   The project org.example:modul-c:1.3.0-SNAPSHOT (/tmp/project/project-root/modul-c/pom.xml) has 1 error
  [ERROR]     Non-resolvable parent POM: Could not find artifact org.example:project:pom:1.3.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 10 -&gt; [Help 2]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
  [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
  </code></pre>