Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

eXist Book Example Code

Build Status Java 7 License

This repository contains all (except the Using eXist 101 chapter) of the code and examples discussed in the eXist book published by O'Reilly.

This version contains code compatible with eXist-db 2.1 which was the latest version at the time the book was authored. Versions for eXist-db 3.0.RC1, 3.0, and 4.0.0 are also available.

The repository has the following layout:

  • chapters/ Under this folder each chapter of the book that has example code is represented.

  • xml-examples-xar/ These are the files needed to build an EXPath Package XAR from other files distributed in the chapters folders. In particular the content of the XAR package is assembled using the the fileSets set out in the assembly xml-examples-xar/expath-pkg.assembly.xml

All other files are related to the Maven build process.


The EXPath Package XAR and the Java projects are all built using Apache Maven. You will need to have Git and at least Maven 3.1.1 installed. Git can be downloaded and installed from and you can download and install Maven from

Once you have Maven installed you can simply run the following from your Unix/Linux/Mac terminal or Windows command prompt:

git clone
cd book-code
mvn clean install

You should then find the EXPath PKG XAR located at xml-examples-xar/target/exist-book.xar. The Java projects artifacts will be located within the target sub-folders of each Java project respectively.