directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r379592 - in /directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers: MojoCommand.java PackagedFile.java
Date Tue, 21 Feb 2006 21:24:31 GMT
Author: akarasulu
Date: Tue Feb 21 13:24:28 2006
New Revision: 379592

URL: http://svn.apache.org/viewcvs?rev=379592&view=rev
Log:
fixing breakage with directory copies

Modified:
    directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
    directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/PackagedFile.java

Modified: directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java?rev=379592&r1=379591&r2=379592&view=diff
==============================================================================
--- directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
(original)
+++ directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/MojoCommand.java
Tue Feb 21 13:24:28 2006
@@ -163,7 +163,21 @@
                 }
                 
                 File dest = new File( target.getLayout().getBaseDirectory(), packagedFiles[ii].getDestinationPath()
);
-                if ( packagedFiles[ii].isFiltered() )
+                
+                if ( packagedFiles[ii].isDirectory() )
+                {
+                    try
+                    {
+                        FileUtils.copyDirectoryStructure( source, dest );
+                    }
+                    catch ( IOException e )
+                    {
+                        throw new MojoFailureException( "Failed to copy packagedFile [directory=true]
from source " 
+                            + source + " to destination " + dest );
+                    }
+                    continue;
+                }
+                else if ( packagedFiles[ii].isFiltered() )
                 {
                     try
                     {
@@ -174,8 +188,7 @@
                         throw new MojoFailureException( "Failed to copy packagedFile from
source " + source +
                             " to destination " + dest );
                     }
-                    
-                    return;
+                    continue;
                 }
                 
                 try

Modified: directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/PackagedFile.java
URL: http://svn.apache.org/viewcvs/directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/PackagedFile.java?rev=379592&r1=379591&r2=379592&view=diff
==============================================================================
--- directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/PackagedFile.java
(original)
+++ directory/trunks/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/PackagedFile.java
Tue Feb 21 13:24:28 2006
@@ -28,6 +28,8 @@
 {
     /** true if this file is obtained from the local maven repository as a project dependency
*/
     private boolean dependency = false;
+    /** true if this file is a directory to be copied */
+    private boolean directory = false;
     /** true if this file is to be filtered to substitute variables */
     private boolean filtered = false;
     /** true if this file is to be made executable */
@@ -127,5 +129,17 @@
     public String getInstallationBundleId()
     {
         return installationBundleId;
+    }
+
+
+    public void setDirectory( boolean directory )
+    {
+        this.directory = directory;
+    }
+
+
+    public boolean isDirectory()
+    {
+        return directory;
     }
 }



Mime
View raw message