Reprinted from: http://blog.csdn.net/u011939453/article/details/43017865
1. For example, right-click the project that requires the MAVEN command to be executed, select "Debug as" or "Run as" and select "Maven build ..."
After you do this, the dialog box appears as shown:
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 operations, such as skipping tests.
The commands we have executed can be selected as "Run configutations ..." To view
Here we can see all the executed commands, in which 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, such as:
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
Execute maven command in Eclipse (reprint)