- Project Template
| Project Template (Archetype) | Purpose |
| maven-archetype-archetype | Create your own project template (archetype). |
| maven-archetype-j2ee-simple | Creates a J2EE project (EAR), with directories and subprojects for the EJBs, servlets, etc. |
| maven-archetype-mojo | Create your own Maven 2 plugins. |
| maven-archetype-quickstart | Simple Java project, suitable for JAR generation. Maven 2 default. |
| maven-archetype-site | Documentation-only site, with examples in several formats. You can run this archetype on top of an existing Maven 2 project to add integrated documentation. |
| maven-archetype-webapp | Creates a web application project (WAR), with a simple Hello World JSP. |
Usage:
mvn archetype:create -DgroupId=[your project's group id] -DartifactId=[your project's artifact id] -DarchetypeArtifactId=maven-archetype-webapp
- Maven Commands
| mvn clean | Cleans out all Maven-2-generated files. |
| mvn compile | Compiles Java sources. |
| mvn test-compile | Compiles JUnit test classes. |
| mvn test | Runs all JUnit tests in the project. |
| mvn package | Builds the JAR or WAR file for the project. |
| mvn install | Installs the JAR or WAR file in the local Maven repository (use this if you have multiple interdependent local projects). |
Origem: java.net




