« Return to Thread: NPE when using exclude rules

Re: NPE when using exclude rules

by Rafael Serrano :: Rate this Message:

Reply to Author | View in Thread

Hi,

I've tried the latest snapshot I've seen (gradle-0.6-20090520111850+1000-all.zip) and doesn't work either (still getting the NPE).

Now I'm downloading the source code from the repository to give it a try.

Thanks
Rafa

hdockter wrote:
On May 26, 2009, at 9:38 PM, Rafael Serrano wrote:

>
> 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

I'm pretty sure that this is related to the fixed (in trunk) issue: http://jira.codehaus.org/browse/GRADLE-499 
. But I haven't tried it yet.

It would be awesome if you could use the latest snapshot and give it a  
try (http://gradle.org/snapshots.html).

- Hans

>
>
>
> 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
>
>

--
Hans Dockter
Gradle Project Manager
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 « Return to Thread: NPE when using exclude rules