avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject svn commit: rev 22695 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks
Date Thu, 08 Jul 2004 07:12:22 GMT
Author: mcconnell
Date: Thu Jul  8 00:12:21 2004
New Revision: 22695

Modified:
   avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/InitializeTask.java
Log:
Update to make sure parent directory exists.

Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/InitializeTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/InitializeTask.java	(original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/InitializeTask.java	Thu
Jul  8 00:12:21 2004
@@ -106,18 +106,26 @@
 
     private void updateCache( Project project, Resource resource, String path )
     {
+        getProject().log( 
+          "Updating local cache for resource " + resource 
+          + " using supplied path: " + path );
+
         File source = new File( path );
         if( !source.exists() )
         {
             final String error = 
               "Gump source resource override for resource " 
-              + resource + " references the non-existant path [" + path 
+              + resource + " references a non-existant path [" + path 
               + "].";
             throw new BuildException( error );  
         }
         else
         {
-            File destination = resource.getArtifact( project, false );
+            File local = resource.getArtifact( project, false );
+            local.getParentFile().mkdirs();
+
+            getProject().log( "Local cache path: " + local );
+
             Copy copy = (Copy) project.createTask( "copy" );
             copy.setTaskName( getTaskName() );
             copy.setFile( source );

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message