How to run spring boot repackage goal - spring-boot

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.

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.

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

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

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.

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

Resources