maven 插件的应用

在pom.xml里配置 以测试插件介绍为主

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>
jar
</goal>

<goal>
test-jar
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14</version>
<configuration>
<!-- 设置包含的测试类 -->
<includes>
<include>
**/Test*
</include>
</includes>
<!-- 设置不进行测试的类 -->
<excludes>
<exclude>App*</exclude>
</excludes>

</configuration>
</plugin>
</plugins>
</build>

posted @ 2018-03-09 13:34  逆水乘舟,不进则退  阅读(106)  评论(0编辑  收藏  举报