Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38808

Jenkins fails to parse Maven poms with version ranges in parent elements

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • maven-plugin
    • None

      I am running Jenkins 1.651.3, Linux, OracleJava8.
      From within Jenkins I installed Maven 3.3.9 "from Apache".

      In our poms, we are using version ranges in parent elements, as described here. This all builds fine from command line.

      In my Maven build project, if I specify a Pre-Build step that uses the installed Maven, with target "clean install", everything builds fine.

      If in the main build phase I specify target "clean install", the build fails with:

      Parsing POMs
      Failed to transfer Could not find artifact <redacted>:<redacted>:pom:(1.3.0,99.0) in central (http://repo.maven.apache.org/maven2)
      ERROR: Failed to parse POMs
      org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
      [FATAL] Non-resolvable parent POM: Could not find artifact <redacted>:<redacted>:pom:(1.3.0,99.0) in central (http://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 10, column 10
      

          [JENKINS-38808] Jenkins fails to parse Maven poms with version ranges in parent elements

          Mark Lehky added a comment -

          Just tried the same thing from latest Jenkins ver. 2.19.1, running in Docker. Still same problem, although the error is little more verbose:

          Parsing POMs
          Failed to transfer Could not find artifact <redacted>:<redacted>:pom:(1.0,99.0) in central (http://repo.maven.apache.org/maven2)
          ERROR: Failed to parse POMs
          org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
          [FATAL] Non-resolvable parent POM: Could not find artifact <redacted>:<redacted>:pom:(1.0,99.0) in central (http://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 10, column 10
          
          	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
          	at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
          	at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
          	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1301)
          	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1098)
          	at hudson.FilePath.act(FilePath.java:1018)
          	at hudson.FilePath.act(FilePath.java:996)
          	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:960)
          	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:679)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
          	at hudson.model.Run.execute(Run.java:1720)
          	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:404)
          

          Mark Lehky added a comment - Just tried the same thing from latest Jenkins ver. 2.19.1, running in Docker. Still same problem, although the error is little more verbose: Parsing POMs Failed to transfer Could not find artifact <redacted>:<redacted>:pom:(1.0,99.0) in central (http://repo.maven.apache.org/maven2) ERROR: Failed to parse POMs org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM: Could not find artifact <redacted>:<redacted>:pom:(1.0,99.0) in central (http://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 10, column 10 at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364) at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361) at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1301) at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1098) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:960) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:679) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1720) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404)

          Mark Lehky added a comment -

          should have done better search

          Mark Lehky added a comment - should have done better search

            Unassigned Unassigned
            siking Mark Lehky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: