gitlabci integration with sonar - sonarqube

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.

Related

maven-deploy-plugin goal failed to achieved - working fine in window agent, build failed in Unix agent (Azure Pipeline)

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project **xxxxxxxxxx**: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy: java.lang.NoSuchMethodError: org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.getBufferCapacityForTransfer(J)I
Same pom.xml was used in two agents but error occurs in unix agent. Anyone knows what is the possible reason for the error?
The version of Maven on the Unix system is probably old and not compatible with the Mule Maven Plugin. Try upgrading to a newer version that is compatible.
The issue is documented at this KB article: https://help.mulesoft.com/s/article/An-API-incompatibility-was-encountered-while-executing-org-apache-maven-plugins-maven-deploy-plugin-while-deploying-an-asset-to-Exchange-using-Exchange-Maven-Facade-v3

Error 409 Conflict when deploy with Jenkins in Anypoint Platform (CloudHub)

We deployed without problems in Anypoint Platform (CloudHub) using Jenkins. Now having problems.
The log shows that the answer is 409 Conflict when trying to deploy.
This is the exact error:
[ERROR] Failed: 409 Conflict: {"status": 409, "message": "Application not updated"}
[ERROR] Failed to deploy myApplicationName: Failed to deploy application myApplicationName
Also:
[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:2.2.1:deploy (deploy)
on project myApplicationName:
Failed to deploy [/usr/local/apache-tomcat-9.0.4/.jenkins/workspace/JDE System API/myApplicationName/
target/myApplicationName-1.0.6.zip] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
As possible solutions we find changing the Maven to 2.2.1 but it is the one we are using.
Any solution?
Migrating to Mule Maven Plugin latest release for Mule 3.x (2.3.3) should resolve that issue. Note that migrating from earlier than 2.3.0 requires adapting the plugin configuration. The link above points to documentation.

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.

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

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.

Resources