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

Pre/postbuild Maven task loses settings configuration on save

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None

      When attempting to set the Settings file or Global Settings file for a Invoke top-level Maven target pre or post-build step, the selected value is never persisted to the job config.xml.

      Regardless of what setting I select, I always end up with the following stanza in my config.xml:

        <prebuilders>
          <hudson.tasks.Maven>
            <targets>clean package antrun:run</targets>
            <mavenName>sys-mvn-3.0.4</mavenName>
            <pom>../db-conf/pom.xml</pom>
            <usePrivateRepository>true</usePrivateRepository>
            <settings class="jenkins.mvn.DefaultSettingsProvider"/>
            <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
          </hudson.tasks.Maven>
        </prebuilders>
      

      If I modify it to the correct configuration as follows

        <prebuilders>
          <hudson.tasks.Maven>
            <targets>clean package antrun:run</targets>
            <mavenName>sys-mvn-3.0.4</mavenName>
            <pom>../db-conf/pom.xml</pom>
            <usePrivateRepository>true</usePrivateRepository>
            <settings class="org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider" plugin="config-file-provider@2.5.1">
              <settingsConfigId>org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1371233015754</settingsConfigId>
            </settings>
            <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
          </hudson.tasks.Maven>
        </prebuilders>
      

      The job works as expected but will revert to the default provider if I resave the configuration (in the event I need to make additional changes).

          [JENKINS-18359] Pre/postbuild Maven task loses settings configuration on save

          There are no comments yet on this issue.

            Unassigned Unassigned
            tke Phil Davies
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: