Maven-eclipse running the MAVEN command

Source: Internet
Author: User

Usually we want to run the MAVEN command in Eclipse, right-click on the project and click Run as, for example:

You can see a lot of existing MAVEN commands, click to run, and see the running information in the console

If the MAVEN command you want to run is not found here, click Maven Build to create a new command, as shown, fill in the Maven command and click Run. The new Maven command can be run again.

========================================================================

However, these operations are very inconvenient, the following to introduce a more convenient way: Click on the Eclipse toolbar Green small icon, I This is the completed state

Click External Tools configurations ..., which appears as shown:

So apply to complete the settings of several common commands, then click Organize Favorites ...

The following window appears, click Add, jump out of the right window, Select all-->ok-->ok; to complete the setup.

Now that you have completed the entire setup process, just select the item and then click the Green button to select the desired command, it is not convenient.

The common MAVEN commands are as follows: (Note that Eclipse has mvn here, so there is no need to fill in mvn)

Compiling source code: MVN Compile

Run Test: MVN test

Packaging: MVN Package

Clear the resulting project: MVN clean

Build Eclipse Project: MVN eclipse:eclipse

Combining goal commands, such as package-only not tested: Mvn-dtest packages

You can even combine commands--mvn clean install to remove and recompile

is not cool crooked. Note To select items First ...

Hope to communicate with the Java learning, you can join the Java Technology Exchange QQ Group: 485731690

Maven-eclipse running the MAVEN command

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.