maven常用插件

转自:http://iffiffj.iteye.com/blog/1661936


=========Maven Report Plugin========= 
1.源码分析 

Java代码   收藏代码
  1. <artifactId>maven-pmd-plugin</artifactId>  

2.代码格式检查  
Java代码   收藏代码
  1. <artifactId>maven-checkstyle-plugin</artifactId>  

3.代码相似度检查  
Java代码   收藏代码
  1. <groupId>org.codehaus.mojo</groupId>  
  2. <artifactId>simian-maven-plugin</artifactId>  

4.格式化统计报告  
Java代码   收藏代码
  1. <groupId>org.codehaus.mojo</groupId>  
  2. <artifactId>jdepend-maven-plugin</artifactId>  

5.FireBug检查  
Java代码   收藏代码
  1. <groupId>org.codehaus.mojo</groupId>  
  2. <artifactId>findbugs-maven-plugin</artifactId>  

6.JavaDoc  
Java代码   收藏代码
  1. <artifactId>maven-javadoc-plugin</artifactId>  

7.生成java代码交叉引用和源代码的html格式  
Java代码   收藏代码
  1. <artifactId>maven-jxr-plugin</artifactId>  

8.代码覆盖率  
Java代码   收藏代码
  1. <groupId>org.codehaus.mojo</groupId>  
  2. <artifactId>cobertura-maven-plugin</artifactId>  
  3.   
  4. <groupId>org.codehaus.mojo</groupId>  
  5. <artifactId>emma-maven-plugin</artifactId>  

9.java代码的度量工具  
Java代码   收藏代码
  1. <groupId>org.codehaus.mojo</groupId>  
  2. <artifactId>javancss-maven-plugin</artifactId>   

10.单元测试报告  
Java代码   收藏代码
  1. <artifactId>maven-surefire-report-plugin</artifactId>  

11.TODO检查报告  
Java代码   收藏代码
  1.     <groupId>org.codehaus.mojo</groupId>  
  2.     <artifactId>taglist-maven-plugin</artifactId>  

12.项目总报告  
Java代码   收藏代码
  1. <artifactId>maven-project-info-reports-plugin</artifactId>  



=========Maven Common Plugin=========  
1.SCP文件传输  
Java代码   收藏代码
  1. <groupId>com.github.goldin</groupId>  
  2. <artifactId>copy-maven-plugin</artifactId>  

2.SSH命令  
Java代码   收藏代码
  1. <groupId>com.github.goldin</groupId>  
  2. <artifactId>sshexec-maven-plugin</artifactId>  

3.Maven Job  
Java代码   收藏代码
  1. <groupId>com.github.goldin</groupId>  
  2. <artifactId>jenkins-maven-plugin</artifactId>  

4.生成about信息  
Java代码   收藏代码
  1. <groupId>com.github.goldin</groupId>  
  2. <artifactId>about-maven-plugin</artifactId>  

5.查找重复依赖  
Java代码   收藏代码
  1. <groupId>com.github.goldin</groupId>  
  2. <artifactId>duplicates-finder-plugin</artifactId>  

6.Maven邮件发送  
Java代码   收藏代码
  1. <groupId>com.github.goldin</groupId>  
  2. <artifactId>mail-maven-plugin</artifactId>  

7.项目目录查找  
Java代码   收藏代码
  1. <groupId>com.github.goldin</groupId>  
  2. <artifactId>find-maven-plugin</artifactId>  

8.获取SVN版本  
Java代码   收藏代码
  1. <groupId>com.google.code.maven-svn-revision-number-plugin</groupId>  
  2. <artifactId>maven-svn-revision-number-plugin</artifactId>  

9.编译C++  
Java代码   收藏代码
  1. <groupId>org.codehaus.mojo</groupId>  
  2. <artifactId>native-maven-plugin</artifactId>  

10.DDL生成  
Java代码   收藏代码
  1. <groupId>org.codehaus.mojo</groupId>  
  2. <artifactId>hibernate3-maven-plugin</artifactId>  

11.Eclipse RCP  
Java代码   收藏代码
  1. <groupid>org.sonatype.tycho</groupid>  
  2. <artifactid>target-platform-configuration</artifactid>  



=========Maven Official Plugin=========  
1.自动定义打包  
Java代码   收藏代码
  1. <artifactId>maven-assembly-plugin</artifactId>  

2.ANT  
Java代码   收藏代码
  1. <artifactId>maven-antrun-plugin</artifactId>  


例子

<?xml version="1.0" encoding="UTF-8"?>
<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>...</groupId> 项目或者组织的唯一标志,并且配置时生成路径也是由此生成,如org.myproject.mojo生成的相对路径为:/org/myproject/mojo
	<artifactId>...</artifactId>
	<version>...</version>
	<packaging>...</packaging> 打包机制,如pom,jar,maven-plugin,ejb,war,ear,rar,par
	 以上四项组成项目唯一坐标
	<dependencies>...</dependencies> 依赖,继承,合成
	<parent>...</parent>
	<dependencyManagement>...</dependencyManagement>
	<modules>...</modules>
	<properties>...</properties> 常量定义 -->
	<groupId>com.vi</groupId>
	<artifactId>personal</artifactId>
	<version>1.0-SNAPSHOT</version>
	<packaging>pom</packaging>
	<modules>
		<module>vi-user</module>
	</modules>
	<properties>
		<project.artifactId>${project.artifactId}</project.artifactId>
		<spring.version>4.0.5.RELEASE</spring.version>
		<hibernate.version>4.3.5.Final</hibernate.version>
		<spring-data-jpa.version>1.6.0.RELEASE</spring-data-jpa.version>
		<tomcat-jdbc.version>7.0.53</tomcat-jdbc.version>
		<sitemesh.version>2.4.2</sitemesh.version>
		<shiro.version>1.2.3</shiro.version>
		<hibernate-validator.version>5.0.3.Final</hibernate-validator.version>
		<jackson.version>2.4.0</jackson.version>
		<aspectj.version>1.7.4</aspectj.version>
		<slf4j.version>1.7.7</slf4j.version>
		<commons-lang3.version>3.3.2</commons-lang3.version>
		<guava.version>17.0</guava.version>
		<junit.version>4.11</junit.version>
		<assertj.version>1.6.1</assertj.version>
		<mockito.version>1.9.5</mockito.version>
		<selenium.version>2.42.2</selenium.version>
		<h2.version>1.3.176</h2.version>
		<geronimo.version>1.1.1</geronimo.version>
		<commons-lang.version>2.6</commons-lang.version>
		<jackson-old.version>1.9.13</jackson-old.version>
		<xstream.version>1.3.1</xstream.version>
		<quartz.version>1.8.5</quartz.version>
		<spring-context-support.version>4.0.9.RELEASE</spring-context-support.version>
		<spring-ibatis.version>2.0.7</spring-ibatis.version>
		<axis.version>1.4</axis.version>
		<poi.version>3.7</poi.version>
		<commons-collections.version>3.2.1</commons-collections.version>
		<commons-fileupload.version>1.2</commons-fileupload.version>
		<commons-net.version>1.4.1</commons-net.version>
		<commons-validator.version>1.1.4</commons-validator.version>
		<commons-httpclient.version>3.1</commons-httpclient.version>
		<commons-io.version>2.4</commons-io.version>
		<jdom.version>1.1</jdom.version>
		<cxf.version>2.2.9</cxf.version>
		<spring-jms.version>4.0.5.RELEASE</spring-jms.version>
		<qdox.version>1.12</qdox.version>
		<mybatis.version>3.3.0</mybatis.version>
		<commons-dbcp.version>1.4</commons-dbcp.version>
		<activemq-client.version>5.10.2</activemq-client.version>
		<hamcrest-core.version>1.1</hamcrest-core.version>
		<druid.version>1.0.14</druid.version>
		<jodconverter-cli.version>2.2.2</jodconverter-cli.version>
		<jodconverter.version>2.2.2</jodconverter.version>
		<unoil.version>4.1.2</unoil.version>
		<ridl.version>4.1.2</ridl.version>
		<jurt.version>4.1.2</jurt.version>
		<juh.version>4.1.2</juh.version>
			


		<!-- Plugin的属性定义 -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.7</java.version>

		<!-- 项目属性 -->
		<!-- <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>mysql</jdbc.driver.groupId>
		<jdbc.driver.artifactId>mysql-connector-java</jdbc.driver.artifactId>
		<jdbc.driver.version>5.1.22</jdbc.driver.version>
		<fastjson.version>1.2.6</fastjson.version>
		<jedis.version>2.7.3</jedis.version>
		<commons-pool.version>1.5.6</commons-pool.version>
		<tomcat.embed.version>7.0.2</tomcat.embed.version>
		<jetty.version>7.6.15.v20140411</jetty.version>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>commons-beanutils</groupId>
				<artifactId>commons-beanutils</artifactId>
				<version>1.9.2</version>
			</dependency>
			<dependency>
				<groupId>log4j</groupId>
				<artifactId>log4j</artifactId>
				<version>1.2.17</version>
			</dependency>
	 
			<dependency>
				<groupId>mysql</groupId>
				<artifactId>mysql-connector-java</artifactId>
				<version>5.1.36</version>
			</dependency>
			<dependency>
				<groupId>org.apache.velocity</groupId>
				<artifactId>velocity</artifactId>
				<version>1.7</version>
			</dependency>
			<dependency>
				<groupId>org.apache.velocity</groupId>
				<artifactId>velocity-tools</artifactId>
				<version>2.0</version>
			</dependency>
			<dependency>  
			    <groupId>org.slf4j</groupId>  
			    <artifactId>slf4j-log4j12</artifactId>
			    <version>1.7.12</version>    
			</dependency>
			
			<!-- hibernate -->
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-entitymanager</artifactId>
				<version>${hibernate.version}</version>
			</dependency>
	
			<!-- spring data access -->
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-jpa</artifactId>
				<version>${spring-data-jpa.version}</version>
			</dependency>
	
			<!-- spring aop -->
			<dependency>
				<groupId>org.aspectj</groupId>
				<artifactId>aspectjrt</artifactId>
				<version>${aspectj.version}</version>
			</dependency>
			<dependency>
				<groupId>org.aspectj</groupId>
				<artifactId>aspectjweaver</artifactId>
				<version>${aspectj.version}</version>
				<scope>runtime</scope>
			</dependency>
	
			<!-- connection pool -->
			<dependency>
				<groupId>org.apache.tomcat</groupId>
				<artifactId>tomcat-jdbc</artifactId>
				<version>${tomcat-jdbc.version}</version>
				<scope>runtime</scope>
			</dependency>
	
			<!-- jdbc driver -->
			<dependency>
				<groupId>${jdbc.driver.groupId}</groupId>
				<artifactId>${jdbc.driver.artifactId}</artifactId>
				<version>${jdbc.driver.version}</version>
				<scope>runtime</scope>
			</dependency>
			<!-- PERSISTENCE end -->
	
			<!-- WEB begin -->
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-webmvc</artifactId>
				<version>${spring.version}</version>
			</dependency>
		
			<!-- sitemesh装饰器 -->
			<dependency>
				<groupId>opensymphony</groupId>
				<artifactId>sitemesh</artifactId>
				<version>${sitemesh.version}</version>
				<scope>runtime</scope>
			</dependency>
	
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>jstl</artifactId>
				<version>1.1.2</version>
				<!--<scope>provided</scope> -->
			</dependency>
	
			<!-- java JSTL标准标签库  -->
			<dependency>
				<groupId>taglibs</groupId>
				<artifactId>standard</artifactId>
				<version>1.1.2</version>
				<!--<scope>provided</scope> -->
			</dependency>
	
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>3.0.1</version>
				<scope>provided</scope>
			</dependency>
			<!-- WEB end -->
			
			<!-- SECURITY begin -->
			<!-- java安全框架 shiro,身份验证、授权、密码学和会话管理 -->
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-spring</artifactId>
				<version>${shiro.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-ehcache</artifactId>
				<version>${shiro.version}</version>
			</dependency>
			<!-- 编码解码 -->
			<dependency>
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>1.9</version>
			</dependency>
			<!-- SECURITY end -->
			
			<!-- JSR303 BeanValidator -->
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-validator</artifactId>
				<version>${hibernate-validator.version}</version>
			</dependency>

			<!-- JSON begin -->
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.module</groupId>
				<artifactId>jackson-module-jaxb-annotations</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<!-- JSON end -->

			<!-- LOGGING begin -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>

			<!-- 代码直接调用log4j会被桥接到slf4j -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>log4j-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
				<scope>runtime</scope>
			</dependency>
			<!-- 代码直接调用common-logging会被桥接到slf4j -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
				<scope>runtime</scope>
			</dependency>
			<!-- 代码直接调用java.util.logging会被桥接到slf4j -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jul-to-slf4j</artifactId>
				<version>${slf4j.version}</version>
				<scope>runtime</scope>
			</dependency>

			<dependency>
				<groupId>com.googlecode.log4jdbc</groupId>
				<artifactId>log4jdbc</artifactId>
				<version>1.2</version>
				<scope>runtime</scope>
			</dependency>
			<!-- LOGGING end -->

			<!-- GENERAL UTILS begin -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>${commons-lang3.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${guava.version}</version>
			</dependency>
			<!-- GENERAL UTILS end -->

			<!-- TEST begin <dependency> <groupId>io.springside</groupId> <artifactId>springside-core</artifactId> 
				<version>${springside.version}</version> <classifier>tests</classifier> <scope>test</scope> 
				</dependency> -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${assertj.version}</version>
				<scope>test</scope>
			</dependency>

			<!-- 模拟测试框架 -->
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
				<scope>test</scope>
			</dependency>

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

			<!-- selenium 2.0 自动化测试-->
			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-java</artifactId>
				<version>${selenium.version}</version>
				<scope>test</scope>
				<exclusions>
					<exclusion>
						<groupId>org.seleniumhq.selenium</groupId>
						<artifactId>selenium-htmlunit-driver</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.seleniumhq.selenium</groupId>
						<artifactId>selenium-android-driver</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.seleniumhq.selenium</groupId>
						<artifactId>selenium-iphone-driver</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.seleniumhq.selenium</groupId>
						<artifactId>selenium-safari-driver</artifactId>
					</exclusion>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-remote-driver</artifactId>
				<version>${selenium.version}</version>
				<scope>test</scope>
				<exclusions>
					<exclusion>
						<groupId>cglib</groupId>
						<artifactId>cglib-nodep</artifactId>
					</exclusion>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<!-- 轻量级内嵌数据库 -->
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>${h2.version}</version>
			</dependency>

	

			<!-- POST define start -->
			<dependency>
				<groupId>org.mybatis</groupId>
				<artifactId>mybatis</artifactId>
				<version>${mybatis.version}</version>
			</dependency>
			<!-- 网络通信 -->
			<dependency>
				<groupId>org.apache.geronimo.specs</groupId>
				<artifactId>geronimo-jms_1.1_spec</artifactId>
				<version>${geronimo.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-lang</groupId>
				<artifactId>commons-lang</artifactId>
				<version>${commons-lang.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.jackson</groupId>
				<artifactId>jackson-core-lgpl</artifactId>
				<version>${jackson-old.version}</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.jackson</groupId>
				<artifactId>jackson-mapper-lgpl</artifactId>
				<version>${jackson-old.version}</version>
			</dependency>
			<!-- xml与java相互转化的工具 -->
			<dependency>
				<groupId>com.thoughtworks.xstream</groupId>
				<artifactId>xstream</artifactId>
				<version>${xstream.version}</version>
			</dependency>
			
			<!-- 定时任务 -->
			<dependency>
				<groupId>org.quartz-scheduler</groupId>
				<artifactId>quartz</artifactId>
				<version>${quartz.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context-support</artifactId>
				<version>${spring-context-support.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-collections</groupId>
				<artifactId>commons-collections</artifactId>
				<version>${commons-collections.version}</version>
			</dependency>

			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-ibatis</artifactId>
				<version>${spring-ibatis.version}</version>
				<exclusions>
					<exclusion>
						<groupId>javax.servlet</groupId>
						<artifactId>javax.servlet-api</artifactId>
					</exclusion>
				</exclusions>
				<scope>compile</scope>
			</dependency>

			<!-- SOAP引擎 -->
			<dependency>
				<groupId>org.apache.axis</groupId>
				<artifactId>axis</artifactId>
				<version>${axis.version}</version>
			</dependency>
			<!-- 提供microsoft office文件的读写api -->
			<dependency>
				<groupId>org.apache.poi</groupId>
				<artifactId>poi</artifactId>
				<version>${poi.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-fileupload</groupId>
				<artifactId>commons-fileupload</artifactId>
				<version>${commons-fileupload.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-net</groupId>
				<artifactId>commons-net</artifactId>
				<version>${commons-net.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-validator</groupId>
				<artifactId>commons-validator</artifactId>
				<version>${commons-validator.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-httpclient</groupId>
				<artifactId>commons-httpclient</artifactId>
				<version>${commons-httpclient.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${commons-io.version}</version>
			</dependency>
			<!-- 操作xml数据文档 -->
			<dependency>
				<groupId>org.jdom</groupId>
				<artifactId>jdom</artifactId>
				<version>${jdom.version}</version>
			</dependency>
			<!-- 基础框架,用于方便构建和开发web服务 -->
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-api</artifactId>
				<version>${cxf.version}</version>
				<exclusions>
			        <!-- 排除冲突 -->
			        <exclusion>
			            <groupId>org.apache.geronimo.specs</groupId>
			            <artifactId>geronimo-javamail_1.4_spec</artifactId>
			        </exclusion>
			        <exclusion>
			            <groupId>org.apache.geronimo.specs</groupId>
			            <artifactId>geronimo-activation_1.1_spec</artifactId>
			        </exclusion>
  				  </exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-databinding-jaxb</artifactId>
				<version>${cxf.version}</version>
				<exclusions>
			        <!-- 排除冲突 -->
			        <exclusion>
			            <groupId>org.apache.geronimo.specs</groupId>
			            <artifactId>geronimo-javamail_1.4_spec</artifactId>
			        </exclusion>
			        <exclusion>
			            <groupId>org.apache.geronimo.specs</groupId>
			            <artifactId>geronimo-activation_1.1_spec</artifactId>
			        </exclusion>
  				  </exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-transports-http</artifactId>
				<version>${cxf.version}</version>
				<exclusions>
			        <!-- 排除冲突 -->
			        <exclusion>
			            <groupId>org.apache.geronimo.specs</groupId>
			            <artifactId>geronimo-javamail_1.4_spec</artifactId>
			        </exclusion>
			        <exclusion>
			            <groupId>org.apache.geronimo.specs</groupId>
			            <artifactId>geronimo-activation_1.1_spec</artifactId>
			        </exclusion>
  				  </exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-jms</artifactId>
				<version>${spring-jms.version}</version>
			</dependency>
			<!-- 生成javadoc -->
			<dependency>
				<groupId>com.thoughtworks.qdox</groupId>
				<artifactId>qdox</artifactId>
				<version>${qdox.version}</version>
			</dependency>
			<!-- 数据库连接池 -->
			<dependency>
				<groupId>commons-dbcp</groupId>
				<artifactId>commons-dbcp</artifactId>
				<version>${commons-dbcp.version}</version>
			</dependency>
			<!-- activeMQ消息机制 -->
			<dependency>
				<groupId>org.apache.activemq</groupId>
				<artifactId>activemq-client</artifactId>
				<version>${activemq-client.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>${spring.version}</version>
			</dependency>
			<!-- 书写匹配器对象时允许直接定义匹配规则的框架 -->
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>${hamcrest-core.version}</version>
				<scope>test</scope>
			</dependency>
			<!-- jdbc组件,大数据实时查询分析的分布式系统 -->
			<dependency>
				<groupId>com.alibaba</groupId>
				<artifactId>druid</artifactId>
				<version>${druid.version}</version>
			</dependency>

			<!-- POST define end -->

			<!-- 各种bom解决jar版本冲突 -->
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-framework-bom</artifactId>
				<version>${spring.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- 缓存,支持集群/分布式缓存 -->
			<dependency>
				<groupId>net.sf.ehcache</groupId>
				<artifactId>ehcache-core</artifactId>
				<version>2.6.9</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.2</version>
			</dependency>
			<!-- 分布式服务框架 与zookeeper springmvc整合使用(负载均衡、容错) -->
			<dependency>
				<groupId>com.alibaba</groupId>
				<artifactId>dubbo</artifactId>
				<version>2.8.4</version>
				<exclusions>
					<exclusion>
						<artifactId>spring</artifactId>
						<groupId>org.springframework</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<!-- 分布式应用程序协调服务 -->
			<dependency>
				<groupId>org.apache.zookeeper</groupId>
				<artifactId>zookeeper</artifactId>
				<version>3.3.6</version>
			</dependency>
			<!-- dubbo使用了zkClient与zookeeper交互 -->
			<dependency>
				<groupId>com.github.sgroschupf</groupId>
				<artifactId>zkclient</artifactId>
				<version>0.1</version>
			</dependency>
			<!-- Code生成类库,与jdk动态代理比较,不需实现一个huo多个接口 -->
			<dependency>
				<groupId>cglib</groupId>
				<artifactId>cglib</artifactId>
				<version>3.1</version>
			</dependency>

			<!-- shiro-web -->
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-web</artifactId>
				<version>1.2.4</version>
			</dependency>
			<!-- <dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-spring</artifactId>
				<version>1.2.4</version>
			</dependency> -->

			<!-- fastjson -->
			<dependency>
				<groupId>com.alibaba</groupId>
				<artifactId>fastjson</artifactId>
				<version>${fastjson.version}</version>
			</dependency>

			<!-- redis -->
			<dependency>
				<groupId>redis.clients</groupId>
				<artifactId>jedis</artifactId>
				<version>${jedis.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-pool</groupId>
				<artifactId>commons-pool</artifactId>
				<version>${commons-pool.version}</version>
			</dependency>
			<!-- belerweb: qq,weibo,chinese to pinyin,ali oss等 -->
			<dependency>
				<groupId>com.belerweb</groupId>
				<artifactId>qq-connect</artifactId>
				<version>1.0.2</version>
			</dependency>
			<dependency>
			  <groupId>com.weibo4j</groupId>
			  <artifactId>weibo4j</artifactId>
			  <version>1.0</version>
			</dependency>
			<!-- submail start -->
			<dependency>
				<groupId>org.apache.submail</groupId>
				<artifactId>httpclient_4.3.5.jar</artifactId>
				<version>4.3.5</version>
			</dependency>
			<dependency>
				<groupId>org.apache.submail</groupId>
				<artifactId>jsonlib</artifactId>
				<version>2.2.3</version>
				<classifier>jdk15</classifier>
			</dependency>
			<dependency>
				<groupId>org.apache.submail.beanutils</groupId>
				<artifactId>beanutils</artifactId>
				<version>1.7.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.submail</groupId>
				<artifactId>collections</artifactId>
				<version>3.2.1</version>
			</dependency>
			<!-- 复制bean -->
			<dependency>
				<groupId>org.apache.submail</groupId>
				<artifactId>ezmorph</artifactId>
				<version>1.0.3</version>
			</dependency>
			<dependency>
				<groupId>org.apache.submail</groupId>
				<artifactId>lang</artifactId>
				<version>2.3</version>
			</dependency>
			<dependency>
				<groupId>org.apache.submail</groupId>
				<artifactId>logging</artifactId>
				<version>1.1.1</version>
			</dependency>
			<!-- submail end -->
			<dependency>
  				<groupId>org.apache.activemq</groupId>
  				<artifactId>activemq-web</artifactId>
  				<version>5.10-SNAPSHOT</version>
			</dependency>
            
            <!-- 统一配置管理 -->
            <dependency>
                <groupId>com.baidu.disconf</groupId>
                <artifactId>disconf-client</artifactId>
                <version>2.6.27</version>
                <exclusions>
                	<exclusion>
                		<groupId>ch.qos.logback</groupId>
                		<artifactId>logback-core</artifactId>
                	</exclusion>
                	<exclusion>
						<groupId>ch.qos.logback</groupId>
						<artifactId>logback-classic</artifactId>
                	</exclusion>
                </exclusions>
            </dependency>
            
            <!-- 加密包 -->
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt</artifactId>
                <version>1.9.2</version>
            </dependency>
            
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt-spring31</artifactId>
                <version>1.9.2</version>
            </dependency>
            <!-- 二维码读取与生成工具 -->
            <dependency>
				<groupId>com.google.zxing</groupId>
				<artifactId>core</artifactId>
				<version>2.2</version>
			</dependency>
			<dependency>
				<groupId>com.google.zxing</groupId>
				<artifactId>javase</artifactId>
				<version>2.2</version>
			</dependency>
            <!-- Java bean mapping framework -->
            <dependency>
                <groupId>ma.glasnost.orika</groupId>
                <artifactId>orika-core</artifactId>
                <version>1.4.6</version>
            </dependency>
            <!-- 文件格式互转工具 -->
			<dependency>
			  <groupId>fakepath</groupId>
			  <artifactId>jodconverter-cli</artifactId>
			  <version>${jodconverter-cli.version}</version>
			</dependency>
			<dependency>
			  <groupId>fakepath</groupId>
			  <artifactId>jodconverter</artifactId>
			  <version>${jodconverter.version}</version>
			</dependency>
			<!-- 文字处理 -->
			<dependency>
				<groupId>org.openoffice</groupId>
				<artifactId>ridl</artifactId>
				<version>${ridl.version}</version>
			</dependency>
			<dependency>
				<groupId>org.openoffice</groupId>
				<artifactId>unoil</artifactId>
				<version>${unoil.version}</version>
			</dependency>
			<dependency>
				<groupId>org.openoffice</groupId>
				<artifactId>jurt</artifactId>
				<version>${jurt.version}</version>
			</dependency>
			<dependency>
				<groupId>org.openoffice</groupId>
				<artifactId>juh</artifactId>
				<version>${juh.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<!-- 构建过程的设置
	<build>...</build>
	<reporting>...</reporting> -->
	<build>
		<plugins>

			<!-- compiler插件, 设定JDK版本 -->
			<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> 
				<version>3.0</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> 
				<showWarnings>true</showWarnings> </configuration> </plugin> -->

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>2.6</version>
			</plugin>

			<!-- error prone 编译的时候加上另外的检查项 -->
			<!-- -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.0</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<showWarnings>true</showWarnings>
					<compilerId>javac-with-errorprone</compilerId>
					<forceJavacCompilerUse>true</forceJavacCompilerUse>
					<encoding>UTF-8</encoding>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.plexus</groupId>
						<artifactId>plexus-compiler-javac-errorprone</artifactId>
						<version>2.4</version>
					</dependency>
				</dependencies>
			</plugin>

			<!-- PMD源码分析  -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<targetJdk>1.6</targetJdk>
				</configuration>
			</plugin>

			<!-- check style代码格式检查 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.5</version>
			</plugin>

			<!-- 代码相似度检查
			<plugin>
				<groupId>org.codehaus.mojo</groupId>  
				<artifactId>simian-maven-plugin</artifactId> 
				<version>2.5</version>
			</plugin>  -->

			<!-- 格式化统计报告
			<plugin>
				<groupId>org.codehaus.mojo</groupId>  
				<artifactId>jdepend-maven-plugin</artifactId> 
				<version>2.5</version>
			</plugin> -->

			<!-- findbugz,FireBug检查 -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>2.3.1</version>
			</plugin>

			<!-- war打包插件, 设定war包名称不带版本号 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<warName>${project.artifactId}</warName>
				</configuration>
			</plugin>

			<!-- test插件, 仅测试名称为*Test的类,使用支持分组测试的surefire-junit47 driver -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.16</version>
				<configuration>
					<includes>
						<include>**/*Test.java</include>
					</includes>
					<argLine>-Xmx256M</argLine>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.surefire</groupId>
						<artifactId>surefire-junit47</artifactId>
						<version>2.16</version>
					</dependency>
				</dependencies>
			</plugin>

			<!-- 增加functional test的Source目录 -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<id>add-functional-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/test/functional</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- cobertura插件, 设置不需要计算覆盖率的类 
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
				<executions>
					<execution>
						<id>add-cobertura</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>cobertura</goal>
						</goals>
						<configuration>
							<encoding>UTF-8</encoding>
							<formats>
								<format>html</format>
								<format>xml</format>
							</formats>
							<instrumentation>
								<excludes>
									<exclude>**/entity/**/*.class</exclude>
									<exclude>**/*Controller.class</exclude> 
								</excludes>
							</instrumentation>
						</configuration>
					</execution>
				</executions>

			</plugin>
            -->

			<!-- enforcer插件, 避免被依赖的依赖引入过期的jar, 老Spring包编译不过. 暂时屏蔽 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>1.3.1</version>
				<executions>
					<execution>
						<id>enforce-banned-dependencies</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>3.0.3</version>
								</requireMavenVersion>
								<requireJavaVersion>
									<version>1.6</version>
								</requireJavaVersion>
								<bannedDependencies>
									<searchTransitive>true</searchTransitive>
									<excludes>
										<!-- <exclude>commons-logging</exclude> -->
										<exclude>aspectj:aspectj*</exclude>
										<!-- <exclude>org.springframework</exclude> -->
									</excludes>
									<includes>
										<include>org.springframework:*:4.0.*</include>
									</includes>
								</bannedDependencies>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
				</executions>
			</plugin>


			<!-- resources插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
			</plugin>

			<!-- install插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>2.5.1</version>
			</plugin>

			<!-- ant插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.2</version>
				<configuration>
					<tagBase>svn://192.168.51.168/example/tag/</tagBase>
				</configuration>
			</plugin>

			<!-- jxr -->
			<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> 
				<version>2.3</version> </plugin> -->

			<!-- 使用mvn site生成全站report -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.4</version>
				<!-- <configuration> <reportPlugins> <plugin> <groupId>org.apache.maven.plugins</groupId> 
					<artifactId>maven-javadoc-plugin</artifactId> <version>2.7</version> </plugin> 
					</reportPlugins> </configuration> -->
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>taglist-maven-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<tags>
						<tag>TODO</tag>
						<tag>@TODO</tag>
						<tag>FIXME</tag>
					</tags>
				</configuration>
			</plugin>


			<!-- 内嵌TOMCAT启动 -->
			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<!-- http port -->
					<port>8086</port>
					<!-- application path always starts with / -->
					<path>/</path>
					<!-- optional path to a context file -->
					<contextFile>D:\apache-tomcat-7.0.2\conf</contextFile>
					<!-- if you want to use test dependencies rather than only runtime -->
					<useTestClasspath>false</useTestClasspath>
					<!-- optional if you want to add some extra directories into the classloader -->
					<additionalClasspathDirs>
						<additionalClasspathDir />
					</additionalClasspathDirs>
				</configuration>
			</plugin>

			<!--远程发布war包到其它机器上 -->
			<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> 
				<version>1.0</version> <executions> <execution> <id>upload-war</id> <phase>package</phase> 
				<goals> <goal>upload-single</goal> </goals> <configuration> <fromFile>target/name.war</fromFile> 
				<url>scpexe://root@IP/opt/archive</url> <server>server-158</server> 
				<skip>false</skip> <toFile>name-webapp.war</toFile> </configuration> </execution> 
				</executions> </plugin> -->

			<!-- 
			<plugin>
				<artifactId>exec-maven-plugin</artifactId>
				<groupId>org.codehaus.mojo</groupId>
				<version>1.0</version>
				<executions>
					<execution>
						<id>copy-war</id>
						<phase>post-site</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>deploy.sh</executable>
						</configuration>
					</execution>
				</executions>
			</plugin> -->

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.5.201505241946</version>
				<executions>
					<execution>
						<id>pre-test</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>post-test</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>build-helper-maven-plugin</artifactId>
										<versionRange>[1.8,)</versionRange>
										<goals>
											<goal>add-test-source</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

	</build>
	
	
	<!-- 项目信息设置
	<name>...</name>
	<description>...</description>
	<url>...</url>
	<inceptionYear>...</inceptionYear>
	<licenses>...</licenses>
	<organization>...</organization>
	<developers>...</developers>
	<contributors>...</contributors> -->
	<name>personal</name>
	
	
	<!-- 环境设置
	<issueManagement>...</issueManagement>
	<ciManagement>...</ciManagement>
	<mailingLists>...</mailingLists>
	<scm>...</scm> 版本管理
	<prerequisites>...</prerequisites>
	<repositories>...</repositories>
	<pluginRepositories>...</pluginRepositories>
	<distributionManagement>...</distributionManagement> 负责管理构件的发布
	<profiles>...</profiles> 区分定义位置:setting.xml和pom.xml. 可定义一系列的配置信息,然后指定其激活条件-->
	
	<profiles>
		<!-- 执行functional test
		<profile>
			<id>functional-test</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<argLine>-Xmx256M -XX:MaxPermSize=128m</argLine>
							<includes>
								<include>**/*FT.java</include>
							</includes> -->
							<!-- 支持taglib tld文件查找的必要设置
							<useSystemClassLoader>false</useSystemClassLoader> -->
							<!-- 将mvn命令行传入的selenium driver参数传入surefire的JVM
							<systemPropertyVariables>
								<selenium.driver>${selenium.driver}</selenium.driver>
							</systemPropertyVariables>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile> -->

		<!-- 执行@Category(Smoke.class)的TestCase
		<profile>
			<id>run-smoke</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>org.springside.modules.test.category.Smoke</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>refresh-db</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<configuration>
							<target>
								<property
									file="src/main/resources/application.development.properties" />
								<property file="src/main/resources/application.properties" />
								<sql driver="${jdbc.driver}" url="${jdbc.url}" userid="${jdbc.username}"
									password="${jdbc.password}" οnerrοr="continue"
									encoding="${project.build.sourceEncoding}">
									<classpath refid="maven.test.classpath" />
									<transaction src="src/main/resources/sql/h2/schema.sql" />
									<transaction src="src/test/resources/data/h2/import-data.sql" />
								</sql>
							</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile> -->
	</profiles>
	
	<!-- 
	<distributionManagement>
		<site>
			<id>certain-site</id>
			<url>file:D:\\site</url>
		</site>

		<repository>
			<id>release</id>
			<layout>default</layout>
			<url>http://hosturl:8082/nexus/content/repositories/releases/</url>
		</repository>
		<snapshotRepository>
			<id>snapshots</id>
			<layout>default</layout>
			<url>http://<span style="font-family: Arial, Helvetica, sans-serif;">hosturl</span>:8082/nexus/content/repositories/snapshots/</url>
		</snapshotRepository>
	</distributionManagement> -->

	<!-- 
	<scm>
		<connection>scm:svn:svn://ip/example/trunk/</connection>
		<developerConnection>scm:svn:svn://ip/example/trunk/</developerConnection>
	</scm> -->
	
</project>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值