Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin - maven

We are seeing below issue while analyzing the PR, even we are not spinning any version in the pom file and its failing while analyzing the code.
Even after removing the plugin version its the same issue. Can you please help with this.
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project amap-repo: PUT https://api.bitbucket.org/2.0/repositories/m/amap-common-lib/pullrequests/175/comments/130003966
returned a response status of 404 Not Found ->
[Help 1] 14:22:15
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 amap-repo: PUT
https://api.bitbucket.org/2.0/repositories/mediaiq/amap-common-lib/pullrequests/175/comments/130003966
returned a response status of 404 Not Found 14:22:15 at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
14:22:15 at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

You can try below command to archive your issue. I was facing the same but below command worked.
- mvn verify sonar:sonar -Dsonar.host.url=http://localhost:Port -Dsonar.login=Token -Dsonar.login=Sonar_username -Dsonar.password=Sonar_password

Related

How to run spring boot repackage goal

I want to run only repackage goal that comes from spring-boot-maven-plugin plugin.
I tried
mvn spring-boot-maven-plugin:2.2.0.RELEASE:repackage
but I got:
Plugin not found in any plugin repository
update
I also tried
mvn org.springframework.boot:spring-boot-maven-plugin:2.2.0.RELEASE:repackage
I got:
Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.2.0.RELEASE:repackage failed: Source file must be provided
and this is the full error log:
[ERROR] Failed to execute goal
org.springframework.boot:spring-boot-maven-plugin:2.2.0.RELEASE:repackage
(default-cli) on project MyServer: Execution default-cli of goal
org.springframework.boot:spring-boot-maven-plugin:2.2.0.RELEASE:repackage
failed: Source file must be provided -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
org.springframework.boot:spring-boot-maven-plugin:2.2.0.RELEASE:repackage
(default-cli) on project MyServer: Execution default-cli of goal
org.springframework.boot:spring-boot-maven-plugin:2.2.0.RELEASE:repackage
failed: Source file must be provided
It looks like you've encountered an issue, although the developers seem to indicate that this goal should not be run standalone at all.

maven verify (sonar) fail to resolve defined argument

I am trying to verify using this parameter (which work for other projects)
mvn -X verify sonar:sonar -Drevision=4.0.10
Maven fails to download dependency because of the argument not resolved
Failed to execute goal on project APP-ear: Could not resolve
dependencies for project com.orginternational:APP-ear:ear:4.0.10:
Failed to collect dependencies at
com.orginternational:APP-was:war:4.0.10: Failed to read artifact
descriptor for com.orginternational:APP-was:war:4.0.10: Could not
transfer artifact com.orginternational:APP:pom:${revision} from/to en
(https://nexus.example.com/repository/maven-central/): Failed to
transfer file
https://nexus.example.com/repository/maven-central/com/orginternational/APP/$%7Brevision%7D/APP-$%7Brevision%7D.pom
with status code 400 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal on project APP-ear: Could not resolve dependencies for
project com.orginternational:APP-ear:ear:4.0.10: Failed to collect
dependencies at com.orginternational:APP-was:war:4.0.10
Any clue how to fix this please?

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project

Facing issue while running sonar in VSTS under code analysis section.Please help me out on this.
2018-06-11T07:50:44.8401948Z [ERROR] Failed to execute goal
org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar
(default-cli) on project testproj: Fail to request
https://sonarqube.tac.com/api/ce/submit?projectKey=com.tac.idd.dps:sealer&projectName=sealer:
timeout: Connection reset by peer: socket write error
You can try below command to archive your issue. I was facing the same but below command worked.
- mvn verify sonar:sonar -Dsonar.host.url=http://localhost:Port -Dsonar.login=Token -Dsonar.login=Sonar_username -Dsonar.password=Sonar_password
Cheers..!!!

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.

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