• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

MAVEN-ARCHETYPE-WEBAPP

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic