I don't think it it very wise to compile to and work in the src/webapp
directory.... that is what the ${maven.build.dir}is for. The war:webapp
goal does exactly what you need, but it uses maven's own directory
structure standards.
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 compiled classes and
the dependent lib files.
This directory structure is an exact copy of what would apear inside the
generated war if you ran the war:war goal.
You can point tomcat at the new webapp dir in your target directory and
keep you src dirs clean...
You can customize this with preGoals and postGoals if you'd rather store
the conf dir in src/conf, etc.
Age
PS
All of this is available in maven beta 7
> I've been using Turbine with Maven since beta 7 was released. Maven
> makes it incredibly easy to generate a war file. Since you
> don't really
> want to copy a war file each time you make a change, I hacked
> together a
> method for "in-situ" development. I have a directory
> structure like this:
>
> src
> +-conf
> +-java
> +-webapp
> +-templates
> +-images
> +-javascript
>
> Then I wrote a small maven plugin which generates a WEB-INF
> directory in
> src/webapp. It copies over the libraries I'm using, as well as the
> configuration files from src/conf. In my IDE (Eclipe) I tell it to
> generate the classes in src/webapp/WEB-INF/classes. I also
> point Tomcat
> to src/webapp as the document root.
>
> Alternatively, I suppose one wouldn't need to work in the src
> directory.
> We could create a directory called /situ and then generate all the
> files in it. Also, I think Jason has some plans for a Summit
> plugin of
> some sorts, but I don't believe anything is firm. No matter
> what, it is
> _very_ easy to create a plugin, so it should be no problem. Any
> thoughts on how a plugin should be done?
>
> My thoughts are:
> turbine:generate - generate an "in-situ" webapp from the src
> dir turbine:generate-dirs - generate a directory structure with
> configuration files
> turbine:clean - remove the "in-situ" webapp
>
> - Dan
>
>
> --
> 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]>