On 6/16/11 5:00 AM, Szczepan Faber wrote:
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')
}

Would this put all of the flat war's dependencies into the ear's lib dir? I can't see that it would...

My thinking was that you could put all of the war project's dependencies into the war's providedCompile configuration, which I thought would create a war without those dependencies in its WEB-INF/lib:

apply plugin: 'war'
dependencies {
  providedCompile 'com.acme:awesome-api:1.0'
  // etc.
}

The ear would still need some kind of a flag to let it know that it should put all the war's dependencies into its own lib dir. On my local system I created such a flag:

ear {
  skinnyDeploy = true
}
dependencies {
  deploy project('mywar')
}

Which tells the ear plugin to put all the dependencies from its "deploy" modules into its own lib dir. I think I have it working, but it needs more testing.

What do you think?


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

   http://xircles.codehaus.org/manage_email


Reply via email to