这是我的 ant xml 文件的示例:
<!--A reference to the classpath that contains the database driver, liquibase.jar, and the changelog.xml file-->
<path id="liquibase.classpath.id">
<pathelement location="${PROJECT_DIR}/lib/liquibase-2.0.2.jar"/>
<pathelement location="${jdbc.classpath}"/>
<fileset dir="${PROJECT_DIR}/db/changelog" includes="db.changelog*.xml"/>
</path>
<pathconvert refid="liquibase.classpath.id" property="liquibase.classpath.id.text" />
<echo message="${liquibase.classpath.id.text}" />
<updateDatabase loglevel="debug"
changeLogFile="${db.changelog.file}"
driver="${jdbc.driver}"
url="${jdbc.url}"
username="${database.username}"
password="${database.password}"
dropFirst="false"
classpathref="liquibase.classpath.id"
/>
我<echo message="${liquibase.classpath.id.text}" />
按预期得到以下输出:
G:\My Documents\PROJECTS\DataSource\lib\liquibase-2.0.2.jar;
G:\My Documents\PROJECTS\DataSource\lib\hsqldb-2.2.5.jar;;
G:\My Documents\PROJECTS\DataSource\db\changelog\db.changelog-1.0.xml;
G:\My Documents\PROJECTS\DataSource\db\changelog\db.changelog-master.xml
但updateDatabase
抛出以下异常:
java.lang.ClassNotFoundException: org.hsqldb.jdbc.JDBCDriver
我究竟做错了什么?请告诉我。