
|
Can not execute Sonar...
Hello Sonar users,
I'm trying out Sonar (v1.11) and sonar-maven-plugin (v1.0-beta-1). When executing "mvn clean verify sonar:sonar -e" on a multi-module project, build fails with stack trace as in [1]. Project aggregator module inherits corporate parent pom which in build plugins section defines maven-checkstyle-plugin (v2.3) with added dependency to corporate build-resources module, and in reporting plugins section configures maven-checkstyle0plugin to use corporate checkstyle configuration via configLocation property, as advised in maven-checkstyle-plugin's usage guide for sharing configuration in a multi-module project.
Am I doing something wrong here? Has anyone else experienced similar behavior? Are there any JIRA issues for this? Is there are workaround?
Regards, Stevo.
[1] maven build failure stack trace
[INFO] Executing sensor class org.sonar.plugins.cpd.CpdSensor [INFO] Executing sensor class org.sonar.plugins.checkstyle.CheckstyleSensor [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar
[INFO] ------------------------------------------------------------------------
[INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.batch.DefaultMavenPluginExecutor.execute(DefaultMavenPlugin Executor.java:45) at org.sonar.batch.core.SensorsExecutor.executeMavenPlugin(SensorsExecut
or.java:68) at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:58)
at org.sonar.batch.Batch.executeJobs(Batch.java:91) at org.sonar.batch.Batch.analyse(Batch.java:79)
at org.sonar.batch.Batch.start(Batch.java:54) at org.sonar.batch.Batch.start(Batch.java:50) at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:138) at org.sonar.batch.BatchMojo.execute(BatchMojo.java:130)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more [INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 27 seconds [INFO] Finished at: Sun Oct 18 15:50:50 CEST 2009 [INFO] Final Memory: 133M/508M [INFO] ------------------------------------------------------------------------
|

|
Re: Can not execute Sonar...
After running build up to install phase instead of verify, build was successful. Trying to find documentation why does sonar need project artifacts to be installed in a repository, why isn't it enough to have them available in build reactor. I'd be grateful If someone would point me to where this is explained.
Regards, Stevo. On Sun, Oct 18, 2009 at 4:11 PM, Stevo Slavić <sslavic@...> wrote:
Hello Sonar users,
I'm trying out Sonar (v1.11) and sonar-maven-plugin (v1.0-beta-1). When executing "mvn clean verify sonar:sonar -e" on a multi-module project, build fails with stack trace as in [1]. Project aggregator module inherits corporate parent pom which in build plugins section defines maven-checkstyle-plugin (v2.3) with added dependency to corporate build-resources module, and in reporting plugins section configures maven-checkstyle0plugin to use corporate checkstyle configuration via configLocation property, as advised in maven-checkstyle-plugin's usage guide for sharing configuration in a multi-module project.
Am I doing something wrong here? Has anyone else experienced similar behavior? Are there any JIRA issues for this? Is there are workaround?
Regards, Stevo.
[1] maven build failure stack trace
[INFO] Executing sensor class org.sonar.plugins.cpd.CpdSensor [INFO] Executing sensor class org.sonar.plugins.checkstyle.CheckstyleSensor [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar
[INFO] ------------------------------------------------------------------------
[INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.batch.DefaultMavenPluginExecutor.execute(DefaultMavenPlugin Executor.java:45) at org.sonar.batch.core.SensorsExecutor.executeMavenPlugin(SensorsExecut
or.java:68) at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:58)
at org.sonar.batch.Batch.executeJobs(Batch.java:91) at org.sonar.batch.Batch.analyse(Batch.java:79)
at org.sonar.batch.Batch.start(Batch.java:54) at org.sonar.batch.Batch.start(Batch.java:50) at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:138) at org.sonar.batch.BatchMojo.execute(BatchMojo.java:130)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more [INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 27 seconds [INFO] Finished at: Sun Oct 18 15:50:50 CEST 2009 [INFO] Final Memory: 133M/508M [INFO] ------------------------------------------------------------------------
|

|
Re: Re: Can not execute Sonar...
Hi Stevo, Could you please send the file target/sonar/sonar-pom.xml ? Executing the Maven install phase is not required by Sonar, so there should be a special Maven configuration which leads to this issue. Thanks for your help
Freddy 2009/10/18 Stevo Slavić <sslavic@...>
After running build up to install phase instead of verify, build was successful. Trying to find documentation why does sonar need project artifacts to be installed in a repository, why isn't it enough to have them available in build reactor. I'd be grateful If someone would point me to where this is explained.
Regards, Stevo.On Sun, Oct 18, 2009 at 4:11 PM, Stevo Slavić <sslavic@...> wrote:
Hello Sonar users,
I'm trying out Sonar (v1.11) and sonar-maven-plugin (v1.0-beta-1). When executing "mvn clean verify sonar:sonar -e" on a multi-module project, build fails with stack trace as in [1]. Project aggregator module inherits corporate parent pom which in build plugins section defines maven-checkstyle-plugin (v2.3) with added dependency to corporate build-resources module, and in reporting plugins section configures maven-checkstyle0plugin to use corporate checkstyle configuration via configLocation property, as advised in maven-checkstyle-plugin's usage guide for sharing configuration in a multi-module project.
Am I doing something wrong here? Has anyone else experienced similar behavior? Are there any JIRA issues for this? Is there are workaround?
Regards, Stevo.
[1] maven build failure stack trace
[INFO] Executing sensor class org.sonar.plugins.cpd.CpdSensor [INFO] Executing sensor class org.sonar.plugins.checkstyle.CheckstyleSensor [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar
[INFO] ------------------------------------------------------------------------
[INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.batch.DefaultMavenPluginExecutor.execute(DefaultMavenPlugin Executor.java:45) at org.sonar.batch.core.SensorsExecutor.executeMavenPlugin(SensorsExecut
or.java:68) at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:58)
at org.sonar.batch.Batch.executeJobs(Batch.java:91) at org.sonar.batch.Batch.analyse(Batch.java:79)
at org.sonar.batch.Batch.start(Batch.java:54) at org.sonar.batch.Batch.start(Batch.java:50) at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:138) at org.sonar.batch.BatchMojo.execute(BatchMojo.java:130)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more [INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 27 seconds [INFO] Finished at: Sun Oct 18 15:50:50 CEST 2009 [INFO] Final Memory: 133M/508M [INFO] ------------------------------------------------------------------------
|

|
Re: Re: Can not execute Sonar...
Seems this has already been reported here for a different version. Will try to create simple maven project that reproduces the issue. Regards, Stevo.
On Sun, Oct 18, 2009 at 10:20 PM, Freddy Mallet <freddy.mallet@...> wrote:
Hi Stevo,
Could you please send the file target/sonar/sonar-pom.xml ? Executing the Maven install phase is not required by Sonar, so there should be a special Maven configuration which leads to this issue.
Thanks for your help
Freddy
2009/10/18 Stevo Slavić <sslavic@...>
After running build up to install phase instead of verify, build was successful. Trying to find documentation why does sonar need project artifacts to be installed in a repository, why isn't it enough to have them available in build reactor. I'd be grateful If someone would point me to where this is explained.
Regards, Stevo.On Sun, Oct 18, 2009 at 4:11 PM, Stevo Slavić <sslavic@...> wrote:
Hello Sonar users,
I'm trying out Sonar (v1.11) and sonar-maven-plugin (v1.0-beta-1). When executing "mvn clean verify sonar:sonar -e" on a multi-module project, build fails with stack trace as in [1]. Project aggregator module inherits corporate parent pom which in build plugins section defines maven-checkstyle-plugin (v2.3) with added dependency to corporate build-resources module, and in reporting plugins section configures maven-checkstyle0plugin to use corporate checkstyle configuration via configLocation property, as advised in maven-checkstyle-plugin's usage guide for sharing configuration in a multi-module project.
Am I doing something wrong here? Has anyone else experienced similar behavior? Are there any JIRA issues for this? Is there are workaround?
Regards, Stevo.
[1] maven build failure stack trace
[INFO] Executing sensor class org.sonar.plugins.cpd.CpdSensor [INFO] Executing sensor class org.sonar.plugins.checkstyle.CheckstyleSensor [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar
[INFO] ------------------------------------------------------------------------
[INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.batch.DefaultMavenPluginExecutor.execute(DefaultMavenPlugin Executor.java:45) at org.sonar.batch.core.SensorsExecutor.executeMavenPlugin(SensorsExecut
or.java:68) at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:58)
at org.sonar.batch.Batch.executeJobs(Batch.java:91) at org.sonar.batch.Batch.analyse(Batch.java:79)
at org.sonar.batch.Batch.start(Batch.java:54) at org.sonar.batch.Batch.start(Batch.java:50) at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:138) at org.sonar.batch.BatchMojo.execute(BatchMojo.java:130)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more [INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 27 seconds [INFO] Finished at: Sun Oct 18 15:50:50 CEST 2009 [INFO] Final Memory: 133M/508M [INFO] ------------------------------------------------------------------------
|

|
Re: Re: Can not execute Sonar...
Hi Stevo, If you can provide this sample project, it would be a great help for us. Thanks in advance, Freddy
2009/10/24 Stevo Slavić <sslavic@...>
Seems this has already been reported here for a different version. Will try to create simple maven project that reproduces the issue.
Regards,
Stevo.
On Sun, Oct 18, 2009 at 10:20 PM, Freddy Mallet <freddy.mallet@...> wrote:
Hi Stevo,
Could you please send the file target/sonar/sonar-pom.xml ? Executing the Maven install phase is not required by Sonar, so there should be a special Maven configuration which leads to this issue.
Thanks for your help
Freddy
2009/10/18 Stevo Slavić <sslavic@...>
After running build up to install phase instead of verify, build was successful. Trying to find documentation why does sonar need project artifacts to be installed in a repository, why isn't it enough to have them available in build reactor. I'd be grateful If someone would point me to where this is explained.
Regards, Stevo.On Sun, Oct 18, 2009 at 4:11 PM, Stevo Slavić <sslavic@...> wrote:
Hello Sonar users,
I'm trying out Sonar (v1.11) and sonar-maven-plugin (v1.0-beta-1). When executing "mvn clean verify sonar:sonar -e" on a multi-module project, build fails with stack trace as in [1]. Project aggregator module inherits corporate parent pom which in build plugins section defines maven-checkstyle-plugin (v2.3) with added dependency to corporate build-resources module, and in reporting plugins section configures maven-checkstyle0plugin to use corporate checkstyle configuration via configLocation property, as advised in maven-checkstyle-plugin's usage guide for sharing configuration in a multi-module project.
Am I doing something wrong here? Has anyone else experienced similar behavior? Are there any JIRA issues for this? Is there are workaround?
Regards, Stevo.
[1] maven build failure stack trace
[INFO] Executing sensor class org.sonar.plugins.cpd.CpdSensor [INFO] Executing sensor class org.sonar.plugins.checkstyle.CheckstyleSensor [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar
[INFO] ------------------------------------------------------------------------
[INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.batch.DefaultMavenPluginExecutor.execute(DefaultMavenPlugin Executor.java:45) at org.sonar.batch.core.SensorsExecutor.executeMavenPlugin(SensorsExecut
or.java:68) at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:58)
at org.sonar.batch.Batch.executeJobs(Batch.java:91) at org.sonar.batch.Batch.analyse(Batch.java:79)
at org.sonar.batch.Batch.start(Batch.java:54) at org.sonar.batch.Batch.start(Batch.java:50) at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:138) at org.sonar.batch.BatchMojo.execute(BatchMojo.java:130)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more [INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 27 seconds [INFO] Finished at: Sun Oct 18 15:50:50 CEST 2009 [INFO] Final Memory: 133M/508M [INFO] ------------------------------------------------------------------------
|

|
Re: Re: Can not execute Sonar...
Example attached to the issue. Regards, Stevo. On Sat, Oct 24, 2009 at 6:07 PM, Freddy Mallet <freddy.mallet@...> wrote:
Hi Stevo,
If you can provide this sample project, it would be a great help for us.
Thanks in advance, Freddy
2009/10/24 Stevo Slavić <sslavic@...>
Seems this has already been reported here for a different version. Will try to create simple maven project that reproduces the issue.
Regards,
Stevo.
On Sun, Oct 18, 2009 at 10:20 PM, Freddy Mallet <freddy.mallet@...> wrote:
Hi Stevo,
Could you please send the file target/sonar/sonar-pom.xml ? Executing the Maven install phase is not required by Sonar, so there should be a special Maven configuration which leads to this issue.
Thanks for your help
Freddy
2009/10/18 Stevo Slavić <sslavic@...>
After running build up to install phase instead of verify, build was successful. Trying to find documentation why does sonar need project artifacts to be installed in a repository, why isn't it enough to have them available in build reactor. I'd be grateful If someone would point me to where this is explained.
Regards, Stevo.On Sun, Oct 18, 2009 at 4:11 PM, Stevo Slavić <sslavic@...> wrote:
Hello Sonar users,
I'm trying out Sonar (v1.11) and sonar-maven-plugin (v1.0-beta-1). When executing "mvn clean verify sonar:sonar -e" on a multi-module project, build fails with stack trace as in [1]. Project aggregator module inherits corporate parent pom which in build plugins section defines maven-checkstyle-plugin (v2.3) with added dependency to corporate build-resources module, and in reporting plugins section configures maven-checkstyle0plugin to use corporate checkstyle configuration via configLocation property, as advised in maven-checkstyle-plugin's usage guide for sharing configuration in a multi-module project.
Am I doing something wrong here? Has anyone else experienced similar behavior? Are there any JIRA issues for this? Is there are workaround?
Regards, Stevo.
[1] maven build failure stack trace
[INFO] Executing sensor class org.sonar.plugins.cpd.CpdSensor [INFO] Executing sensor class org.sonar.plugins.checkstyle.CheckstyleSensor [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar
[INFO] ------------------------------------------------------------------------
[INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.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:6 0) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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(DefaultPlugi nManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.batch.DefaultMavenPluginExecutor.execute(DefaultMavenPlugin Executor.java:45) at org.sonar.batch.core.SensorsExecutor.executeMavenPlugin(SensorsExecut
or.java:68) at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:58)
at org.sonar.batch.Batch.executeJobs(Batch.java:91) at org.sonar.batch.Batch.analyse(Batch.java:79)
at org.sonar.batch.Batch.start(Batch.java:54) at org.sonar.batch.Batch.start(Batch.java:50) at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:138) at org.sonar.batch.BatchMojo.execute(BatchMojo.java:130)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more [INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 27 seconds [INFO] Finished at: Sun Oct 18 15:50:50 CEST 2009 [INFO] Final Memory: 133M/508M [INFO] ------------------------------------------------------------------------
|