Last active
May 13, 2022 16:34
-
-
Save ubermichael/beff98fc0b939788c908ac75b149d35c to your computer and use it in GitHub Desktop.
Example of an ant build.xml file for uploading files to eXistDb with credentials stored in a properties file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project default="xar" name="wilde" xmlns:xdb="http://exist-db.org/ant"> | |
<description>Wilde Trials International News Archive</description> | |
<property name="host" value="localhost"/> | |
<property file="${host}.properties"/> | |
<path id="classpath.core"> | |
<fileset dir="${local.dir}/lib"> | |
<include name="*.jar"/> | |
</fileset> | |
<pathelement path="${local.dir}/exist.jar"/> | |
<pathelement path="${local.dir}/exist-optional.jar"/> | |
</path> | |
<typedef resource="org/exist/ant/antlib.xml" uri="http://exist-db.org/ant"> | |
<classpath refid="classpath.core"/> | |
</typedef> | |
<target name="fetch"> | |
<echo>Fetching data from ${host} at ${server.data}</echo> | |
<xdb:extract uri="${server.data}" destdir="data" | |
user="${server.user}" password="${server.pass}" | |
subcollections="true" createdirectories="true" overwrite="true"/> | |
</target> | |
<target name="store-reports"> | |
<echo>Storing reports to ${host} at ${server.data}</echo> | |
<xdb:store uri="${server.data}/reports" createcollection="true" | |
user="${server.user}" password="${server.pass}" | |
createsubcollections="true" type="xml"> | |
<fileset dir="./data/reports"> | |
<include name="**/*.xml"/> | |
</fileset> | |
</xdb:store> | |
</target> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local.dir=/Applications/eXist-db | |
server.host=localhost | |
server.port=8080 | |
server.path=exist/xmlrpc/db/apps/wilde-data | |
server.root=xmldb:exist://${server.host}:${server.port}/${server.path} | |
server.data=${server.root}/data | |
server.user=admin | |
server.pass= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment