1. First go to http: // Maven
.Apache.org/download.htmldownload Maven
2. After local decompression, configure the environment variable m2_home = Maven
Decompress directory
3. Open the command window MVN-V to check whether MVN is successfully installed.
Installing the maven2eclipse plug-in eclipse is a http://m2eclipse.sonatype.org/update/
1. MVN archetype: Create-dgroupid = mygroup-dartifactid = simple-webapp-dpackagename = com. mypackage-darchetypeartifactid = Maven
-Archetype-webapp
2. Create a Java directory in the simple-webapp/src/main/directory.
3. create COM/mypackage in the Java directory
4. switch to the simple-webapp directory on the console and execute MVN Eclipse: eclipse-dwtpversion = 1.5 to create the Eclipse project file-dwtpversion = 1.5, which indicates that the startup is a web project. If this sentence is not found, you cannot run the server in eclipse.
5. Import project files in eclipse
6. Add the Server Runtime Library to the libraries label in the Java build path of the Project attribute in eclipse.
7. In eclipse, right-click the project and select Maven
-> Enable dependency management