I forgot to mention that i am using the "freestyle" project's maven builder. Apart from that i am using a newly installed jenkins with the newest version (1.492). So all i did was:

  • Installing "Jenkins" (1.492)
  • Installing "Config File Provider Plugin" (2.3)
  • Creating a "Maven settings.xml" configuration ("MySettings")
  • Creating a new "Freestyle Software Project" ("Test")
  • Adding a "Invoke top-level Maven targets" build step
  • Clicking the "Advanced..." button to reveal more settings
  • Selecting "provided settings.xml" file in "Settings file"
  • Selecting the former created "MySettings" configuration in "Provided Settings"

Running this job worked and i know the maven builder used the provided settings.xml, because it would not have worked otherwise (i added a server configuration for the deployment of artifacts). But as soon as i reopened the project configuration and clicked on "Save", the provided settings were lost! Thus the job failed due to the missing configuration AND i found out that any reference to the "MySettings" configuration was removed from "config.xml". The "settingsConfigId" element was still there, but it was empty!

This is a snippet of config.xml when i created the job and everything was fine:

<builders>
    <hudson.tasks.Maven>
      <targets>clean install</targets>
      <mavenName>maven-3.0.4</mavenName>
      <usePrivateRepository>false</usePrivateRepository>
      <settings class="org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider" plugin="config-file-provider@2.3">
        <settingsConfigId>org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig1354471384133</settingsConfigId>
      </settings>
      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
    </hudson.tasks.Maven>
  </builders>

And this happened AFTER i reopened it and saved it again (i did not change anything by the way, just clicked on "Save"):

<builders>
    <hudson.tasks.Maven>
      <targets>clean install</targets>
      <mavenName>maven-3.0.4</mavenName>
      <usePrivateRepository>false</usePrivateRepository>
      <settings class="org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider" plugin="config-file-provider@2.3">
        <settingsConfigId></settingsConfigId>
      </settings>
      <globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
    </hudson.tasks.Maven>
  </builders>

I also created a "Maven 2/3 Project" - which i cannot use in my context by the way - and here the same settings were NOT lost after reopening and saving! So it might have something to do with the freestyle software project.

I hope i cleared things up a bit and did not do something stupid, as i am new to jenkins. And thank you for fast response!

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to