cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r349303 - in /cocoon/trunk: cocoon.sh src/java/org/apache/cocoon/components/blocks/BlockWiring.java src/webapp/WEB-INF/block.xml src/webapp/wiring.xml
Date Sun, 27 Nov 2005 20:32:44 GMT
Author: danielf
Date: Sun Nov 27 12:32:39 2005
New Revision: 349303

URL: http://svn.apache.org/viewcvs?rev=349303&view=rev
Log:
Starting to integrate blocks in the webapp, use ./cocoon.sh blocks to try it. Doesn't work
yet, context problem in source resolving.

Modified:
    cocoon/trunk/cocoon.sh
    cocoon/trunk/src/java/org/apache/cocoon/components/blocks/BlockWiring.java
    cocoon/trunk/src/webapp/WEB-INF/block.xml
    cocoon/trunk/src/webapp/wiring.xml

Modified: cocoon/trunk/cocoon.sh
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon.sh?rev=349303&r1=349302&r2=349303&view=diff
==============================================================================
--- cocoon/trunk/cocoon.sh (original)
+++ cocoon/trunk/cocoon.sh Sun Nov 27 12:32:39 2005
@@ -178,6 +178,10 @@
         $JAVA $JAVA_OPTIONS $JAVA_PROFILE_ARGS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_ARGS
$JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
         ;;
 
+  blocks)
+        $JAVA $JAVA_OPTIONS -Dorg.apache.cocoon.processor=org.apache.cocoon.components.blocks.BlocksManager
-Dorg.apache.cocoon.configuration=/wiring.xml -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS
$JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
+        ;;
+
   osgi)
         # -init prevents knopflerfish from using its persistent info about bundles, seems
safer for now
         KNOP_OPTIONS="-init"

Modified: cocoon/trunk/src/java/org/apache/cocoon/components/blocks/BlockWiring.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/blocks/BlockWiring.java?rev=349303&r1=349302&r2=349303&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/blocks/BlockWiring.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/blocks/BlockWiring.java Sun Nov 27
12:32:39 2005
@@ -112,6 +112,11 @@
         try {
             resolver.contextualize(this.context);
             source = resolver.resolveURI(blockPath);
+	    // FIXME: Have used different locations for block.xml in the OSGi and the block stuff.
+	    if (!source.exists()) {
+		blockPath = this.location + "WEB-INF/block.xml";
+		source = resolver.resolveURI(blockPath);
+	    }
             DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
             block = builder.build(source.getInputStream(), source.getURI());
         } catch (IOException e) {

Modified: cocoon/trunk/src/webapp/WEB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/WEB-INF/block.xml?rev=349303&r1=349302&r2=349303&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/WEB-INF/block.xml (original)
+++ cocoon/trunk/src/webapp/WEB-INF/block.xml Sun Nov 27 12:32:39 2005
@@ -28,7 +28,7 @@
          implementation="unstable"/>
   <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
   <author href="http://cocoon.apache.org">Apache Cocoon community</author>
-  <components>
+  <components core="true">
     <include src="context://WEB-INF/xconf/cocoon-core.xconf"/>
     <include src="context://WEB-INF/xconf/cocoon-core-sitemap.xconf"/>
     <include src="context://WEB-INF/sitemap-additions/cocoon-core-sitemap-additions.xconf"/>

Modified: cocoon/trunk/src/webapp/wiring.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/webapp/wiring.xml?rev=349303&r1=349302&r2=349303&view=diff
==============================================================================
--- cocoon/trunk/src/webapp/wiring.xml (original)
+++ cocoon/trunk/src/webapp/wiring.xml Sun Nov 27 12:32:39 2005
@@ -20,15 +20,7 @@
         xsi:schemaLocation="http://apache.org/cocoon/blocks/wiring/1.0 wiring-schema-1.0.xsd"
 >
 
-  <block id="sampleid" location="WEB-INF/blocks/sample/">
-    <mount path="/blocks-test/sample/"/>
+  <block id="webapp" location="">
+    <mount path="/"/>
   </block>
-
-  <block id="mysample" location="WEB-INF/blocks/mysample/">
-    <mount path="/blocks-test/mysample/"/>
-    <connections>
-      <connection name="super" block="sampleid"/>
-    </connections>
-  </block>
-
 </wiring>



Mime
View raw message