maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arami...@apache.org
Subject svn commit: r399626 - in /maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs: ArchiverManagerStub.java ArchiverStub.java DirectoryArchiverStub.java
Date Thu, 04 May 2006 09:04:31 GMT
Author: aramirez
Date: Thu May  4 02:04:30 2006
New Revision: 399626

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

added/modified stubs for directory mojo

Added:
    maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/DirectoryArchiverStub.java
Modified:
    maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
    maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java?rev=399626&r1=399625&r2=399626&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverManagerStub.java
Thu May  4 02:04:30 2006
@@ -43,7 +43,14 @@
     {
         if ( archiverStub == null )
         {
-            archiverStub = new ArchiverStub();
+            if( string.equals( "dir" ) )
+            {
+                archiverStub = new DirectoryArchiverStub();
+            }
+            else
+            {
+                archiverStub = new ArchiverStub();
+            }
         }
 
         return archiverStub;

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java?rev=399626&r1=399625&r2=399626&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/ArchiverStub.java
Thu May  4 02:04:30 2006
@@ -88,7 +88,7 @@
     public void addFile( File file, String string, int i )
         throws ArchiverException
     {
-        addDirectory( file );
+        addFile( file, string );
     }
 
     public File getDestFile()

Added: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/DirectoryArchiverStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/DirectoryArchiverStub.java?rev=399626&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/DirectoryArchiverStub.java
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/stubs/DirectoryArchiverStub.java
Thu May  4 02:04:30 2006
@@ -0,0 +1,34 @@
+package org.apache.maven.plugin.assembly.stubs;
+
+import org.codehaus.plexus.archiver.ArchiverException;
+
+import java.io.IOException;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Allan Ramirez
+ */
+public class DirectoryArchiverStub
+    extends ArchiverStub
+{
+    public void createArchive()
+        throws ArchiverException, IOException
+    {
+        getDestFile().mkdirs();
+    }
+}



Mime
View raw message