Maven2 has a growing impact on project management, and many projects use Maven2. Here's how to quickly create a prototype of a project using MAVEN2, and then build on that project. Let's look at how to create a typical three-class project using Maven2:
Common Java projects, such as basic packages:
MVN archetype:create-dgroupid=com.yourcompany-dartifactid=myproject-darchetypeartifactid= Maven-archetype-quickstart
A generic Web project, such as a Web project:
MVN Archetype:create-dgroupid=com.yourcompany-dartifactid=myproject-darchetypeartifactid=maven-archetype-webapp
The Struts 2.0 project in Appfuse:
MVN archetype:create-darchetypegroupid=org.appfuse-darchetypeartifactid=appfuse-basic-struts- Dremoterepositories=http://static.appfuse.org/repository-darchetypeversion=2.0-m4-snapshot-dgroupid= Com.mycompany-dartifactid=myproject
With the above command, you can quickly build the prototype of the project you want. Next we just use the command below to generate the project file for idea and then open it to project development under idea.
MVN idea:idea-ddownloadsources=true-ddownloadjavadocs=true-djdklevel=1.5
When the Pom.xml file changes, we just need to regenerate the module file with the following command, and the newly generated module file will be well merged with the original module file, usually depending on the package change.
MVN Idea:module