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