# ant path problem

**URL:** <https://forum.liquibase.org/t/ant-path-problem/1103>\
**Category:** General Discussion\
**Created:** [February 1, 2011, 9:39pm UTC](https://forum.liquibase.org/t/ant-path-problem/1103 "2011-02-01T21:39:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin\_mic](https://avatars.discourse-cdn.com/v4/letter/k/b38774/32.png) [@kevin\_mic](https://forum.liquibase.org/u/kevin_mic)\
**Post date:** [February 1, 2011, 9:39pm UTC](https://forum.liquibase.org/t/ant-path-problem/1103/1 "2011-02-01T21:39:00Z")

</div>

I am running up against a path issue with using liquibase and ant.

If I run ant from the directory where the build.xml is defined then everything runs correctly. &nbsp; But if I run ant from a different location and specify the build.xml file manually then the liquibase scripts can no longer locate the changeLogFile file.

So if I am in the directory /tmp &nbsp;and my “build.xml” file is in the directory “/tmp/liquibase” and I run “ant -f /tmp/liquibase/build.xml” I will get an error “/tmp/liquibase/build.xml:28: liquibase.exception.ChangeLogParseException: ora/update.xml does not exist”. &nbsp; It appears that Liquibase is using the directory I run ant from rather than the directory where the build file is located as its base directory. &nbsp; It should take all of its directory references from where the build file is specified rather than from where the ant script is executed.

I can get around this problem by stating the entire path in the build.xml file but then it makes it so each developer using liquibase must have the exact same path structure or else I have the chance of a changeset being executed twice because of a differing file structure.

For repeatability here is my project structure and my build.xml file

Here is my file structure  
/tmp/liquibase/build.xml  
/tmp/liquibase/ora/update.xml  
/tmp/liquibase/lib/liquibase.jar  
/tmp/liquibase/lib/ojdbc.jar

note my liquibase.jar is the 2.0-rc7 version.

My build.xml file looks like this

 &nbsp; 

&nbsp;

&nbsp;   
&nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  
&nbsp; &nbsp;   
&nbsp;

&nbsp;   
&nbsp; &nbsp;   
&nbsp;

&nbsp;   
&nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; \<updateDatabase  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;changeLogFile=“ora/update.xml”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;driver=“oracle.jdbc.OracleDriver”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;url="${sqlj.url}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;username="${sqlj.user}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;password="${sqlj.password}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;promptOnNonLocalDatabase=“true”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dropFirst=“false”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;contexts=“dev”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;classpathref=“liquibase.classpath”  
&nbsp; &nbsp; &nbsp; /\>  
&nbsp;

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 1, 2011, 9:39pm UTC](https://forum.liquibase.org/t/ant-path-problem/1103/2 "2011-02-01T21:39:00Z")

</div>

It works best if you include the directory containing your changelog folders in the classpath passed to updateDatabase.&nbsp; In your example, if you add “.” to liquibase.classpath liquibase should find ora/update.xml regardless of where you run ant from.

Nathan
