Can not execute Sonar: Fail to decorate - maven-plugin

I installed a sonar server on my own pc (Windows XP), and I deployed sonar on Tomcat with a MySQL database.
I successfully analysed an old project. But with my current project, I get this exception when trying to execute mvn sonar:sonar:
EDIT:
[INFO] [14:39:37.254] Sensor CoberturaSensor done: 218 ms
[INFO] [14:39:37.254] Sensor Maven dependencies...
[INFO] [14:39:41.426] Sensor Maven dependencies done: 4172 ms
[INFO] [14:39:41.848] Execute decorators...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:53.354s
[INFO] Finished at: Tue May 15 14:39:43 CEST 2012
[INFO] Final Memory: 21M/138M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (d
efault-cli) on project XXX: Can not execute Sonar: Fail to decorate 'com.myPackage
.myClass': 793 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXX: Can
not execute Sonar
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'com.myPackage.myClass
'
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(Decorators
Executor.java:84)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:70)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:63)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(Decorators
Executor.java:63)
at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.
java:55)
at org.sonar.batch.phases.Phases.execute(Phases.java:94)
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:14
3)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:109)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:59)
at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:143)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
... 23 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 793
at org.sonar.plugins.core.timemachine.tracking.HashedSequenceComparator.
equals(HashedSequenceComparator.java:34)
at org.sonar.plugins.core.timemachine.ViolationTrackingBlocksRecognizer.
computeLengthOfMaximalBlock(ViolationTrackingBlocksRecognizer.java:48)
at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.mapViol
ations(ViolationTrackingDecorator.java:130)
at org.sonar.plugins.core.timemachine.ViolationTrackingDecorator.decorat
e(ViolationTrackingDecorator.java:70)
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(Decorators
Executor.java:79)
... 39 more
I don't understand where the problem comes from. Please anyone have an answer? Can it come from my POM configuration?
PS: the command lines mvn clean install and mvn site work correctly...

You're facing a bug of Sonar 3.0 (=> http://jira.codehaus.org/browse/SONAR-3442). We have release Sonar 3.0.1 (see http://www.sonarsource.org/downloads/) that fixes this issue.

Related

Javascript build fails

I tried to do a javascript build with an existing working project but it gives me a build error like below, any idea ?
The project is working for Android and IOS, I did the build without any changes of settings or whatever
Full stack Trace :
Executing: /home/ec2-user/jdk1.8.0_45/bin/java -Dretrolambda.inputDir=/tmp/build4395325875721494407xxx/tmpClasses -Dretrolambda.classpath=/tmp/build4395325875721494407xxx/tmpClasses:/tmp/temp6791530583283105825.jar -Dretrolambda.outputDir=/tmp/build4395325875721494407xxx/tmpClasses_retrolamda -Dretrolambda.bytecodeVersion=49 -jar /tmp/temp3309944789126593083.jar Retrolambda 2.0.3
Bytecode version: 49 (Java 5)
Default methods: false
Input directory: /tmp/build4395325875721494407xxx/tmpClasses
Output directory: /tmp/build4395325875721494407xxx/tmpClasses_retrolamda
Classpath: /tmp/build4395325875721494407xxx/tmpClasses:/tmp/temp6791530583283105825.jar
Executing: /home/ec2-user/javascript/apache-maven-3.2.5/bin/mvn -e clean package [INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for nl.aalease.apps:Main:war:1.0
[WARNING] 'dependencies.dependency.systemPath' for ca.weblite:codename1-core:jar should not point at files within the project directory, ${basedir}/lib/CodenameOne.jar will be unresolvable by dependent projects # line 24, column 25
[WARNING] 'dependencies.dependency.systemPath' for ca.weblite:codename1-factory:jar should not point at files within the project directory, ${basedir}/lib/Factory.jar will be unresolvable by dependent projects # line 32, column 25
[WARNING] 'dependencies.dependency.systemPath' for ca.weblite:codename1-core-hello:jar should not point at files within the project directory, ${basedir}/lib/app.jar will be unresolvable by dependent projects # line 40, column 25
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Main 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # Main ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # Main ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # Main ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 50 source files to /tmp/build4395325875721494407xxx/target/classes
[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/impl/html5/Stub.java: /tmp/build4395325875721494407xxx/src/main/java/com/codename1/impl/html5/Stub.java uses or overrides a deprecated API.
[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/impl/html5/Stub.java: Recompile with -Xlint:deprecation for details.
[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/teavm/ext/localforage/LocalForage.java: Some input files use unchecked or unsafe operations.
[WARNING] /tmp/build4395325875721494407xxx/src/main/java/com/codename1/teavm/ext/localforage/LocalForage.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # Main ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /tmp/build4395325875721494407xxx/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # Main ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # Main ---
[INFO] No tests to run.
[INFO]
[INFO] --- teavm-maven-plugin:0.3.0-cn1-039:build-javascript (web-client) # Main ---
[INFO] Preparing classpath for JavaScript generation
[INFO] Using the following classpath for JavaScript generation: /tmp/build4395325875721494407xxx/lib/CodenameOne.jar:/tmp/build4395325875721494407xxx/lib/Factory.jar:/tmp/build4395325875721494407xxx/lib/app.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-classlib/0.3.0-cn1-039/teavm-classlib-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-platform/0.3.0-cn1-039/teavm-platform-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-core/0.3.0-cn1-039/teavm-core-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/ec2-user/.m2/repository/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.jar:/home/ec2-user/.m2/repository/com/carrotsearch/hppc/0.6.1/hppc-0.6.1.jar:/home/ec2-user/.m2/repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/home/ec2-user/.m2/repository/com/jcraft/jzlib/1.1.3/jzlib-1.1.3.jar:/home/ec2-user/.m2/repository/joda-time/joda-time/2.7/joda-time-2.7.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-jso/0.3.0-cn1-039/teavm-jso-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/org/teavm/teavm-dom/0.3.0-cn1-039/teavm-dom-0.3.0-cn1-039.jar:/home/ec2-user/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/home/ec2-user/.m2/repository/org/mitre/dsmiley/httpproxy/smiley-http-proxy-servlet/1.6/smiley-http-proxy-servlet-1.6.jar:/home/ec2-user/.m2/repository/org/apache/httpcomponents/httpclient/4.3.4/httpclient-4.3.4.jar:/home/ec2-user/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/ec2-user/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/ec2-user/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar:/tmp/build4395325875721494407xxx/target/classes
[INFO] Building JavaScript file
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:16 min
[INFO] Finished at: 2016-02-09T05:28:02-05:00
[INFO] Final Memory: 17M/839M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-039:build-javascript (web-client) on project Main: Unexpected error occured: -1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.teavm:teavm-maven-plugin:0.3.0-cn1-039:build-javascript (web-client) on project Main: Unexpected error occured
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unexpected error occured
at org.teavm.maven.BuildJavascriptMojo.execute(BuildJavascriptMojo.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(ArrayList.java:400)
at java.util.ArrayList.get(ArrayList.java:413)
at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2035)
at org.teavm.javascript.Renderer.visit(Renderer.java:931)
at org.teavm.javascript.ast.ConditionalStatement.acceptVisitor(ConditionalStatement.java:48)
at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2035)
at org.teavm.javascript.Renderer.visit(Renderer.java:1059)
at org.teavm.javascript.ast.BlockStatement.acceptVisitor(BlockStatement.java:34)
at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2032)
at org.teavm.javascript.Renderer.visit(Renderer.java:1059)
at org.teavm.javascript.ast.BlockStatement.acceptVisitor(BlockStatement.java:34)
at org.teavm.javascript.Renderer.visitStatements(Renderer.java:2032)
at org.teavm.javascript.Renderer.visit(Renderer.java:910)
at org.teavm.javascript.ast.SequentialStatement.acceptVisitor(SequentialStatement.java:34)
at org.teavm.javascript.Renderer$MethodBodyRenderer.visit(Renderer.java:752)
at org.teavm.javascript.ast.AsyncMethodNode.acceptVisitor(AsyncMethodNode.java:51)
at org.teavm.javascript.Renderer.renderBody(Renderer.java:604)
at org.teavm.javascript.Renderer.renderMethodBodies(Renderer.java:404)
at org.teavm.javascript.Renderer.render(Renderer.java:302)
at org.teavm.vm.TeaVM.build(TeaVM.java:441)
at org.teavm.tooling.TeaVMTool.generate(TeaVMTool.java:299)
at org.teavm.maven.BuildJavascriptMojo.execute(BuildJavascriptMojo.java:256)
... 21 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
That seems to be an issue with the current implementation of TeaVM that we are using for the JavaScript port.
We are in the process of updating the VM to the latest version which will hopefully resolve that issue.
I've added an issue to our issue tracker to track the status more effectively.

"Either processor or processors need to be given" when running "mvn apt:process"

I am trying to get QueryDSL to work on a Spring Roo project.
Here is my plugin config:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
When I run the following command: mvn apt:process, I get the following error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building suivitrc 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-apt-plugin:1.0.2:process (default-cli) # suivitrc ---
[ERROR] Either processor or processors need to be given
[ERROR] execute error
java.lang.IllegalArgumentException: Either processor or processors need to be given
at com.mysema.maven.apt.AbstractProcessorMojo.buildProcessor(AbstractProcessorMojo.java:140)
at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.375s
[INFO] Finished at: Wed Sep 05 12:22:16 CEST 2012
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.2:process (default-cli) on project suivitrc: Either processor
to be given -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Of course I have already tried mvn install which doesn't generate any source.
Any advice welcome.
EDIT:
The only output from maven-apt-plugin is this:
[INFO] --- maven-apt-plugin:1.0.2:process (default) # suivitrc ---
You are calling the goal directly. The execution configuration is not used in this case. Do you get the same exception when running clean install?

Plugin not found error during mvn release:perform

I am trying to do a mvn release:perform on my project and get the error pasted below.
I do not have any dependency mentioned anywhere in the project for org.codehaus.mojo:cobertura-maven-plugin neither it is in the maven settings.xml file but still it creeps up from somewhere. Just to mention I can successfully build the project with mvn clean compile install and the mvn release:prepare command run successfully.
Can someone please help and let me know how I can get rid of this error.
ERROR
=====
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] The plugin 'org.codehaus.mojo:cobertura-maven-plugin' does not exist or no valid version could be found
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 13 seconds
[INFO] [INFO] Finished at: Wed Aug 15 17:03:36 BST 2012
[INFO] [INFO] Final Memory: 28M/51M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1' 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: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:133)
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.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89) at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:67) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:334) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:282) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:262) at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:129)
... 19 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:375) at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:393) at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81) ... 24 more
What does your pom.xml say? it should have the following in it:
<project>
...
<build>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<tagBase>https://svn.apache.org/repos/asf/maven/components/releases</tagBase>
</configuration>
</plugin>
</plugins>
...
</build>
...
</project>

getting error Reason: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin trying to build slideshow-plugin

When i try to build (mvn) the slide-show plugin, i get error:
(see detaied stdout below)
mvn -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] POM for 'org.kohsuke.stapler:maven-stapler-plugin:pom:1.15:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.kohsuke.stapler:maven-stapler-plugin
POM Location: /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
Reason: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1599)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findArtifactTypeHandlersInPlugins(DefaultLifecycleExecutor.java:1468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:222)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:178)
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.InvalidPluginException: Unable to build project for plugin 'org.kohsuke.stapler:maven-stapler-plugin': Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)
at org.apache.maven.plugin.DefaultPluginManager.loadPluginFully(DefaultPluginManager.java:1626)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1582)
... 15 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project org.kohsuke.stapler:maven-stapler-plugin at /home/kahmed/.m2/repository/org/kohsuke/stapler/maven-stapler-plugin/1.15/maven-stapler-plugin-1.15.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1599)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1571)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:562)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)
... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Apr 16 00:32:26 EDT 2012
[INFO] Final Memory: 15M/182M
[INFO] ------------------------------------------------------------------------
I am getting this too (although its for the akuma artifact) and can explain why, but have not yet found a good solution. Both define a parent POM and a new repo:
<parent>
<groupId>org.kohsuke</groupId>
<artifactId>pom</artifactId>
<version>2</version>
</parent>
<repositories>
<repository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</repository>
</repositories>
The URL for this glassfish maven repo gives a 301 to https://maven.glass... and for some reason, maven decides to download the body of that response as the POM. If you look in your ~/.m2/repository/org/kohsuke/pom/2/pom-2.pom, you should see something like:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.6.39</center>
</body>
</html>
Manually looking at the glassfish repo, I do not even see the desired parent POM (at this time).
I hope this helps. If you are able to figure it out, please post back as this is as far as I have gotten so far!
I had this problem also, with a different POM from another project, and I was attempting to build with Maven 3.X. The simple solution was to install the most recent 2.X version of Maven. After that, it built fine. Being a Maven novice, It appears the URI format for REPOS differs between the 2 versions.
Simply install Maven 2.X (I used 2.2.1), and put it's "bin" directory first in your PATH env variable, and you should be good to go.

sonar maven plugin fail to download the file: http://localhost:9000/deploy/jdbc-driver.jar

I tried to download and install sonar and then running an analysis with maven sonar plugin.
I have tried first Sonar version 2.14, and now 2.13.1, but I get the same error over and over again.
It seems it is unable to download the jdbc driver from localhost (the sonar server) because I get this error message: "Fail to download the
file: http://localhost:9000/deploy/jdbc-driver.jar (no proxy): Read timed out -> [Help 1]"
But If I go to http://localhost:9000/deploy/jdbc-driver.jar with my browser, it downloads the file without problems, so it seems that the sonar server is working the correct way, and that the maven sonar plugin is doing something wrong that I can not figure out.
I have also tried to alter sonar's context root to /sonar, but I get the same error.
I have configured sonar to use postgreSQL instead of the embedded Derby database, but still no luck. Accessing Sonar from a browser works like a charm, but I can not run mvn sonar:sonar so at this point my sonar installation is pretty useless... :(
Here is the stack trace from running maven with the -e option:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project betterfarmer-engine: Can not execute Sonar: Fail to download the
file: http://localhost:9000/deploy/jdbc-driver.jar (no proxy): Read timed out -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project betterfarmer-engi
ne: Can not execute Sonar
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
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:601)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.sonar.api.utils.SonarException: Fail to download the file: http://localhost:9000/deploy/jdbc-driver.jar (no proxy)
at org.sonar.api.utils.HttpDownloader.download(HttpDownloader.java:130)
at org.sonar.batch.bootstrap.ArtifactDownloader.downloadJdbcDriver(ArtifactDownloader.java:58)
at org.sonar.batch.bootstrap.JdbcDriverHolder.<init>(JdbcDriverHolder.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:147)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:319)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:274)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:341)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:689)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:638)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:663)
at org.sonar.api.platform.ComponentContainer.getComponentByType(ComponentContainer.java:113)
at org.sonar.batch.bootstrap.Module.getComponentByType(Module.java:131)
at org.sonar.batch.bootstrap.BootstrapModule.configure(BootstrapModule.java:63)
at org.sonar.batch.bootstrap.Module.init(Module.java:49)
at org.sonar.batch.bootstrap.Module.init(Module.java:41)
at org.sonar.batch.Batch.<init>(Batch.java:37)
at org.sonar.maven3.SonarMojo.executeBatch(SonarMojo.java:143)
at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:136)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
... 23 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.MeteredStream.read(MeteredStream.java:134)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2959)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2953)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1262)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1236)
at org.sonar.api.utils.HttpDownloader.download(HttpDownloader.java:125)
... 48 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Your Sonar is probably not correctly installed.
Don't you have errors in the server log?
Are you able to browse the web application at http://localhost:9000?
I'd suggest to start with a fresh install (in another folder than the previous one) and check that you don't have env properties that point to the previous install location before starting the new Sonar.

Resources