Hi Hans,

Thanks for the quick reply. I over-simplified my use case and that example
works, but I have just found the problem and it comes when using a flatDir
resolver. Here is a failing script:
repositories {
        flatDir name: 'lib', dirs: "src/lib"
    mavenCentral().checkconsistency = false
}

configurations {
        all*.exclude group: "hsqldb"
}

dependencies {
        compile "dk.eobjects.commons:MetaModel:1.0.7"
        compile ":gdata-core:1.0"
}

task myTask << {
        configurations.testRuntime.each { file -> println file } 
}

The problem seem to be that I can't reference any library with an empty
group, so I have changed my dependency to:
compile "a:gdata-core:1.0"
and moved accordingly my JAR to "src/lib/a/gdata-core". This workaround is
working for me, but anyway I'm gonna post a JIRA on this.

Thanks for your help. Regards
Rafa


hdockter wrote:
> 
> Hi Rafa,
> 
> I can't reproduce this. The following code works for me (MetaModel has  
> a dependency on hsqldb):
> 
> usePlugin 'java'
> 
> repositories {
>       mavenCentral()
> }
> 
> configurations {
>    all*.exclude group: "hsqldb"
> }
> 
> dependencies {
>       compile "dk.eobjects.commons:MetaModel:1.0.7"
> }
> 
> task myTask << {
>       configurations.testRuntime.each { file -> println file }
> }
> 
> P.S. You don't need to quote the task name any more when creating it.
> 
> Could you create a test case and file a Jira?
> 
> - Hans
> 
> 

-- 
View this message in context: 
http://www.nabble.com/NPE-when-using-exclude-rules-tp23728395p23729882.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


Reply via email to