Hey,

I'm reluctant to add additional properties to the dependency notation
to satisfy the ear plugin. However, we can surely figure out some
other way to configure such behavior :)

BTW. I think you can already achieve what you need with vanilla
Gradle. Have your war project configure a 'flat' configuration:

configurations {
        flat
}

task flatWar(type: War, dependsOn: classes) {
        classpath = sourceSets.main.output
}

artifacts {
    flat flatWar
}

Then in your ear project:

dependencies {
    deploy project(path: ':myWebApp', configuration: 'flat')
}

Cheers!

On Tue, Jun 14, 2011 at 10:56 PM, David Gileadi <gilea...@gmail.com> wrote:
> On 6/14/11 1:47 PM, Rene Groeschke wrote:
>>
>> Hi there,
>> I had a look on the newly introduced ear plugin. One of the common use
>> cases for creating ear files is to share thirdparty dependencies of war
>> files at one common place and remove all thirdparty libs from the wars.
>> At the moment, I have to add all 3party dependencies of the war to the
>> earlib configuration. It would be cool to have buildin support for that.
>> In the earWithWar example the dependency section of the root project
>> looks like this:
>>
>> ---------------------
>> dependencies {
>> deploy project(':war')
>>
>> earlib group: 'log4j', name: 'log4j', version: '1.2.15', ext: 'jar'
>> }
>> ---------------------
>>
>> It would be cool to create flat war archives by setting a flag when
>> adding a war project to the deploy configuration. for example this way
>>
>> ---------------------
>> dependencies {
>> deploy project(':war'){
>> skinny = true
>> }
>> }
>> ---------------------
>>
>> The snippet above would automatically add the thirdparty deps of war to
>> the earlibs configuration.
>>
>> What do you think about this?
>>
>> regards,
>> René
>
> I like the idea--in fact, I think it would be nice if it were the default.
>  I made the initial implementation of the ear plugin and unfortunately I
> didn't feel familiar enough with gradle's dependency workings to try
> implementing this.  Maybe I can have another go at it.
>
> In any case thanks for checking the new plugin out!
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>



-- 
Szczepan Faber
Principal engineer@gradleware
Lead@mockito

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

    http://xircles.codehaus.org/manage_email


Reply via email to