Eclipse ee + Maven3 + jrebel 的 Dynamic Web 搭建

1. 下载安装 apahce-maven

    http://maven.apache.org/download.cgi


2. m2clipse 插件安装

   eclipse ee -> install new softwar

   http://download.eclipse.org/technology/m2e/releases


3. 创建 maven project, 然后转换成 dynamic web 


4. pom.xml 配置

<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>MavenWebTemplate</groupId>
	<artifactId>MavenWebTemplate</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<name>MavenWebTemplate</name>
	<url>http://maven.apache.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<repositories>
		<repository>
			<id>spring-snapshots</id>
			<name>Spring Snapshots</name>
			<url>http://repo.spring.io/snapshot</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<dependencies>

		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-catalina</artifactId>
			<version>7.0.47</version>
		</dependency>


		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>1.1.37</version>
		</dependency>

		<dependency>
			<groupId>com.github.httl</groupId>
			<artifactId>httl</artifactId>
			<version>1.0.11</version>
		</dependency>


		<dependency>
			<groupId>com.github.httl</groupId>
			<artifactId>httl-springmvc</artifactId>
			<version>1.0.11</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring-webmvc</artifactId>
				</exclusion>
			</exclusions>
		</dependency>


		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>4.0.0.BUILD-SNAPSHOT</version>
		</dependency>


		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>4.2.7.Final</version>
		</dependency>

		<dependency>
			<groupId>net.sf.fastupload</groupId>
			<artifactId>fastupload-core</artifactId>
			<version>0.6.0</version>
			<exclusions>
				<exclusion>
					<groupId>javax.servlet</groupId>
					<artifactId>servlet-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>net.sf.fastupload</groupId>
			<artifactId>fastupload-springmvc</artifactId>
			<version>0.6.0</version>
		</dependency>

		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.27</version>
		</dependency>

		<dependency>
			<groupId>antlr</groupId>
			<artifactId>antlr</artifactId>
			<version>2.7.7</version>
		</dependency>


	</dependencies>



	<build>
		<finalName>MavenWebTemplate</finalName>
		<defaultGoal>install</defaultGoal>
		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>
					
					<webResources>
						<resource>
							<directory>WebContent</directory>
							<includes>
								<include>**/*.jsp</include>
							</includes>
						</resource>
					
						<resource>
							<!-- this is relative to the pom.xml directory -->
							<directory>WebContent/templates</directory>
							<targetPath>templates</targetPath>
						</resource>
						
					</webResources>
					
				</configuration>
				
			</plugin>


		</plugins>

	</build>



</project>


   

   

你可能感兴趣的:(Eclipse ee + Maven3 + jrebel 的 Dynamic Web 搭建)