[Cosmo-dev] startup repository initialization

Brian Moseley bcm at osafoundation.org
Mon May 15 14:17:57 PDT 2006


earlier today i committed a big change to the cosmo trunk dealing with
repository initialization.

we used to use maven to read a longhand text description of cosmo's
schema, generate a jackrabbit xml file out of that, and then use that
xml file to import the schema. if somebody wanted to blow away the
repository for a running server and start from scratch, they had to go
through a series of manual steps, including re-running maven.

now cosmo looks for a repository at startup and, if it doesn't find
one, it autocreates and initializes one. so now if you want to blow
away your repository and start over, you can simply 1) stop cosmo, 2)
rm -rf the data dir, and 3) restart cosmo.

also, cosmo now uses the "compact nodetype definition" format to
specify its schema. the result is much briefer and more readable.

startup + initialization now takes ~45-50 seconds on my windows dev
machine, but subsequent startups only take ~15 seconds.

this change has caused tests to behave a little differently. for the
time being, if you need to run tests, you should also run the clean
goal. if you don't, you'll get some test failures. i'm still trying to
decide how best to automate this.


More information about the cosmo-dev mailing list