Need help on Sonar Jasmine spec failures - maven

I'm getting the following exception when trying to build the sonar dashboard using maven (mvn sonar:sonar)
Failed to execute goal com.github.searls:jasmine-maven-plugin:1.2.0.0:test (default) on project sample-web: There were Jasmine spec failures. -> [Help 1]
Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project operative-global: Can not execute Sonar: Unable to execute maven plugin: Exception during execution of org.codehaus.mojo:cobertura-maven-plugin:2.5.1:cobertura -> [Help 2]
Could someone help me with the suggestions/comments to resolve the problem?
Thanks,
Kathir

This was related to compatability issues. The issue gets resolved after upgrading the jars to the latest version.

Related

gitlabci integration with sonar

Hi Everyone I’m trying to integrate with the sonar below is the error i am facing
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project XXXXX: Unable to register extension fr.cnes.sonar.plugins.icode.check.ICodeSensor from plugin ‘icode’: javax/xml/bind/JAXBException: javax.xml.bind.JAXBException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project XXXXX: Unable to register extension
My code is java 11 and I have added the related dependency.
Can anyone help me in this one?
The version of Sonar i-Code CNES plugin you use is not compatible with your java version (11).
Update your version of Sonar i-Code CNES plugin to >2.0.0 and it will work.

Maven Release plugin error: Version was not mapped

I'm using maven release plugin and I'm getting the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project ****: Version for '****' was not mapped -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project ****: Version for '****' was not mapped
I run the job from Jenkins and source code is in perforce.
What am I missing?
Thanks.
You need to configure your project to use perforce as an SCM - use the maven-scm-plugin and add the dependency to the P4Maven plugin.
See the P4Maven manual.
See also this question.

Build is failing due to maven-sonar plugin issue when I run through VSTS Private agent

I am building maven project after that running sonar analysis but its failing with the below error.I am using java 8 ,Maven 3.0.5,Sonar cube 5.6.7 but I am not sure where should I make the configuration changes.Please help me out.
My VSTS Build tasks are Prepare analysis on sonar cube,Maven,Publish Analysis result.
Error:
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project Product: With SonarQube server prior to 5.6, it is recommended to use the sonar-maven-plugin 3.3 -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
C:\apache-maven-3.0.5\bin\mvn.bat failed with return code: 1
Could not retrieve code analysis results - Maven run failed.
Build failed.

Logging error when executing Maven SonarQube plugin

I've been facing an issue with Maven SonarQube plugin (v2.6) when Maven version is recent (strictly larger than 3.1).
Here is what I run:
mvn clean verify -Psonar
mvn org.codehaus.mojo:sonar-maven-plugin:2.6:sonar -Psonar
The first invocation makes sure sources are compiled and JaCoCo agent is prepared.
The interesting part comes, when the second command is run:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project merlin-schema: Error setting Log implementation. Cause: java.lang.reflect.InvocationTargetException: org/slf4j/Marker -> [Help 1]
Any fix to be published?
Replacing default Maven logging implementation is currently not supported. Ticket created: http://jira.sonarsource.com/browse/MSONAR-122

First time SONAR setup with Maven, getting a error on RulePriority, analysis fails

I am trying to setup SONAR on a server. I have Maven 3.0.3 and using Sonar 3.1.1 with a Java project.
Part way through the mvn sonar:sonar, I am getting the following error:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXXXXXX-common: Can not execute Sonar: No enum const class org.sonar.api.rules.RulePriority.3 -> [Help 1]
I have setup Sonar before and never saw this, it has always been unzip and go. But on this particular server I keep getting this error.
I tried creating a blank rule set, but the error still pops up.
Any thoughts?
I think you are facing the same problem described here
http://sonar.15.n6.nabble.com/Xpath-rules-gt-Failed-startup-of-context-td3183230.html
You might find it useful

Resources