Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.1
-
Labels:None
-
Environment:Jenkins 1.427 (maven-plugin) / Sonar
-
Number of attachments :
Description
Since version 1.427 the jenkins maven-plugin supports the resolving of alternate settings.xml via the config-file-provider-plugin: https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin
Since the sonar-plugin should work with the same settings as the maven-plugin, it should use the same logic to get hold of the alternate settings.xml.
This is valid for the alternate settings.xml and the global settings.xml:
- hudson.maven.MavenModuleSet.globalSettingConfigId
- hudson.maven.MavenModuleSet.globalSettingConfigPath
and uses this dependency:
<dependency>
<groupId>org.jenkins-ci.lib</groupId>
<artifactId>config-provider-model</artifactId>
<version>1.0</version>
</dependency>
...its also described at: https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin
Issue Links
- relates to
-
SONARJNKNS-42
Sonar Hudson plugin handling of alternate settings.xml is broken after changes in Hudson maven plugin
-
Jenkins 1.491 introduces two new extension points (relaxing the dependency to the plugin) to configure user settings.xml and global settings.xml on a MavenProject and/or a MavenBuild step:
jenkins.mvn.SettingsProvider
jenkins.mvn.GlobalSettingsProvider
the configured values for a project are available via:
hudson.maven.MavenModuleSet.getSettings()
hudson.maven.MavenModuleSet.getGlobalSettings()
and
hudson.tasks.Maven.getSettings()
hudson.tasks.Maven.getGlobalSettings()