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

Muli-modules maven projects with relative modules paths using "../" are throwing a NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Blocker Blocker
    • maven-plugin
    • None
    • Linux (Ubuntu)

      Muli-modules maven projects with relative modules paths using "../" are throwing a NullPointerException.

      If a jenkins job contains a pom like:

      <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/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.example</groupId>
      <artifactId>my-example</artifactId>
      <version>1.0-SNAPSHOT</version>
      <packaging>pom</packaging>
      <modules>
      <module>../../../a-job/workspace</module>
      </modules>
      </project>

      where a module path is relative and using "../", a NullPointerException is thrown:

      Found mavenVersion 2.2.1 from file jar:file:/home/hudson/.hudson/tools/maven_2.2.1/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
      No emails were triggered.
      Parsing POMs
      ERROR: Processing failed due to a bug in the code. Please report this to jenkins-users@googlegroups.com
      java.lang.NullPointerException
      at hudson.FilePath.isAbsolute(FilePath.java:224)
      at hudson.FilePath.<init>(FilePath.java:212)
      at hudson.FilePath.child(FilePath.java:894)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:555)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:420)
      at hudson.model.Run.run(Run.java:1362)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:406)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:145)

      (using jenkins 1.398)

            Unassigned Unassigned
            jpcourson JP Courson
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: