SonarQube Jenkins
  1. SonarQube Jenkins
  2. SONARJNKNS-151

use same logic as maven-plugin to resolve alternate settings.xml

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Labels:
      None
    • Environment:
      Jenkins 1.427 (maven-plugin) / Sonar
    • Number of attachments :
      0

      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

          Activity

          Hide
          Dominik Bartholdi added a comment - - edited

          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()

          Show
          Dominik Bartholdi added a comment - - edited 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()
          Hide
          Julien HENRY added a comment -

          To properly deal with this issue I had to upgrade to 1.491 that is higher than latest LTS.

          Show
          Julien HENRY added a comment - To properly deal with this issue I had to upgrade to 1.491 that is higher than latest LTS.
          Hide
          Fabrice Bellingard added a comment -

          Tested!

          Show
          Fabrice Bellingard added a comment - Tested!

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Dominik Bartholdi
            • Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: