Maven3 common commands and using MAVEN to manage your own projects

Source: Internet
Author: User
Tags package json

First, MAVEN common commands

1. Installation configuration maven: slightly
               2, create                             Create Java project: MVN Archetype:generate-dgroupid=com.demo (package name)-dartifactid=java-app (project name) & nbsp                           Create Web project: MVN archetype:generate -dgroupid=com.demo (registration)-dartifactid=web-app (project name)-darchetypeartifactid=maven-archetype-webapp                            build Eclipse Project: MVN eclipse:eclipse                3, General Command                     &NBS P        MVN Validate//Verify that the project is correct and that all required resources are available                 &NBS P            MVN compile//compiling the project's source code                 &NBS P       &NBsp    MVN test-compile  //compiling project test code                              MVN test  //using compiled test code to test compiled source codes                 & nbsp            MVN package    //published formats, such as jars, bundle compiled source code         &NBS P                    MVN integration-test//process and publish packages in an environment where integration testing can run   &NBS P                          MVN Verify//Run any checks to verify that the package is valid and quality Standard                              MVN Install//pack Installed in a local repository, can be used by other projects as a dependency                /             MVN Deploy//execute in an integrated or release environment, copy the final version of the package to a remote repository so that other developers or projects can share                             MVN generate-sources//Generate any additional source code required for the application, such as xdoclet    &NBSP ;                        MVN archetype:generate//Create Maven Project &NB Sp                            MVN compile//compile source code                            MVN   test-compile//compile test code                              MVN test//Run in Application Unit testing                              MVN site//Build Project-related information sites                              MVN clean Clear build results in target directory                              MVN Package//Based on Project Generation JAR file                              MVN Install/ /install in local Repository jar                           . NBSP;MVN eclipse:eclipse//Generate Eclipse project files                       &NB Sp  
Ii. Example one: Create a MAVEN project 1, execute: MVN archetype:generate Enter information such as GroupID after prompting, such as: 2, modify the Pom.xml, here to test the new JSON dependency package JSON warehouse address in:http://mvnrepository.com/You can query add the following dependency 3, execute the MVN eclipse:eclipse command, import the project in eclipse after execution is complete 4. View the jar information introduced by the project

Maven3 common commands and using MAVEN to manage your own projects

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.