I'm new to Cocoon. I'm trying to understand how to set up an area on my server where I can 1) start doing some testing and 2) eventually deploy production code. I've scoured the docs and several websites but have had no luck in finding an answer to my question, below.
I've dropped the cocoon.war in my webapps directory and it's expanded and the samples are and docs are all running fine.
What I don't understand: where can I set up a clean, virgin sitemap file and folder for my testing, without having to edit the huge sitemap file currently under the cocoon folder, but at the same time without disabling any of the current files? I just want a separate area to work in but I don't know how to set this up without modifying the current sitemap(s).
First, in case you were wondering, there is only one root sitemap. You must either edit it, replace it, or use something defined in it.
Options:
1) Use the "mount table" match set up in the default root sitemap. The problem with this is you can see the default mount-table.xml is assumed to be two directories back from your webroot (bizarre for production, makes sense for visibility in cocoon demo). From the sitemap:
<!--+
| Find a match in the "mount-table.xml" file, if present. It allows to mount other
| directories without touching this main sitemap (and thus loosing changes on rebuild).
|
| Note that other mount-tables can be added here using the xpatch ant task
| (see src/confpatch/mount-table.xmap)
+-->
<map:match type="mount-table" pattern="../../mount-table.xml">
<map:mount src="{src}" uri-prefix="{uri-prefix}"/>
</map:match>
2) Use sub directory. The matcher section below in the default sitemap means that if you create a davesapp/sitemap.xmap under the webapp root, it will automatically handle requests to http://localhost:8888/davesapp/* -- drawback is that you'll be stuck using this directory name in your urls. You can configure around this and use variables or link translation, but that can be a pain.
<!--+ | Mount everything else by calling the sitemap.xmap file located | in the requested folder. +--> <map:match pattern="*/**"> <map:mount check-reload="yes" src="{1}/" uri-prefix="{1}"/> </map:match>
3) Use the xpatch task (search wiki) to automatically apply your arbitrary edits to the main sitemap. The edits will be applied with each build, so you are safe against cvs update.
Note: the planned "real blocks" should make all three unnecessary.
Finally, when I go into production on a separate server, I would like
to simply have my application and nothing else, no samples, no docs. What's the general approach to this? Can you point me to a good
document that describes these steps?
You'll need to rebuild cocoon with appropriate choices in local.build.properties and local.blocks.properties. There are options there for including/excluding samples, docs, javadocs, and of course any "blocks" (which are currently defined as compile-time optional functional modules).
HTH, Geoff
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]