对于源代码,在POM文件中增加<excludes><exclude></exclude></excludes>参数;
对于测试代码,在POM文件中增加<testExcludes><testExclude></testExclude></testExcludes>参数.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<excludes>
<exclude>**/sdh/**</exclude>
</excludes>
<testExcludes> <testExclude>**/sdh/**</testExclude>
</testExcludes> </configuration>
</plugin>
</plugins>
</build>
用mvn如何选择不编译某些文件
猜你喜欢
转载自fanrey.iteye.com/blog/1616125
今日推荐
周排行