Quantcast

[sonar-dev] Problem when I want to analyse a plugin in SONAR

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] Problem when I want to analyse a plugin in SONAR

David François

Hi all,

 

I have a strange problem when i want to build and analyse a SONAR plugin (in my case, sonar-comparing-plugin).

When I run “mvn clean install” and then “mvn sonar:sonar”, all work fine.

But if I run “mvn clean install sonar:sonar”, I have this stacktrace :

 

[INFO] [enforcer:enforce {execution: enforce}]

[WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message:

Some plugins are missing valid versions:(LATEST RELEASE SNAPSHOT are not allowed )

org.codehaus.mojo:sonar-maven-plugin.   The version currently in use is 1.0-beta-2

Build reproducibility : always define plugin versions!

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

[INFO] ------------------------------------------------------------------------

[INFO] Trace

org.apache.maven.lifecycle.LifecycleExecutionException: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)

        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

        at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:224)

        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)

 

        ... 17 more

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 6 seconds

[INFO] Finished at: Fri Aug 10 17:54:26 CEST 2012

[INFO] Final Memory: 47M/3925M

[INFO] ------------------------------------------------------------------------

 

Someone has already faced this problem?

I have seen this thread : http://sonar.15.n6.nabble.com/sonar-dev-Enforcer-rules-issue-td4999073.html which talk about this but I want to understand why I have this error

 

Regards,

David FRANCOIS


Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Problem when I want to analyse a plugin in SONAR

Simon Brandhof
Hi David,

The enforcer plugin is enabled on builds and checks that all the versions of maven plugins are defined. Because the version of sonar-m-p is not defined, you have to add -Denforcer.skip=true when analyzing a sonar plugin.

Regards

On 10 August 2012 18:03, Francois, David <[hidden email]> wrote:

Hi all,

 

I have a strange problem when i want to build and analyse a SONAR plugin (in my case, sonar-comparing-plugin).

When I run “mvn clean install” and then “mvn sonar:sonar”, all work fine.

But if I run “mvn clean install sonar:sonar”, I have this stacktrace :

 

[INFO] [enforcer:enforce {execution: enforce}]

[WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message:

Some plugins are missing valid versions:(LATEST RELEASE SNAPSHOT are not allowed )

org.codehaus.mojo:sonar-maven-plugin.   The version currently in use is 1.0-beta-2

Build reproducibility : always define plugin versions!

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

[INFO] ------------------------------------------------------------------------

[INFO] Trace

org.apache.maven.lifecycle.LifecycleExecutionException: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)

        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

        at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:224)

        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)

        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)

 

        ... 17 more

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 6 seconds

[INFO] Finished at: Fri Aug 10 17:54:26 CEST 2012

[INFO] Final Memory: 47M/3925M

[INFO] ------------------------------------------------------------------------

 

Someone has already faced this problem?

I have seen this thread : http://sonar.15.n6.nabble.com/sonar-dev-Enforcer-rules-issue-td4999073.html which talk about this but I want to understand why I have this error

 

Regards,

David FRANCOIS


Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



--

Simon BRANDHOF | SonarSource
http://sonarsource.com

Loading...