Hi Juergen,
My fatjar/uberjar task looks like this:
task jarAll(dependsOn: configurations.default.buildArtifacts, type: Jar) {
description = 'Creates a shaded/uberjar/fatjar of the application.'
classifier = 'all'
manifest.attributes(
'Main-Class': "${mainClassName}"
)
from (sourceSets.main.classesDir)
doFirst { // <- note the doFirst
// the following must be executed in doFirst since the configuration
// has not been initialized at configuration time
from (configurations.runtime.resolve().collect { it.isDirectory() ? it :
zipTree(it) }) {
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
}
}
}
It takes care of removing signatures from the dependencies.
Otherwise, bad things can happen ;)
Hope that helps.
Cheers,
Joern.
--
Joern Huxhorn
Sent with Sparrow
On Samstag, 30. April 2011 at 13:07, Rene Groeschke wrote:
> Hi Juergen,
>
> Am 30.04.11 12:38, schrieb Juergen Donnerstag:
> > Hi,
> >
> > I tried to find the information in the userguide, the cookbook and the
> > mailing list but failed so far. Hopefully it's not a stupid question.
> Did you try the examples available at
> http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-Creatingafatjar
> There is a section that describes how to Include all runtime
> dependencies into a jar.
>
> regards,
> René
>
> --
> -----------------------
> regards René
>
> rene groeschke
> http://www.breskeby.com
> @breskeby
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>