You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Balasubramanian, Ravi Shankar" <rb...@informatica.com> on 2009/03/13 02:27:36 UTC

Is there a way to exclude a source root in the compiler plugin ?

Hi all, 

I want to know if there is a way to exclude a source root when the
compiler plugin executes. 

 

When I execute a command such as: 

mvn generate-sources-plugin:generate clover2:setup test

 

the first plugin generates source code for me into
target/generated-sources and clover2:setup generates the instrumented
sources for these generated sources in target/clover/src and when test
is executed, the compiler plugin tries to compile classes in both
target/generated-sources and target/clover/src since the clover plugin
adds that to the build path of the project. Since the generated-sources
and the clover instrumented files have the same package and names, the
compiler plugin throws a duplicate class error. So, is there a way to
tell the maven-compiler-plugin to compile only the classes in the
target/clover/src directory and not the target/generated-sources
directory ? 

 

 

Thanks, 

Ravi