I'm using maven to build my project and cobertura for UT code coverage collection.
My problem is when I try to build the project, I met the error below, finally I found the failure is caused by cobertura plugin when I was issuing the command : mvn cobertura:instrument.
[INFO] Unable to obtain CommandsFile location.
Embedded error: Permission denied
I tried to go through the directories and I think I have the permission.
Have anyone ever seen the failure before? How to debug it?
$ mvn cobertura:instrument
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] MyProject
[INFO] ------------------------------------------------------------------------
[INFO] Building XXXXXX
[INFO] task-segment: [cobertura:instrument]
[INFO] ------------------------------------------------------------------------
[INFO] [cobertura:instrument]
[INFO] Skipping cobertura mojo for project with packaging type 'pom'
[INFO] ------------------------------------------------------------------------
[INFO] Building ato-client
[INFO] task-segment: [cobertura:instrument]
[INFO] ------------------------------------------------------------------------
[INFO] [cobertura:instrument]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to obtain CommandsFile location.
Embedded error: Permission denied
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to obtain CommandsFile location.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
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: Unable to obtain CommandsFile location.
at org.codehaus.mojo.cobertura.tasks.AbstractTask.executeJava(AbstractTask.java:195)
at org.codehaus.mojo.cobertura.tasks.InstrumentTask.execute(InstrumentTask.java:131)
at org.codehaus.mojo.cobertura.CoberturaInstrumentMojo.execute(CoberturaInstrumentMojo.java:145)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
... 16 more
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at java.io.File.createTempFile(File.java:1828)
at net.sourceforge.cobertura.util.CommandLineBuilder.<init>(CommandLineBuilder.java:96)
at org.codehaus.mojo.cobertura.tasks.CommandLineArguments.getCommandsFile(CommandLineArguments.java:82)
at org.codehaus.mojo.cobertura.tasks.AbstractTask.executeJava(AbstractTask.java:191)
... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Jan 22 09:30:25 CST 2013
[INFO] Final Memory: 22M/241M
[INFO] ------------------------------------------------------------------------
I think your current user doesn't have write permissions to the temporary folder (check java.io.tmpdir system property value):
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at java.io.File.createTempFile(File.java:1828)
at net.sourceforge.cobertura.util.CommandLineBuilder.(CommandLineBuilder.java:96)
at enter code here
The error said the user of java process has no write permission on temp directory (/tmp).
Java process will write pid to a file on the temp directory.
Jps/jstat can use this pid file to get jvm informations.
See also:
jstat
How can I prevent Java from creating hsperfdata files
jps
Have you checked that the user has permissions to write to the standard temporary file directory provided by the java configuration?
Related
I am trying to deploy my spring boot app to app engine via Jenkins using Maven. After maven has built the package, I am using "mvn install appengine: deploy" in the execute shell in the Build step. However, I get the following error when it is built,
GCLOUD: ERROR: (gcloud.app.deploy) Permissions error fetching application [apps/microservice-qa]. Please make sure you are using the correct project ID and that you have permission to view applications on the project.
Detailed error trace:
[INFO] Detected App Engine flexible environment application.
Sep 12, 2017 7:54:14 AM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /usr/lib/google-cloud-sdk/bin/gcloud app deploy
[INFO] GCLOUD: Services to deploy:
[INFO] GCLOUD:
[INFO] GCLOUD: descriptor: [/opt/bitnami/apps/jenkins/jenkins_home/workspace/demo-test/target/appengine-staging/app.yaml]
[INFO] GCLOUD: source: [/opt/bitnami/apps/jenkins/jenkins_home/workspace/demo-test/target/appengine-staging]
[INFO] GCLOUD: target project: [xxxx]
[INFO] GCLOUD: target service: [xxxxx]
[INFO] GCLOUD: target version: [20170912t075415]
[INFO] GCLOUD: target url: [https://xxxxx-dot-microservice-qa.appspot.com]
[INFO] GCLOUD:
[INFO] GCLOUD:
[INFO] GCLOUD: If this is your first deployment, this may take a while...
[INFO] GCLOUD: ....done.
[INFO] GCLOUD:
[INFO] GCLOUD: Beginning deployment of service [another-pub-sub-service]...
[INFO] GCLOUD: Building and pushing image for service [another-pub-sub-service]
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) You do not have permission to access project [xxxx] (or it may not exist): The caller does not have permission
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.198s
[INFO] Finished at: Tue Sep 12 07:54:27 UTC 2017
[INFO] Final Memory: 21M/51M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy (default-cli) on project demo-test1: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1 -> [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/PluginExecutionException
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy failed: Non zero exit: 1
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: com.google.cloud.tools.appengine.api.AppEngineException: Non zero exit: 1
at com.google.cloud.tools.appengine.cloudsdk.process.NonZeroExceptionExitListener.onExit(NonZeroExceptionExitListener.java:30)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.syncRun(DefaultProcessRunner.java:211)
at com.google.cloud.tools.appengine.cloudsdk.internal.process.DefaultProcessRunner.run(DefaultProcessRunner.java:137)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdk.runGcloudCommand(CloudSdk.java:193)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdk.runAppCommandInWorkingDirectory(CloudSdk.java:136)
at com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineDeployment.deploy(CloudSdkAppEngineDeployment.java:90)
at com.google.cloud.tools.maven.DeployMojo.execute(DeployMojo.java:107)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
I have checked the permissions in the server for the key/user used to run gcloud commands, they both have full rights. However I still get the above error.
Also, is there any other plugin in Jenkins or any other tool (like jenkins to manage builds and deploy to app engine) to do the same?
Any help would be greatly appreciated. Thanks.
Since your Jenkins Server might not be configured with your project, use following commands in your jenkins job configuration:
Execute shell:
#!/bin/sh
gcloud -q auth activate-service-account --key-file=${PROJECT_KEY.JSON}
gcloud -q config set project ${PROJECT_ID}
mvn appengine:deploy
Also, for 'gcloud' to be available on Jenkins server, you would have to install plugin 'Google Deployment Manager Jenkins Plugin' in Jenkins.
I'm trying to build Apache Spark to do this I execute mvn clean package (obviously in the spark root directory) halfway through the process I get a failure in the core file. The error log is as follows:
main:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Core ................................. FAILURE [ 12.363 s]
[INFO] Spark Project ML Local Library ..................... SKIPPED
[INFO] Spark Project GraphX ............................... SKIPPED
[INFO] Spark Project Streaming ............................ SKIPPED
[INFO] Spark Project Catalyst ............................. SKIPPED
[INFO] Spark Project SQL .................................. SKIPPED
[INFO] Spark Project ML Library ........................... SKIPPED
[INFO] Spark Project Tools ................................ SKIPPED
[INFO] Spark Project Hive ................................. SKIPPED
[INFO] Spark Project REPL ................................. SKIPPED
[INFO] Spark Project Assembly ............................. SKIPPED
[INFO] Spark Project External Flume Sink .................. SKIPPED
[INFO] Spark Project External Flume ....................... SKIPPED
[INFO] Spark Project External Flume Assembly .............. SKIPPED
[INFO] Spark Integration for Kafka 0.8 .................... SKIPPED
[INFO] Spark Project Examples ............................. SKIPPED
[INFO] Spark Project External Kafka Assembly .............. SKIPPED
[INFO] Spark Integration for Kafka 0.10 ................... SKIPPED
[INFO] Spark Integration for Kafka 0.10 Assembly .......... SKIPPED
[INFO] Kafka 0.10 Source for Structured Streaming ......... SKIPPED
[INFO] Spark Project Java 8 Tests ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.500 s
[INFO] Finished at: 2017-03-09T18:20:34+05:30
[INFO] Final Memory: 46M/498M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (default) on project spark-core_2.11: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "bash" (in directory "C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core"): CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...<exec executable="bash">... # 4:27 in C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core\target\antrun\build-main.xml
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (default) on project spark-core_2.11: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "bash" (in directory "C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core"): CreateProcess error=2, The system cannot find the file specified
around Ant part ...<exec executable="bash">... # 4:27 in C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core\target\antrun\build-main.xml
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
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:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "bash" (in directory "C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core"): CreateProcess error=2, The system cannot find the file specified
around Ant part ...<exec executable="bash">... # 4:27 in C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core\target\antrun\build-main.xml
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:342)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core\target\antrun\build-main.xml:4: Execute failed: java.io.IOException: Cannot run program "bash" (in directory "C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core"): CreateProcess error=2, The system cannot find the file specified
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:313)
... 22 more
Caused by: java.io.IOException: Cannot run program "bash" (in directory "C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
... 35 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 41 more
Looks like the build_main.xml has a problem with the bash executable. The xml file below:
<project name="maven-antrun-" default="main" >
<target name="main">
<exec executable="bash">
<arg value="C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core/../build/spark-build-info"/>
<arg value="C:\Users\Admin\Downloads\spark-2.1.0\spark-2.1.0\core\target/extra-resources"/>
<arg value="2.1.0"/>
</exec>
</target>
</project>
I did my research and found out that changing the exec to bash.exe might solve the issue but when I edit my xml file and execute mvn -e clean package -rf :spark-core_2.11 same error occurs and the changes I made to build_main.xml get reverted.
Thanks in advance.
Update - I couldn't find a way around it. I had to download the Pre-built version of Spark.
I found one way around this problem, you can put %GIT_HOME%\bin into the "path" environment variable to use git bash.
We just upgraded to SQ 6.0 and now some projects get the following error when analyzing with maven:
[INFO] --- sonar-maven-plugin:3.1.1:sonar (default-cli) # gitlab-hook-dispatcher ---
[INFO] User cache: C:\Users\frank.jakop\.sonar\cache
[INFO] Load global repositories
[INFO] Load global repositories (done) | time=94ms
[INFO] User cache: C:\Users\frank.jakop\.sonar\cache
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=5ms
[INFO] SonarQube version: 6.0
[INFO] Default locale: "de_DE", source code encoding: "UTF-8"
[INFO] Process project properties
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=162ms
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=1ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=73ms
[INFO] Load active rules
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.419 s
[INFO] Finished at: 2016-09-14T08:29:20+02:00
[INFO] Final Memory: 67M/495M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar (default-cli) on project gitlab-hook-dispatcher: Unable to load component class org.sonar.scanner.report.ActiveRulesPublisher: Unable to load component interface org.sonar.api.batch.rule.ActiveRules: NullPointerException -> [Help 1]
Last part of trace is
Caused by: java.lang.NullPointerException
at org.sonar.scanner.rule.DefaultActiveRulesLoader.readPage(DefaultActiveRulesLoader.java:99)
at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:59)
at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:102)
at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:63)
at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:67)
... 72 more
This happens also when we use org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar and seems to be project specific, some projects work and some don't.
Can anyone provide a hint what's wrong here?
Credit to #teryk-sonarsource-team, just making it an answer:
Delete the directory data/es in your SonarQube installation.
Restart SonarQube.
It will recompute all the ES indexes.
This resolved the problem for me in SonarQube 5.6.3.
I need to integrate Apple Push Notification Service to Openfire.
For that I had followed openfire-apns-plugin. But when I am executing mvn clean install command (last step), I am getting error. So, because of that openfire-apns.jar is not created.Please help me to figure out this issue. Following log is generated after executing mvn clean install,
root#vps [~/openfire_src/openfire-apns-plugin]# mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building APNS Service 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # apns ---
[INFO] Deleting /root/openfire_src/openfire-apns-plugin/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # apns ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/openfire_src/openfire-apns-plugin/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) # apns ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /root/openfire_src/openfire-apns-plugin/target/classes
[INFO]
[INFO] --- maven-openfire-plugin:1.0.2-SNAPSHOT:jspc (default-jspc) # apns ---
[INFO] Logging to org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortbay.log.Slf4jLog
java.lang.NullPointerException: charsetName
at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:99)
at org.apache.jasper.compiler.JDTJavaCompiler.getJavaWriter(JDTJavaCompiler.java:120)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
at org.apache.jasper.JspC.processFile(JspC.java:1137)
at org.apache.jasper.JspC.execute(JspC.java:1306)
at com.reucon.maven.plugin.openfire.jspc.JspcMojo.compile(JspcMojo.java:279)
at com.reucon.maven.plugin.openfire.jspc.JspcMojo.execute(JspcMojo.java:196)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
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:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.557 s
[INFO] Finished at: 2014-09-15T06:01:37-05:00
[INFO] Final Memory: 17M/98M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.reucon.maven.plugins:maven-openfire-plugin:1.0.2-SNAPSHOT:jspc (default-jspc) on project apns: Failure processing jsps -> [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/MojoFailureException
I am getting following error while launching quality analysis via "mvn sonar:sonar" command.
Few info which might be helpful to you.
Sonar Version:2.9
Created POM.xml at the same dir where .sln file resides
.sln file has Csharp code for which i want to do quality analysis.
Sonar is using default derby
Exception information
[INFO] Excluded sources : [**/Reference.cs, **/*.designer.cs, **/*.Designer.cs]
[INFO] Selected quality profile : [name=Sonar C# Way,language=cs]
[INFO] Loading i18n bundles
[INFO] Compare to previous analysis (2011-09-08)
[INFO] Compare over 5 days (2011-09-08, analysis of 2011-09-08 19:02:00.235)
[INFO] Compare over 30 days (2011-08-14, analysis of 2011-09-08 19:02:00.235)
[INFO] Gallio won't execute as there are no test projects.
[INFO] Configure maven plugins...
[INFO] Sensor AsynchronousMeasuresSensor...
[INFO] Sensor AsynchronousMeasuresSensor done: 16 ms
[INFO] Sensor org.sonar.plugins.csharp.core.CSharpSourceImporter#1125a40...
[INFO] Sensor org.sonar.plugins.csharp.core.CSharpSourceImporter#1125a40 done:
188 ms
[INFO] Sensor com.sonar.plugins.csharp.squid.C#155aa19...
[INFO] Sensor com.sonar.plugins.csharp.squid.C#155aa19 done: 1609 ms
[INFO] Sensor org.sonar.plugins.csharp.gendarme.GendarmeSensor#1df3bec...
[INFO] Gendarme executable not found: 'C:\Program Files\gendarme-2.10-bin\genda
rme.exe'. The embedded version (2.10) will be used instead.
[INFO] Skipping the non generated assembly of project : BusinessLogic
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar
Embedded error: No assembly to scan. Please check your project's Gendarme plugin
configuration.
[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:585)
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:103)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: java.lang.IllegalStateException: No assembly to scan. Please check your project's Gendarme plugin configuration.
at org.sonar.dotnet.tools.gendarme.GendarmeCommandBuilder.validate(GendarmeCommandBuilder.java:263)
at org.sonar.dotnet.tools.gendarme.GendarmeCommandBuilder.toCommand(GendarmeCommandBuilder.java:177)
at org.sonar.dotnet.tools.gendarme.GendarmeRunner.execute(GendarmeRunner.java:133)
at org.sonar.plugins.csharp.gendarme.GendarmeSensor.launchGendarme(GendarmeSensor.java:149)
at org.sonar.plugins.csharp.gendarme.GendarmeSensor.analyse(GendarmeSensor.java:115)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:63)
at org.sonar.batch.phases.Phases.execute(Phases.java:93)
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:145)
at org.sonar.batch.bootstrap.Module.start(Module.java:89)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:101)
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:96)
at org.sonar.batch.bootstrap.Module.start(Module.java:89)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96)
at org.sonar.batch.bootstrap.Module.start(Module.java:89)
at org.sonar.batch.Batch.execute(Batch.java:74)
at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:154)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:143)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
... 21 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Tue Sep 13 10:52:39 IST 2011
[INFO] Final Memory: 15M/34M
My first guess is that your solution has never been build prior tot he sonar analysis. Build your solution with whatever tool you feel comfortable, msbuild for example then retry mvn sonar:sonar.
If that does not work, ask for help to the user mailing list : http://www.sonarsource.org/support/support/