aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes How to setup maven2 release plugin with the Tomcat Plugin Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to setup maven2 release plugin with the Tomcat Plugin" Watch "How to setup maven2 release plugin with the Tomcat Plugin" New topic
Author

How to setup maven2 release plugin with the Tomcat Plugin

Pete Karlsson
Greenhorn

Joined: Aug 05, 2007
Posts: 1
Hi,

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.

Thanks
Pete
 
wood burning stoves
 
subject: How to setup maven2 release plugin with the Tomcat Plugin