あるフリーランスエンジニアの色んなメモ!! ITスキル・ライフハックとか

Maven:Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project MyProject: Cannot prepare the release because you have local modifications

事象

Maven実行時に以下のエラーが発生

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project MyProject: Cannot prepare the release because you have local modifications :
[ERROR] [target\MyProject-1.0-SNAPSHOT.jar:unknown]
[ERROR] [target\test-classes\com\myprj\common\AppTest.class:modified]

原因

targetディレクトリをVCS(Version Control System)でソース管理していたため


対策

targetディレクトリをVCSから削除する

comments powered by Disqus