Eclipse uses MAVEN to create the STRUCT2 project and the various pits it encounters

Source: Internet
Author: User

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> &LT;ARTIFACTID&GT;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> &LT;ARTIFACTID&GT;STRUTS2-CORE&L t;/artifactid> <version>2.3.16</version> <exclusions> <exclus Ion> <groupId> org.javassist </groupId><artifactId>javassist</artifactId> </exclusion> </exclusions> &lt ;/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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.