I am writing a maven 2 plugin and I would like to exclude all java files associated with the source repository that I am using, which is BitKeeper. These files are stored in SCCS directories. Until now, I have not been successful.
When I add a maven-compile-plugin with data exception, it works (BitKeeper files are excluded) if I execute the mvn: compile compiler. But this is not related to the compilation phase. So when I run mvn compilation it explodes trying to compile a specific java file for version control. Any help or pointers appreciated.
One more note: everything works fine if I change the packaging from “maven-plugin” to “jar”, which, of course, I can’t do all the time, since this is the maven plugin I'm trying to write.
Sorry if this is answered elsewhere. I looked at a few hours here and through maven docs, but everything related to this topic seems to be related to writing code that will be packaged in banks, and not in maven plugins.
Here is 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>
Thanks to everyone who has an idea about this,
-Denali
source
share