Sonarqube maven plugin, relocation warning

Hi,

since we are working with the latest version of Sonarqube Enterprise, I gave the recommendation to not enter the plugin configuration in the pom in order to always use the latest version of the Sonar Maven plugin - currently 4.0.0.4121

The maven build log has this warning
[WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:jar:4.0.0.4121 has been relocated to org.sonarsource.scanner.maven:sonar-maven-plugin:jar:4.0.0.4121: SonarQube plugin was moved to SonarSource organisation

According to java - Why sonar-maven-plugin-3.0.1.jar cannot be found when executing sonar:sonar? - Stack Overflow

it should be sufficient to use Maven 3.x , we’re using Maven 3.9.7 right now.

Is there something to be done or may this warning be safely ignored !?

Gilbert

To get rid of this warning i’ve added the pluginGroup to the maven settings.xml used in Jenkins like that

<?xml version="1.0" encoding="UTF-8" ?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <pluginGroups>
    <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
  </pluginGroups>  
[...]
</settings>

and it works.
So i guess it’s recommended to add the pluginGroup in the maven settings.xml ?

Hi,

Actually, it used to be the recommendation to float on the latest. But that changed quietly. Now:

If sonar-maven-plugin is not defined by the project’s pom.xml file, we recommend specifying the version instead of using the latest to avoid breaking changes at an unwanted time.

 
Ann

Hi Ann,

of course you are right. Especially, when it comes to the next Maven major version - Maven 4.0.0 is in beta - I would be more careful than usual.

Gilbert