views:

56

answers:

0

I'm wondering how the development of this plugin is going? I've tried to build the plugin from source (https://svn.codehaus.org/sonar-plugins/trunk/groovyGMNarc) but get get it running within my project. I can install the plugin on Sonar but it fails to run against my Maven project.

I get the following error

[INFO] [sonar-core:internal {execution: default-internal}]
[INFO]  Database dialect class org.sonar.api.database.dialect.MySql
[INFO]  -------------  Analyzing Unnamed - example:my-app:war:1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Can not analyze the project
Cannot stop.  Current container state was: CONSTRUCTED
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
 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: Can not execute Sonar
 at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87)
 at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
 at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117)
 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
 ... 17 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not analyze the project
 at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:143)
 at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:122)
 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
 at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
 ... 21 more
Caused by: java.lang.IllegalStateException: Cannot stop.  Current container state was: CONSTRUCTED
 at org.picocontainer.lifecycle.DefaultLifecycleState.stopping(DefaultLifecycleState.java:72)
 at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:772)
 at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:777)
 at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:777)
 at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:77)
 at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:140)
 ... 24 more