1、maven-jar-plugin插件

<!-- 排除资源文件中的properties文件,不需要打到jar中,后面通过assembly插件打包到conf目录中 --><plugin>    <artifactId>maven-jar-plugin</artifactId>    <configuration>        <excludes>            <exclude>**/*.properties</exclude>            <exclude>**/*.xml</exclude>            <exclude>**/*.conf</exclude>        </excludes>    </configuration></plugin>

这个插件通常不需要手动指定,默认mvn install 的时候就会运行,但是如果想排除某些资源文件,就需要手动指定一下了

2、maven-dependency-plugin<plugin> <!-- maven-dependency-plugin 会拷贝所有依赖的jar包,包括传递依赖的jar包都会拷贝 --> <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-dependency-plugin</artifactId>    <executions>        <execution>            <id>copy</id>            <phase>install</phase>            <goals>                <goal>copy-dependencies</goal>            </goals>            <configuration>                <outputDirectory>lib</outputDirectory>            </configuration>        </execution>    </executions></plugin>maven默认是不理会项目所依赖的jar包的,但是如果要发布项目,需要通过maven-dependency-plugin将项目所依赖的jar包输出到lib目录;maven-dependency-plugin 会拷贝所有依赖的jar包,包括传递依赖的jar包都会拷贝,比如项目依赖于a.jar,而a.jar的项目依赖b.jar,c.jar,那么maven-dependency-plugin会将a.jar,b.jar,c.jar一起拷贝到项目的lib目录

3、如果项目要发布源码,需要用到maven-source-plugin<!-- Source attach plugin --><plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-source-plugin</artifactId>    <executions>        <execution>            <id>attach-sources</id>            <goals>                <goal>jar</goal>            </goals>        </execution>    </executions></plugin>

4、maven-release-plugin<!-- package release plugin --><plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-release-plugin</artifactId>    <version>2.5</version></plugin>这个插件暂时还不知道有什么用

5、maven-Javadoc-plugin<plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-javadoc-plugin</artifactId>    <version>2.7</version>    <executions>        <execution>            <id>attach-javadocs</id>            <goals>                <goal>jar</goal>            </goals>        </execution>    </executions></plugin>

6、maven-war-plugin<plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-war-plugin</artifactId>    <version>2.1.1</version>    <configuration>        <webResources>            <resource>                <directory>src/main/webapp</directory>                <excludes>                    <exclude>**/*.jpg</exclude>                </excludes>            </resource>        </webResources>    </configuration></plugin>这个插件通常不需要手动指定,默认mvn install 的时候就会运行,但是如果想排除某些资源文件,就需要手动指定一下了
tomcat插件
<plugin>    <groupId>org.apache.tomcat.maven</groupId>    <artifactId>tomcat7-maven-plugin</artifactId>    <version>2.0</version>    <configuration>        <path>/</path>        <port>80</port>        <uriEncoding>UTF-8</uriEncoding>        <url>http://localhost/manager/text</url>        <server>tomcat6</server>    </configuration></plugin><plugin>    <groupId>org.codehaus.mojo</groupId>    <artifactId>tomcat-maven-plugin</artifactId>    <version>1.1</version>    <configuration>        <path>/</path>        <port>80</port>        <uriEncoding>UTF-8</uriEncoding>        <url>http://localhost/manager/text</url>        <server>tomcat6</server>    </configuration></plugin>
代码规范检查插件
<plugin>  <groupId>org.apache.maven.plugins</groupId>  <artifactId>maven-checkstyle-plugin</artifactId>  <configuration>    <configLocation>my_check.xml</configLocation>  </configuration></plugin>my_check.xml : https://git.oschina.net/it-much/dubbo-demo/blob/master/dubbo-parent/my_check.xml?dir=0&filepath=dubbo-parent%2Fmy_check.xml&oid=8c10ce5ce32148fba20c847cbf5baf310f7826f2&sha=57d2861736831834d7d16a3c61c315b6dde14bda

资料: http://iffiffj.iteye.com/blog/1661936
        http://zheng12tian.iteye.com/blog/1771040

http://www.cnblogs.com/Binhua-Liu/p/5604841.html

最新文章

  1. Android开源框架:NineOldAndroid
  2. centos 安装和配置 rabbitmq
  3. Hadoop.2.x_集群初建
  4. 13.第一个只出现一次的字符[FindFirstNotRepeatingChar]
  5. Asp.net笔记(原创)
  6. HDU 4041 Eliminate Witches! (模拟题 ACM ICPC 2011亚洲北京赛区网络赛)
  7. Qt Creator键盘快捷键速查
  8. C语言之基本算法35—数组上三角之积 主对角之积 副对角之积
  9. 使用TcpTrace小工具截获Web Service的SOAP报文
  10. 11.Java 加解密技术系列之 总结
  11. JAVA中线程同步方法
  12. c++面试题一
  13. jsoncpp
  14. NIO之缓冲区
  15. JS——页面倒计时跳转
  16. groovy 从jsonList中读取某个字段
  17. MySQL在线大表DDL操作
  18. 在Android工程中加入AIDL文件时,gen目录生成的文件报错-问题解决
  19. 女超人第三季/全集Supergirl迅雷下载
  20. 机器学习理论基础学习18---高斯过程回归(GPR)

热门文章

  1. the c programming language 2-3
  2. ACM HDU 2674 N! Again(数论)
  3. Android Studio中JNI -- 2 -- 编写c文件
  4. linux vim 基本操作
  5. jquery 幻灯片
  6. web系统
  7. MVC5框架解析之MvcHandler
  8. Socket 错误总结
  9. NWERC 2012 Problem I Idol
  10. RSA算法原理(二)