On Jul 3, 2008, at 11:24 AM, Hans Dockter wrote:

Hi Marko,

On Jul 3, 2008, at 11:01 AM, Marko Bauhardt wrote:

Hi,
i try to create a distrubution (zip file) for our project. this zip should contain 3 directories:

Everything look ok, but the jar of my project is not included in the lib folder of this zip archive. so i add this line to the zip task

---
zipFileSet(dir: buildDir, includes: file("$myProject_jar.archivePath"), prefix: "$zipRoot/lib")

First: myProject_jar.archivePath is already a file object (no need to transform it to a String and back to a file).

The ZipFileSet has an includes property which is of type Set. To make the above work you have to say:

zipFileSet(includes: ['somepath'], ...)

or (via the include method of the ZipFileSet)

zipFileSet(....).include('somepath')

and similarly

zipFileSet(...) {
   include('somepath')
}



Cool thanks. this works for me:

    zipFileSet(dir: buildDir, prefix: "$zipRoot/lib") {
      include('*.jar')
    }

Thanks for help . sorry for the mail traffic and those basic questions. but i'm a newbie of gradle/ivy/groovy and ant and i have to read more documentation and get more practice.


regards
marko


btw
this does not work
zipFileSet(dir: buildDir, includes: ['*.jar'], prefix: "$zipRoot/lib")

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '[*.jar]' with class 'java.util.ArrayList' to class 'java.util.LinkedHashSet'







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

   http://xircles.codehaus.org/manage_email


Reply via email to