Reference Creation Tutorial: http://www.jb51.net/article/45138.htmPit One:Eclipse Create maven Project error: Could not resolve archetype Org.apache.maven.archetypes: Maven-archetype-quickstart Select: Maven-archetype-webapp version 1.0 instead of the default Maven-archetype-quickstartPit Two:This is also the biggest pit, this pit took 4, 5 hours to solve failed to read artifact descriptor for Xxx:jar and missing artifact Problem Network solution: http://wyyzfy.iteye.com /blog/1698805 and other similar solutions download different jar packages from the Web, delete repository under the JAR package other than the file, are not valid, still error is finally located to javassist this library, whether manually added, pom file Add, Pom file deletion is not validfinally in the Pom.xml add the following configuration after the Pom file does not error, the focus is to eliminate the javassist library through exclusions, but this exclusion will lead to pit three <dependency> <groupId>org.apache.struts</groupId> <ARTIFACTID>STRUTS2-CORE&L T;/artifactid> <version>2.3.16</version> <exclusions><exclusion> <groupId>javassist</groupId><artifactId>javassist</artifactId></exclusion> </exclusions> </dependency>
Pit III: Use Jetty as the Web container, start the Times wrong: Dispatcher initialization failedOn-line solution: The idea is basically structs different versions of the resulting, some versions need Javassist, there's no need.http://my.oschina.net/u/815213/blog/93371http://blog.csdn.net/lk_blog/article/details/41554757 finally by viewing .m2--> Repository folder, found that javassist exists in\.m2\repository\javassist and \.m2\repository\org\javassist two places, and toExclusions is the org under the library, because exclusions the first, resulting in jetty can not start Solution: Modify the Pom.xml configuration as follows:<dependency> <groupId>org.apache.struts</groupId> <ARTIFACTID>STRUTS2-CORE&L t;/artifactid> <version>2.3.16</version> <exclusions> <exclus Ion>
<groupId>
org.javassist </groupId><artifactId>javassist</artifactId> </exclusion> </exclusions> < ;/dependency>
Lessons Learned:Large piles of pits, online search for reference only, or have to constantly try to solve
Eclipse uses MAVEN to create the STRUCT2 project and the various pits it encounters