适用于Maven 3,呵呵,这是我在项目中用到的,部分代码由Netbeans生成,Eclipse应该也没问题的4.0.0 com.myPackageName projectName war 0.0.1 My Project http://maven.apache.org 6.0 1.2 3.8.2 1.2.16 1.6.2 2.3.2 1.6.1 5.1.15 3.6.3.Final 3.0.5.RELEASE 0.7.1.RELEASE 1.7.4 sonatype-snapshots Sonatype snapshot repository http://oss.sonatype.org/content/repositories/snapshots java.net2 Repository hosting the jee6 artifacts http://download.java.net/maven/2 JBoss The "public-jboss" repository group provides a combined view all JBoss community project artifacts default http://repository.jboss.org/nexus/content/groups/public-jboss true bonecp-repo BoneCP Repository http://jolbox.com/bonecp/downloads/maven CodeHaus-Jackson Json CodeHaus Jackson http://repository.codehaus.org/org/codehaus/jackson/ org.slf4j slf4j-jdk14 ${org.slf4j.version} javax javaee-web-api ${javax.version} provided junit junit ${junit.version} test org.hibernate hibernate-entitymanager ${org.hibernate.entitymanager.version} net.sf.ehcache ehcache-core ${net.sf.ehcache.version} javax.servlet jstl ${javax.servlet.version} runtime log4j log4j ${log4j.version} org.aspectj aspectjtools ${org.aspectj.version} mysql mysql-connector-java ${mysql.jdbc.version} com.jolbox bonecp ${com.jolbox.bonecp.version} com.jolbox bonecp-provider ${com.jolbox.bonecp.version} com.jolbox bonecp-spring ${com.jolbox.bonecp.version} org.codehaus.jackson jackson-core-asl ${org.codehaus.jackson.version} org.codehaus.jackson jackson-core-lgpl ${org.codehaus.jackson.version} org.codehaus.jackson jackson-mapper-asl ${org.codehaus.jackson.version} org.codehaus.jackson jackson-mapper-lgpl ${org.codehaus.jackson.version} org.springframework spring-aop ${org.springframework.version} org.springframework spring-asm ${org.springframework.version} org.springframework spring-beans ${org.springframework.version} org.springframework spring-context ${org.springframework.version} org.springframework spring-core ${org.springframework.version} org.springframework spring-expression ${org.springframework.version} org.springframework spring-jdbc ${org.springframework.version} org.springframework spring-orm ${org.springframework.version} org.springframework spring-tx ${org.springframework.version} org.springframework spring-web ${org.springframework.version} org.springframework spring-webmvc ${org.springframework.version} org.springframework spring-test ${org.springframework.version} test org.apache.maven.plugins maven-compiler-plugin 2.3.2 org.apache.maven.plugins maven-war-plugin 2.1.1 false org.apache.maven.plugins maven-resources-plugin 2.5 UTF-8 projectName endorsed sun.boot.class.path org.apache.maven.plugins maven-compiler-plugin 2.3.2 UTF-8 ${settings.localRepository}/javax/javaee-endorsed-api/6.0/javaee-endorsed-api-6.0.jar${path.separator}${sun.boot.class.path} javax javaee-endorsed-api ${javax.version}