Maven笔记3:ssh配置

ssh框架,附带其他基本功能的pom配置。

<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>edu.scau</groupId>
  <artifactId>ssh</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>ssh Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <properties>
		<!-- 主要依赖库的版本定义 -->
		<!-- SSH -->		
		<spring.version>3.2.4.RELEASE</spring.version>
		<hibernate.version>4.2.6.Final</hibernate.version>
		<struts.version>2.3.15.2</struts.version>
		<!-- Persisentce -->
		<mysql.version>5.1.26</mysql.version>
		<druid.version>0.2.26</druid.version>
		<!-- Web -->
		<fastjson.version>1.1.36</fastjson.version>
		<jstl.version>1.2</jstl.version>
		<servlet.version>2.5</servlet.version>
		<jsp.version>2.2.1-b03</jsp.version>
		<!-- Log -->		
		<slf4j.version>1.7.5</slf4j.version>		
  </properties>
  <!-- 指定Maven仓库, OSChina国内更快,优先从osc下载。 -->
	<repositories>
		<!-- oschina的maven仓库 -->
		<repository>
			<id>oschinaRepository</id>
			<name>local private nexus</name>
			<url>http://maven.oschina.net/content/groups/public/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	
		<!-- 官方maven仓库 -->	
		<repository>
			<id>maven</id>
			<name>Maven Repository Switchboard</name>
			<layout>default</layout>
			<url>http://repo1.maven.org/maven2</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>
	
  <dependencies>
  <!-- 加入mysql驱动依赖包 -->
	<dependency>
		<groupId>mysql</groupId>
		<artifactId>mysql-connector-java</artifactId>
		<version>${mysql.version}</version>
	</dependency>    
   <!-- 加入druid数据源依赖包 -->
	<dependency>
		<groupId>com.alibaba</groupId>
		<artifactId>druid</artifactId>
		<version>${druid.version}</version>
	</dependency>
	<dependency>
		<groupId>org.aspectj</groupId>
		<artifactId>aspectjweaver</artifactId>
		<version>1.7.3</version>
	</dependency>
	<!-- 加入fastjson依赖包 -->
	<dependency>
		<groupId>com.alibaba</groupId>
		<artifactId>fastjson</artifactId>
		<version>${fastjson.version}</version>
	</dependency>
	<!-- 加入jstl依赖包 -->
	<dependency>
		<groupId>javax.servlet</groupId>
		<artifactId>jstl</artifactId>
		<version>${jstl.version}</version>
	</dependency>
	<!-- 加入jsp-api依赖包 -->
	<dependency>
		<groupId>javax.servlet.jsp</groupId>
		<artifactId>jsp-api</artifactId>
		<version>${jsp.version}</version>
		<scope>provided</scope>
	</dependency>
	<!-- 加入servlet-api依赖包 -->
	<dependency>
		<groupId>javax.servlet</groupId>
		<artifactId>servlet-api</artifactId>
		<version>${servlet.version}</version>
		<scope>provided</scope>
	</dependency>
	  	<!-- 加入slf4j依赖包 -->
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-log4j12</artifactId>
		<version>${slf4j.version}</version>
	</dependency>
	
  	<!-- SSH -->
    <!-- 加入hibernate依赖包 -->
	<dependency>
		<groupId>org.hibernate</groupId>
		<artifactId>hibernate-core</artifactId>
		<version>${hibernate.version}</version>
	</dependency>
	
	<!-- Spring BEGIN -->
	<!-- 加入Spring-orm依赖包 -->
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-orm</artifactId>
		<version>${spring.version}</version>
	</dependency>
	<!-- 加入Spring-context-support依赖包 -->
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-context-support</artifactId>
		<version>${spring.version}</version>
	</dependency>
	<!-- 加入spring测试依赖包 -->
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-test</artifactId>
		<version>${spring.version}</version>
	</dependency>
	<!-- Spring END -->
	
	<!-- Struts2 BEGIN -->
	<!-- 加入struts2依赖包 -->
	<dependency>
		<groupId>org.apache.struts</groupId>
		<artifactId>struts2-core</artifactId>
		<version>${struts.version}</version>
		<exclusions>
			<!-- 避免与hibernate中javassist包冲突 -->
			<exclusion>
				<groupId>javassist</groupId>
				<artifactId>javassist</artifactId>
			</exclusion>
		</exclusions>
	</dependency>
	<!-- struts2整合spring插件 -->
	<dependency>
		<groupId>org.apache.struts</groupId>
		<artifactId>struts2-spring-plugin</artifactId>
		<version>${struts.version}</version>
	</dependency>
	<!-- struts2注解插件 -->
	<dependency>
		<groupId>org.apache.struts</groupId>
		<artifactId>struts2-convention-plugin</artifactId>
		<version>${struts.version}</version>
	</dependency>
	<!-- struts2测试插件 -->
	<dependency>
		<groupId>org.apache.struts</groupId>
		<artifactId>struts2-junit-plugin</artifactId>
		<version>${struts.version}</version>
	</dependency>
	<!-- Struts2 END -->
			
</dependencies>
  <build>
    <finalName>ssh</finalName>
    <plugins>
    	<!-- 让Maven的核心插件compiler支持Java 7 -->
		<!-- 编译的时候使用JDK7和UTF8编码 -->
		<plugin>
			<artifactId>maven-compiler-plugin</artifactId>
			<configuration>
				<source>1.7</source>
				<target>1.7</target>
				<encoding>UTF-8</encoding>
			</configuration>
		</plugin>
	</plugins>
  </build>
</project>


你可能感兴趣的:(Maven笔记3:ssh配置)