Thank you for the quick replies, the configurations section is indeed useless 
in this case

Regards
Ale
-- 


Jason Porter <[email protected]> kirjoitti 29.9.2010 kello 21.59:

> The only time you need the configurations section is
> 
> 1) if you are creating new configurations outside of the default
> (compile, runtime, testCompile, testRuntime), or
> 2) modifying existing ones (compile extendsFrom ...)
> 
> What this is actually doing is setting up the Ivy configurations.  If
> you're using all the stock stuff you don't need to mess with it.
> 
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
> 
> Software Engineer
> Open Source Advocate
> 
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu
> 
> 
> 
> On Wed, Sep 29, 2010 at 11:29, Paul Speed <[email protected]> 
> wrote:
>> I'm no expert but I've done similar to generate classpaths, build distro
>> zips, etc.... in my experience, you shouldn't need the configurations {}
>> section.  You will still need it in the task itself.
>> 
>> Did you have a problem when not using that section?  The only other major
>> difference I can see between my code and yours is the 'configuration-time'
>> versus 'execution-time' issue.
>> 
>> For example, my task might have been written as:
>> task print_dependencies(dependsOn: assemble) << {
>>    configurations.compile.files.each { file ->
>>        println "$file.name <http://file.name> -> $file.path"
>>    }
>> }
>> 
>> Actually, in case it helps, here is an example of a plug-in I use to
>> generate a windows setclasspath script:
>> 
>> http://filament.svn.sourceforge.net/viewvc/filament/trunk/gradle-plugins/setclasspath.gradle?revision=431
>> 
>> Again, I don't know if it's the best way.  Would also be curious to know if
>> there are better ways, actually.  But at least I didn't need to put a
>> redundant 'configurations' section.
>> 
>> -Paul
>> 
>> Alessandro Novarini wrote:
>>> 
>>> Hello list,
>>> 
>>> This is my first message here, sorry if my question is going to be naive.
>>> 
>>> I'm trying to get the dependencies of a project so that I can copy them in
>>> my package; the test I'm running now is just to print their path.
>>> 
>>> What I did is the following:
>>> 
>>> apply plugin: 'java'
>>> repositories {
>>>    mavenCentral()
>>> }
>>> configurations {
>>>    compile
>>> }
>>> dependencies {
>>>    compile group: 'commons-digester', name: 'commons-digester', version:
>>> '2.1', transitive: true
>>> }
>>> task print_dependencies(dependsOn: assemble) {
>>>    configurations.compile.files.each { file ->
>>>        println "$file.name <http://file.name> -> $file.path"
>>>    }
>>> }
>>> 
>>> 
>>> The question is: how I can get rid of the "configurations" section? I
>>> mean, isn't it a sort of duplication with the dependencies section?
>>> I tried to use dependencies.compile.files.each but gradle told me that the
>>> compile property wasn't found.
>>> 
>>> Any advice? Is there a better method to do it?
>>> 
>>> Thank you in advance
>>> Ale
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>> 
>>   http://xircles.codehaus.org/manage_email
>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 

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

    http://xircles.codehaus.org/manage_email


Reply via email to