# Classpath for CustomSqlChange (derived) objects when using ANT task (1.9.3)

**URL:** <https://forum.liquibase.org/t/classpath-for-customsqlchange-derived-objects-when-using-ant-task-1-9-3/355>\
**Category:** General Discussion\
**Created:** [November 19, 2009, 4:31pm UTC](https://forum.liquibase.org/t/classpath-for-customsqlchange-derived-objects-when-using-ant-task-1-9-3/355 "2009-11-19T16:31:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kascice](https://avatars.discourse-cdn.com/v4/letter/k/9dc877/32.png) [@kascice](https://forum.liquibase.org/u/kascice)\
**Post date:** [November 19, 2009, 4:31pm UTC](https://forum.liquibase.org/t/classpath-for-customsqlchange-derived-objects-when-using-ant-task-1-9-3/355/1 "2009-11-19T16:31:00Z")

</div>

Has anyone had luck with creating a CustomSqlChange and using it with the updateDatabase in ANT?

I’ve found that I can’t just add the custom java object to the classpathref for the updateDatabase task.&nbsp; If I add the object to ANT’s classpath by way of ${user.home}/ant/lib it will find it but then it won’t find Liquibase since they are presumably in different classloaders now…

then if I add Liquibase to ${user.home}/ant/lib it will work… but I don’t know if there are going to be any unintended consequences from fooling around with the classpath like this?

Am I missing somethinga and making this way too complicated?

Thanks in advance for any help.

---

<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:** [November 19, 2009, 4:31pm UTC](https://forum.liquibase.org/t/classpath-for-customsqlchange-derived-objects-when-using-ant-task-1-9-3/355/2 "2009-11-19T16:31:00Z")

</div>

I have an update target like this that is working fine for me with 1.9.4(?):

&nbsp; &nbsp; &nbsp; \<updateDatabase  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; changeLogFile=“path/to/db.changelog.xml”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver="${database.driver}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url="${database.url}${database.schema.dataset}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; username="${database.username}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; password="${database.password}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; promptOnNonLocalDatabase="${promptOnNonLocalDatabase}"  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dropFirst=“false”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; classpathref=“liquibaseclasspath”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \>  
&nbsp; &nbsp; &nbsp; &nbsp;

where liquibaseclasspath is:

&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; &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;

&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; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   
&nbsp; &nbsp; &nbsp; &nbsp;

and liquibase is in the apps/distributed-server/ear/lib dir

Nathan
