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

artifactory release NPE on multi-module project

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • artifactory-plugin
    • None
    • Jenkins ver. 1.651.3
      Artifactory plugin 2.5.0
      Linux
      Java
      Maven 3.x (tried 3.1.0, 3.1.1, 3.3.3)

      Had a working multi-module maven build that was releasing fine to artifactory. Added a new sub-module C that is a dependency of another sub-module A. I already had submodule B that depends upon submodule A. The dependency version was an explicit SNAPSHOT equal to the project version. When using this version, I get an error after the version replace stage that there is still a SNAPSHOT in module A.

      [RELEASE] Release build triggered
      > git config --get remote.origin.url # timeout=10
      > git config core.sparsecheckout # timeout=10
      > git checkout -f master
      [RELEASE] Changing POMs to release version
      [RELEASE] ERROR: Snapshot detected in file '/tmp/mcpjenkins/workspace/commerce_squad/rigel-core/Promote/rigel-dropwizard/pom.xml': com.cimpress.mcp:rigel-logging:4.1.3-SNAPSHOT
      B

      Not knowing what version replacement logic there is and even though I have this same scheme with another module in the same project, I change the module C version in module A pom to be ${project.version}. This led to the NPE below. Tried a whole bunch of other techniques that work with maven release:prepare but nothing works.

      [RELEASE] Release build triggered
      > git config --get remote.origin.url # timeout=10
      > git config core.sparsecheckout # timeout=10
      > git checkout -f master
      [RELEASE] Changing POMs to release version
      Jenkins Artifactory Plugin version: 2.5.0
      Parsing POMs
      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.NullPointerException
      at org.jfrog.hudson.release.maven.MavenReleaseWrapper$2.tearDown(MavenReleaseWrapper.java:196)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:882)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      project=hudson.maven.MavenModuleSet@58727239[commerce_squad/rigel-core/Promote]
      project.getModules()=[hudson.maven.MavenModule@5f3b1b66[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-bom][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-bom][relativePath:rigel-bom], hudson.maven.MavenModule@c99d1cc[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-dropwizard][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-dropwizard][relativePath:rigel-dropwizard], hudson.maven.MavenModule@5006508b[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-example-app][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-example-app][relativePath:rigel-example-app], hudson.maven.MavenModule@6dffab14[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][relativePath:], hudson.maven.MavenModule@7f2edf9c[commerce_squad/rigel-core/Promote/com.cimpress.rigel:rigel-core][commerce_squad/rigel-core/Promote/com.cimpress.rigel:rigel-core][relativePath:]]
      project.getRootModule()=hudson.maven.MavenModule@6dffab14[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][relativePath:]
      FATAL: null
      java.lang.NullPointerException
      at org.jfrog.hudson.release.maven.MavenReleaseWrapper$2.tearDown(MavenReleaseWrapper.java:196)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:882)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.
      Skipping sonar analysis due to bad build status FAILURE
      Started calculate disk usage of build
      Finished Calculation of disk usage of build in 0 seconds
      Started calculate disk usage of workspace
      Finished Calculation of disk usage of workspace in 0 seconds
      > git config --get remote.origin.url # timeout=10
      > git config core.sparsecheckout # timeout=10
      > git checkout -f master
      > git config --get remote.origin.url # timeout=10
      [RELEASE] Reverting git working copy (reset --hard)

          [JENKINS-41596] artifactory release NPE on multi-module project

            eyalbe Eyal Ben Moshe
            dres1011 Andres March
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: