马文2pom.xml文件对于在Eclipse Europa+m2eclipse中工作的webapp
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了马文2pom.xml文件对于在Eclipse Europa+m2eclipse中工作的webapp相关的知识,希望对你有一定的参考价值。
1. mvn archetype:create -DgroupId=deng -DartifactId=mywebapp -DarchetypeArtifactId=maven-archetype-webapp2. 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>
以上是关于马文2pom.xml文件对于在Eclipse Europa+m2eclipse中工作的webapp的主要内容,如果未能解决你的问题,请参考以下文章
如何通过 Maven2 pom.xml 获取 Hibernate + javax.persistence
纽约时报人工智能之父马文·明斯基(Marvin Minsky)去世,享年 88 岁
rtl8188eu芯片,在kail中开启监听功能,解决PHY=null问题
powershell PowerShell并行代码示例。对于http://mxii.eu.org/2016/09/16/parallel-processing-in-powershell/