I am trying to run an ant script to deploy changes via liquibase.
<project name="Example" xmlns:liquibase="antlib:liquibase.integration.ant">
<taskdef
resource="liquibase/integration/ant/antlib.xml"
uri="antlib:liquibase.integration.ant">
<classpath path="C:\liquibase\lib\liquibase\"/>
</taskdef>
<property name="db.changelog.file" value="C:\projects\lbdemo\trunk\db_v4.xml"/>
<property name="database.url" value="jdbc:oracle:thin:@mydb:1521:ORCL"/>
<property name="database.username" value="myuser"/>
<property name="database.password" value="mypassword"/>
<property name="database.driver" value="oracle.jdbc.OracleDriver"/>
<liquibase:database id="my-database" driver="${database.driver}" url="${database.url}" user="${database.username}" password="${database.password}"/>
<liquibase:updateDatabase databaseref="my-database" changelogfile="${db.changelog.file}"/>
</project>
Installation Paths:
- Liquibase is installed at: C:\liquibase
The JDBC driver is located at: C:\liquibase\ojdbc7.jar
Ant is installed at: C:\apache-ant-1.10.1
- I copied the liquibase.jar into: C:\apache-ant-1.10.1\lib
- My ANT build file : C:\projects\lbdemo\trunk\build.xml
- My change file: C:\projects\lbdemo\trunk\db_v4.xml
Tests
I am able to successfully run a liquibase update with my change file db_v4.xmls using the Windows command line.
I am able to run the ANT build.xml file if I remove all liquibase tags from it.
Error:
I am getting the below error when running the above ANT build:
C:\projects\lbdemo\trunk>ant
C:\projects\lbdemo\trunk\build.xml [liquibase:updateDatabase] Starting Liquibase.
BUILD FAILED C:\projects\lbdemo\trunk\build.xml:15: Class not found: oracle.jdbc.OracleDriver
Total time: 1 second
How can I tell liquibase in ant where the Oracle Driver sits?
I referred to: http://www.liquibase.org/documentation/ant/index.html
classpath
for the Liquibase task (inside thetaskdef
) – a_horse_with_no_name