Common Maven commands

Source: Internet
Author: User
1. Create a normal Java project for Maven:
MVN archetype: Create
-Dgroupid = packagename
-Dartifactid = projectname
2. Create a Maven web project:
MVN archetype: Create
-Dgroupid = packagename
-Dartifactid = webappname
-Darchetypeartifactid = Maven-Archetype-webapp
3. Compile Source code : MVN compile
4. Compile and Test Code : MVN test-compile
5. Run the test: MVN Test
6. Generate site: MVN site
7. Package: MVN package
8. Install jar: MVN install in local repository
9. Clear the generated project: MVN clean
10. Generate Eclipse project: MVN Eclipse: Eclipse
11. Create an idea project: MVN idea: idea
12. Use the goal command in combination. For example, package only and do not test: MVN-Dtest package
13. Compile the test content: MVN test-compile
14. Create a jar package: MVN jar: jar
15. Test without compiling or compiling: MVN test-skipping compile-skipping test-compile
(-The flexible use of skipping can also be used for other combined commands)
16. Clear some system settings of Eclipse: MVN Eclipse: clean

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.