You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marie Sauvage <ma...@ebmwebsourcing.com> on 2006/11/22 10:35:09 UTC

different sources for maven compiling and Eclipse building

Hi !

I have to use 2 different sources directories : one for Eclipse project 
building and one for maven compiling, because of a transition phase of 
annotation processing.
I thought of using profiles (one for the "mvn eclipse:eclipse" and one 
for "mvn") but we can't define multiple <sourceDirectory>, so it doesn't 
work (I can't make it work...).
By default the Eclipse building includes all ${basedir} but my 
generated-sources directory is in there (${basedir}/target/spooned) so 
classes are duplicated (sources are in ${basedir}/src ) and hundreds of 
errors appears. Is there a way in the pom.xml to exclude some 
directories in Eclipse project ?

Do someone have an idea on how to do that ?

thanks in advance,
Marie Sauvage.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: different sources for maven compiling and Eclipse building

Posted by Marie Sauvage <ma...@ebmwebsourcing.com>.
Hi, it's me anymore !

I found the <exclude> directive and try this in my build to exclude the 
spooned directory from project :
            <resource>
                <directory>${basedir}/target/spooned</directory>
                <excludes>
                    <exclude>**/*</exclude>
                </excludes>
            </resource>

but in the build log, I have this :

    [INFO] [eclipse:eclipse]
    [WARNING] This plugin currently doesn't support include patterns for
    resources. Adding the entire directory.
    [WARNING] This plugin currently doesn't support exclude patterns for
    resources. Adding the entire directory.
    [WARNING] This plugin currently doesn't support include patterns for
    resources. Adding the entire directory.
    [WARNING] This plugin currently doesn't support include patterns for
    resources. Adding the entire directory.
    [WARNING] This plugin currently doesn't support include patterns for
    resources. Adding the entire directory.

(one include message for each <include> in the pom)

is there a way to "redirect" the parent directory to make maven include 
for example ${basedir}/src instead of ${basedir} ?

I think of having my generated-sources (target/spooned) outside the 
basedir but, as we have multiple projects, this architecture isn't 
convenient...

Marie Sauvage a écrit :
> Hi !
>
> I have to use 2 different sources directories : one for Eclipse 
> project building and one for maven compiling, because of a transition 
> phase of annotation processing.
> I thought of using profiles (one for the "mvn eclipse:eclipse" and one 
> for "mvn") but we can't define multiple <sourceDirectory>, so it 
> doesn't work (I can't make it work...).
> By default the Eclipse building includes all ${basedir} but my 
> generated-sources directory is in there (${basedir}/target/spooned) so 
> classes are duplicated (sources are in ${basedir}/src ) and hundreds 
> of errors appears. Is there a way in the pom.xml to exclude some 
> directories in Eclipse project ?
>
> Do someone have an idea on how to do that ?
>
> thanks in advance,
> Marie Sauvage.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org