I started this reply ages ago but never got around to finishing it ... Brolin Empey wrote: > Brolin Empey wrote: > > > > The Cocoon checksum feature sounds like it may work. I will try it > > when I return to work and will let you know the results. > > The Cocoon checksum feature seems to work, but I have a configuration > problem with specifying checksums-uri in cli.xconf. > > I need checksums-uri to be relative to e.g. the root of my Forrest > project (the directory containing forrest.properties and src/) so that > I can use a relative path to a checksums file in my build/site/ > directory. > > I do not want to hard-code an absolute path because this path will > break if I move the SVN working copy of my Forrest site, or if someone > else checks out a copy of my Forrest site. > > I tried setting checksums-uri to just "checksums", but then the build > process hangs when I run "forrest" to rebuild the static site because > the JVM encounters a Java IO exception when attempting to write the > checksums file. This happens because I do not have write permission > for whichever directory checksums-uri is relative to. I tried > enabling both verbose and debug output for both Forrest and the JVM, > but when the JVM encounters the Java IO exception it still does not > say which path it is trying to write to. > > So, my questions are: > > 1. Which directory is checksums-uri relative to?
As said in the example cli.xconf file: "The default path is relative to the core webapp directory." So, relative to $FORREST_HOME/main/webapp directory. I think that we have a problem in Forrest. Some stuff (e.g. main sitemaps) are relative to the above directory whereas other stuff is relative to project.home directory. > 2. Is there any way to get the path of the file that could not be > written when the JVM encounters a Java IO exception? I am using Sun's > JDK on Linux: Did you look in the Cocoon logs? http://forrest.apache.org/faq.html#logs > $ java -version > java version "1.5.0_10" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) > Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing) > > 3. Can I make checksums-uri relative to e.g. the root of my Forrest > project? I notice I can set e.g. a context directory in cli.xconf, > but I do not know what else is affected by this setting. Sorry, i don't know. It might not even have any effect. Search the Forrest code. I see one mention of "webapp" at main/targets/site.xml line 37 in trunk SVN. Also search the Cocoon docs and code as mentioned in the top of the default config file at main/webapp/WEB-INF/cli.xconf http://cocoon.apache.org/2.1/userdocs/offline/ http://wiki.apache.org/cocoon/CommandLine More discussion should probably happen on the Forrest "dev" list as we are getting away from user-land discussion. -David > If possible, I would like to avoid having to specify an absolute path > to a temporary location, such as /tmp/checksums, and copy the > checksums file back into my build/site/ directory. > > Thanks, > Brolin