It is also JEE standard to include jars in WEB-INF/lib. There is a difference between a standard and recommendation. Another possible perspective for you is avoiding potential classloading problems. If you work with various vendors you may notice not all vendors are as moderate to how your archives are packaged.
On Nov 27, 2007 8:18 PM, Thomas Van de Velde <[EMAIL PROTECTED]> wrote: > That's interesting. Isn't the JEE standard to store servlet classes under > WEB-INF/classes? What's the value of creating a separate JAR file for > servlets? It seems to me that this adds unnecessary complexity. Having > worked on several large projects, I've never seen servlets being packaged > in > multiple jar files. I do see how this can be valuable for architectural > code, domain classes, services and repositories (DAO's). Any other > perspectives on this? > > On Nov 27, 2007 10:07 AM, Wendy Smoak <[EMAIL PROTECTED]> wrote: > > > On 11/27/07, Thomas Van de Velde <[EMAIL PROTECTED]> wrote: > > > > > I was trying out maven-archetype-webapp with Maven 2.0.7 and > > maven-archetype > > > 1.0-alpha-7 and noticed that the following directory structure is > > created: > > ... > > > Is there not supposed to be a directory structure for Java source code > > and > > > unit test source code and resources? > > > > > > Is this a bug or am I missing out on a best practice? > > > > It's intentional. The recommendation is to have a separate module for > > the Java code and resources, and to declare it as a dependency in your > > webapp. > > > > (However, there's nothing stopping you from creating the directories > > and using them, which is often fine for simple webapps, example apps > > for frameworks for example.) > > > > -- > > Wendy > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
