You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by שרון דגן <sh...@gmail.com> on 2007/10/27 22:27:58 UTC

extra source dirs in compiler plugin

Hi,

I'm trying to add an extra source directory to the compiler plugin:

...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
  <includes>
    <include>/tmp/generated-src/**/*.java</include>
  </includes>
</configuration>
...

But it doesn't work, the sources are not compiled.
It seems that you cannot specify a directory that is outside of "<project
root>/src/main/java".

Any idea?

Thanks,
-S.

Re: extra source dirs in compiler plugin

Posted by Wayne Fay <wa...@gmail.com>.
You need to use build-helper-maven-plugin to do this:
http://mojo.codehaus.org/build-helper-maven-plugin/howto.html

Wayne

On 10/27/07, שרון דגן <sh...@gmail.com> wrote:
> Hi,
>
> I'm trying to add an extra source directory to the compiler plugin:
>
> ...
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
>  <includes>
>    <include>/tmp/generated-src/**/*.java</include>
>  </includes>
> </configuration>
> ...
>
> But it doesn't work, the sources are not compiled.
> It seems that you cannot specify a directory that is outside of "<project
> root>/src/main/java".
>
> Any idea?
>
> Thanks,
> -S.
>