forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r227190 - in /forrest/trunk: main/forrest.build.xml main/targets/plugins.xml main/var/plugins.xconf main/webapp/WEB-INF/cocoon.xconf site-author/status.xml tools/anttasks/ tools/anttasks/DocumentCache.class tools/anttasks/XConfToolTask.class
Date Wed, 03 Aug 2005 10:01:31 GMT
Author: rgardler
Date: Wed Aug  3 03:01:12 2005
New Revision: 227190

URL: http://svn.apache.org/viewcvs?rev=227190&view=rev
Log:
        Plugins can now define their own *.xconf file to add configuration
        information to cocoon.xconf. Simply place your *.xconf file in
        PLUGIN_HOME/conf/*.xconf. Note that changes to this configuration
        file will not take effect until Forrest has been restarted.

Added:
    forrest/trunk/main/var/plugins.xconf   (with props)
    forrest/trunk/tools/anttasks/
    forrest/trunk/tools/anttasks/DocumentCache.class   (with props)
    forrest/trunk/tools/anttasks/XConfToolTask.class   (with props)
Modified:
    forrest/trunk/main/forrest.build.xml
    forrest/trunk/main/targets/plugins.xml
    forrest/trunk/main/webapp/WEB-INF/cocoon.xconf
    forrest/trunk/site-author/status.xml

Modified: forrest/trunk/main/forrest.build.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/forrest.build.xml?rev=227190&r1=227189&r2=227190&view=diff
==============================================================================
--- forrest/trunk/main/forrest.build.xml (original)
+++ forrest/trunk/main/forrest.build.xml Wed Aug  3 03:01:12 2005
@@ -37,6 +37,7 @@
   <property name="forrest.optional.lib-dir"   location="${forrest.lib-dir}/optional"/>
 
   <property name="forrest.ant.lib-dir"        location="${forrest.home}/tools/ant/lib"/>
+  <property name="forrest.anttasks"           location="${forrest.home}/tools/anttasks"/>
   <property name="forrest.jetty.lib-dir"      location="${forrest.home}/tools/jetty"/>
 
   <property name="forrest.build.lib-dir"      location="${forrest.home}/build"/>
@@ -61,6 +62,8 @@
              Call this through the 'forrest' command
   </description>
 
+  <taskdef name="xpatch" classname="XConfToolTask"
+           classpath="${forrest.anttasks}"/>
   <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
     <classpath>
       <fileset dir="${forrest.core.lib-dir}" includes="jing*.jar" />
@@ -351,6 +354,7 @@
          <pathelement location="${forrest.core.webapp}/WEB-INF/classes"/>
          <pathelement location="${forrest.build.lib-dir}/xml-forrest.jar"/>
          <pathelement location="${project.classes-dir}"/>
+         <pathelement location="${project.build-dir}"/>
          <fileset dir="${forrest.plugins-dir}" casesensitive="no">
            <include name="**/lib/*.jar"/>
            <include name="**/lib/*.zip"/>

Modified: forrest/trunk/main/targets/plugins.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/targets/plugins.xml?rev=227190&r1=227189&r2=227190&view=diff
==============================================================================
--- forrest/trunk/main/targets/plugins.xml (original)
+++ forrest/trunk/main/targets/plugins.xml Wed Aug  3 03:01:12 2005
@@ -143,7 +143,8 @@
    </if>
   </target>
   
-  <target name="configure-plugin" 
+  <target name="configure-plugin"
+    depends="configure-cocoon"
     unless="plugin.unavailable">
     <if>
       <available file="${forrest.plugins-dir}/${versioned.name}"/>
@@ -326,6 +327,11 @@
     
     <mkdir dir="${forrest.plugins-dir}"/>
     <mkdir dir="${project.temp-dir}"/>
+        <mkdir dir="${project.webapp}/conf"/>
+
+    <copy file="${forrest.core}/var/plugins.xconf"
+      tofile="${project.build-dir}/plugins.xconf"
+      overwrite="true"/>
     <copy file="${forrest.core}/var/initial_plugins_sitemap.xmap"
       tofile="${project.temp-dir}/input.xmap"
       overwrite="true"/>
@@ -368,6 +374,23 @@
         </antcall>
       </sequential>
     </for>
+  </target>
+  
+  <target name="configure-cocoon" unless="plugin.unavailable">
+    <!--  set up the xconf files -->
+    <copy todir="${project.build-dir}"
+		  failonerror="false">
+      <fileset dir="${forrest.plugins-dir}/${plugin.name}/conf">
+        <exclude name="*.xconf"/>
+      </fileset>
+    </copy>
+
+    <xpatch file="${project.build-dir}/plugins.xconf" 
+      srcdir="${forrest.plugins-dir}/${plugin.name}"
+      addcomments="true">
+      <include name="conf/*.xconf"/>
+    </xpatch>
+	
   </target>
   
 </project>

Added: forrest/trunk/main/var/plugins.xconf
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/var/plugins.xconf?rev=227190&view=auto
==============================================================================
--- forrest/trunk/main/var/plugins.xconf (added)
+++ forrest/trunk/main/var/plugins.xconf Wed Aug  3 03:01:12 2005
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2005 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.
+-->
+<components>
+</components>
\ No newline at end of file

Propchange: forrest/trunk/main/var/plugins.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/main/webapp/WEB-INF/cocoon.xconf
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/WEB-INF/cocoon.xconf?rev=227190&r1=227189&r2=227190&view=diff
==============================================================================
--- forrest/trunk/main/webapp/WEB-INF/cocoon.xconf (original)
+++ forrest/trunk/main/webapp/WEB-INF/cocoon.xconf Wed Aug  3 03:01:12 2005
@@ -28,6 +28,6 @@
     +-->
 
   <include src="context://WEB-INF/xconf/forrest-core.xconf"/>
-
+  <include src="resource://plugins.xconf"/>
 </cocoon>
 

Modified: forrest/trunk/site-author/status.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/site-author/status.xml?rev=227190&r1=227189&r2=227190&view=diff
==============================================================================
--- forrest/trunk/site-author/status.xml (original)
+++ forrest/trunk/site-author/status.xml Wed Aug  3 03:01:12 2005
@@ -130,7 +130,13 @@
         Added document to facilitate
         <link href="site:v0.80//upgrading_08">upgrading to v0.8</link>
       </action>
-      
+
+      <action context="code" type="add" dev="RDG">
+        Plugins can now define their own *.xconf file to add configuration 
+        information to cocoon.xconf. Simply place your *.xconf file in 
+        PLUGIN_HOME/conf/*.xconf. Note that changes to this configuration 
+        file will not take effect until Forrest has been restarted.  
+      </action>      
       <action context="code" type="add" dev="RDG">
         New site seeding mechanism. You can now run "forrest seed" as before, or you can
run
         "forrest seedBusiness". The later will ask a number of questions about the site

Added: forrest/trunk/tools/anttasks/DocumentCache.class
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/anttasks/DocumentCache.class?rev=227190&view=auto
==============================================================================
Binary file - no diff available.

Propchange: forrest/trunk/tools/anttasks/DocumentCache.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: forrest/trunk/tools/anttasks/XConfToolTask.class
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/anttasks/XConfToolTask.class?rev=227190&view=auto
==============================================================================
Binary file - no diff available.

Propchange: forrest/trunk/tools/anttasks/XConfToolTask.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message