maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From epunza...@apache.org
Subject svn commit: r387495 - /maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
Date Tue, 21 Mar 2006 11:14:39 GMT
Author: epunzalan
Date: Tue Mar 21 03:14:37 2006
New Revision: 387495

URL: http://svn.apache.org/viewcvs?rev=387495&view=rev
Log:
PR: MASSEMBLY-2

Added tarLongFileMode parameter to goals: assembly and attached which sets the behavior of
the TarArchiver on file paths with more that 100 characters.

Modified:
    maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java?rev=387495&r1=387494&r2=387495&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java
Tue Mar 21 03:14:37 2006
@@ -47,6 +47,7 @@
 import org.codehaus.plexus.archiver.jar.ManifestException;
 import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
 import org.codehaus.plexus.archiver.tar.TarArchiver;
+import org.codehaus.plexus.archiver.tar.TarLongFileMode;
 import org.codehaus.plexus.archiver.war.WarArchiver;
 import org.codehaus.plexus.util.DirectoryScanner;
 import org.codehaus.plexus.util.FileUtils;
@@ -125,6 +126,13 @@
     protected File descriptor;
 
     /**
+     * Sets the TarArchiver behavior on file paths with more than 100 characters length
+     *
+     * @parameter expression="${tarLongFileMode}" default-value="warn"
+     */
+    private String tarLongFileMode;
+
+    /**
      * Base directory of the project.
      *
      * @parameter expression="${basedir}"
@@ -1098,6 +1106,8 @@
                     throw new IllegalArgumentException( "Unknown compression format: " +
compression );
                 }
                 tarArchiver.setCompression( tarCompressionMethod );
+
+                tarArchiver.setLongfile( getTarLongFileMode() );
             }
         }
         else if ( "war".equals( format ) )
@@ -1111,6 +1121,16 @@
             archiver = this.archiverManager.getArchiver( format );
         }
         return archiver;
+    }
+
+    private TarLongFileMode getTarLongFileMode()
+        throws ArchiverException
+    {
+        TarLongFileMode tarFileMode = new TarLongFileMode();
+
+        tarFileMode.setValue( tarLongFileMode );
+
+        return tarFileMode;
     }
 
     private void copyReplacingLineEndings( File source, File dest, String lineEndings )



Mime
View raw message