2
votes

I am trying sonar 5.0 with jdk 1.8 .

With Sonar 5.0 I am getting following error for two jenkin version

Jenkins ver. 1.583

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project com.ciphercloud.root.core.grp: Unable to register extension com.villagechief.sonar.salesforce.sftest.SFTestSensor: Lorg/apache/commons/configuration/Configuration;: org.apache.commons.configuration.Configuration -> [Help 1]

Jenkins ver. 1.580.3 [ERROR] Plugin org.codehaus.mojo:sonar-maven-plugin:2.9 or one of its dependencies could not be resolved: Failure to find org.codehaus.mojo:sonar-maven-plugin:jar:2.9 in http://172.16.16.86:9081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]

Is this issue also you are resolving ? If we have known work around to resolve this please suggest.

Thanks in adv for any suggestion in this regard.

Thanks and Regards, Prem

1
I updated to sonar 5.0 but getting following error [ERROR] Failed to execute goal org.codehaus.sonar:sonar-maven-plugin:5.0:sonar (default-cli) on project com.ciphercloud.root: Please update sonar-maven-plugin to at least version 2.3 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.sonar:sonar-maven-plugin:5.0:sonar (default-cli) on project com.ciphercloud.root: Please update sonar-maven-plugin to at least version 2.3 - Prem Kumar Subudhi
With 2.6 latest error : [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project com.ciphercloud.root: Unable to register extension com.villagechief.sonar.salesforce.sftest.SFTestSensor: Lorg/apache/commons/configuration/Configuration;: org.apache.commons.configuration.Configuration org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project com.ciphercloud.root: Unable to register extension com.villagechief.sonar.salesforce.sftest.SFTestSensor - Prem Kumar Subudhi
I have an update. Re attempted to run with sonar 5.1 through command line, this time the report gets generated, but with an issue I encountered in Unit test coverage is showing as "-" instead of value. Unit test is shown as expected. Any suggestion on getting the unit test coverage is help to us - Prem Kumar Subudhi

1 Answers

2
votes

Try setting the plugin version explicitly to match your sonar server version by including the following in your <pluginManagement> section:

<dependency>
    <groupId>org.codehaus.sonar</groupId>
    <artifactId>sonar-maven-plugin</artifactId>
    <version>5.0</version>
</dependency>