Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No plugin found for prefix 'sonar' in the current project and in the plugin groups Error

Everything was working fine till yesterday with Jenkins and Sonar (using Maven). Suddenly I saw below error in Jenkins logs and build fails for all projects with the same error.

[ERROR] No plugin found for prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/user/mysys/.m2/repository), nexus (http://localhost:8081/nexus/content/groups/public)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/user/mysys/.m2/repository), nexus (http://localhost:8081/nexus/content/groups/public)]
    at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:94)
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

I have sonar running and sonar plugin installed in Jenkins.

What could be the issue. Can any one help me on this regard.

like image 970
Venkat Avatar asked Sep 12 '13 07:09

Venkat


2 Answers

I've the same problem since this morning .I didn't make any changes on my conf. I found a solution , on Jenkins : Manage Jenkins -> Configure System -> Sonar -> Advanced -> Version of sonar-maven-plugin , i put 2.1 and all my projects work fine now, weird ...

like image 120
Bigoudenus Avatar answered Sep 25 '22 02:09

Bigoudenus


Same here. I've defined the plugin in pom (so we can also run sonar locally)

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>2.1</version>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
like image 33
user2776302 Avatar answered Sep 23 '22 02:09

user2776302