【马文2pom.xml文件对于在Eclipse Europa+m2eclipse中工作的webapp】壮心未与年俱老,死去犹能作鬼雄。这篇文章主要讲述马文2pom.xml文件对于在Eclipse Europa+m2eclipse中工作的webapp相关的知识,希望能为你提供帮助。
1. mvn archetype:create -DgroupId=deng -DartifactId=mywebapp -DarchetypeArtifactId=maven-archetype-webapp
2. Replace web.xml with http://snipplr.com/view/3800/minimal-webxml-webapp-descriptor-version-24
3. Replace pom.xml in this snipplet.
4. mvn eclipse:m2eclipse -Dwtpversion=1.5
5. Import project into Eclipse
6. In project properties >
java Build Path. Add a "
Server Runtime"
Library ( with Tomcat6)
7. In project properties >
J2EE Module Dependencies. Check Maven2Dependencies
8. Project >
Clean
If you re-importing a project back into Eclipse, be sure to:
1. Delete your existing project in eclipse
2. mvn clean eclipse:clean
3. Repeat steps 4-8 above.
- < project xmlns=" http://maven.apache.org/POM/4.0.0"
- xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
- < modelVersion> 4.0.0< /modelVersion>
- < groupId> deng.mywebapp< /groupId>
- < artifactId> mywebapp< /artifactId>
- < packaging> war< /packaging>
- < version> 1.0-SNAPSHOT< /version>
- < name> mywebapp Maven Webapp< /name>
- < url> http://maven.apache.org< /url>
- < profiles>
- < profile>
- < id> servlet< /id>
- < activation>
- < activeByDefault> false< /activeByDefault>
- < /activation>
- < dependencies>
- < dependency>
- < groupId> javax.servlet< /groupId>
- < artifactId> servlet-api< /artifactId>
- < version> 2.5< /version>
- < scope> provided< /scope>
- < /dependency>
- < dependency>
- < groupId> javax.servlet.jsp< /groupId>
- < artifactId> jsp-api< /artifactId>
- < version> 2.1< /version>
- < scope> provided< /scope>
- < /dependency>
- < /dependencies>
- < /profile>
- < /profiles>
- < dependencies>
- < dependency>
- < groupId> junit< /groupId>
- < artifactId> junit< /artifactId>
- < version> 4.4< /version>
- < scope> test< /scope>
- < /dependency>
- < dependency>
- < groupId> javax.servlet< /groupId>
- < artifactId> jstl< /artifactId>
- < version> 1.1.2< /version>
- < /dependency>
- < dependency>
- < groupId> taglibs< /groupId>
- < artifactId> standard< /artifactId>
- < version> 1.1.2< /version>
- < /dependency>
- < /dependencies>
- < build>
- < finalName> mywebapp< /finalName>
- < plugins>
- < plugin>
- < groupId> org.mortbay.jetty< /groupId>
- < artifactId> maven-jetty-plugin< /artifactId>
- < /plugin>
- < plugin>
- < artifactId> maven-compiler-plugin< /artifactId>
- < configuration>
- < source> 1.5< /source>
- < target> 1.5< /target>
- < /configuration>
- < /plugin>
- < /plugins>
- < /build>
- < /project>
推荐阅读
- 优化Mac OS X邮件.app
- PureMVC ApplicationFacade类模板
- 使用Twidroid&?039;的public intent从您自己的Android应用程序发送Twitter消息
- 在KickApps支持的站点上移动模块
- 为您的KickApps社区提供人造社区隐私
- KickApps:将类添加到“组”页上的“离开/加入”按钮。
- Nginx性能优化和安全性配置
- 使用Python,Twisted和Django通过Android手机控制笔记本电脑
- 有抱负的Google Glass开发者教程(构建你的第一个Glass应用)