Logging error when executing Maven SonarQube plugin - maven

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

Related

maven dependency check failure when cleaning and installing project

strong text
my build fails when i perform a maven clean install:
i have the following error:
Failed to execute goal org.owasp:dependency-check-maven:5.3.2:check (default) on project
[ERROR] bcpg-jdk15on-1.56.jar: CVE-2005-0366
[ERROR] cucumber-jvm-deps-1.0.5.jar\META-INF/maven/com.thoughtworks.xstream/xstream/pom.xml: CVE-2017-7957, CVE-2016-3674
is there a command to not to fail on error ,tahnks
I would set <failOnError> on false in the configuration of the dependency check maven plugin.

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-helper-maven-plugin: Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.2:set

We have a project and in the pom.xml we did not specify the groupId becuase we inherit it from the parent pom.
If we then run mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion}, we get an error:
[ERROR] Failed to execute goal org.codehaus.mojo:versions-maven-plugin:2.2:set (default-cli) on project dbutils: Execution default-cli of goal org.codehaus.mojo:versions-maven-plugin:2.2:set failed. NullPointerException -> [Help 1]
I checked this is a bug from the maven versions plugin and there are workarounds e.g., using 2.1 instead of 2.2.
Do you know, how can I avoid this error using the build-helper plugin?
Thank you,
Yashu
Thanks to #khmarbaise, I can specify the versoin of versions-maven-plugin:
mvn -B build-helper:parse-version org.codehaus.mojo:versions-maven-plugin:2.4:set

Need help on Sonar Jasmine spec failures

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.

use Maven to add info from MKS to Sonar

According to to the SCM Activity plugin info from the Sonar Webiste (http://docs.codehaus.org/display/SONAR/SCM+Activity+Plugin), a connection to MKS should be possible. On the Maven site, MKS provider code also exists.
However, when I run mvn sonar:sonar in my command line, I get the error:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project example-it-jacoco-maven: Can not execute Sonar: Unsupported SCM: [svn:integrity]. Check compatibility at http://docs.codehaus.org/display/SONAR/SCM+Activity+Plugin. Please check the parameter "sonar.scm.url" or the section of Maven pom. -> [Help 1]
Do I need to somehow import the provider (coded into the pom.xml ?) or is there something wrong with my code in the pom:
scm:svn:integrity|myuser#mkssvr1:7001|#/SonarScm/TestCode
Anybody have an idea how to get this to work?
Cheers,
Kristian
I believe that correct URL will look like : scm:integrity|myuser#mkssvr1:7001|#/SonarScm/TestCode

Resources