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

Copying a job doesn't update rootModule

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: Linux
    • Similar Issues:

      Description

      I wanted to make a New Job with similar settings to an existing one, so I used
      the "Copy existing job" and changed the settings for the new job.

      Trying to build this new project made Hudson fail with a NullPointerException
      when trying to find the root module.

      Looking in the config.xml file, I see that it still refers to the old project in
      the <rootModule> element. This doesn't appear anywhere on the web config page.

        Attachments

          Activity

          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          I think I fixed this in 1.110, but it's not obvious to me why the scenario you
          explained to me would cause your problem.

          If you could check the latest snapshot, that would be great. Or if you have the
          complete stack trace of NPE, that would be also very helpful.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - I think I fixed this in 1.110, but it's not obvious to me why the scenario you explained to me would cause your problem. If you could check the latest snapshot, that would be great. Or if you have the complete stack trace of NPE, that would be also very helpful.
          Hide
          tal tal added a comment -

          I've just upgraded to 109 (but not trunk) and reproduced it:

          1. I created a new job.
          2. I used the Copy feature to copy an existing one (I'm trying to break a large
          build into smaller sub-modules).
          3. I edited the remote svnroot to the new location (sub-directory) and changed
          the root pom to 'pom.xml'.
          4. Saved.

          At this point, Hudson tried to check out everything from the old svn location. I
          did "Reload Configuration from Disk" (even though I hadn't edited anything
          manually) and started the build again and this time it got it from the right place.

          After checking it all out and listing the maven sub-modules correctly, the
          console output page showed this error:

          ERROR: Processing failed due to a bug in the code. Please report thus to
          users@hudson.dev.java.net
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:559)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132)
          at hudson.model.Executor.run(Executor.java:59)
          FATAL: null
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:559)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132)
          at hudson.model.Executor.run(Executor.java:59)

          The config.xml has:

          <rootModule>
          <groupId>org.gria</groupId>
          <artifactId>base</artifactId>
          </rootModule>

          This is the root of the job I copied, not the new one.

          Show
          tal tal added a comment - I've just upgraded to 109 (but not trunk) and reproduced it: 1. I created a new job. 2. I used the Copy feature to copy an existing one (I'm trying to break a large build into smaller sub-modules). 3. I edited the remote svnroot to the new location (sub-directory) and changed the root pom to 'pom.xml'. 4. Saved. At this point, Hudson tried to check out everything from the old svn location. I did "Reload Configuration from Disk" (even though I hadn't edited anything manually) and started the build again and this time it got it from the right place. After checking it all out and listing the maven sub-modules correctly, the console output page showed this error: ERROR: Processing failed due to a bug in the code. Please report thus to users@hudson.dev.java.net java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:559) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132) at hudson.model.Executor.run(Executor.java:59) FATAL: null java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:230) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:559) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:132) at hudson.model.Executor.run(Executor.java:59) The config.xml has: <rootModule> <groupId>org.gria</groupId> <artifactId>base</artifactId> </rootModule> This is the root of the job I copied, not the new one.
          Hide
          tal tal added a comment -

          I still get the same problem with 115.

          The job's config.xml says:

          <rootModule>
          <groupId>...old group...</groupId>
          <artifactId>...old artifact ID...</artifactId>
          </rootModule>

          When I try to build, I get:

          Parsing POMs
          ERROR: Processing failed due to a bug in the code. Please report thus to
          users@hudson.dev.java.net
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:562)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133)
          at hudson.model.Executor.run(Executor.java:59)
          FATAL: null
          java.lang.NullPointerException
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127)
          at hudson.model.Run.run(Run.java:562)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133)
          at hudson.model.Executor.run(Executor.java:59)

          Show
          tal tal added a comment - I still get the same problem with 115. The job's config.xml says: <rootModule> <groupId>...old group...</groupId> <artifactId>...old artifact ID...</artifactId> </rootModule> When I try to build, I get: Parsing POMs ERROR: Processing failed due to a bug in the code. Please report thus to users@hudson.dev.java.net java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:562) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133) at hudson.model.Executor.run(Executor.java:59) FATAL: null java.lang.NullPointerException at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:231) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:127) at hudson.model.Run.run(Run.java:562) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:133) at hudson.model.Executor.run(Executor.java:59)
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Should be fixed for 1.117. If you can try the latest snapshot, that would be great.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Should be fixed for 1.117. If you can try the latest snapshot, that would be great.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tal tal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: