If you use Sysdeo's Eclipse Tomcat Launcher plugin ( http://www.eclipsetotale.com/tomcatPlugin.html) and its devloader, you can point to src/main/webapp for context, pick up the class files from target/classes and the libraries from your local m2 repo directories. It's both faster and more reliable than Eclipse WTP's built-in container support. There's also http://merve.sourceforge.net/, which offers less options than Sysdeo's but is more automatic. Similarly for Jetty you can use run-jetty-run (http://code.google.com/p/run-jetty-run/). I never create a war while developing a webapp and I even try to avoid container restarts (several solutions exist for hot-code swapping depending on your web framework and platform).
Kalle On Sun, Aug 3, 2008 at 4:23 AM, Devai Istvan <[EMAIL PROTECTED]> wrote: > Dear Sirs, > > Currently I'm developing a webapp in eclipse running on a tomcat instance. > When I edit a .html or a .java file in eclipse, the modification can be > immediately observed (because Automatic building is turned on in Eclipse and > I'm using a context file that specifies the docbase of the context as the > ouput directory of Eclipse). > > Now, I'd like to convert the project to use maven and preserve the above > way of development. How to do this? > > The problem is that if I place stuff into the /src/main/webapp directory, > it does not get copied to /target/classes, which means I cannot use > target/classes as the docbase of the context. > > Since my pom specifies war as a packaging mode, /target/myapp-1.0-SNAPSHOT > contains the exploded WAR contents. If I specify this directory as a docbase > for the tomcat context, everything works as intended, the only problem is > that if I edit something in eclipse, the changes will be only visible after > doing a mvn package.. > > Anyone has a solution for this? > What about Jetty, is there a solution for that too? > > Best regards, > Istvan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >