Hi Johan,

I've tried this. I've configured Jetty as a WTP server and added a Jetty context file to point to /target/myapp-1.0-SNAPSHOT. It worked, however, if I edited a random .html file in Eclipse, these changes were not copied to /target/myapp-1.0-SNAPSHOT, only after I ran mvn package.
How would you automate this? Maybe using one of the maven eclipse plugins?

Regards,
Istvan

Johan Eltes wrote:
Wtp and the maven plugin for eclipse works for me.

Prereqs: wtp1.5, 2.x or 3.x

1. Define classpath variable M2_REPO in eclipse, pointing to your maven repo.

2. Run mvn command...
mvn -U -Dwtpversion=1.5 eclipse:clean eclipse:eclipse

3. Import the generated project into eclipse

Ready to go!
Re-run ...
mvn -Dwtpversion=1.5 eclipse:eclipse
...every time the pom has changed. This Can be automated by a builder in eclipse.

/Johan


Aug 3, 2008 kl. 13:23 skrev Devai Istvan <[EMAIL PROTECTED]>:

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]


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





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

Reply via email to