This guide explains how to compile the Xaj binary JAR from source.
At a minimum you'll need the following tools to be able to build Xaj:
To build individual XmlDb back-end implementations, you'll need additional JARs, detailed in the build instructions for each implementation in this document.
The Xaj source files are stored in a Subversion repository, hosted on SourceForge.net. You'll need a Subversion client to check out the sources.
The main development trunk is available at this URL:
Specific releases are available at URLs like the following:
Substitute the release name you're interested in for RELEASE (e.g. 1.0).
For example, to get the latest sources checked out into a directory
named xaj on your computer, you could do this (using the
svn
command line tool):
Xaj is split between the core framework packages and individual back-end implementation packages. The core framewwork consists of:
net.sf.xaj
package.net.sf.xaj.core
package.net.sf.xaj.web
package.To build just these core packages, run the jar Ant task.
This will create the dist/xaj.jar JAR file that contains both the compiled Java sources as well as the original source files.
To build actual Xaj backend implementations, you'll need supporting JARs made available by each implementation's release packages. Xaj supports many different implementations, some of which are open source and some which are not.
For any non-core package you want to build, you'll need to copy the JAR
files listed here into the environment/local
directory of your checked-out Xaj project. Then you simply run the
jar Ant task, passing a command-line build property
-Dwith.package=true
to add that
package to the built JAR.
You need to copy the db.jar and dbxml.jar files from your
Berkeley DB XML distribution into environment/local
. Then run
the jar task, passing -Dwith.bdb=true:
Copy the following JARs from your Exist distribution into
environment/local
:
Then run the jar task, passing -Dwith.exist=true:
Xaj can be deployed into a J2EE servlet container as a WAR, which is useful for XML DB implementations that do not run as a network server natively (such as Berkeley DB XML).
Xaj also provides a web-remote implementation wrapper so you can use the remote web server as if it were a normal local instance.
To build the Xaj WAR, do the following:
environment/local
. See the
defs/examples
directory for example
context files for the backend you are interested in.environment/local
. See the
defs/examples
directory for examples.dist-war
Ant task (be sure
to specify your non-core implementation flags still) to build
the xaj.war
file.Once running, you should be able to visit the
/xaj/admin/xquery.do
URL in your browser
to use the XQuery Admin Tool to execute queries.