I'll summarize what I've said before on the turbine-dev list:

My src tree looks like this:

/src
  /java
  /schema (used by the Torque plugin)
  /test
  /webapp
    /logs
    /resources
    /templates
    /WEB-INF
      /conf
      /web.xml

If you run the war:webapp goal with this kind of src dir structure it
will generate a complete webapp directory structure under
${maven.build.dir}/${pom.id} for you, including the classes compiled
from src/java, the dependent lib files, and everything that exists under
src/webapp.
The war:war goal generates exactly the same thing but then inside a war
file.

You can point tomcat at ${maven.build.dir}/${pom.id} in its server.xml
file and run your webapp from there.

The only (tiny) problem is that now you have to run war:webapp to deploy
any changes, even for changed templates, images, etc. I use the maven
console so running war:webapp takes about 1 second.

I use maven 1.0 b7.

If anyone is interested I can xdoc this and send it to the list.

Age


> -----Original Message-----
> From: Lester Ward [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, December 11, 2002 23:13
> To: '[EMAIL PROTECTED]'
> Subject: Newbie question: Current best practice for web apps
> 
> 
> In the mail archive, there seems to have been some lively 
> discussion about what the proper way to handle web 
> applications is. It appears that at one time, files for web 
> applications (e.g. WEB-INF, etc.) were kept in the 
> "webapps/<appname>" directory, but this was later changed to 
> just be a single "webapp" directory per project. 
> Unfortunately, neither of these schemes is mentioned in the 
> project layout recommendation page 
> (http://jakarta.apache.org/turbine/maven/reference/dirlayout.h
tml), so it's unclear what I should do.

Can someone please summarize the current thinking on how Maven should be
used when building a web application?

Thanks.

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


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

Reply via email to