How to solve "Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar"? - maven

I have some problems to execute command "mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=25d0a6a8a078272ad5c53e5c76fb15e6a4242736".
JDK 1.8
Sonarqube 7.4
Maven 3.5.4
How could I solve my troubles?
Below I post my screen code from git bash
[INFO] Calculating CPD for 599 files
[INFO] CPD calculation finished
[INFO] Analysis report generated in 18123ms, dir size=7 MB
[INFO] Analysis reports compressed in 4815ms, zip size=3 MB
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:49 min
[INFO] Finished at: 2019-12-19T11:28:56+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project traccar: Failed to upload report - An error has occurred. Please contact your administrator -> [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```

You can have a look at this Sonarsource community discussion. The general policy is that there is only support for LTS versions. In your case you should plan to upgrade to version 7.9.2 and update all your plugins and (in this case) the scanner. You didn't explain why you state "have to use a specific version of Sonar". If you do not want the newest features, advise your Client only to use LTS versions.

Related

Jenkins svn branches

I recently created an automated process to run multi-step Maven builds for my organization. But i am having difficulty committing the version changes on svn
I want to update this file contents and compile my code and then commit this file back to svn. So that SVN has latest build version number.
How do I commit this changed file to SVN.
Ty very much.
I invoke top-level Maven targets to release in svn:
my goals is: release:perform -DconnectionUrl=scm:svn:http://XXX
This is my maven error in jenkins:
[maven] $ cmd.exe /C "D:\apache-maven-3.5.0\bin\mvn.cmd release:perform -DconnectionUrl=scm:svn:http://10.10.20.151/svn/repos/aubay/test/jenkins/branches && exit %%ERRORLEVEL%%"
channel stopped
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jenkins 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.3.2:perform (default-cli) # jenkins ---
[ERROR] Cannot perform release - the preparation step was stopped mid-way. Please re-run release:prepare to continue, or perform the release from an SCM tag.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.199 s
[INFO] Finished at: 2017-08-24T15:48:29+02:00
[INFO] Final Memory: 12M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:perform (default-cli) on project jenkins: Cannot perform release - the preparation step was stopped mid-way. Please re-run release:prepare to continue, or perform the release from an SCM tag. -> [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
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE

Apache Spark 1.4.1 Build Failed

I have download Apache Spark 1.4.1 from the official site. As follows:
I don't have hadoop installed in my machine.
Apache provides build command. So, I tried to start building the project using following command
build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.4.0 -DskipTests clean package
But build was failed with the following error:
[INFO] Spark Project External Kafka Assembly ............. SKIPPED
[INFO] Spark Project YARN Shuffle Service ................ SKIPPED
[INFO] --------------------------------------------------------------------- ---
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.840s
[INFO] Finished at: Wed Jul 29 10:43:04 IST 2015
[INFO] Final Memory: 15M/43M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:1.4: Could not transfer artifact org.apache.maven.plugins:maven-enforcer-plugin:pom:1.4 from/to central (https://repo1.maven.org/maven2): peer not authenticated -> [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/PluginResolutionException
I am new with Apache Spark please give suggestions.
since it is precompiled Binary distribution you have downloaded. you do not need to compile it again using maven2. just put it on path and use it directly.

Cannot install grails plugin to local or remote maven repo

I'm trying to install my grails plugin to local or remote repo, but when I run
mvn install -DskipTests I'd always get this message:
|Loading Grails 2.3.9
|Configuring classpath
|Running pre-compiled script
.
|Environment set to development
................................
|Packaging Grails application
................................
|Plugin packaged grails-mcplugin-license-0.4.3.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.532s
[INFO] Finished at: Thu Jun 05 14:12:03 MSK 2014
[INFO] Final Memory: 13M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.0:package-plugin (default->package-plugin) on project McpluginLicense: Unable to copy the plugin ZIP to the target >directory -> [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
I'm using grails-maven plugin right from github because it solves this problem -https://jira.grails.org/browse/MAVEN-237, can it be related to my issue? How do I track it down? I tried to look at maven debug output but I didn't notice anything that can help
I suggest installing the release plugin and then running
grails maven-install
The documentation is here.

Getting errors while trying to build a skeleton Mule Cloud Connector..

So I'm following the tutorials online to build a cloud connector but I can't even get the skeleton to be generated!
tutorial 1
tutorial 2
I get the following error, using the create-cloud-connector.bat script given by the Mule Cloud Connect Development Kit
> [INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.170s
[INFO] Finished at: Mon Jul 30 13:00:57 EDT 2012
[INFO] Final Memory: 7M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.mule.tools:mule-cloud-connector-archetype:2.0.16) -> [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
what are some things I could be doing wrong?
I updated the Maven settings.xml file
the first question is " Name of the cloud service the new connector uses
[default: ] " can I enter anything there? (or does it have to be like an existing service? what if I'm building one that doesn't exist?)
It looks like the tutorial is pointing at rather old version of the archetype (2.0.16) that maven can't even find.
I recommend to replace the generation step with the following command
mvn archetype:generate -DarchetypeGroupId=org.mule.tools.devkit -DarchetypeArtifactId=mule-devkit-archetype-cloud-connector -DarchetypeVersion=3.3.0
You can find additional informations here

Sonar - CSharp Plugins Ecosystem - Can not execute Sonar: Error while trying to get the next element name

Sonar CSharp Plugins Ecosystem is throwing error at the end of processing.
I have checked the coverage-report.xml and it only include one line.
<PartCoverReport version="4.0" date="2011-08-10T10:09:12.1721003+08:00" />
I think this is the possible reason for the error.
How can I fix this issue? Is this a configuration issue?
Thanks in advance.
Please see piece of error message below:
...
[INFO] Sensor org.sonar.plugins.csharp.fxcop.FxCopSensor#e6529c...
[INFO] Microsoft (R) FxCop Command-Line Tool, Version 10.0 (10.0.30319.1) X86
[INFO] Copyright (C) Microsoft Corporation, All Rights Reserved.
[INFO]
[INFO] Loading C:\JanusPilot\SonarDotnetExample\Example.Application\target\sonar \sonar.FxCop...
[INFO] Loaded DesignRules.dll...
[INFO] Loaded GlobalizationRules.dll...
[INFO] Loaded NamingRules.dll...
[INFO] Loaded PerformanceRules.dll...
[INFO] Loaded Example.Application.exe...
[INFO] Initializing Introspection engine...
[INFO] Analyzing...
[INFO] Analysis Complete.
[INFO] Writing 1 messages...
[INFO] Writing report to C:\JanusPilot\SonarDotnetExample\Example.Application\t
arget\sonar\fxcop-report.xml...
[INFO] Done:00:00:01.1050632
[INFO] Sensor org.sonar.plugins.csharp.fxcop.FxCopSensor#e6529c done: 2342 ms
[INFO] Sensor org.sonar.plugins.csharp.gallio.CoverageReportSensor#eb73e...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:14.037s
[INFO] Finished at: Wed Aug 10 10:13:29 CST 2011
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0-beta-2:s
onar (default-cli) on project example: Can not execute Sonar: Error while trying
to get the next element name: ParseError at [row,col]:[1,75]
[ERROR] Message: Can not call 'getLocalName(): cursor does not point to a valid
node (curr event [null]; cursor state CLOSED)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I am one of the developpers of the C# plugins.
You should rather ask for help by sending a mail to the sonar user mailing list.
Your partcover reports shows that partcover did not succeed to gather coverage measures suring test execution.
You have 3 solutions :
try ncover3
skip coverage
If you need more details, again, please drop a message to the user mailing list
Regards

Resources