对于源代码,在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>
[color=blue][b] <excludes>
<exclude>**/sdh/**</exclude>
</excludes>
<testExcludes> <testExclude>**/sdh/**</testExclude>
</testExcludes>[/b][/color] </configuration>
</plugin>
</plugins>
</build>
对于测试代码,在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>
[color=blue][b] <excludes>
<exclude>**/sdh/**</exclude>
</excludes>
<testExcludes> <testExclude>**/sdh/**</testExclude>
</testExcludes>[/b][/color] </configuration>
</plugin>
</plugins>
</build>