The project creates an empty directory on the hard disk to store the MAVEN project, such as E:\mvnDemo Open the cmd window, switch to the Mvndemo directory input Command mvn archetype:generate, press ENTER, if it is the first time use, need to download the plugin, Wait a few minutes. If the first installation may require you to enter MVN archetype:generate again, the input will allow you to enter the following content groupId and Artifactid the same as the department name and the group name, to uniquely identify a project; package is to help you create a standard package. Version indicates that the current project has been entered with the build number. The MAVEN project was created successfully.
Basic Operation mvn Clean empty the compiled file, all the compiled files are under the target file, and then empty the folder after use. MVN compile recompile the project source code to the target folder. MVN test tests whether the project is working correctly. MVN install the current project into a jar or a war installation to the local MAVEN warehouse, where the installation path is the coordinates of the project. MVN site to generate information, after execution in the target directory will have a site directory, open the index.html can see the project information. MVN Javadoc:javadoc automatically generates API documentation in the Target\site\apidocs directory.