From: Jakob <ja...@jf...> - 2004-04-21 09:09:17
|
Hi, I'd like to store documents in Exist using an Ant build file. Following the example shown here http://exist-db.org/ant-tasks.html#N1014A I wrote a test build file (see below). Now the problems: *** 1) I had to copy the exist.jar, exist-optional.jar, and xmldb.jar into my ant/lib directory to no receive errors about classes not found. Why doesn't it find these files in the directories specified? Yes, they do exist there. *** 2) Once I had worked around the first issue, I get the following error message: E:\>ant -buildfile buildtest.xml Buildfile: buildtest.xml store: BUILD FAILED E:\buildtest.xml:23: The <http://exist-db.org/ant:store> type doesn't support the nested "fileset" element. Total time: 1 second Why? I downloaded the version 1.0b1, so I hoped to be in sync with the doc. If "fileset" doesn't work, how else can I specify the documents to add? *** 3) It appears from the example as if a database must be running on a server. Does it alos work like the command line client which starts the local database itself? *** 4) I am using the "xdb" namespace, as I read that "xmldb" has been changed to "xdb" because of the XML spec which doesn't allow a namespace to contain "x", "m", "l" at the beginning of the namespace string. Is this correct? Does it matter? Thanks, Jakob. ----------8<----------8<---------- <project basedir="." default="store" name="exist-ant-test"> <path id="classpath.core"> <fileset dir="bin/ant/lib"> <include name="*.jar"/> </fileset> <fileset dir="bin/eXist-1.0b1/lib/core"> <include name="*.jar"/> </fileset> <fileset dir="bin/eXist-1.0b1/lib/optional"> <include name="*.jar"/> </fileset> <pathelement path="exist.jar"/> <pathelement path="exist-optional.jar"/> </path> <typedef resource="org/exist/ant/antlib.xml" uri="http://exist-db.org/ant"> <classpath refid="classpath.core"/> </typedef> <target name="store" xmlns:xdb="http://exist-db.org/ant"> <xdb:store uri="xdb:exist:///db" initdb="true" createcollection="true"> <fileset dir="data/test/doc" includes="*.xml"/> </xdb:store> </target> </project> ----------8<----------8<---------- |