You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Unico Hommes <Un...@hippo.nl> on 2003/10/29 15:41:43 UTC
Developing samples
Trying to figure out how to use the Cocoon build system to most
conveniently develop samples I first added a way to invoke an individual
${block.name}-samples target.
If you do:
# build -Dblock.name call-block-samples
The samples of the ${block.name} block will be built into the
build/webapp directory.
If you don't like this and you would rather that the block samples are
mounted directly in the source directory. This is also possible. I
modified the samples/sitemap.xmap so that by starting jetty as follows:
# cocoon -Dsamples.location=source servlet
The samples are mounted from the blocks source directory. Note that
unfortunately I wasn't able to make this work for the core samples as
well so that the system will not be able to find those when you run
jetty with this option.
I think this is probably something that will be useful in general so
I'll commit this change later if noone objects, but I'd like to hear how
others are developing samples. Develop in the build directory and then
copy the changes back into the source tree? Create a mount to the
sitemap in the source directory instead?
Cheers, Unico
Re: Developing samples
Posted by Steven Noels <st...@outerthought.org>.
Bertrand Delacretaz wrote:
> Le Mercredi, 29 oct 2003, à 15:41 Europe/Zurich, Unico Hommes a écrit :
>
>> ...I'd like to hear how
>> others are developing samples. Develop in the build directory and then
>> copy the changes back into the source tree?
>
>
> For samples that don't require compiling (i.e. XSLT or similar stuff), I
> usually setup a simple rsync loop to sync stuff every N seconds from src
> to build/webapp.
I had multiple cases of little tests which I sent down the bitbucket
drain by doing stuff in build/webapp and forgetting to sync afterwards,
and habitually doing an 'rm -rf build' after a cvs update. So yes, you
should try to avoid at all costs to do stuff in your build dir. 'build
webapp' sure takes some time, but in the end it appears to be the most
foolproof method. The thing about 'build webapp' is the annoying 10
second time lapse of the xpatch part, which might be because the it
tries to resolve the URI of the web.xml DTD - this is just a wild guess
however, it might also have to do with the documentation validation step.
</Steven>
--
Steven Noels http://outerthought.org/
Outerthought - Open Source Java & XML An Orixo Member
Read my weblog at http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org stevenn at apache.org
Re: Developing samples
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le Mercredi, 29 oct 2003, à 15:41 Europe/Zurich, Unico Hommes a écrit :
> ...I'd like to hear how
> others are developing samples. Develop in the build directory and then
> copy the changes back into the source tree?
For samples that don't require compiling (i.e. XSLT or similar stuff),
I usually setup a simple rsync loop to sync stuff every N seconds from
src to build/webapp.
Not the most sophisticated thing, but works for me!
-Bertrand