无法执行目标org.apache.maven.plugin

时间:2018-09-19 19:15:45

标签: maven intellij-idea maven-3 maven-plugin

我做到了 当我尝试在终端中键入mvn resolve:release时,我确实遇到了麻烦,我遇到了一个错误。如果您能看一下并尝试帮助我解决这个问题,那将花费我很多时间,但我一直无法解决,我将非常高兴。链接到仓库: https://github.com/CharlesCZ/sfg-pet-clinic

P.S 我使用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>

1 个答案:

答案 0 :(得分:0)

项目中有检出文件,因此请还原(撤消)为项目,然后尝试mvn release:prepare。