How to setup maven2 release plugin with the Tomcat Plugin
Joined: Aug 05, 2007
I'm trying to configure my maven2 builds to work nicely with the maven release plugin and the maven Tomcat plugin (Mojo Codehause) in my cruisecontrol environment. Everything does work fine but the problem I have is that my build always deploy the SNAPSHOT version of the WAR file instead of the release candidate.
This is the sequence of maven goals cruisecontrol executes in order to prepare the build and deploy the war file to the server:
The problem I have with the configuration above is that the release erform goal is creating a new SNAPSHOT version by updating the pom.xml file in the checkout folder directly after generating the release version. The problem now is that the tomcat eploy goal will automatically compile the source code from the checkout folder in order to create a war file to deploy to Tomcat. Since the release erform goal has updated the pom.xml to the next SNAPSHOT version this is the version that tomcat eploy compiles and deploy onto the tomcat server for every build.
I can actually get around this problem by making sure that the builds for the release candidates get created in some other folder and then configure my tomcat-plugin to look in this alternative folder for the WAR file to deploy. I would appreciate if anyone know of an easier more efficient way of conducting these steps.