Failed to execute goal org.apache.maven.plugin - maven

I did it and
I have really nagging problem when I try to type(in terminal) mvn resolve:release I've got an error. I would be very glad if you could look at it and try to help me with solving this problem which took me a lot of time and I haven't been able to solve it. link to repo:
https://github.com/CharlesCZ/sfg-pet-clinic
P.S
I use windows 10 and intellij ultimate
I'm sorry for bad formatted code.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project sfg-pet-clinic: Cannot prepare the release because
you have local modifications :
[ERROR] [pet-clinic-data/pom.xml:modified]
[ERROR] [pet-clinic-web/pom.xml:modified]
[ERROR] [pom.xml:modified]
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
and full code
Microsoft Windows [Version 10.0.17134.285]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\Charles\Desktop\kurs\sfg-pet-clinic>mvn release:prepare
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] pet-clinic-data [jar]
[INFO] pet-clinic-web [jar]
[INFO] sfg-pet-clinic [pom]
[INFO]
[INFO] ----------------< guru.springframework:sfg-pet-clinic >-----------------
[INFO] Building sfg-pet-clinic 0.0.1-SNAPSHOT [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.5.3:prepare (default-cli) # sfg-pet-clinic ---
[INFO] Resuming release from phase 'scm-check-modifications'
[INFO] Verifying that there are no local modifications...
[INFO] ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup
[INFO] Executing: cmd.exe /X /C "git rev-parse --show-toplevel"
[INFO] Working directory: C:\Users\Charles\Desktop\kurs\sfg-pet-clinic
[INFO] Executing: cmd.exe /X /C "git status --porcelain ."
[INFO] Working directory: C:\Users\Charles\Desktop\kurs\sfg-pet-clinic
[WARNING] Ignoring unrecognized line: ?? desktop.ini
[WARNING] Ignoring unrecognized line: ?? pet-clinic-data/target/
[WARNING] Ignoring unrecognized line: ?? pet-clinic-web/target/
[WARNING] Ignoring unrecognized line: ?? release.properties
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] pet-clinic-data 0.0.1 .............................. SKIPPED
[INFO] pet-clinic-web 0.0.1 ............................... SKIPPED
[INFO] sfg-pet-clinic 0.0.1-SNAPSHOT ...................... FAILURE [ 3.467 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.795 s
[INFO] Finished at: 2018-09-19T18:40:47+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project sfg-pet-clinic: Cannot prepare the release because
you have local modifications :
[ERROR] [pet-clinic-data/pom.xml:modified]
[ERROR] [pet-clinic-web/pom.xml:modified]
[ERROR] [pom.xml:modified]
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :sfg-pet-clinic
C:\Users\Charles\Desktop\kurs\sfg-pet-clinic>

There are checkout files in your project so Revert(undo) to project and then try mvn release:prepare.

Related

Codename One online building error by terminal

I'm trying to use my CN1 account to compile online my project whit Ubuntu 16.04 LTS terminal command:
$ mvn cn1:build -Dcodename1.platform=android -Dcodename1.buildTarget=android-device
but I got this long error:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for bo.conectica.carry:carry-common:jar:1.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.systemPath' for com.codenameone:codenameone-buildclient:jar refers to a non-existing file /home/synapsido/.codenameone/CodeNameOneBuildClient.jar # bo.conectica.carry:carry:1.0-SNAPSHOT, /home/synapsido/Documentos/carry/pom.xml, line 293, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for bo.conectica.carry:carry-android:jar:1.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.systemPath' for com.codenameone:codenameone-buildclient:jar refers to a non-existing file /home/synapsido/.codenameone/CodeNameOneBuildClient.jar # bo.conectica.carry:carry:1.0-SNAPSHOT, /home/synapsido/Documentos/carry/pom.xml, line 293, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for bo.conectica.carry:carry:pom:1.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.systemPath' for com.codenameone:codenameone-buildclient:jar refers to a non-existing file /home/synapsido/.codenameone/CodeNameOneBuildClient.jar # line 293, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] carry [pom]
[INFO] carry-common [jar]
[INFO] carry-android [jar]
[INFO]
[INFO] ----------------------< bo.conectica.carry:carry >----------------------
[INFO] Building carry 1.0-SNAPSHOT [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> codenameone-maven-plugin:7.0.36:build (default-cli) > package # carry >>>
[INFO]
[INFO] <<< codenameone-maven-plugin:7.0.36:build (default-cli) < package # carry <<<
[INFO]
[INFO]
[INFO] --- codenameone-maven-plugin:7.0.36:build (default-cli) # carry ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for carry 1.0-SNAPSHOT:
[INFO]
[INFO] carry .............................................. FAILURE [ 10.155 s]
[INFO] carry-common ....................................... SKIPPED
[INFO] carry-android ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.516 s
[INFO] Finished at: 2022-01-09T21:32:07-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.36:build (default-cli) on project carry: Execution default-cli of goal com.codenameone:codenameone-maven-plugin:7.0.36:build failed: Plugin com.codenameone:codenameone-maven-plugin:7.0.36 or one of its dependencies could not be resolved: Could not find artifact com.codenameone:codenameone-buildclient:jar:7.0.36 at specified path /home/synapsido/.codenameone/CodeNameOneBuildClient.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
maybe my mvn plugin version is deprecated? How to Update?
That particular target doesn't seem to trigger the download of that dependency. If you run mvn verify first, or the "Run In Simulator" option in your IDE, it will cause these dependencies to be downloaded.
e.g.
mvn verify
then
mvn cn1:build -Dcodename1.platform=android -Dcodename1.buildTarget=android-device
will work.
It seems that this is an older version of the maven plugin (7.0.36) where the current is 7.0.55. Make sure to update the version and dependencies. You can use https://start.codenameone.com/ to generate a new reference.
The new version no longer depends on the file in that location.

CodeHaus Maven JAXB2 plugin error MojoExecutionException: NoSchemasException

I am trying to build my project ,in that i got error called [ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.4:xjc (One) on project tg-tg-tems-ota-common-service: : MojoExecutionException: NoSchemasException -> [Help 1]
we are using java8 ,apache maven 3.6.3 ,jaxb2 plugin 2.4
Please find below error
INFO] Building TravelGrid-Tems-Ota-Service 3.0.0-SNAPSHOT [2/3]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # tg-tg-tems-ota-common-service ---
[INFO]
[INFO] --- jaxb2-maven-plugin:2.4:xjc (One) # tg-tg-tems-ota-common-service ---
[INFO] Created EpisodePath [D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer\tg-tems-ota-common-service\target\generated-sources\jaxb\emt\hotelSearchRequest\META-INF\JAXB]: true
[INFO] Ignored given or default xjbSources [D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer\tg-tems-ota-common-service\src\main\xjb], since it is not an existent file or directory.
[INFO] Ignored given or default sources [D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer\tg-tems-ota-common-service\src\main\xsd], since it is not an existent file or directory.
[WARNING] No XSD files found. Please check your plugin configuration.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for tg-servicelayer 3.0.0-SNAPSHOT:
[INFO]
[INFO] tg-servicelayer .................................... SUCCESS [ 0.697 s]
[INFO] TravelGrid-Tems-Ota-Service ........................ FAILURE [ 0.909 s]
[INFO] TravelGrid-Subsystems .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.941 s
[INFO] Finished at: 2020-06-30T15:50:30+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.4:xjc (One) on project tg-tg-tems-ota-common-service: : MojoExecutionException: NoSchemasException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :tg-tg-tems-ota-common-service
D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer>
I am new to jaxb plugin ,can anyone help me
Please user "mvn clean install" it will clean the target folder and regenerate everything from scratch.

Issues in exceution while run the test script through Maven

While i am executing my test script through maven test, it shows error. below are the errors at runtime.
[INFO] Scanning for projects... [INFO]
[INFO]
------------------------------------------------------------------------ [INFO] Building Talentrack V1 [INFO]
------------------------------------------------------------------------ [INFO] Downloading:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom
[INFO] Downloaded:
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom
(11 KB at 4.5 KB/sec) [INFO] Downloading:
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.12.4/surefire-2.12.4.pom
[INFO] Downloaded:
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.12.4/surefire-2.12.4.pom
(14 KB at 21.1 KB/sec) [INFO] [INFO] ---
maven-resources-plugin:2.6:resources (default-resources) # Talentrack
--- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non
existing resourceDirectory
D:\Talentrack_talent\Talentrack\src\main\resources [INFO] [INFO] ---
maven-compiler-plugin:3.3:compile (default-compile) # Talentrack ---
[INFO] Changes detected - recompiling the module! [WARNING] File
encoding has not been set, using platform encoding Cp1252, i.e. build
is platform dependent! [INFO] Compiling 10 source files to
D:\Talentrack_talent\Talentrack\target\classes [INFO]
------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO]
------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running
on a JRE rather than a JDK? [INFO] 1 error [INFO]
------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 4.087 s [INFO] Finished at:
2016-05-17T16:35:05+05:30 [INFO] Final Memory: 9M/121M [INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.3:compile
(default-compile) on project Talentrack: Compilation failure [ERROR]
No compiler is provided in this environment. Perhaps you are running
on a JRE rather than a JDK? [ERROR] -> [Help 1] [ERROR] [ERROR] To
see the full stack trace of the errors, re-run Maven with the -e
switch. [ERROR] Re-run Maven using the -X switch to enable full debug
logging. [ERROR] [ERROR] For more information about the errors and
possible solutions, please read the following articles: [ERROR] [Help
1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Compilation failure [ERROR] No compiler is provided in this
environment. Perhaps you are running on a JRE rather than a JDK?
You need to specify the JDK path into your system variables / bash profile which can be done by adding a JAVA_HOME variable to it.

No pom found while creating new project from archetype

I am trying to execute this :
mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple -DartifactId=simple - DpackageName=org.sonatype.mavenbook -Dversion=1.0-SNAPSHOT"
but it shows this error:
C:\TPMaven>mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple -DartifactId=simple - DpackageName=org.sonatype.mavenbook -Dversion=1.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.090 s
[INFO] Finished at: 2015-04-20T17:28:05+00:00
[INFO] Final Memory: 5M/108M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\TPMaven). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
What's wrong with my maven statement?
The right code should be:
mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple -DartifactId=simple -DpackageName=org.sonatype.mavenbook -Dversion=1.0-SNAPSHOT
If you use Win, running the code above in cmd.exe is ok.
If you run the code in PowerShell, please use the code below:
mvn archetype:generate "-DgroupId=org.sonatype.mavenbook.simple" "-DartifactId=simple" "-DpackageName=org.sonatype.mavenbook" "-Dversion=1.0-SNAPSHOT"
There are two errors in your code:
mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple -DartifactId=simple - DpackageName=org.sonatype.mavenbook -Dversion=1.0-SNAPSHOT"
- DpackageName
should be
-DpackageName
-Dversion=1.0-SNAPSHOT"
should be
-Dversion=1.0-SNAPSHOT
There is a space in between one of your command line arguments. Running your command:
acanby#PANAMERA /c/projects/mvntest $ mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple -DartifactId=simple - DpackageName=org.sonatype.mavenbook -Dversion=1.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.072 s
[INFO] Finished at: 2015-04-21T15:20:41+10:00
[INFO] Final Memory: 5M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (c:\projects\mvntest). Please verify you invoked Maven from the correct directory
. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
Fixing the - DpackageName=... part to -DpackageName=...:
acanby#host /c/projects/mvntest$ mvn archetype:generate -DgroupId=org.sonatype.mavenbook.simple -DartifactId=simple -DpackageName=org.sonatype.mavenbook -Dversion=1.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) > generate-sources # standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) < generate-sources # standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) # standalone-pom ---
[INFO] Generating project in Interactive mode

Install Maven jar with pom into local repository

I have an old jar (jsf-api-2.0.2.jar). In this jar there is a /META-INF/maven-Folder.
How do I install the jar into my local repository?
install:install-file says I need to specify the artifactId myself. How do I force it to use the information in jsf-api-2.0.2.jar!\META-INF\maven\com.sun.faces\jsf-api\pom.xml?
Output:
mvn install:install-file -Dfile=jsf-api-2.0.2.jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) # standalone-pom ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.410s
[INFO] Finished at: Sat Feb 01 12:52:34 CET 2014
[INFO] Final Memory: 13M/368M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default cli) on project standalone-pom: The artifact information is incomplete or not valid:
[ERROR] [0] 'groupId' is missing.
[ERROR] [1] 'artifactId' is missing.
[ERROR] [2] 'packaging' is missing.
[ERROR] [3] 'version' is missing.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
See http://maven.apache.org/plugins/maven-install-plugin/examples/custom-pom-installation.html
Just ensure you're using at least version 2.5, which introduced this feature.
And by the way: the goal is install-file, not install-jar

Resources