You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bd...@apache.org on 2005/09/22 16:53:14 UTC

svn commit: r290955 - in /cocoon/whiteboard/example-apps: ./ bricks-cms/ bricks-cms/lib/ bricks-cms/lib/servlet/ bricks-cms/src/ bricks-cms/src/build-targets/ bricks-cms/src/cocoon/ bricks-cms/src/cocoon/config/ bricks-cms/src/cocoon/webapp/ bricks-cms...

Author: bdelacretaz
Date: Thu Sep 22 07:52:54 2005
New Revision: 290955

URL: http://svn.apache.org/viewcvs?rev=290955&view=rev
Log:
skeleton for the bricks-cms example app, does nothing useful at this point

Added:
    cocoon/whiteboard/example-apps/
    cocoon/whiteboard/example-apps/bricks-cms/
    cocoon/whiteboard/example-apps/bricks-cms/README.TXT
    cocoon/whiteboard/example-apps/bricks-cms/build.xml
    cocoon/whiteboard/example-apps/bricks-cms/lib/
    cocoon/whiteboard/example-apps/bricks-cms/lib/servlet/
    cocoon/whiteboard/example-apps/bricks-cms/lib/servlet/servletapi-2.3.jar   (with props)
    cocoon/whiteboard/example-apps/bricks-cms/src/
    cocoon/whiteboard/example-apps/bricks-cms/src/build-targets/
    cocoon/whiteboard/example-apps/bricks-cms/src/build-targets/build-cocoon-targets.xml
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/config/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/config/cocoon.build.properties
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/sitemap.xmap
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/pages/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/pages/admin-homepage.xml
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/resources/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/resources/css/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/resources/css/bricks-cms.css
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/xslt/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/xslt/page-to-html.xsl
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/sitemap.xmap
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/welcome.xml
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/xconf/
    cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/xconf/ComponentManagerInitializer.xweb
    cocoon/whiteboard/example-apps/bricks-cms/src/java/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/componentmanager/
    cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/componentmanager/ComponentManagerInitializer.java
    cocoon/whiteboard/example-apps/bricks-cms/user.properties

Added: cocoon/whiteboard/example-apps/bricks-cms/README.TXT
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/README.TXT?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/README.TXT (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/README.TXT Thu Sep 22 07:52:54 2005
@@ -0,0 +1,24 @@
+===========================================================================
+TODO - describe the bricks-cms app, how to compile and start it
+$Id$
+===========================================================================
+
+This directory contains the source code of the bricks-cms application,
+that will be presented at the GetTogether 2005.
+
+The first commit is only a small skeleton, does nothing useful.
+
+To build:
+    Read user.properties and adjust settings by creating a
+    local.user.properties if needed.
+
+    Use ant 1.6.1 or later (from Cocoon?)
+
+    JAVA_HOME must be set
+
+    ant cocoon:get
+    ant run
+
+Tips and tricks:
+    Use rsync -r src/cocoon/webapp/* build/cocoon/webapp/ to update
+    the running webapp without having to restart it.
\ No newline at end of file

Added: cocoon/whiteboard/example-apps/bricks-cms/build.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/build.xml?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/build.xml (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/build.xml Thu Sep 22 07:52:54 2005
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright 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.
+-->
+
+<!--
+    Main build targets for the bricks-cms cocoon app.
+    $Id$
+-->
+
+<project name="bricks-cms" default="explain">
+
+  <!--
+      Override default settings provided by user.properties, which is stored in SVN),
+      with settings from local_user.properties, which is not in SVN and can be used
+      to set local values.
+
+      And yes, this is the correct order of <property> elements to do this.
+  -->
+  <property file="local.user.properties"/>
+  <property file="user.properties"/>
+
+  <!-- setup paths -->
+  <property name="src" value="${basedir}/src"/>
+  <property name="src.java" value="${src}/java"/>
+  <property name="src.cocoon" value="${src}/cocoon"/>
+  <property name="src.webapp" value="${src.cocoon}/webapp"/>
+  <property name="src.config" value="${src.cocoon}/config"/>
+  <property name="build" value="${basedir}/build"/>
+  <property name="build.classes" value="${build}/classes"/>
+  <property name="warfile" value="${build}/${ant.project.name}.war"/>
+
+  <!-- ${basedir}/ ensures that the absolute path is part of the properties;
+       this is needed for property 'cocoon.webapp' in the 'cocoon:run' target -->
+  <property name="lib" value="${basedir}/lib"/>
+  <property name="utilities" value="${basedir}/utilities"/>
+
+  <property name="cocoon-build.properties" value="${src.cocoon}/local.build.properties"/>
+  <property name="cocoon.xconf.dir" value="${src.cocoon}/xconf"/>
+  <property name="cocoon.tool.dir" value="${build}/cocoon"/>
+  <property name="cocoon.webapp" value="${cocoon.tool.dir}/webapp"/>
+  <property name="cocoon.lib" value="${cocoon.webapp}/WEB-INF/lib"/>
+  <property name="cocoon.classes" value="${cocoon.webapp}/WEB-INF/classes"/>
+  <property name="jetty.workdir" value="${cocoon.webapp}/WEB-INF/work"/>
+
+  <!-- build targets for Cocoon distro processing -->
+  <property name="build-cocoon-targets" value="${src}/build-targets/build-cocoon-targets.xml"/>
+  <import file="${build-cocoon-targets}"/>
+
+  <!-- Common paths -->
+  <path id="all.cp">
+    <pathelement location="${build.classes}"/>
+    <fileset dir="${cocoon.lib}">
+      <include name="*.jar"/>
+    </fileset>
+    <fileset dir="${lib}">
+      <include name="**/*.jar"/>
+    </fileset>
+  </path>
+
+  <!-- Main targets -->
+
+  <target name="explain">
+    <echo>See README.TXT for how to setup and use this module</echo>
+  </target>
+
+  <target name="init">
+    <mkdir dir="${build.classes}"/>
+  </target>
+
+  <target name="compile" depends="init,-cocoon:check">
+    <javac srcdir="${src.java}" destdir="${build.classes}" debug="true">
+      <classpath refid="all.cp"/>
+      <include name="**/*.java"/>
+    </javac>
+  </target>
+
+  <!-- Compile and configure -->
+  <target name="copy-configs" depends="init"
+          description="copy required configuration files for webapp">
+
+    <!-- add any configuration files copies here -->
+
+  </target>
+
+  <target name="webapp" depends="compile, cocoon:xconf, copy-configs" description="build and configure the webapp">
+    <copy todir="${cocoon.lib}" flatten="true">
+      <fileset dir="${lib}">
+        <include name="**/*.jar"/>
+      </fileset>
+    </copy>
+    <copy todir="${cocoon.classes}">
+      <fileset dir="${build.classes}"/>
+    </copy>
+    <copy todir="${cocoon.webapp}">
+      <fileset dir="${src.webapp}"/>
+    </copy>
+
+    <!-- make sure to overwrite the welcome.xml generated by cocoon:get -->
+    <copy todir="${cocoon.webapp}" overwrite="true">
+      <fileset dir="${src.webapp}">
+        <include name="welcome.xml"/>
+      </fileset>
+    </copy>
+
+    <!-- Jetty uses WEB-INF/work as a work dir if it exists, clean it up -->
+    <delete dir="${jetty.workdir}"/>
+    <mkdir dir="${jetty.workdir}"/>
+  </target>
+
+  <target name="clean" depends="init" description="cleanup all generated files, including the cocoon:get build">
+    <delete dir="${build}"/>
+  </target>
+
+  <target name="run-message">
+    <echo>${build.run.message}</echo>
+  </target>
+
+  <target name="run" depends="webapp,run-message,cocoon:run" description="build and start with built-in Jetty"/>
+
+  <target name="war" depends="webapp" description="create a war file for deployment">
+    <jar destfile="${warfile}" basedir="${cocoon.webapp}"/>
+  </target>
+
+</project>

Added: cocoon/whiteboard/example-apps/bricks-cms/lib/servlet/servletapi-2.3.jar
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/lib/servlet/servletapi-2.3.jar?rev=290955&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cocoon/whiteboard/example-apps/bricks-cms/lib/servlet/servletapi-2.3.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/whiteboard/example-apps/bricks-cms/src/build-targets/build-cocoon-targets.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/build-targets/build-cocoon-targets.xml?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/build-targets/build-cocoon-targets.xml (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/build-targets/build-cocoon-targets.xml Thu Sep 22 07:52:54 2005
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright 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.
+-->
+
+<!--
+  build-cocoon-targets.xml, copied and adapted from the Cocoon wiki site
+  (YourCocoonBasedProjectAnt16 page).
+
+  This Apache Ant build.xml snippet contains targets for helping out
+  managing the Cocoon dependencies of your project.
+
+  It assumes that you have Ant version 1.6.x or later that supports the
+  <import> task.
+
+  See the top-level README.TXT for how to use this.
+
+  $Id: build-cocoon-targets.xml,v 1.1.1.1 2005/07/25 13:30:57 bdelacretaz Exp $
+-->
+
+<project name="cocoon-main-targets" default="seed">
+
+  <!-- if not set yet... -->
+  <property name="src" value="./src"/>
+  <property name="src.cocoon" value="${src}/cocoon"/>
+  <property name="cocoon.build.properties" value="${src.cocoon}/config/cocoon.build.properties"/>
+  <property name="cocoon.get.build.targets" value="clean webapp"/>
+  <property name="cocoon.unpatched" value="${cocoon.tool.dir}/unpatched"/>
+
+  <!--
+    sets some essential properties for these targets
+  -->
+  <target name="-cocoon:init">
+    <mkdir dir="${cocoon.tool.dir}"/>
+    <property name="cocoon.webapp" value="${cocoon.tool.dir}/webapp"/>
+    <property name="cocoon.tasks" value="${cocoon.tool.dir}/taskdefs"/>
+    <property name="cocoon.lib" value="${cocoon.webapp}/WEB-INF/lib"/>
+
+    <available property="build.properties.ok" file="${cocoon.build.properties}"/>
+    <fail unless="build.properties.ok" message="File ${cocoon.build.properties} is missing"/>
+  </target>
+
+  <!--
+    checks what kind of OS this is running on
+  -->
+  <target name="-cocoon:oscheck">
+    <condition property="isWindows">
+      <os family="windows"/>
+    </condition>
+  </target>
+
+  <!--
+    creates Windows batch files for cocoon dependencies
+  -->
+  <target name="-cocoon:bat" if="isWindows"
+          depends="-cocoon:init, -cocoon:oscheck">
+    <echo>Building batch files for support on windows OS</echo>
+    <property name="shbat" value="bat"/>
+
+    <echo file="${cocoon.tool.dir}/getc2.${shbat}"><![CDATA[@echo off
+if "%COCOON_HOME%"=="" then echo You haven't set the COCOON_HOME environment variable.
+echo GOING TO %COCOON_HOME%
+cd /d %COCOON_HOME%
+echo Running build.bat -propertyfile %PROJECT_PROPERTIES% clean webapp -Dbuild.webapp=%PROJECT_WEBAPP% -Dtools.tasks.dest=%PROJECT_TASKDEFS%
+build.bat -propertyfile %PROJECT_PROPERTIES% clean webapp -Dbuild.webapp=%PROJECT_WEBAPP% -Dtools.tasks.dest=%PROJECT_TASKDEFS%
+]]></echo>
+
+    <echo file="${cocoon.tool.dir}/runc2.${shbat}"><![CDATA[@echo off
+set JETTY_WEBAPP=%PROJECT_WEBAPP%
+cd /d %COCOON_HOME%
+cocoon.bat servlet-debug
+]]></echo>
+  </target>
+
+  <!--
+    creates shell scripts for cocoon dependencies
+  -->
+  <target name="-cocoon:sh" unless="isWindows"
+          depends="-cocoon:init, -cocoon:oscheck">
+
+    <echo>Building shell scripts for support on non-windows</echo>
+    <property name="shbat" value="sh"/>
+
+    <echo file="${cocoon.tool.dir}/getc2.${shbat}"><![CDATA[#!/bin/sh
+cd $COCOON_HOME
+echo running /build.sh -propertyfile $PROJECT_PROPERTIES $COCOON_GET_BUILD_TARGETS -Dbuild.webapp=$PROJECT_WEBAPP -Dtools.tasks.dest=$PROJECT_TASKDEFS
+./build.sh -propertyfile $PROJECT_PROPERTIES $COCOON_GET_BUILD_TARGETS -Dbuild.webapp=$PROJECT_WEBAPP -Dtools.tasks.dest=$PROJECT_TASKDEFS
+]]></echo>
+    <chmod file="${cocoon.tool.dir}/getc2.${shbat}" perm="u+x"/>
+
+    <echo file="${cocoon.tool.dir}/runc2.${shbat}"><![CDATA[#!/bin/sh
+export COCOON_WEBAPP_HOME=$PROJECT_WEBAPP
+echo COCOON_WEBAPP_HOME=$COCOON_WEBAPP_HOME
+cd $COCOON_HOME
+./cocoon.sh servlet-debug
+]]></echo>
+    <chmod file="${cocoon.tool.dir}/runc2.${shbat}" perm="u+x"/>
+  </target>
+
+  <!--
+    creates as needed batch files or shell scripts
+  -->
+  <target name="-cocoon:shbat" depends="-cocoon:bat, -cocoon:sh"/>
+
+  <!--
+    checks if the cocoon dependency is holding what we expect
+    sets a variable if all is ok
+  -->
+  <target name="-cocoon:test" depends="-cocoon:init">
+    <condition property="cocoon.ok" value="true">
+      <and>
+        <available type="dir" file="${cocoon.lib}"/>
+        <available classname="XConfToolTask"
+                   classpath="${cocoon.tasks}"/>
+      </and>
+    </condition>
+  </target>
+
+  <!--
+    fails the build if the cocoon dependency is not met
+  -->
+  <target name="-cocoon:check" depends="-cocoon:test" unless="cocoon.ok">
+    <fail>No cocoon available. Run 'ant cocoon:get' (or './build.sh cocoon:get') first.</fail>
+  </target>
+
+
+  <target name="-cocoon:patch">
+    <echo>Patching ${cocoon.patch.target} with
+      ${cocoon.xconf.dir}/*.${cocoon.patch.src-extension} ...</echo>
+    <xpatch
+      file="${cocoon.patch.target}"
+      srcdir="${cocoon.xconf.dir}"
+      includes="**/*.${cocoon.patch.src-extension}"/>
+  </target>
+
+  <!--
+      applies the patch files in the ${cocoon.xconf.dir}
+      on the various cocoon conf files
+  -->
+  <target name="cocoon:xconf" depends="-cocoon:check">
+    <path id="cocoon.tasks.cp">
+      <pathelement path="${cocoon.tasks}"/>
+      <path>
+        <fileset dir="${cocoon.lib}">
+          <include name="xalan*.jar"/>
+          <include name="xerces*.jar"/>
+          <include name="xml*.jar"/>
+        </fileset>
+      </path>
+    </path>
+
+    <taskdef
+      name="xpatch"
+      classname="XConfToolTask"
+      classpathref="cocoon.tasks.cp"/>
+
+    <xpatch file="${cocoon.webapp}/WEB-INF/cocoon.xconf" srcdir="">
+      <include name="${cocoon.xconf.dir}/*.xconf"/>
+    </xpatch>
+
+    <antcall target="-cocoon:patch">
+      <param name="cocoon.patch.target"
+             value="${cocoon.webapp}/WEB-INF/cocoon.xconf"/>
+      <param name="cocoon.patch.src-extension"
+             value="xconf"/>
+    </antcall>
+
+    <antcall target="-cocoon:patch">
+      <param name="cocoon.patch.target"
+             value="${cocoon.webapp}/WEB-INF/logkit.xconf"/>
+      <param name="cocoon.patch.src-extension"
+             value="xlog"/>
+    </antcall>
+
+    <antcall target="-cocoon:patch">
+      <param name="cocoon.patch.target"
+             value="${cocoon.webapp}/sitemap.xmap"/>
+      <param name="cocoon.patch.src-extension"
+             value="xmap"/>
+    </antcall>
+
+    <antcall target="-cocoon:patch">
+      <param name="cocoon.patch.target"
+             value="${cocoon.webapp}/WEB-INF/web.xml"/>
+      <param name="cocoon.patch.src-extension"
+             value="xweb"/>
+    </antcall>
+  </target>
+
+  <target name="cocoon:unpatch" description="revert to the original Cocoon config, without project-specific patches">
+    <copy todir="${cocoon.webapp}" overwrite="true">
+      <fileset dir="${cocoon.unpatched}">
+        <include name="WEB-INF/web.xml"/>
+        <include name="WEB-INF/cocoon.xconf"/>
+        <include name="WEB-INF/logkit.xconf"/>
+        <include name="sitemap.xmap"/>
+      </fileset>
+    </copy>
+  </target>
+
+  <target name="cocoon:get" depends="-cocoon:shbat"
+          description="Get cocoon into this project (from directory specified in user.properties) and compile">
+    <mkdir dir="${cocoon.webapp}"/>
+    <exec executable="${cocoon.tool.dir}/getc2.${shbat}">
+      <env key="COCOON_HOME" file="${cocoon.distro.home}"/>
+      <env key="PROJECT_PROPERTIES" file="${cocoon.build.properties}"/>
+      <env key="PROJECT_WEBAPP" file="${cocoon.webapp}"/>
+      <env key="PROJECT_TASKDEFS" file="${cocoon.tasks}"/>
+      <env key="COCOON_GET_BUILD_TARGETS" value="${cocoon.get.build.targets}"/>
+    </exec>
+    <mkdir dir="${cocoon.unpatched}"/>
+    <copy todir="${cocoon.unpatched}">
+      <fileset dir="${cocoon.webapp}">
+        <include name="WEB-INF/web.xml"/>
+        <include name="WEB-INF/cocoon.xconf"/>
+        <include name="WEB-INF/logkit.xconf"/>
+        <include name="sitemap.xmap"/>
+      </fileset>
+    </copy>
+  </target>
+
+  <target name="cocoon:run" depends="-cocoon:shbat, -cocoon:check"
+          description="Run cocoon on the built-in jetty to test (does *not* build the webapp automatically)"
+    >
+    <echo>The runc2.${shbat} script runs Cocoon with the servlet-debug option, remote debugging should be available on
+      port 8000</echo>
+    <echo>${jvm.debug.message}</echo>
+    <exec executable="${cocoon.tool.dir}/runc2.${shbat}">
+      <!-- Added project.webapp.dir system property for JUnit tests; the path ${cocoon.webapp}
+must be full expanded, with absolute path (define it with the ${basedir} Ant property) -->
+      <env key="JAVA_OPTIONS" value="${jvm.options} -Dproject.webapp.dir=${cocoon.webapp}"/>
+      <env key="JAVA_DEBUG_ARGS" value="${jvm.debug.options}"/>
+      <env key="COCOON_HOME" file="${cocoon.distro.home}"/>
+      <env key="PROJECT_WEBAPP" file="${cocoon.webapp}"/>
+    </exec>
+  </target>
+
+
+  <!--
+  Below are some targets that build a default project-setting which allows you to
+  make use of the reusable targets declared in this build-script.
+
+  You can launch the 'seed' target to start-off your project.
+  -->
+  <target name="seed-check">
+    <available property="cocoonHomeOk" file="${cocoon.distro.home}"/>
+    <fail unless="cocoonHomeOk">
+      This script needs a property $${cocoon.distro.home} to be set and
+      pointing to an existing directory containing a cocoon 2.1.x distro.
+      You can set it either by providing a -D flag to ant, or
+      by adding it to a local ./user.properties.
+    </fail>
+
+    <available property="existsBuild" file="build.xml"/>
+    <available property="existsLocalProps" file="${cocoon.build.properties}"/>
+    <available property="existsUserProps" file="user.properties"/>
+    <available property="existsCvsIgnore" file=".cvsignore"/>
+  </target>
+
+  <target name="msg-seed-build" if="existsBuild">
+    <echo>build.xml exists. This script cannot overwrite it.
+      If you want to regenerate the build.xml then manually delete it prior to running the seed target again.</echo>
+  </target>
+
+  <target name="seed-build" depends="msg-seed-build" unless="existsBuild">
+    <echo>Creating build.xml...</echo>
+    <echo file="build.xml"><![CDATA[<?xml version="1.0"?>
+<!--
+  File automatically generated by ant script for YourCocoonBasedProject.
+  Manually extend it to your own needs.
+  -->
+<project name="YourProjectName" default="init">
+  <property file="user.properties" />
+
+  <property name="src"              value="src" />
+  <property name="src.java"         value="${src}/java" />
+  <property name="src.cocoon"       value="${src}/cocoon" />
+  <property name="src.webapp"       value="${src.cocoon}/webapp" />
+
+  <property name="build"            value="build" />
+  <property name="build.classes"    value="${build}/classes" />
+  <property name="zipfile"          value="${build}/${ant.project.name}.zip" />
+  <property name="warfile"          value="${build}/${ant.project.name}.war" />
+
+  <property name="lib"            value="lib" />
+
+  <property name="cocoon-build.properties" value="${src.cocoon}/local.build.properties" />
+  <property name="cocoon-xconf.dir" value="${src.cocoon}/xconf" />
+  <property name="cocoon-tool.dir"  value="tools/cocoon" />
+  <property name="cocoon.webapp"    value="${cocoon-tool.dir}/webapp" />
+  <property name="cocoon.lib"       value="${cocoon.webapp}/WEB-INF/lib" />
+  <property name="cocoon.classes"   value="${cocoon.webapp}/WEB-INF/classes" />
+
+  <property name="cocoon-targets" value="${ant.file}" />
+  <!-- insert properties here to override defaults in the import cocoon-targets script -->
+  <import file="$${cocoon-targets}" />
+
+  <path id="all.cp">
+    <pathelement location="${build.classes}" />
+    <fileset dir="${cocoon.lib}">
+      <include name="*.jar"/>
+    </fileset>
+    <fileset dir="${lib}">
+      <include name="*.jar"/>
+    </fileset>
+  </path>
+
+  <target name="init">
+    <mkdir dir="${build.classes}" />
+  </target>
+
+  <target name="compile" depends="init,-cocoon:check" >
+    <javac srcdir="${src.java}" destdir="${build.classes}" debug="true" >
+      <classpath refid="all.cp"/>
+      <include name="**/*.java"/>
+    </javac>
+  </target>
+
+  <target name="webapp" depends="compile, cocoon:xconf"
+          description="configure the webapp">
+    <copy todir="${cocoon.lib}">
+      <fileset dir="${lib}">
+        <include name="*.jar"/>
+      </fileset>
+    </copy>
+    <copy todir="${cocoon.classes}">
+      <fileset dir="${build.classes}" />
+    </copy>
+    <copy todir="${cocoon.webapp}">
+      <fileset dir="${src.webapp}" />
+    </copy>
+  </target>
+
+  <target name="zip" depends="init">
+    <zip zipfile="${zipfile}" basedir="." excludes="**/build/**, tools/**" />
+  </target>
+
+  <target name="war" depends="webapp" >
+    <jar destfile="${warfile}" basedir="${cocoon.webapp}" />
+  </target>
+
+</project>
+    ]]></echo>
+  </target>
+
+  <target name="seed-dirs">
+    <mkdir dir="${src.cocoon}"/>
+    <mkdir dir="${src.cocoon}/webapp"/>
+    <mkdir dir="${cocoon.xconf.dir}"/>
+    <mkdir dir="${cocoon.tool.dir}"/>
+    <mkdir dir="${cocoon.tool.dir}/webapp"/>
+    <mkdir dir="src/java"/>
+    <mkdir dir="lib"/>
+  </target>
+
+  <target name="msg-seed-userprops" if="existsUserProps">
+    <echo>user.properties already exists. This script cannot overwrite it.
+      If you want to regenerate the user.properties then manually delete it prior to running the seed target
+      again.</echo>
+  </target>
+
+  <target name="seed-userprops" depends="msg-seed-userprops" unless="existsUserProps">
+    <echo file="user.properties">#
+      # File automatically generated by ant script for YourCocoonBasedProject.
+      # Manually extend it to your own needs.
+      #
+      cocoon.distro.home=${cocoon.distro.home}</echo>
+  </target>
+
+  <target name="msg-seed-cvsignore" if="existsCvsIgnore">
+    <echo>.cvsignore already exists. This script cannot overwrite it.
+      If you want to regenerate the .cvsignore then manually delete it prior to running the seed target again.</echo>
+  </target>
+
+  <target name="seed-cvsignore" depends="msg-seed-cvsignore" unless="existsCvsIgnore">
+    <echo file=".cvsignore">build
+      tools
+      user.properties</echo>
+  </target>
+
+  <target name="msg-seed-localprops" if="existsLocalProps">
+    <echo>${cocoon.build.properties} already exists. This script cannot overwrite it.
+      If you want to regenerate the ${cocoon.build.properties} then manually delete it prior to running the seed target
+      again.</echo>
+  </target>
+
+  <target name="seed-localprops"
+          depends="msg-seed-localprops, seed-dirs"
+          unless="existsLocalProps">
+    <concat destfile="${cocoon.build.properties}">
+      <fileset dir="${cocoon.distro.home}">
+        <include name="build.properties"/>
+        <include name="blocks.properties"/>
+      </fileset>
+    </concat>
+  </target>
+
+  <target name="seed" depends="seed-check, seed-localprops, seed-cvsignore, seed-userprops, seed-build">
+    <echo>Done.
+
+      The directory src/cocoon/webapp is created to hold your cocoon
+      webapp resources.
+      The directory src/cocoon/xconf is created to hold XConfPatch files
+      to (optionally) modify the cocoon.xconf log.xconf web.xml and
+      (root) sitemap.xmap
+
+      From here:
+      ---------
+      You should now edit the file ${cocoon.build.properties} to select
+      only those optional components of Cocoon that your project needs.
+      IMPORTANT: Remove the path-entries from that file!
+
+      The build.xml can freely be extended for your project needs.
+
+      To build a fresh Cocoon base for this project
+      (when you updated the distro pointed to by -Dcocoon.distro.home)
+      > ant cocoon:get
+
+      To blend in your own project resources and classes:
+      > ant webapp
+
+      To test-run using the Jetty container:
+      > ant cocoon:run
+    </echo>
+  </target>
+</project>
+

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/config/cocoon.build.properties
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/config/cocoon.build.properties?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/config/cocoon.build.properties (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/config/cocoon.build.properties Thu Sep 22 07:52:54 2005
@@ -0,0 +1,227 @@
+#------------------------------------------------------------------------------
+# Set Cocoon build options.
+#
+# Contains a combination of settings corresponding to the Cocoon
+# local.blocks.properties and local.build.properties files.
+#
+# Mainly used to define which Cocoon blocks are made available to
+# our application.
+#
+# Must not contain ${...} variables, see
+#   http://wiki.cocoondev.org/Wiki.jsp?page=YourCocoonBasedProjectAnt16
+# for more info.
+#------------------------------------------------------------------------------
+# $Id: cocoon.build.properties,v 1.4 2005/09/20 13:48:51 bdelacretaz Exp $
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+#  Cocoon Build Options
+#------------------------------------------------------------------------------
+
+# ---- Webapp ------------------------------------------------------------------
+
+exclude.webapp.documentation=true
+exclude.webapp.javadocs=true
+exclude.webapp.samples=true
+exclude.webapp.test-suite=true
+
+# ---- Build Exclusions --------------------------------------------------------
+
+exclude.deprecated=true
+exclude.documentation=true
+exclude.javadocs=true
+
+# ---- Configuration -----------------------------------------------------------
+
+#include.driver.oracle=true
+#include.driver.postgre=true
+#include.driver.odbc=true
+#config.allow-reloads=true
+#config.enable-uploads=true
+
+# ---- Validation --------------------------------------------------------------
+
+#exclude.validate.config=true
+#exclude.validate.xdocs=true
+#exclude.validate.jars=true
+
+# ---- Forrest -----------------------------------------------------------------
+
+# set $FORREST_HOME and $PATH as instructed by Forrest
+
+# ---- Anteater ----------------------------------------------------------------
+
+anteater.home = /default-from-build.properties/anteater-0.9.16
+anteater.target.host = localhost
+anteater.target.port = 8888
+anteater.target.base.path = /
+anteater.option.haltonerror = true
+
+# disable some long-running tests by default
+# anteater.test.bug26186InternalRequestMemoryLeak.enabled = true
+
+# ---- JUnit -------------------------------------------------------------------
+
+junit.test.debugport=8000
+#junit.testcase=org.apache.cocoon.util.test.NetUtilsTestCase
+
+# ---- Compilation -------------------------------------------------------------
+
+compiler=modern
+compiler.debug=on
+compiler.optimize=on
+compiler.deprecation=off
+compiler.nowarn=on
+
+
+# ------ System Properties -----------------------------------------------------
+
+# WARNING: you shouldn't need to modify anything below here since there is a
+# very high change of breaking the build system. Do it only if you know what
+# you're doing.
+
+packages=org.apache
+
+# Project descriptor
+gump.descriptor=gump.xml
+
+
+#------------------------------------------------------------------------------
+# Cocoon Blocks selection
+#------------------------------------------------------------------------------
+
+# All blocks -------------------------------------------------------------------
+
+# Use this property to exclude all blocks at once
+# exclude.all.blocks=true
+
+# Use this property to include all blocks at once
+# include.all.blocks=true
+
+
+# Stable blocks ----------------------------------------------------------------
+
+# Stable blocks are those that can be considered ready for production and
+# will contain components and API that will remain stable and where
+# developers are committed to back compatibility. In short, stuff that you
+# can depend on.
+
+#-----[dependency]: "authentication-fw" depends on "session-fw".
+#-----[dependency]: "authentication-fw" is needed by "portal", "portal-fw".
+include.block.authentication-fw=false
+#-----[dependency]: "batik" is needed by "fop", "tour".
+include.block.batik=false
+include.block.bsf=false
+include.block.chaperon=false
+#-----[dependency]: "databases" depends on "xsp".
+#-----[dependency]: "databases" is needed by "hsqldb", "jms", "ojb", "petstore", "repository", "xmldb".
+include.block.databases=false
+#-----[dependency]: "fop" depends on "batik".
+#-----[dependency]: "fop" is needed by "tour".
+include.block.fop=false
+#-----[dependency]: "hsqldb" depends on "databases".
+#-----[dependency]: "hsqldb" is needed by "jms", "ojb", "petstore".
+include.block.hsqldb=false
+include.block.html=false
+#-----[dependency]: "itext" depends on "xsp" (for samples).
+include.block.itext=false
+include.block.jfor=false
+include.block.jsp=false
+#-----[dependency]: "linkrewriter" depends on "xsp".
+include.block.linkrewriter=false
+#-----[dependency]: "lucene" is needed by "querybean".
+include.block.lucene=false
+include.block.naming=false
+#-----[dependency]: "ojb" depends on "databases" (for samples), "forms" (for samples), "hsqldb" (for samples).
+#-----[dependency]: "ojb" is needed by "javaflow", "querybean".
+include.block.ojb=false
+include.block.paranoid=false
+include.block.poi=false
+#-----[dependency]: "portal" depends on "authentication-fw", "cron", "forms", "session-fw".
+#-----[dependency]: "portal" is needed by "faces".
+include.block.portal=false
+include.block.profiler=false
+#-----[dependency]: "python" depends on "xsp".
+include.block.python=false
+#-----[dependency]: "session-fw" depends on "xsp".
+#-----[dependency]: "session-fw" is needed by "authentication-fw", "portal", "portal-fw".
+include.block.session-fw=false
+#-----[dependency]: "velocity" is needed by "petstore".
+include.block.velocity=false
+include.block.web3=false
+#-----[dependency]: "xmldb" depends on "databases".
+include.block.xmldb=false
+#-----[dependency]: "xsp" is needed by "databases", "itext", "linkrewriter", "python", "session-fw", "woody".
+include.block.xsp=false
+
+# Deprecated blocks ------------------------------------------------------------
+
+# Although some of these blocks may have been stable, they are now deprecated
+# in favour of other blocks and therefore are excluded by default from the build.
+# For including one of them you have to set the exclude property into comment in
+# blocks.properties.
+
+include.block.php=false
+#-----[dependency]: "portal-fw" depends on "authentication-fw", "session-fw".
+include.block.portal-fw=false
+include.block.swf=false
+#-----[dependency]: "woody" depends on "xsp" (for samples).
+include.block.woody=false
+
+# Unstable blocks --------------------------------------------------------------
+
+# Unstable blocks are currently under development and do not guarantee that the
+# contracts they expose (API, xml schema, properties, behavior) will remain
+# constant in time. Developers are not committed to back-compatibility just yet.
+# This doesn't necessarily mean the blocks implementation is unstable or
+# the code can't be trusted for production, but use with care and watch
+# its development as things might change over time before they are marked
+# stable.
+
+#-----[dependency]: "apples" depends on "forms" (for samples).
+include.block.apples=false
+#-----[dependency]: "asciiart" is needed by "mail".
+include.block.asciiart=false
+include.block.axis=false
+#-----[dependency]: "cron" is needed by "portal".
+include.block.cron=false
+include.block.deli=false
+#-----[dependency]: "eventcache" depends on "jms".
+#-----[dependency]: "eventcache" is needed by "repository".
+include.block.eventcache=false
+#-----[dependency]: "faces" depends on "portal", "taglib".
+include.block.faces=false
+#-----[dependency]: "forms" is needed by "apples", "javaflow", "ojb", "petstore", "portal", "querybean", "tour".
+#include.block.forms=false
+#-----[dependency]: "javaflow" depends on "forms", "ojb".
+include.block.javaflow=false
+include.block.jcr=false
+#-----[dependency]: "jms" depends on "databases" (for samples), "hsqldb".
+#-----[dependency]: "jms" is needed by "eventcache", "slide".
+include.block.jms=false
+include.block.linotype=false
+#-----[dependency]: "mail" depends on "asciiart".
+include.block.mail=false
+include.block.midi=false
+#-----[dependency]: "petstore" depends on "databases", "forms", "hsqldb", "velocity".
+include.block.petstore=false
+include.block.proxy=false
+include.block.qdox=false
+#-----[dependency]: "querybean" depends on "forms" (for samples), "lucene", "ojb".
+include.block.querybean=false
+#-----[dependency]: "repository" depends on "databases", "eventcache".
+#-----[dependency]: "repository" is needed by "slide", "webdav".
+include.block.repository=false
+include.block.serializers=false
+#-----[dependency]: "slide" depends on "jms", "repository".
+include.block.slide=false
+#-----[dependency]: "slop" is needed by "tour".
+include.block.slop=false
+include.block.stx=false
+#-----[dependency]: "taglib" is needed by "faces".
+include.block.taglib=false
+#-----[dependency]: "tour" depends on "batik", "fop", "forms", "slop".
+include.block.tour=false
+#-----[dependency]: "webdav" depends on "repository".
+include.block.webdav=false
+

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/sitemap.xmap?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/sitemap.xmap (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/sitemap.xmap Thu Sep 22 07:52:54 2005
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright 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.
+-->
+
+<!--
+  admin sitemap for the bricks-cms project
+
+  $Id$
+-->
+<map:sitemap
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0"
+  >
+
+  <map:resources>
+    <map:resource name="layout">
+      <map:transform src="xslt/page-to-html.xsl"/>
+      <map:serialize type="html"/>
+    </map:resource>
+  </map:resources>
+
+  <map:pipelines>
+
+    <map:pipeline>
+      <map:match pattern="">
+        <map:redirect-to uri="homepage"/>
+      </map:match>
+
+      <map:match pattern="homepage">
+        <map:generate src="static-content/pages/admin-homepage.xml"/>
+        <map:call resource="layout"/>
+      </map:match>
+
+      <!--
+        serve static images, CSS, etc
+         accept any path before admin-resources to make it easier
+      -->
+      <map:match pattern="**/admin-resources/**">
+        <map:read src="static-content/resources/{2}"/>
+      </map:match>
+
+    </map:pipeline>
+
+  </map:pipelines>
+
+</map:sitemap>

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/pages/admin-homepage.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/pages/admin-homepage.xml?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/pages/admin-homepage.xml (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/pages/admin-homepage.xml Thu Sep 22 07:52:54 2005
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright 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.
+-->
+
+<page>
+  <metadata>
+    <title>bricks-cms admin homepage</title>
+  </metadata>
+
+  <content>
+    <p>
+      This is the admin homepage, soon you'll find lots of cool links here.
+    </p>
+  </content>
+</page>
\ No newline at end of file

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/resources/css/bricks-cms.css
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/resources/css/bricks-cms.css?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/resources/css/bricks-cms.css (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/static-content/resources/css/bricks-cms.css Thu Sep 22 07:52:54 2005
@@ -0,0 +1,25 @@
+/*
+  Copyright 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.
+*/
+
+/** CSS stylesheet for the bricks-cms example application */
+
+body {
+    font-family: Georgia, Verdana, Sans-Serif;
+}
+
+h1 {
+    border-bottom: solid gray 1px;
+}
\ No newline at end of file

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/xslt/page-to-html.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/xslt/page-to-html.xsl?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/xslt/page-to-html.xsl (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/admin/xslt/page-to-html.xsl Thu Sep 22 07:52:54 2005
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright 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.
+-->
+
+<!--
+    Convert a <page> document to HTML
+    $Id$
+-->
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
+                xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+  >
+
+  <xsl:variable name="title" select="page/metadata/title"/>
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>
+          <xsl:value-of select="$title"/>
+        </title>
+        <link rel="stylesheet" type="text/css" href="x/admin-resources/css/bricks-cms.css"/>
+      </head>
+
+      <body>
+        <h1 class="pageTitle">
+          <xsl:value-of select="$title"/>
+        </h1>
+        <xsl:apply-templates select="page/content" mode="copy-content"/>
+
+      </body>
+    </html>
+  </xsl:template>
+
+  <!-- assume content is XHTML, and also copy other namespaces like ft, fi, etc. -->
+  <xsl:template match="*|ft:*|fi:*|i18n:*" mode="copy-content">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates mode="copy-content"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/sitemap.xmap?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/sitemap.xmap (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/bricks-cms/sitemap.xmap Thu Sep 22 07:52:54 2005
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<!--
+  Copyright 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.
+-->
+
+<!--
+  Main sitemap for the bricks-cms project
+
+  $Id$
+-->
+<map:sitemap
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0"
+  >
+
+  <map:pipelines>
+
+    <map:pipeline>
+      <map:match pattern="">
+        <map:redirect-to uri="admin/"/>
+      </map:match>
+
+      <!-- mount sub-sitemaps, one level down from this directory -->
+      <map:match pattern="*/**">
+        <map:mount
+          check-reload="yes"
+          src="{1}/"
+          uri-prefix="{1}/"
+          />
+      </map:match>
+
+    </map:pipeline>
+
+  </map:pipelines>
+
+</map:sitemap>

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/welcome.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/welcome.xml?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/welcome.xml (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/webapp/welcome.xml Thu Sep 22 07:52:54 2005
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 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.
+-->
+
+<!--
+  Welcome page shown when starting Cocoon and navigating to 
+  http://localhost:8888/ (or whatever port you're using).
+  
+  Should give information about what the application does
+  and links to entry points.
+-->
+<welcome>
+  <message>
+    Use
+    <link href="bricks-cms/">bricks-cms/</link>
+    to access the bricks-cms Cocoon application.
+  </message>
+</welcome>
\ No newline at end of file

Added: cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/xconf/ComponentManagerInitializer.xweb
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/xconf/ComponentManagerInitializer.xweb?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/xconf/ComponentManagerInitializer.xweb (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/cocoon/xconf/ComponentManagerInitializer.xweb Thu Sep 22 07:52:54 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright 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.
+-->
+
+<!--
+  patch web.xml to add our ComponentManagerInitializer
+  $Id$
+-->
+
+<xweb
+    xpath="/web-app"
+    unless="/web-app/listener[listener-class='org.apache.cocoon.apps.bricks.cms.componentmanager.ComponentManagerInitializer']"
+    insert-before="servlet"
+>
+    <!-- add the ComponentManagerInitializer as a context listener -->
+    <listener>
+        <listener-class>org.apache.cocoon.apps.bricks.cms.componentmanager.ComponentManagerInitializer</listener-class>
+    </listener>
+</xweb>

Added: cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/componentmanager/ComponentManagerInitializer.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/componentmanager/ComponentManagerInitializer.java?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/componentmanager/ComponentManagerInitializer.java (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/src/java/org/apache/cocoon/apps/bricks/cms/componentmanager/ComponentManagerInitializer.java Thu Sep 22 07:52:54 2005
@@ -0,0 +1,66 @@
+package org.apache.cocoon.apps.bricks.cms.componentmanager;
+
+/*
+  Copyright 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.
+*/
+
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+
+/**
+ * Called as a ServletContextListener at startup, initializes the Hivemind Registry
+ * $Id$
+ */
+
+public class ComponentManagerInitializer implements ServletContextListener {
+
+    public static final String COMPONENT_MANAGER_ATTRIBUTE = "application.component.manager";
+
+    /**
+     * Notification that the web application initialization process is starting.
+     * Create our ApplicationComponentManager, and add it to the servlet context,
+     * so that it is easily accessible from flowscript or java code.
+     */
+    public void contextInitialized(ServletContextEvent event) {
+        /*  TODO setup component manager
+        event.getServletContext().log("ComponentManagerInitializer: initializing hivemind registry...");
+        final Registry r = RegistryBuilder.constructDefaultRegistry();
+        final ApplicationComponentManager cm = new ApplicationComponentManager(r);
+        event.getServletContext().setAttribute(COMPONENT_MANAGER_ATTRIBUTE,cm);
+        event.getServletContext().log(
+                "ComponentManagerInitializer: ApplicationComponentManager added to servlet context as attribute '"
+                + COMPONENT_MANAGER_ATTRIBUTE + "'"
+        );
+        */
+    }
+
+    /**
+     * Notification that the servlet context is about to be shut down.
+     * Shutdown the hivemind registry
+     */
+    public void contextDestroyed(ServletContextEvent event) {
+        /*  TODO setup component manager
+        event.getServletContext().log("ComponentManagerInitializer: processing contextDestroyed event");
+
+        final ApplicationComponentManager cm = (ApplicationComponentManager)event.getServletContext().getAttribute(COMPONENT_MANAGER_ATTRIBUTE);
+        if(cm == null) {
+            event.getServletContext().log("ComponentManagerInitializer: registry context attribute (" + COMPONENT_MANAGER_ATTRIBUTE + ") not found");
+        } else {
+            event.getServletContext().log("ComponentManagerInitializer: hivemind registry shutdown");
+            cm.shutdown();
+        }
+        */
+    }
+}

Added: cocoon/whiteboard/example-apps/bricks-cms/user.properties
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/example-apps/bricks-cms/user.properties?rev=290955&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-cms/user.properties (added)
+++ cocoon/whiteboard/example-apps/bricks-cms/user.properties Thu Sep 22 07:52:54 2005
@@ -0,0 +1,40 @@
+# --------------------------------------------------------------------------
+# Configuration properties for build.xml
+#
+# **************************************************************************
+# DO NOT EDIT THIS FILE unless adding new parameters or changing
+# default values - this file is meant to hold default values only,
+# **************************************************************************
+#
+# To set custom values, make a copy of this file, call it
+# local.user.properties and edit values there.
+#
+# The values from local-user.properties (which is not stored in SVN)
+# override those from this file.
+# --------------------------------------------------------------------------
+# $Id: user.properties,v 1.2 2005/07/25 14:26:20 bdelacretaz Exp $
+# --------------------------------------------------------------------------
+
+# Select Cocoon distribution to use
+# To customize the Cocoon build see src/cocoon/config/cocoon.build.properties
+# For example:
+#   cocoon.distro.home=/software/cocoon/2.1.7
+# --------------------------------------------------------------------------
+cocoon.distro.home=../../../branches/BRANCH_2_1_X
+
+# JVM options (remote debugging, etc)
+# --------------------------------------------------------------------------
+
+# Use suspend=y to wait for debugger at startup
+# Uncomment one of the following sets of lines only:
+
+# set 1: activate remote debuging
+# jvm.debug.message = Debugging activated from user.properties
+# jvm.debug.options = -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+
+# set 2: no remote debugging
+jvm.debug.message = Remote debugging disabled
+jvm.debug.options =
+
+# additional JVM options
+jvm.options = -Xmx128M -Dfile.encoding=iso-8859-1