1, maven command to create a project
mvn archetype:generate -DgroupId=com.albert -DartifactId=TestMaven -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false -DarchetypeCatalog=internal
2.m2Eclipse uses the maven plugin to run the prompt "-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match."
a. Add the environment variable of M2_HOME
b.Preference->Java->Installed JREs->Edit select a jdk,
添加 -Dmaven.multiModuleProjectDirectory=$M2_HOME
3. Eclipse's solution to editor does not contain a main type
a. Right-click src--build path--use as source folder, it is estimated that some things in the project were deleted before. If there are many errors reported for other folders, don't worry, just remove the source folder, remember to run After restarting, there are still packages that need to be rebuilt and sourced.
b. Right-click the upper level directory of the package where the class is located in the package explorer on the left--build path--use as source folder. This solves the problem.
4. Maven projects run on Eclipse's Tomcat
Solution: see attachment for steps
5.Maven creates SpringMVC architecture
Reference: http://blog.csdn.net/mr_tank_/article/details/12159297