CHS

Introduction

CHS is a showcase of the integration between Cocoon, Hibernate and Spring.

This component is made available outside of the main Cocoon CVS repository because it relies on Hibernate which is LGPL licensed and as such cannot be added to Apache's CVS repository.

Howto (for Cocoon 2.1.6)

  1. Configure local.blocks.properties and make sure that the "forms" block is included and the "hsqldb" block is excluded.
  2. Configure local.build.properties and make sure that the exclude.validate.jars=true line is not commented.
  3. From your Cocoon 2.1 working directory, go to src/blocks.
  4. Fetch the source code from SVN: svn co http://svn.cocoondev.org/repos/chs/spring.
  5. Paste the contents of the spring/jars-snippet.xml file into the lib/jars.xml file under the root of the Cocoon working directory.
  6. Paste the following element in the gump.xml file under the root of the Cocoon working directory:
  <project name="cocoon-block-spring" status="unstable">

    <package>org.apache.cocoon</package>

    <ant target="gump-block">
      <property name="block-name" value="spring"/>
      <property name="version" value="@@DATE@@"/>
    </ant>

    <depend project="cocoon" inherit="all"/>

    <library name="aopalliance"/>
    <library name="c3p0"/>
    <library name="cglib-full"/>
    <library name="commons-dbcp"/>
    <library name="commons-pool"/>
    <library name="connector"/>
    <library name="dom4j"/>
    <library name="jta"/>
    <library name="odmg"/>
    <library name="proxool"/>
    <library name="spring-aop"/>
    <library name="spring-context"/>
    <library name="spring-core"/>
    <library name="spring-dao"/>
    <library name="spring-orm"/>
    <library name="spring-web"/>
    <library name="hsqldb"/>
    <library name="hibernate2"/>

    <work nested="tools/anttasks"/>

    <home nested="build/cocoon-@@DATE@@"/>

    <jar name="blocks/spring-block.jar"/>

    <nag from="Gump" to="dev@cocoon.apache.org"/>

  </project>

Now you can build Cocoon as usual.

You can find the Spring Petstore sample under http://localhost:8888/samples/blocks/spring/

Project resources

Comments (23)