I had a problem with the release of the continuum: prepare a phase that does not work in the scm-check-changes step with an error:
[ERROR] org.apache.maven.shared.release.ReleaseFailureException: Cannot prepare for release because you have local modifications: [Pom.xml: modified]
What I've done:
- I made all my changes (* .java and pom.xml) in SVN
- I built the project in Continuum
- I started preparing the release.
I know that scm-check modifications call the ScmCheckModificationsPhase class, which checks for the absence of local changes compared to what is in SCM.
I understand that if I work only with Maven, if there are local changes or any differences between the local code and SVN, for example, the release: the preparation will not work, because it checks the changes first; but working with Continuum, I don’t know why it should be differencse between the local code and the SVN repository? Therefore, I do not know why the release: prepare the target in Continuum is facing this problem.
An example of my pom:
<build> <plugins> ... <plugin> <artifactId>maven-release-plugin</artifactId> <configuration> <useReleaseProfile>false</useReleaseProfile> </configuration> </plugin> ... </plugins> </build> <scm> <connection>scm:cvs:ext:url:/var/cvs:application_name</connection> <developerConnection>scm:cvs:ext:url:/var/cvs:application_name</developerConnection> </scm> ..... </project>
In the parent pom.xml:
... <pluginManagement> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.2.2</version> <configuration> <useReleaseProfile>false</useReleaseProfile> <goals>deploy</goals> <arguments>-Prelease</arguments> </configuration> </plugin> .....
For information, the assembly and release of the project always works fine, so far.
There is a workaround solution that solved my problem, but I'm still trying to understand the origin of this problem.
Workaround:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.2.2</version> <configuration> ... <checkModificationExcludes> <checkModificationExclude>pom.xml</checkModificationExclude> </checkModificationExcludes> </configuration> </plugin>
source share