Maven operations in Eclipse

Source: Internet
Author: User

First, several of the commands commonly used in MAVEN are:

Clean clear the target directory

Compile compiling

Package to target directory

Install package to local warehouse

----------------------------------------------------------------------------------------------

Clean

  

In Eclipse's Run As-maven build, enter clean in goals, click Run

Console output:

  

My project is named Maven-demo, notice the information inside the red box, delete the target file in the project directory file

Compile

  

Console output:

  

In the project file, the Target\classes directory is created and your Java file is compiled into a class file, stored in this directory

Install

  

Note that the install will be compile compiled first, then the project will be packaged into target, in your pox.xml, your packaging if it is a war, then the Big Siege War, if the jar, then packaged as Jar, And then copy it to your local warehouse.

Package

  

The package will try compile first, and then package your project into the target directory, unlike the install, where the install makes a copy of the packages to the MAVEN local repository.

Maven operations in Eclipse

Related Article

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.