To create the Gant distribution I am using Tar and Zip tasks with
copyspecs.  I need the copy to include some stream editing.  So I tried:

        standaloneCopySpec = copySpec {
          def scriptsDirectory = 'scripts'
          def projectBase = project ( projectNameForStandalone )
          from ( '.' ) { include ( 'README*' ) }
          into ( 'conf' ) { from ( scriptsDirectory + '/conf' ) { include ( 
'*.conf' ) } } 
          into ( 'lib' ) {
            from ( projectBase.libsDir )
            from ( projectBase.configurations.runtime )
            from ( 'jarfiles' )
          }
          into ( 'bin' ) {
            fileMode = 0755
            from ( [ scriptsDirectory + '/bin' , scriptsDirectory + 
'/bin_standalone' ] )
            filter ( ReplaceTokens , tokens : [ GROOVYJAR : 'groovy-' + 
groovyVersions[groovyStandaloneSeries] + '.jar' ] )
          }
        }

If I remove the filter then things works as expected but not as
required, i.e. there is no stream editing, but all the files needed in
the archive find their way into the archive.

With the filter line in place I get:

        Execution failed for task ':standaloneBinTgz'.
        Cause: Could not add file 
'/home_local/users/russel/Repositories/Bazaar/Masters/Gant/Trunk_Development/scripts/bin/startGroovy.bat'
 to TAR 
'/home_local/users/russel/Repositories/Bazaar/Masters/Gant/Trunk_Development/build/gant-1.10.0-SNAPSHOT.tgz'.

which isn't very helpful :-(  The full stack trace doesn't appear to add
any extra useful information.

If someone can give me a fix for this, or even a workaround, I can make
a Gant 1.9.1 release.

Thanks.


-- 
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [email protected]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[email protected]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to