Showing posts with label excludes. Show all posts
Showing posts with label excludes. Show all posts

Tuesday, December 4, 2012

Maven Is Back, Stronger Than Ever

Guess what this does, in proper maven resource plugin context:

<configuration>
<outputDirectory>target/classes</outputDirectory>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.class</exclude>
<exclude>**/.svn</exclude>
</excludes>
<resources>
<resource>
<directory>src/test/java</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>

Copies resources out of src/test/java and src/main/java, excluding files matching the specified patterns? 

Wrong. Or, mostly wrong. 

The exclusions will apply to the src/test/java directory paths, but not the src/main/java. Yep, at least in the version we use. 

Caveat utilitor.