This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes MAVEN-ARCHETYPE-WEBAPP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "MAVEN-ARCHETYPE-WEBAPP" Watch "MAVEN-ARCHETYPE-WEBAPP" New topic
Author

MAVEN-ARCHETYPE-WEBAPP

Marcos Urata
Greenhorn

Joined: Dec 31, 2004
Posts: 26
I am using "Maven 2.1.0 (r755702; 2009-03-18 16:10:27-0300)" version on my project.

I was trying to start a web app using Maven directory structure, so I ran the following command:



However, I was expecting the following directory strutucture to be generated:


But, what Maven generated was:



Is this the default directory structure?? Or I am missing something here ? Why would they suppress the java and test folders?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Yes, that is the expected structure. Essentially, building a web app takes two projects - a simple java project containing servlets that will be placed into a JAR file, and a webapp project that depends on the JAR file from the simple java project. Or you can do what I did - combine the simple java project and webapp project structures, in which case the servlet classes end up in WEB-APP/classes.

There might be an archetype that already builds such an app structure. Codehaus maintains a list of archetypes: http://docs.codehaus.org/display/MAVENUSER/Archetypes+List


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MAVEN-ARCHETYPE-WEBAPP