maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r556174 - in /maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver: PrefixedArchivedFileSet.java PrefixedFileSet.java
Date Fri, 13 Jul 2007 23:09:21 GMT
Author: jdcasey
Date: Fri Jul 13 16:09:20 2007
New Revision: 556174

URL: http://svn.apache.org/viewvc?view=rev&rev=556174
Log:
Bumping plexus-archiver version for [MASSEMBLY-213] testing.

Added:
    maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedArchivedFileSet.java
  (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedFileSet.java
  (with props)

Added: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedArchivedFileSet.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedArchivedFileSet.java?view=auto&rev=556174
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedArchivedFileSet.java
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedArchivedFileSet.java
Fri Jul 13 16:09:20 2007
@@ -0,0 +1,82 @@
+package org.apache.maven.plugin.assembly.archive.archiver;
+
+import org.codehaus.plexus.archiver.ArchivedFileSet;
+import org.codehaus.plexus.components.io.fileselectors.FileSelector;
+
+import java.io.File;
+
+public class PrefixedArchivedFileSet
+    implements ArchivedFileSet
+{
+
+    private final String rootPrefix;
+    private final ArchivedFileSet fileSet;
+
+    public PrefixedArchivedFileSet( ArchivedFileSet fileSet, String rootPrefix )
+    {
+        this.fileSet = fileSet;
+
+        if ( ! rootPrefix.endsWith( "/" ) )
+        {
+            this.rootPrefix = rootPrefix + "/";
+        }
+        else
+        {
+            this.rootPrefix = rootPrefix;
+        }
+    }
+
+    public File getArchive()
+    {
+        return fileSet.getArchive();
+    }
+
+    public String[] getExcludes()
+    {
+        return fileSet.getExcludes();
+    }
+
+    public FileSelector[] getFileSelectors()
+    {
+        return fileSet.getFileSelectors();
+    }
+
+    public String[] getIncludes()
+    {
+        return fileSet.getIncludes();
+    }
+
+    public String getPrefix()
+    {
+        String prefix = fileSet.getPrefix();
+        if ( prefix.startsWith( "/" ) )
+        {
+            if ( prefix.length() > 1 )
+            {
+                prefix = prefix.substring( 1 );
+            }
+            else
+            {
+                prefix = "";
+            }
+        }
+
+        return rootPrefix + prefix;
+    }
+
+    public boolean isCaseSensitive()
+    {
+        return fileSet.isCaseSensitive();
+    }
+
+    public boolean isIncludingEmptyDirectories()
+    {
+        return fileSet.isIncludingEmptyDirectories();
+    }
+
+    public boolean isUsingDefaultExcludes()
+    {
+        return fileSet.isUsingDefaultExcludes();
+    }
+
+}

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedArchivedFileSet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedArchivedFileSet.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedFileSet.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedFileSet.java?view=auto&rev=556174
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedFileSet.java
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedFileSet.java
Fri Jul 13 16:09:20 2007
@@ -0,0 +1,82 @@
+package org.apache.maven.plugin.assembly.archive.archiver;
+
+import org.codehaus.plexus.archiver.FileSet;
+import org.codehaus.plexus.components.io.fileselectors.FileSelector;
+
+import java.io.File;
+
+public class PrefixedFileSet
+    implements FileSet
+{
+
+    private final String rootPrefix;
+    private final FileSet fileSet;
+
+    public PrefixedFileSet( FileSet fileSet, String rootPrefix )
+    {
+        this.fileSet = fileSet;
+
+        if ( ! rootPrefix.endsWith( "/" ) )
+        {
+            this.rootPrefix = rootPrefix + "/";
+        }
+        else
+        {
+            this.rootPrefix = rootPrefix;
+        }
+    }
+
+    public String[] getExcludes()
+    {
+        return fileSet.getExcludes();
+    }
+
+    public FileSelector[] getFileSelectors()
+    {
+        return fileSet.getFileSelectors();
+    }
+
+    public String[] getIncludes()
+    {
+        return fileSet.getIncludes();
+    }
+
+    public String getPrefix()
+    {
+        String prefix = fileSet.getPrefix();
+        if ( prefix.startsWith( "/" ) )
+        {
+            if ( prefix.length() > 1 )
+            {
+                prefix = prefix.substring( 1 );
+            }
+            else
+            {
+                prefix = "";
+            }
+        }
+
+        return rootPrefix + prefix;
+    }
+
+    public boolean isCaseSensitive()
+    {
+        return fileSet.isCaseSensitive();
+    }
+
+    public boolean isIncludingEmptyDirectories()
+    {
+        return fileSet.isIncludingEmptyDirectories();
+    }
+
+    public boolean isUsingDefaultExcludes()
+    {
+        return fileSet.isUsingDefaultExcludes();
+    }
+
+    public File getDirectory()
+    {
+        return fileSet.getDirectory();
+    }
+
+}

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedFileSet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/archiver/PrefixedFileSet.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message