Quickly create a project using Maven2

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.