cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r374163 - in /cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core: ./ src/main/java/org/apache/cocoon/deployer/applicationserver/ src/main/resources/xsd/ src/test/java/org/apache/cocoon/deployer/applicationserver/
Date Wed, 01 Feb 2006 20:27:30 GMT
Author: reinhard
Date: Wed Feb  1 12:27:20 2006
New Revision: 374163

URL: http://svn.apache.org/viewcvs?rev=374163&view=rev
Log:
#COCOON-1750
- deploy blocks into /blocks
- only support one servlet per block as supported by the blocks-fw
  (adapt XML schema)
- fix location of blocks in wiring.xml

Modified:
    cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/pom.xml
    cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22.java
    cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/cob-schema-1.0.xsd
    cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-block.xml
    cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22Test.java

Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/pom.xml?rev=374163&r1=374162&r2=374163&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/pom.xml (original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/pom.xml Wed Feb  1 12:27:20 2006
@@ -1,3 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 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.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>

Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22.java?rev=374163&r1=374162&r2=374163&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22.java
(original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22.java
Wed Feb  1 12:27:20 2006
@@ -51,9 +51,8 @@
 
 	public static final String WIRING_10_NAMESPACE = "http://apache.org/cocoon/blocks/wiring/1.0";
 	public static final String WIRING_FILE = "WEB-INF/wiring.xml";
-	public static final String WEB_INF_BLOCKS_DIR = "WEB-INF/blocks";
 	public static final String WEB_INF_LIBS_DIR = "WEB-INF/lib";
-	public static final String BLOCKS_DIR = "blocks";
+	public static final String BLOCKS_DIR = "/blocks/";
 	
 	private boolean exclusive = false;
 	private URI baseDirectory;
@@ -132,11 +131,11 @@
 					// check if the block has already been unpacked
 					if(!installedBlocks.containsKey(block.getId())) {
 						String nextDirectory = intDirToStringDirConvert(
-								getNextDirectory(new File(baseDirectoryFile, WEB_INF_BLOCKS_DIR), this.lastDir));
+								getNextDirectory(new File(baseDirectoryFile, BLOCKS_DIR), this.lastDir));
 						this.lastDir = Integer.parseInt(nextDirectory);
-						String installDirectory = BLOCKS_DIR + "/" + nextDirectory;
+						String installDirectory = BLOCKS_DIR + nextDirectory;
 						wiringBlock.setLocation(installDirectory);					
-						deployBlock(binaryBlock, frm, txId, WEB_INF_BLOCKS_DIR + "/" + nextDirectory);
+						deployBlock(binaryBlock, frm, txId, BLOCKS_DIR + nextDirectory);
 						installedBlocks.put(block.getId(), installDirectory);
 					} else {
 						wiringBlock.setLocation((String) installedBlocks.get(block.getId()));

Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/cob-schema-1.0.xsd
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/cob-schema-1.0.xsd?rev=374163&r1=374162&r2=374163&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/cob-schema-1.0.xsd
(original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/cob-schema-1.0.xsd
Wed Feb  1 12:27:20 2006
@@ -32,7 +32,7 @@
         <xs:element name="implements" type="implements" minOccurs="0"/>
         <xs:element name="extends" type="extends" minOccurs="0"/>
         <xs:element name="components" type="configuration" minOccurs="0"/>
-        <xs:element name="servlets" type="servlets" minOccurs="0"/>        
+        <xs:element name="servlet" type="configuration" minOccurs="0"/>   
       </xs:all>
       <xs:attribute name="id" type="xs:anyURI" use="required"/>
     </xs:complexType>
@@ -130,13 +130,6 @@
     </xs:sequence>
     <xs:attribute name="class" type="java-classes" use="required"/>
   </xs:complexType>  	    	
-
-  <!-- servlets -->
-  <xs:complexType name="servlets">
-    <xs:sequence>
-      <xs:element name="servlet" type="configuration" minOccurs="1" maxOccurs="unbounded"/>
-    </xs:sequence>
-  </xs:complexType>  
   
   
   <!-- type for class attributes -->

Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-block.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-block.xml?rev=374163&r1=374162&r2=374163&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-block.xml
(original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-block.xml
Wed Feb  1 12:27:20 2006
@@ -28,6 +28,7 @@
 		implementation="stable"/>
 	<license href="http://www.apache.org/licenses/">Apache License 2.0</license>
 	<author href="http://cocoon.apache.org">Apache Cocoon community</author>
+	
 	<properties>
 		<property name="mailserver">
 			<default>localhost</default>
@@ -37,6 +38,7 @@
 			<description>bar</description>
 		</property>
 	</properties>
+	
 	<requirements>
 		<requires 
 		  interface="http://cocoon.apache.org/interface/portal/1.0" 
@@ -44,16 +46,16 @@
 		  default="http://cocoon.apache.org/blocks/portal/1.0.2"
 		  />
 	</requirements>
+	
 	<extends block="http://cocoon.apache.org/blocks/another-block/1.0"/>
+	
 	<implements>
 		<interface id="http://cocoon.apache.org/interface/bla/1.0"/>
 	</implements>
-  
-  <servlets>
-    <servlet class="org.apache.cocoon.servlet.SitemapServlet">
-      <sitemap>COB-INF/sitemap.xmap</sitemap>
-    </servlet>
-  </servlets>
+  
+  <servlet class="org.apache.cocoon.servlet.SitemapServlet">
+    <sitemap>COB-INF/sitemap.xmap</sitemap>
+  </servlet>
   
   <components class="org.apache.cocoon.some.component.manager">
     <include>META-INF/block.xconf</include>

Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22Test.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22Test.java?rev=374163&r1=374162&r2=374163&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22Test.java
(original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/CocoonServer22Test.java
Wed Feb  1 12:27:20 2006
@@ -82,9 +82,9 @@
 		assertEquals("db", wiring.getBlock(1).getId());
 		
 		// check locations
-		assertEquals("blocks/00000001", wiring.getBlock(0).getLocation());
-		assertEquals("blocks/00000002", wiring.getBlock(1).getLocation());
-		assertEquals("blocks/00000002", wiring.getBlock(2).getLocation()); // ensure that a block
is unpacked only once
+		assertEquals("/blocks/00000001", wiring.getBlock(0).getLocation());
+		assertEquals("/blocks/00000002", wiring.getBlock(1).getLocation());
+		assertEquals("/blocks/00000002", wiring.getBlock(2).getLocation()); // ensure that a block
is unpacked only once
 		
 		// check connections
 		assertEquals("db", wiring.getBlock(0).getConnections().getConnection(0).getName());



Mime
View raw message