beeb50564e
Allows you to explicitly set which sonar configuration to use for the sonar analysis when having more than one sonar installation. In this case you are required to select which one to use, as there is no default fallback in the Jenkins plugin itself. Also added a similar option for configuring the maven installation to use. This does have a default value, the version used in the maven build in the same job. However, if for some reason you need a different version of maven for sonar analysis you have to be able to configure which one. Adds parameter installation-name for the sonar configuration, and maven-installation-name for the maven configuration. Change-Id: I013ea80688efa17334448e6394d312ca6854cf07
28 lines
1.2 KiB
XML
28 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<project>
|
|
<publishers>
|
|
<hudson.plugins.sonar.SonarPublisher plugin="sonar">
|
|
<installationName>MySonar</installationName>
|
|
<jdk>MyJdk</jdk>
|
|
<mavenInstallationName>Maven3.3.3</mavenInstallationName>
|
|
<branch>myBranch</branch>
|
|
<language>java</language>
|
|
<rootPom>mypom.xml</rootPom>
|
|
<usePrivateRepository>true</usePrivateRepository>
|
|
<mavenOpts>-DskipTests</mavenOpts>
|
|
<jobAdditionalProperties>-DsonarHostURL=http://example.com/</jobAdditionalProperties>
|
|
<triggers>
|
|
<skipScmCause>true</skipScmCause>
|
|
<skipUpstreamCause>true</skipUpstreamCause>
|
|
<envVar>SKIP_SONAR</envVar>
|
|
</triggers>
|
|
<settings class="org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider">
|
|
<settingsConfigId>org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012</settingsConfigId>
|
|
</settings>
|
|
<globalSettings class="org.jenkinsci.plugins.configfiles.maven.job.MvnGlobalSettingsProvider">
|
|
<settingsConfigId>org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig0123456789012</settingsConfigId>
|
|
</globalSettings>
|
|
</hudson.plugins.sonar.SonarPublisher>
|
|
</publishers>
|
|
</project>
|