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>


   

   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值