Hey folks -- I'm starting a new Cocoon application and I want to try to take advantage of the new 2.1 build system and the blocks stuff. As I couldn't find any documentation on how to do this, I put together something and wanted to run it by all of you to let me know if I'm on the right track. I added the following directory structure to the src/blocks dir:
testblock/ conf/ testblock.xmap java/ lib/ webapp/ testblock/ sitemap.xmap build.xml conf/testblock.xmap inserts a match/mount into the main sitemap to mount my webapp/testblock/sitemap.xmap: <xmap xpath="/sitemap/pipelines/pipeline" unless="[EMAIL PROTECTED]'testblock']"> <map:match pattern="testblock/**"> <map:mount check-reload="yes" src="testblock/" uri-prefix="testblock"/> </map:match> </xmap> I created the webapp directory to hold all the stuff I need copied to build/webapp, and build.xml is the ant task that copies it: <project default="main" basedir="."> <target name="main"> <copy filtering="on" todir="${build.webapp}"> <fileset dir="${block.dir}/webapp"/> </copy> </target> </project> Finally I added my new block to gump.xml: <project name="cocoon-block-testblock" status="unstable"> <package>org.apache.cocoon</package> <ant target="gump-block"> <property name="block-name" value="testblock"/> <property name="version" value="@@DATE@@"/> </ant> <depend project="cocoon" inherit="all"/> <work nested="tools/anttasks"/> <home nested="build/cocoon-@@DATE@@"/> <jar name="blocks/testblock-block.jar"/> <nag from="Gump" to="[EMAIL PROTECTED]"/> </project> Doing a build webapp builds it and it all seems to work. Does this seem right? Is there anything else I should be doing? Also, is there a way to hot-deploy blocks without restarting jetty? cheers, -steve