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

NPE from MavenSiteArchiver.getModulePath

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • maven-plugin
    • Linux RHEL 5, JVM 64bits by Oracle, Maven 3.0.4, Checkstyle, PMD, Active

    Description

      We have a job that do few static analisys (PMD, Findbugs, checkstyle) that are enabled when "site" goal is active.

      After upgrading to 1.563 the jobs with "site" goal defined stop working with a NPE.

      Attached the complete stacktrace !

      Attachments

        Activity

          There is a workaround for this issue: Deactivate Maven site achiving in the Jenkins Maven build options (Build->Advanced->Disable automatic site documentation artifact archiving).
          Nevertheless this is of course quite nasty since it removes functionality from Jenkins (namely site archiving).

          camann9 Christian Amann added a comment - There is a workaround for this issue: Deactivate Maven site achiving in the Jenkins Maven build options (Build->Advanced->Disable automatic site documentation artifact archiving). Nevertheless this is of course quite nasty since it removes functionality from Jenkins (namely site archiving).

          Hi Christian,
          thanks for the tip. It work very well for me.

          jschaefer Johannes Schaefer added a comment - Hi Christian, thanks for the tip. It work very well for me.
          pic Aldric Berges added a comment -

          Hi,

          We are having the same issue on our projects.

          The workaround did the trick.
          Of course, sites are no more archived.

          Environment :

          • Jenkins ver. 1.590
          • Maven 3.0.5
          pic Aldric Berges added a comment - Hi, We are having the same issue on our projects. The workaround did the trick. Of course, sites are no more archived. Environment : Jenkins ver. 1.590 Maven 3.0.5

          We are also having the same issue. Workaround 'Disable automatic site documentation artifact archiving' succeeds the build. But we also want the site archiving feature in our builds

          Jenkins v1.598.

          subwiz Subhash Chandran added a comment - We are also having the same issue. Workaround 'Disable automatic site documentation artifact archiving' succeeds the build. But we also want the site archiving feature in our builds Jenkins v1.598.
          mgrafl Michael Grafl added a comment -

          This often happens if the master project (aka. root project) is not the parent project.

          For example:

          master.pom (has parent.pom as its parent)
          `-- parent.pom
          `-- module1.pom (has parent.pom as its parent)
          

          The MavenSiteArchiver goes up the pom hierarchy until it finds the root project:

                  MavenProject currentLevel = pom;
                  // build the path to the module by ascending to the parent pom until the root project
                  while (!rootArtifactId.equals(currentLevel.getArtifactId())) {
                      path = currentLevel.getArtifactId() + File.separator + path;
                      currentLevel = currentLevel.getParent();
                  }
          

          So, eventually, currentLevel.getParent() will return null.

          mgrafl Michael Grafl added a comment - This often happens if the master project (aka. root project) is not the parent project. For example: master.pom (has parent.pom as its parent) `-- parent.pom `-- module1.pom (has parent.pom as its parent) The MavenSiteArchiver goes up the pom hierarchy until it finds the root project: MavenProject currentLevel = pom; // build the path to the module by ascending to the parent pom until the root project while (!rootArtifactId.equals(currentLevel.getArtifactId())) { path = currentLevel.getArtifactId() + File.separator + path; currentLevel = currentLevel.getParent(); } So, eventually, currentLevel.getParent() will return null .

          People

            Unassigned Unassigned
            habj herlani junior
            Votes:
            14 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated: