directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1676059 - /directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
Date Sat, 25 Apr 2015 19:39:13 GMT
Author: seelmann
Date: Sat Apr 25 19:39:13 2015
New Revision: 1676059

URL: http://svn.apache.org/r1676059
Log:
DIRSERVER-2065: Make apacheds.sh executable in tar.gz

Modified:
    directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java

Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java?rev=1676059&r1=1676058&r2=1676059&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
(original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ArchiveInstallerCommand.java
Sat Apr 25 19:39:13 2015
@@ -34,6 +34,7 @@ import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.BZip2;
 import org.apache.tools.ant.taskdefs.GZip;
 import org.apache.tools.ant.taskdefs.Tar;
+import org.apache.tools.ant.taskdefs.Tar.TarFileSet;
 import org.apache.tools.ant.taskdefs.Zip;
 import org.codehaus.plexus.util.FileUtils;
 
@@ -306,8 +307,17 @@ public class ArchiveInstallerCommand ext
         Tar tarTask = new Tar();
         tarTask.setProject( project );
         tarTask.setDestFile( tarFile );
-        tarTask.setBasedir( getTargetDirectory() );
-        tarTask.setIncludes( getArchiveDirectory().getName() + ALL_FILES );
+
+        TarFileSet nonExecutables = tarTask.createTarFileSet();
+        nonExecutables.setDir( getTargetDirectory() );
+        nonExecutables.setIncludes( getArchiveDirectory().getName() + ALL_FILES );
+        nonExecutables.setExcludes( getArchiveDirectory().getName() + "/**/*.sh" );
+
+        TarFileSet executables = tarTask.createTarFileSet();
+        executables.setDir( getTargetDirectory() );
+        executables.setIncludes( getArchiveDirectory().getName() + "/**/*.sh" );
+        executables.setFileMode( "755" );
+
         tarTask.execute();
     }
 



Mime
View raw message