Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MAVEN-ARCHETYPE-WEBAPP

 
Marcos Urata
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic