Maven Archetypes

Posted by Martin Homik | Posted in Java | Posted on 11-02-2008

0

Assume you are a beginner and someone tells you to implement a JAR, J2EE, portlet or some other project. How should you start? How should you organize your project? To base your project on best-practice use Maven’s archetype plug in. Just select the project type you would like to have and let the Maven create the structure for you. Version 1.0-alpha-7 supports the following archetypes:

  • maven-archetype-archetype
  • maven-archetype-j2ee-simple
  • maven-archetype-mojo
  • maven-archetype-portlet
  • maven-archetype-profiles (currently under development)
  • maven-archetype-quickstart
  • maven-archetype-simple (currently under development)
  • maven-archetype-site
  • maven-archetype-site-simple
  • maven-archetype-webapp

Take some time and create different projects and explore its differences. It will provide you with a broader overview and you get the feeling for how to set up projects and what kind of files are needed for a project. A few more archetypes can be found here.

The latest snapshot of Version 2.0 provides even more archetypes and a much more convenient way to create projects. Try it!

Write a comment