Am 25.04.10 22:33, schrieb Dan King:
From: Anders Hammar<[email protected]>

To: Maven Users List<[email protected]>
Sent: Sun, April 25, 2010 4:11:57 PM
Subject: Re: Unclear about maven web app directory structure

The java folder is for your java source code, while the webapp folder is for
your web application source files such as jsp files. Create a jar project
through the quickstart archetype to get an example of the former and the
webapp archetype shows the latter.

/Anders

So, if I understand correctly for 'jar' projects the source code goes in the 
src/main/java directory, while in webapps the source code (such as jsps, 
servlets, daos, models, etc.) go into the src/main/webapp directory.

Exactly, you have to see the source/main/<... structure as structure by type. A Servlet is mostly coded in java, so it is a java file,
if you code it in groovy it would go into src/main/groovy

Not to be belabor the question, but why in "Maven by Example" is the source 
code for the simple servlet in the src/main/java directory?

Link to the example follows: 
http://www.sonatype.com/books/mvnex-book/reference/web-sect-adding-simple-servlet.html

See above, the src/main/webapp is only for web related resources, a servlet however in most instances is a java file.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to