I'm writing a maven 2 plugin and I'd like to exclude all the java files related to the source repository I'm using, which is BitKeeper. These files live in directories called SCCS. So far, I've been unsuccessful.
When I add the maven-compile-plugin with excludes data, it works (the BitKeeper files are excluded) if I execute mvn compiler:compile. But this is not binding to the compile phase. So that when I run mvn compile, it blows up trying to compile a source control specific java file. Any help or pointers appreciated.
Another thing to note: Everything works perfectly if I change the packaging from "maven-plugin" to "jar", which of course, I can't do permanently since this is a maven plugin I am trying to write.
I'm sorry if this is answered elsewhere. I've looked around for several hours here and through the maven docs, but everything on this topic seems to be related to writing code which will be packaged in jars, not maven plugins.
Here's my pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.mygroup</groupId>
<artifactId>special-persistence-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>1.0-SNAPSHOT</version>
<name>Special Persistence Plugin</name>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<excludes>
<exclude>**/SCCS/**/*.java</exclude>
</excludes>
<phase>compile</phase>
<goals>
<goal>compiler:compile</goal>
</goals>
</configuration>
</plugin>
</plugins>
</build>
</project>
Thank you to anyone with ideas about this,
-Denali