On Tuesday 06 April 2010 13:33:03, Spencer Allain wrote:
> Try putting your myArchive "from" inside of a configure closure and see if
> it behaves differently.

Thanks for that hint! you made my day.

I tried several variants and finally the same task-definition without "<<" 
does the job

task myArchive(type: Tar) {
   baseName = 'rednose'
   destinationDir = rootProject.buildDir
   from(file(rootProject.buildDir).absolutePath + '/src') {
      include '**/*.java'
   }
}

... by the way:

task myArchive(type: Tar) {
   from(file(rootProject.buildDir).absolutePath + '/src') {
      include '**/*.java'
   }
}
myArchive {
   baseName = 'rednose'
   destinationDir = rootProject.buildDir
}

creates an empty tar-file. I think it would be better, throw an exception or 
the like, if the archive will be empty.

So - regarding to the thread "0.9 User Guide Hello World", the importance of 
using or not using "<<" should be highlighted much more in the user guide.
It's true, the samples at the archive sections don't have a "<<" at the task 
definitions, but as I read few posts before, that a task-definition with "<<" 
is just a shortcut for a wrapped task-definition ...

I'd like to ask for some clearance (at the userguide too), when do I need "<<" 
at task-definition and when should I avoid using it?!?

kind regards

Geronimo




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

    http://xircles.codehaus.org/manage_email


Reply via email to