I used to work on my webapp with appserver and war plugins in maven1, which requires an "maven war:webapp" command everytime a web resource like JSP is changed (I wouldn't directly change the files in target). With an eclipse file synchronization plugin, this maven command can be eliminated.

After a upgrade to M2, I'm using a jetty plugin which works with in-place webapp (src/main/webapp) seamlessly. There's no deployment needed, war plugin is not need either. I can change jsp files without any synchronization. This could be the best practice for web development to me. You may need a filtered web.xml in CVS. However, to my understanding it's just one file to be edited for only once.

http://jetty.mortbay.org/jetty6/maven-plugin/index.html
http://andrei.gmxhome.de/filesync/index.html

I hope this helps.

KC Baltz wrote:

I'd like to convert our project to use M2 for web app development and I've run into a bit of a snag. Right now, we use Eclipse with the Sysdeo plugin so we can run our webapp in Tomcat, directly from Eclipse without any sort of deployment/copying steps. The files we edit are the ones Tomcat is using. This is great because we can edit JSPs and see the changes take place immediately. I don't want to give up this behavior. Here's the problem: We have some values in web.xml that we want to be configured at build time via filtering. We're currently using an Ant task to copy, filter, and rename web.xml.template to web.xml. In Maven, the best practice seems to be to not have a rename step, but I can't see how to make this work with an in-place deployment. I need to have an unfiltered version of web.xml for CVS, and a filtered version for running in Tomcat. Obviously, I could point Tomcat at the /target/MyProject directory and run it from there, but then any changes I made to JSPs would need to be copied back to the /src tree to commit them to CVS. Is anyone doing something like this? Can you suggest a fix?
K.C.



--
Regards

Jiaqi Guo
http://www.cyclopsgroup.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to