maven-compiler-plugin exclude
Posted
by easyrider
on Stack Overflow
See other posts from Stack Overflow
or by easyrider
Published on 2010-06-12T12:08:03Z
Indexed on
2010/06/12
12:12 UTC
Read the original article
Hit count: 307
Hi,
I have a following Problem. I would like to exclude some .java files (*/jsfunit/.java) during test-compile phace and on the other side i would like to include them during compile phace (id i start tomact with tomcat:run goal)
My pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<!-- <excludes>
<exclude>**/*JSFIntegration*.java</exclude>
</excludes> -->
</configuration>
<executions>
<!-- <execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<includes>
<include>**/jsfunit/*.java</include>
</includes>
</configuration>
</execution>-->
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<configuration>
<excludes>
<exclude>**/jsfunit/*.java</exclude>
</excludes>
</configuration>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
But it does not work : exclude in default-testCompile execution does not filter these classes. If i remove the comments then all classes matched */jsfunit/.java would be compiled but only if i touch them!
Please help!
Thanx in advance
© Stack Overflow or respective owner