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

POM location is deleted when changing Maven top-level target

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • None
    • Jenkins 1.6.10
      Configuration Slicing Plugin 1.40

      I noticed that setting the Maven top-level target for a job deletes the job's POM location setting.

      I can reproduce this as follows:

      1. There's a freestyle project with a Maven Build step. The Goals are "clean verify", the POM location is "myproject-parent/pom.xml".
      2. Change the Maven goal with the Configuration Slicing Plugin to "clean package"

      Result:
      The POM location is empty.

          [JENKINS-29093] POM location is deleted when changing Maven top-level target

          Alex Java added a comment -

          I think all data corruption bugs should have "critical" priority. it's one thing when data is not updated / ignored, but it's much worse when plugin can erase/damage existing data.

          Alex Java added a comment - I think all data corruption bugs should have "critical" priority. it's one thing when data is not updated / ignored, but it's much worse when plugin can erase/damage existing data.

          Code changed in jenkins
          User: Michael Donohue
          Path:
          .project
          pom.xml
          src/main/java/configurationslicing/executeshell/MavenTargetsSlicer.java
          http://jenkins-ci.org/commit/configurationslicing-plugin/120e5ee47bfdb1551755fbcd831a979159cc9071
          Log:
          Copy all existing maven config values to newly created builder

          JENKINS-29093 The Maven top-level target slicer was trying to be
          careful about the maven installation version used, but this ends up
          breaking other maven settings when the default maven installation is used.

          The fix is to copy the config values if we have an old maven builder,
          regardless of whether it has a maven installation version set.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Donohue Path: .project pom.xml src/main/java/configurationslicing/executeshell/MavenTargetsSlicer.java http://jenkins-ci.org/commit/configurationslicing-plugin/120e5ee47bfdb1551755fbcd831a979159cc9071 Log: Copy all existing maven config values to newly created builder JENKINS-29093 The Maven top-level target slicer was trying to be careful about the maven installation version used, but this ends up breaking other maven settings when the default maven installation is used. The fix is to copy the config values if we have an old maven builder, regardless of whether it has a maven installation version set.

          mdonohue added a comment -

          Released in the 1.44 version of configurationslicing

          mdonohue added a comment - Released in the 1.44 version of configurationslicing

          POM location is no longer deleted with version 1.44. Thanks a lot

          Arend v. Reinersdorff added a comment - POM location is no longer deleted with version 1.44. Thanks a lot

            mdonohue mdonohue
            arend_von_reinersdorff Arend v. Reinersdorff
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: