Maven3 common commands, Java Project Building, Web project Building

Source: Internet
Author: User

------------------------------Maven3 Common commands--------- ------------------

1. Common commands

1) Create a project

MVN Archetype:generate-darchetypecatalog=internal-dgroupid=com.mycompany.app-dartifactid=my-app- Darchetypeartifactid=maven-archetype-quickstart-dinteractivemode=false

MVN archetype:generate Fixed format

-dgroupid Organization identification (package name)

-dartifactid Project Name

-darchetypecatalog=internal do not fetch catalog from the remote server

-darchetypeartifactid specify Archetypeid,maven-archetype-quickstart, create a Java Project;maven-archetype-webapp, create a Web Project

-dinteractivemode whether to use interactive mode

2) compiling the source code

MVN Compile

3) Compile the test code

MVN Test-compile

4) Clear

MVN clean

5) Run the test

MVN test

6) Production Site Directory and packaging

MVN Site-deploy

7) Install the current project's output file to the local repository

MVN Install

8) Packaging

MVN Package

9) First clear and then pack

MVN Clean Package

10) hit into a jar package

MVN Jar:jar

11) Build Eclipse Project

MVN Eclipse:eclipse

12) View Help information

MVN help:help

13) See what Project type categories maven has

MVN archetype:generate-darchetypecatalog=intrenal

Create a Java Project

MVN archetype:generate-darchetypecatalog=internal-dgroupid=com.study-dartifactid=javademo-darchetypeartifactid= Maven-archetype-quickstart-dinteractivemode=false

Create a WebApp Project

MVN Archetype:generate-darchetypecatalog=internal-dgroupid=com.study-dartifactid=webappdemo- Darchetypeartifactid=maven-archetype-webapp-dinteractivemode=false

Maven3 common commands, Java Project Building, Web project Building

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.