Database Reference
In-Depth Information
Library packages
Library packages contain data, libraries, or resources used by other packages.
They can also contain Java JAR files to load into eXist's classpath.
You might not have realized it, but you've used the result of the packaging system
already quite intensively: most dashboard applications are packages. When you
browse through the list of installed packages, you'll likely recognize some of them
from the dashboard.
Examples
We need not provide you with extensive examples of packages in this section,
because there are many practical examples already in existence that you can learn
from:
• The example code for this topic is distributed as a package, and you can look
inside the package file or at the installed version in the database (in the /db/apps/
exist-book collection) to see how it is structured. Besides examples of all the pack‐
aging configuration files, there is some interesting code in the installer subcollec‐
tion also.
• The directory $EXIST_HOME/webapp/WEB-INF/data/expathrepo holds the
unpacked files of each installed package and is a good source of varied examples.
The Packaging Format
An eXist/EXPath package is a ZIP archive file, containing all the package's resources
in directories which follow their collection structure. The file extension is, by conven‐
tion, not .zip but .xar .
The root of the archive contains some packaging configuration files:
expath-pkg.xml
The standard EXPath descriptor file. It contains information on things like the
package's name, version, and dependencies. See “The expath-pkg.xml file” on
page 230 .
repo.xml
The eXist-specific deployment descriptor file. It contains additional metadata
and controls how the package will be deployed into the database. See “The
repo.xml file” on page 231 .
exist.xml
An eXist adaptation for loading extension modules written in Java. For more
information about this, refer to the Package Repository documentation (available
through the dashboard's Function Documentation browser).
Search WWH ::




Custom Search