`

pom.xml

阅读更多
官方的 稍微改下
<?xml version="1.0" encoding="UTF-8"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springside</groupId>
		<artifactId>springside3-parent</artifactId>
		<version>3.3.4</version>
	</parent>
	<groupId>org.dean</groupId>
	<artifactId>springside</artifactId>
	<packaging>war</packaging>
	<name>Springside3 Mini-Web Example</name>
	<version>0.0.1-SNAPSHOT</version>
	<description />
	<!-- 用myeclipse应该不需要 -->
	<build>
		<sourceDirectory>${basedir}/src</sourceDirectory>
		<outputDirectory>
			${basedir}/web/WEB-INF/classes
		</outputDirectory>
		<resources>
			<resource>
				<directory>${basedir}/src</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webappDirectory>${basedir}/web</webappDirectory>
					<warSourceDirectory>
						${basedir}/web
					</warSourceDirectory>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<!-- 项目属性 -->
	<properties>
		<!--
			<jdbc.driver.groupId>com.h2database</jdbc.driver.groupId>
			<jdbc.driver.artifactId>h2</jdbc.driver.artifactId>
			<jdbc.driver.version>${h2.version}</jdbc.driver.version>
		-->
		<!--
			<jdbc.driver.groupId>com.oracle</jdbc.driver.groupId> <jdbc.driver.artifactId>ojdbc14</jdbc.driver.artifactId>
			<jdbc.driver.version>10.2.0.3.0</jdbc.driver.version>
		-->
		<jdbc.driver.groupId>mysql</jdbc.driver.groupId>
		<jdbc.driver.artifactId>
			mysql-connector-java
		</jdbc.driver.artifactId>
		<jdbc.driver.version>5.1.13</jdbc.driver.version>
	</properties>

	<!-- 依赖项定义 -->
	<dependencies>
		<!-- springside -->
		<dependency>
			<groupId>org.springside</groupId>
			<artifactId>springside3-core</artifactId>
		</dependency>

		<!-- spring begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib-nodep</artifactId>
		</dependency>
		<!-- spring end -->

		<!-- database begin -->
		<!-- hibernate -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-annotations</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-ehcache</artifactId>
		</dependency>
		<dependency>
			<groupId>javassist</groupId>
			<artifactId>javassist</artifactId>
		</dependency>

		<!-- spring data access -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
		</dependency>

		<!-- dbcp connection pool -->
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
		</dependency>

		<!-- jdbc driver -->
		<dependency>
			<groupId>${jdbc.driver.groupId}</groupId>
			<artifactId>${jdbc.driver.artifactId}</artifactId>
			<version>${jdbc.driver.version}</version>
			<scope>runtime</scope>
		</dependency>
		<!-- database end -->

		<!-- web begin -->
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-convention-plugin</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-spring-plugin</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>
		<dependency>
			<groupId>taglibs</groupId>
			<artifactId>standard</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
		</dependency>

		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-mapper-asl</artifactId>
		</dependency>
		<!-- web end -->

		<!-- spring security -->
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-config</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-taglibs</artifactId>
		</dependency>

		<!-- logging begin -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<!-- logging end -->

		<!-- utils begin-->
		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>

		<!-- utils end -->

		<!-- testing begin -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>

		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
		</dependency>

		<!-- selenium 2.0 -->
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-htmlunit-driver</artifactId>
		</dependency>
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-firefox-driver</artifactId>
		</dependency>
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-ie-driver</artifactId>
		</dependency>
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-remote-client</artifactId>
		</dependency>

		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
		</dependency>

		<dependency>
			<groupId>org.dbunit</groupId>
			<artifactId>dbunit</artifactId>
		</dependency>

		<!-- jetty -->
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jsp-2.1-jetty</artifactId>
		</dependency>
		<!-- testing end -->

		<!-- hibernate tools -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-tools</artifactId>
		</dependency>
	</dependencies>

</project>



自己改的
<?xml version="1.0" encoding="UTF-8"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springside</groupId>
		<artifactId>springside3-parent</artifactId>
		<version>3.3.4</version>
	</parent>
	<groupId>org.dean</groupId>
	<artifactId>springside</artifactId>
	<packaging>war</packaging>
	<name>Springside3 Mini-Web Example</name>
	<version>0.0.1-SNAPSHOT</version>
	<description />
	<build>
		<sourceDirectory>${basedir}/src</sourceDirectory>
		<outputDirectory>
			${basedir}/web/WEB-INF/classes
		</outputDirectory>
		<resources>
			<resource>
				<directory>${basedir}/src</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webappDirectory>${basedir}/web</webappDirectory>
					<warSourceDirectory>
						${basedir}/web
					</warSourceDirectory>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<properties>
		<!-- 主要依赖库的版本定义 -->
		<springside.version>3.3.4</springside.version>
		<spring.version>3.0.5.RELEASE</spring.version>
		<hibernate.version>3.5.5-Final</hibernate.version>
		<struts2.version>2.2.1</struts2.version>
		<cxf.version>2.2.10</cxf.version>
		<jersey.version>1.3</jersey.version>
		<spring-security.version>3.0.5.RELEASE</spring-security.version>
		<activemq.version>5.4.0</activemq.version>
		<jetty.version>6.1.25</jetty.version>
		<h2.version>1.2.142</h2.version>
		<quartz.version>1.8.4</quartz.version>
		<jackson.version>1.6.0</jackson.version>
		<slf4j.version>1.6.1</slf4j.version>
		<selenium.version>2.0a5</selenium.version>
		<jdbc.driver.groupId>mysql</jdbc.driver.groupId>
		<jdbc.driver.artifactId>
			mysql-connector-java
		</jdbc.driver.artifactId>
		<jdbc.driver.version>5.1.13</jdbc.driver.version>
		<!-- Plugin的属性定义  -->
		<project.build.sourceEncoding>
			UTF-8
		</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.apache.openejb</groupId>
			<artifactId>javaee-api</artifactId>
			<version>5.0-1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>1.2_04</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.faces</groupId>
			<artifactId>jsf-impl</artifactId>
			<version>1.2_04</version>
			<scope>provided</scope>
		</dependency>

		<!-- springside begin -->
		<dependency>
			<groupId>org.springside</groupId>
			<artifactId>springside3-core</artifactId>
			<version>${springside.version}</version>
		</dependency>

		<!-- spring begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<!-- spring aop -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.6.9</version>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib-nodep</artifactId>
			<version>2.2</version>
		</dependency>

		<!-- database begin -->
		<!-- hibernate -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${hibernate.version}</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-annotations</artifactId>
			<version>${hibernate.version}</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-ehcache</artifactId>
			<version>${hibernate.version}</version>
		</dependency>
		<dependency>
			<groupId>javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.12.1.GA</version>
		</dependency>

		<!-- spring data access -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<!-- dbcp connection pool -->
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>

		<!-- jdbc driver -->
		<dependency>
			<groupId>${jdbc.driver.groupId}</groupId>
			<artifactId>${jdbc.driver.artifactId}</artifactId>
			<version>${jdbc.driver.version}</version>
			<scope>runtime</scope>
		</dependency>
		<!-- database end -->

		<!-- web begin -->
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-core</artifactId>
			<version>${struts2.version}</version>
			<exclusions>
				<exclusion>
					<groupId>com.sun</groupId>
					<artifactId>tools</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-convention-plugin</artifactId>
			<version>${struts2.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-spring-plugin</artifactId>
			<version>${struts2.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.version}</version>
		</dependency>

		<dependency>
			<groupId>taglibs</groupId>
			<artifactId>standard</artifactId>
			<version>1.1.2</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-mapper-asl</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<!-- web end -->

		<!-- spring security -->
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-core</artifactId>
			<version>${spring-security.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-config</artifactId>
			<version>${spring-security.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-taglibs</artifactId>
			<version>${spring-security.version}</version>
		</dependency>

		<!-- logging begin -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
		</dependency>
		<!-- logging end -->

		<!-- utils begin-->
		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.5</version>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.8.3</version>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>r07</version>
		</dependency>

		<!-- utils end -->

		<!-- testing begin -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<version>3.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
</project>
分享到:
评论

相关推荐

    Maven pom.xml与settings.xml详解

    在Maven的世界里,`pom.xml`和`settings.xml`是两个至关重要的配置文件,它们共同决定了Maven项目的构建过程和环境配置。`pom.xml`(Project Object Model)文件是每个Maven项目的核心,它包含了项目的基本信息、...

    maven的本地仓库配置文件settings.xml和项目中文件pom.xml.zip

    一、Idea关联的maven本地仓库配置文件settings.xml (1)必须使用默认文件名 D:\developsoft\javaweb\commonPlugins\maven\apache-maven-3.8.1_first\conf\settings.xml ...pom-maven-spring-CusConfigV1不推荐使用.xml

    史上最全的maven的pom.xml文件详解

    史上最全的Maven的Pom.xml文件详解 Maven是Java领域最流行的构建工具之一,其核心配置文件是Pom.xml。在Pom.xml文件中,我们可以定义项目的基本信息、依赖关系、构建过程、测试环境等。下面,我们将详细解析Pom.xml...

    根据pom.xml下载依赖

    当我们说“根据pom.xml下载依赖”,实际上是在指Maven如何通过解析项目中的pom.xml文件来获取并安装项目的依赖库。 pom.xml文件通常位于项目的根目录下,它定义了项目的基本属性,如项目名称、版本、打包类型(如...

    常用pom.xml文件.zip

    《深入解析Maven工程中的pom.xml配置》 在软件开发过程中,管理依赖关系是一项繁重的任务,而Apache Maven提供了一种优雅的方式来处理这个问题。本文将深入探讨Maven工程的核心配置文件——pom.xml,以及它在项目...

    通过mvn命令下载pom.xml中的jar包

    本文将详细介绍如何使用`mvn`命令下载`pom.xml`文件中声明的jar包,并解释涉及的相关概念。 首先,`pom.xml`是Maven项目对象模型(Project Object Model)的配置文件,它定义了项目的构建过程、依赖关系、项目信息...

    Maven build之pom.xml文件中的Build配置

    Maven通过一个叫做pom.xml的项目对象模型文件来配置项目构建的各个方面,其中标签是Maven构建配置的核心部分,它定义了整个构建生命周期中需要执行的指令和任务。 Maven构建包括编译代码、执行测试、打包以及部署等...

    Maven的pom.xml配置文件详细配置说明

    Maven的pom.xml配置文件详细配置说明 &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=...

    maven项目pom.xml中parent标签的使用.docx

    "Maven 项目 pom.xml 中 parent 标签的使用" Maven 项目 pom.xml 文件中的 parent 标签是 Maven 项目管理依赖的核心组件之一。parent 标签的使用可以简化项目间的依赖管理,使得项目结构更加清晰、易于维护。 ...

    pom.xml android maven 工程

    pom.xml android maven 工程 如何拿Maven 构建 一个 Android 项目的pom配置

    idea中pom.xml文件

    idea中pom.xml文件

    pom.xml常用配置

    pom.xml常用配置 Pom.xml是Maven项目的核心配置文件,它定义了项目的结构、依赖关系和构建过程。下面是pom.xml文件中常用的配置项和解释: 1. `&lt;project&gt;`:pom.xml文件的根元素,定义了整个项目的信息。 2. `...

    基于Java的POM.XML

    基于Java的POM.XML,如果用兴趣,可以下载下去参考一下

    maven项目pom.xml最详细配置

    maven的pom.xml的最详细配置,内含pom的依赖、jdk配置等

    Maven之pom.xml配置文件详解.pdf

    本篇详解主要针对Maven中的核心配置文件——pom.xml进行深入解析,帮助理解和应用其配置。 首先,pom.xml是每个使用Maven的项目的必配文件,它位于项目的根目录下,用于定义项目的构建配置和其他信息。配置文件的...

    netty-all-5.0.0.Alpha3 完整pom.xml配置

    这个“netty-all-5.0.0.Alpha3 完整pom.xml配置”是针对Netty 5.0.0 Alpha3版本的集成配置,包含了该版本所需的全部依赖项,便于开发者在基于Maven的项目中直接引用,避免了手动管理多个jar文件的繁琐过程。...

    maven私服(nexus)配置(setting,pom.xml)

    本文将详细介绍如何配置Maven以使用Nexus作为本地中央仓库,以及涉及的主要配置文件`settings.xml`和`pom.xml`。 **一、Nexus简介** Nexus是Sonatype公司提供的一款开源的Maven仓库管理器,它能够作为Maven的代理...

    Maven_pom.xml常用配置解析

    Maven pom.xml 常用配置解析 Maven 项目对象模型(POM)是 Maven 的核心概念,它是 Maven 项目的描述文件,用于定义项目的坐标、依赖关系、编译、打包、测试、部署等过程。pom.xml 文件是 Maven 项目的核心配置文件...

    netty-all-4.1.5.Final完整pom.xml文件配置

    在标题"netty-all-4.1.5.Final完整pom.xml文件配置"中,我们关注的是Netty的特定版本——4.1.5.Final。这个版本包含了Netty的所有模块,提供了完整的功能集。`pom.xml`文件是Maven项目对象模型(Project Object ...

    pom.xml 文件

    pom.xml配置文件

Global site tag (gtag.js) - Google Analytics