Maven release:prepare : Cannot prepare the release because you have local modifications
I can confirm, that adding the plugin or configuring it to exclude the pom.xml
check did work:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<checkModificationExcludes>
<checkModificationExclude>pom.xml</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
Removing my project's target
folder from source control fixed this issue for me.
For everybody who don't want to change the pom.xml
a commandline option does the trick:
mvn [...] -DcheckModificationExcludeList=pom.xml,.maven/spy.log
I had the problem on our hudson / jenkins CI environment which complained about changes in the .maven/spy.log