Just in case anyone else stumbles on this thread, it is "fileMode"
instead of "filemode".
ie: tarFileSet(dir: '.', fileMode: '755') { ... }On Fri, Oct 2, 2009 at 8:57 AM, Philip Crotwell <[email protected]> wrote: > OK, thanks. > > I guess I am surprised that the tar task does not keep the file's > existing permissions. Seems weird that you have to specify it in the > tar task instead of in the task that actually creates the file. > > I put an issue in jira for this: > http://jira.codehaus.org/browse/GRADLE-673 > > thanks, > Philip > > On Thu, Oct 1, 2009 at 3:05 AM, Adam Murdoch <[email protected]> wrote: >> You can use the 'filemode' attribute on tarFileSet to specify the permisions >> for files: >> >> tarFileSet(dir: '.', filemode: '755') { ... } >> >> >> Philip Crotwell wrote: >>> >>> Hi >>> >>> I have some sh scripts that I want to package in a tar. Example tasks >>> using Wrapper are below. The issue is that gradlew has a+x permissions >>> in the directory before the tar, but when untarred it is -rw-r--r--. >>> How do you preserve execute permissions with a Tar task? >>> >>> thanks, >>> Philip >>> >>> task wrapper(type: Wrapper) { >>> gradleVersion = '0.8' >>> jarPath = 'gradleWrapper' >>> } >>> >>> >>> task testTarDist(type: Tar, dependsOn: 'wrapper') { >>> dirName = 'testWrapper' >>> tarFileSet(dir: '.') { >>> include('gradleWrapper/**') >>> include('gradlew') >>> include('gradlew.bat') >>> prefix = dirName >>> } >>> } >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
