maven - 未能执行目标 org.apache.maven.plugin
问题描述
我做到了,当我尝试输入(在终端中) mvn resolve:release 时,我遇到了一个非常烦人的问题。我遇到了一个错误。如果您能看到它并尝试帮助我解决这个问题,我将非常高兴,这花了我很多时间,但我无法解决它。回购链接: https ://github.com/CharlesCZ/sfg-pet-clinic
PS我使用Windows 10和intellij Ultimate
对于格式错误的代码,我深表歉意。
[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]
和完整的代码
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>
解决方案
您的项目中有签出文件,因此 Revert(undo) 到项目,然后尝试 mvn release:prepare。
推荐阅读
- weka - Weka 以波斯语显示数字并使用问号保存数据输出
- python - 在 GPU 中运行代码或以某种方式并行化
- javascript - 表的反应搜索功能
- image - 如何在不裁剪的情况下调整“嵌入”标签内的图像大小?
- pandas - DataFrame 创建 - 推文
- python - 我 rm python3.9 我可以拿回来吗?
- javascript - 我的套接字怎么能留在房间里,所以客户端会收到消息
- java - 时区有冒号时如何解决解析异常?
- python - PySpark 中的语法 df.rdd.map(lambda row: row[0:]) 有什么作用?
- c# - 为什么在 try 块中返回变量不会更改在 finally 部分中重置该变量时返回的值?