On 21/06/10 8:34 AM, Misha Koshelev wrote:
Dear All:

Thank you for a great product!

Is there any way to leave out certain paths from a Gradle fat jar.

I am using:

     jar {
         from configurations.compile.collect { it.isDirectory() ? it :
zipTree(it) }
     }

You can do something like:

jar {
def classpath = configurations.compile.collect { it.directory ? it : zipTree(it) }
   from (classpath) {
       exclude 'META-INF/**'
   }
}


You can find out more about the Jar task using the API docs. The interesting stuff, as far as controlling what goes into the JAR is on CopySpec (which the Jar task implements): http://gradle.org/0.9-preview-3/docs/javadoc/org/gradle/api/file/CopySpec.html



--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz


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

   http://xircles.codehaus.org/manage_email


Reply via email to