Execute maven command in eclipse

Source: Internet
Author: User
Tags tomcat

1. Right-click the project that requires the MAVEN command, select "Debug as" or "Run as", and select "Maven build ...".


After doing so, a dialog appears as shown in the following figure:


Name: You can name this operation command, and each MAVEN command executed will be saved.

Goals: Enter the MAVEN command we need to execute, one at a time, separated by a space.

check box: The check box below allows us to do some selective actions, such as skipping the test above.


The commands we have executed can be selected as "Run configutations ..." To view


Here we can see all the executed commands, in the following figure we can get the following information:

The command corresponds to the project, the execution of the order, etc.

In this dialog, we can delete commands, rename, modify commands, and so on.



As we said above, the executed commands will be saved, and if we are going to execute the previously executed commands, we can choose Maven Build:


If the project that we right-clicked executes only one command, the dialog box does not pop up and executes directly.

If more than one command is executed, a dialog box pops up to let us choose which command to execute.


MAVEN also provides us with some basic commands, as shown in the following diagram:



2. Common MAVEN Commands

Clean: Clears the build results from the target directory.

Generate-sources: The development environment is separated from the code and is seldom used, and this command can be viewed by viewing the. Classpath and. Project two files to see the changes.

Install: Installing the jar in the local library

Test: Run a unit test in a project

Package: Generate jar files based on project

Tomcat*:run: Start tomcat If the Tomcat plugin is added to the project's Pom.xml file

Eclipse:eclipse: Generate Eclipse project files, i.e.. classpath and. Project files

Compile: Compiling source code

Dependency:sources: Download the source package for the project-dependent jar package

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.