Building a new standalone eXist war file (dist-war)
If this is a new setup and you've never checked out eXist before, then:
- mkdir exist_trunk
- cd exist_trunk
- svn co http://exist.svn.sourceforge.net/svnroot/exist/trunk/eXist .
Otherwise just go into exist_trunk and do
- svn update
- cd eXist
- ./build.sh clean
- ./build.sh download-additional-jars
- cd extensions
- cp build.properties local.build.properties
- [Check local.build.properties to make sure FOP is turned on. It's turned on by default at the moment. **FYI: just checked out rev 15484 (Oct 29, 2011) and FOP is turned off in build.properties]
- cd ../
- ./build.sh
NOTE: if the build fails because of an error related to a Ant and Ivy, then download this file: http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar and put it in eXist/tools/ant/lib/
- ./build.sh -f build/scripts/jarsigner.xml
- ./build.sh dist-war
Next, if you're going to store your XQuery and the rest of your application logic in the database, don't forget to edit WEB-INF/controller-config.xml to make sure requests in the webapp root are handled by your controller file. For example, I added this:
<!-- MDH: Application site configuration. --> <root pattern="/*" path="xmldb:exist:///db/site"/>
to tell eXist that my controller.xql lives in /db/site, and should be handling every request to the webapp from the root down.
One other fix proved to be necessary: my application serves images out of an /images/ subcollection, but there's a line in the default controller-config.xml which blocks the handler in my controller.xql. I had to comment it out:
<!-- MDH: Commented this out. --> <!-- <forward pattern="/images" servlet="ScaleImageJAI"/> -->