cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r470968 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
Date Fri, 03 Nov 2006 19:42:08 GMT
Author: cziegeler
Date: Fri Nov  3 11:42:08 2006
New Revision: 470968

URL: http://svn.apache.org/viewvc?view=rev&rev=470968
Log:
Remove unused deployment stuff

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java?view=diff&rev=470968&r1=470967&r2=470968
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/deployment/DeploymentUtil.java
Fri Nov  3 11:42:08 2006
@@ -32,15 +32,13 @@
 import org.apache.commons.io.IOUtils;
 
 /**
- * Helper class for deploying resources and configuration files from the
- * block artifacts.
+ * Helper class for deploying resources from the block artifacts.
  *
  * @version $Id$
  * @since 2.2
  */
 public class DeploymentUtil {
 
-    protected static final String CONFIGURATION_PATH = "META-INF/cocoon";
     protected static final String RESOURCES_PATH = "COB-INF";
 
     protected final String destinationDirectory;
@@ -72,7 +70,7 @@
         }        
     }
 
-    protected void deploy(String resourcePattern, String relativeDirectory)
+    protected void deployBlockResources(String resourcePattern, String relativeDirectory)
     throws IOException {
         final Enumeration jarUrls = this.getClass().getClassLoader().getResources(resourcePattern);
         while ( jarUrls.hasMoreElements() ) {
@@ -87,29 +85,24 @@
                 url = url.substring(0, pos+2); // +2 as we include "!/"
                 final URL jarUrl = new URL(url);
                 final JarURLConnection connection = (JarURLConnection)jarUrl.openConnection();
-                this.deploy(connection.getJarFile(), resourcePattern, this.destinationDirectory
+ File.separator + relativeDirectory);
+                final JarFile jarFile = connection.getJarFile();
+                final StringBuffer buffer = new StringBuffer(this.destinationDirectory);
+                buffer.append(File.separator);
+                buffer.append(relativeDirectory);
+                buffer.append(File.separator);
+                // TODO Add block name
+                buffer.append("BLOCKNAME");
+                this.deploy(jarFile, resourcePattern, buffer.toString());
             }
         }        
     }
 
-    protected void deployConfigFiles()
-    throws IOException {
-        // deploy all artifacts containing Cocoon specific configuration files
-        this.deploy(DeploymentUtil.CONFIGURATION_PATH, "WEB-INF" + File.separator + "cocoon");
-    }
-
-    protected void deployResources()
-    throws IOException {
-        // deploy all artifacts containing block resources
-        this.deploy(DeploymentUtil.RESOURCES_PATH, "blocks");
-    }
-    
     public void deploy()
     throws IOException {
         // Check if we run unexpanded
         if ( this.destinationDirectory != null ) {
-            this.deployConfigFiles();
-            //this.deployResources();
+            // deploy all artifacts containing block resources
+            //this.deployBlockResources(DeploymentUtil.RESOURCES_PATH, "blocks");
         }
     }
 }



Mime
View raw message