I am a total newb to Gradle and Groovy but the below didn't work for me until
I changed: 

    pom.dependencies = pom.dependencies.collect { dep -> dep.scope != 'test'
}
into
    pom.dependencies = pom.dependencies.findAll { dep -> dep.scope != 'test'
}


hansd wrote
> 
> On Fri, Apr 2, 2010 at 5:03 PM, Shay Banon <kimchy@> wrote:
> 
>>
>> You sure that this is the correct stage? I added the mentioned logic to
>> the
>> uploadArchives, and nothing is changed. It seems like the
>> pom.dependencies
>> is empty at this stage...
>>
> 
> Of course. Sorry:
> 
> uploadArchives {
>      repositories.mavenDeployer {
>          repository(url: "file://localhost/tmp/myRepo/")
>          pom.whenConfigured { pom ->
>             pom.dependencies = pom.dependencies.collect { dep -> dep.scope
> != 'test' } // removes the test scoped ones
>             pom.dependencies.findAll { dep -> // someCriteria }*.scope ==
> 'runtime'
>          }
>     }
> }
> 
> That should work.
> 
> - Hans
> 
> --
> Hans Dockter
> Founder, Gradle
> http://www.gradle.org, http://twitter.com/gradleorg
> CEO, Gradle Inc. - Gradle Training, Support, Consulting
> http://www.gradle.biz
> 
> 
> 


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/maven-pom-generation-tp1431537p5611454.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