Hi

Is there a way to distinguish between multiproject dependencies and
remote jar dependencies? For example in
gradle/src/samples/java/multiproject/services/webservice
the dependencies look like:

dependencies {
    compile project(':shared'),
'commons-collections:commons-collections:3...@jar',
'commons-io:commons-io:1.2', 'commons-lang:commons-lang:2...@jar'
    compile project(path: ':api', configuration: 'spi')
    runtime project(':api')
}


then the below copy fails if the api subproject has not yet been
built, which is not what you want if you are just trying to get all
remote dependencies downloaded so you can work "offline". Ideally I
suppose you would want to download all remote jar dependencies and
then run the "retrieveRuntimeLibs" task on any dependency projects.

......................
:: problems summary ::
:::: WARNINGS
                module not found: org.gradle#api;1.0

I tryed something like:
task retrieveRuntimeLibs << {
  copy {
     from configurations.runtime.files {dep -> dep instanceof
ExternalDependency}
     into 'runtimeLibs'
  }
}

but didn't seem to make any difference.

thanks,
Philip


On Fri, Aug 21, 2009 at 3:31 AM, Hans Dockter<[email protected]> wrote:
>
> On Jun 13, 2009, at 7:40 AM, Helmut Denk wrote:
>
>>
>> for the interested user ...
>> one way to do this is:
>>
>>
>> task retrieveRuntimeLibs << {
>>   Set files = configurations.runtime.resolve()
>>   ant {
>>       files.each {
>>           copy(file: it, todir: 'runtimeLibs')
>>       }
>>   }
>> }
>
> In trunk you can write:
>
> task retrieveRuntimeLibs << {
>   copy {
>      from configurations.runtime.files
>      into 'runtimeLibs'
>   }
> }
>
> With 0.7 you can also specify filters based on dependency properties:
>
> task retrieveRuntimeLibs << {
>   copy {
>      from configurations.runtime.files { dep -> dep.group = 'something' }
>      into 'runtimeLibs'
>   }
> }
>
> In trunk there is also the feature to copy artifacts to necessarily tp a
> name they have in the local repository, but based on the properties of the
> artifact object.
>
> - Hans
>
> --
> Hans Dockter
> Gradle Project Manager
> http://www.gradle.org
>
>
> ---------------------------------------------------------------------
> 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