Hello Adam,

Thank you very much. The exclude worked for me.
I think it would be hepful for others if it is part of the documentation.

I have a question though.
What if I have several srcDir and would like to exclude only from one
of them, e.g.:

sourceSets {
        main {
                java {
                        srcDir new File(webAppDirName, 'src')
                        srcDir new File(webInfDir, 'src')
                        exclude '**/someDirToBeExcludedOnlyFromWebAppDirName/**'
                }
        }
}


On Wed, Nov 24, 2010 at 10:26 AM, Adam Murdoch-3 [via Gradle]
<[email protected]> wrote:
>
> On 24/11/2010, at 9:15 AM, omax wrote:
>
> Hello,
>
> I have usual setup of my sourceSets as following:
>
> sourceSets {
> main {
> java {
> srcDir 'src'
> }
> }
> }
>
> But some java sources are not compilable and I would like to exclude them.
> Is there any easy way to do it with gradle?
>
> Yes. You can do this:
> sourceSets {
>     main {
>         java {
>             srcDir 'src'
>             exclude '**/uncompilable/**'
>        }
>    }
> }
>
>
> I could do it with Maven using standard excludes as following:
>
>            <plugin>
>                <artifactId>maven-compiler-plugin</artifactId>
>                <configuration>
>                    <excludes>
>                        <exclude>**/uncompilable/**</exclude>
>                    </excludes>
>                </configuration>
>             </plugin>
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/Exclude-some-java-classes-packages-from-compilation-sourceSets-tp3277622p3277622.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
>
> --
> Adam Murdoch
> Gradle Developer
> http://www.gradle.org
> CTO, Gradle Inc. - Gradle Training, Support, Consulting
> http://www.gradle.biz
>
>
>
> ________________________________
> View message @
> http://gradle.1045684.n5.nabble.com/Exclude-some-java-classes-packages-from-compilation-sourceSets-tp3277622p3278064.html
> To unsubscribe from Exclude some java classes packages from
> compilation/sourceSets, click here.



-- 
Thanks,
Oleksandr Maksymchuk

-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/Exclude-some-java-classes-packages-from-compilation-sourceSets-tp3277622p3278090.html
Sent from the gradle-user mailing list archive at Nabble.com.

Reply via email to