You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Duncan Krebs <li...@krebsnet.com> on 2004/11/09 03:53:56 UTC

How to use maven while developing a webapp

Hello Maven People,
I have a build process setup for a webapp and am able to use maven war:war to produce a .war file that can be deployed with no problems. My development process however seems a little twisted and I'm looking for a better way. 

I'm using eclipse/tomcat5 to work and make changes to my app. However to get it so I can develop and debug while in tomcat I first deploy the .war built by maven to tomcat. Get's deployed okay, then I use maven eclipse to generate an eclipse project. 

In eclipse, I change the default bin from "target/..." to the classes folder in my WEB-INF which is simple enough, I can make changes to source files in my project folder and tomcat sees the new changes because they are getting compiled to WEB-INF/classes. 

However when I want to make changes to my jsp and html pages and see the new changes in Tomcat I'm working out of the root folder that was deployed to Tomcat. After making changes I then have to paste them back into my project/src/webapp folder to keep things in synch. Does anyone know if there is a way around this or a better way to go about it? Thanks. - Duncan


Re: How to use maven while developing a webapp

Posted by Brett Porter <br...@gmail.com>.
There are a couple of alternatives.

In IntelliJ, I am able to copy JSPs to the deployed directory. You
might need to by some J2EE support for Eclipse (eg MyEclipseIDE).

>From the Maven side, you can run "maven war:inplace" which will
compile your sources to ${maven.war.src}/WEB-INF/classes and
dependencies to ${maven.war.src}/WEB-INF/lib. If you then point Tomcat
at that directory (And eclipse at that classes directory), you are
editing your JSPs in your source folder which is also your deployment
folder and you are all set.

- Brett

On Mon, 8 Nov 2004 20:53:56 -0600, Duncan Krebs <li...@krebsnet.com> wrote:
> Hello Maven People,
> I have a build process setup for a webapp and am able to use maven war:war to produce a .war file that can be deployed with no problems. My development process however seems a little twisted and I'm looking for a better way.
> 
> I'm using eclipse/tomcat5 to work and make changes to my app. However to get it so I can develop and debug while in tomcat I first deploy the .war built by maven to tomcat. Get's deployed okay, then I use maven eclipse to generate an eclipse project.
> 
> In eclipse, I change the default bin from "target/..." to the classes folder in my WEB-INF which is simple enough, I can make changes to source files in my project folder and tomcat sees the new changes because they are getting compiled to WEB-INF/classes.
> 
> However when I want to make changes to my jsp and html pages and see the new changes in Tomcat I'm working out of the root folder that was deployed to Tomcat. After making changes I then have to paste them back into my project/src/webapp folder to keep things in synch. Does anyone know if there is a way around this or a better way to go about it? Thanks. - Duncan
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org