cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r418745 - /cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
Date Mon, 03 Jul 2006 11:28:45 GMT
Author: cziegeler
Date: Mon Jul  3 04:28:44 2006
New Revision: 418745

URL: http://svn.apache.org/viewvc?rev=418745&view=rev
Log:
Fix dir creation and add some more debug logging

Modified:
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java

Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java?rev=418745&r1=418744&r2=418745&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
(original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
Mon Jul  3 04:28:44 2006
@@ -325,9 +325,15 @@
         final File srcDirectory = new File(parentDir, srcDir);
         if (srcDirectory.exists() && srcDirectory.isDirectory()) {
             File destDirectory = new File(parentDir, destDir);
+            if ( this.getLog().isDebugEnabled() ) {
+                this.getLog().debug("Deleting directory " + destDirectory);
+            }
             org.apache.cocoon.maven.deployer.utils.FileUtils.deleteDirRecursivly(destDirectory);
             destDirectory = new File(parentDir, destDir);
-            org.apache.cocoon.maven.deployer.utils.FileUtils.createDirectory(destDirectory);
+            if ( this.getLog().isDebugEnabled() ) {
+                this.getLog().debug("Recreating directory " + destDirectory);
+            }
+            destDirectory.mkdir();
             final File[] files = srcDirectory.listFiles();
             if (files != null && files.length > 0) {
                 for (int i = 0; i < files.length; i++) {
@@ -336,8 +342,14 @@
                     boolean exclude = false;
                     if ("lib".equals(srcDir) && files[i].getName().startsWith("cocoon-bootstrap"))
{
                         exclude = true;
+                        if ( this.getLog().isDebugEnabled() ) {
+                            this.getLog().debug("Excluding " + files[i] + " from moving.");
+                        }
                     }
                     if (!exclude) {
+                        if ( this.getLog().isDebugEnabled() ) {
+                            this.getLog().debug("Moving " + files[i] + " to " + destDirectory);
+                        }
                         files[i].renameTo(new File(destDirectory, files[i].getName()));
                     }
                 }



Mime
View raw message