I’ve just spend a lot of time trying to figure out why am i getting HibernateException hibernate.cfg.xml not found all the time when running ant task.
Apparently when I run this task, it looks for hibernate.cfg.xml only in classpath configured in taskdef. See details below:
<diffDatabaseToChangeLog classpathref=“classpath2”
driver="${database.driver}" url="${database.url}" username="${database.username}" password="${database.password}"
referenceurl=“hibernate:hibernate.cfg.xml”
outputFile="${liquibase.dir}/changelog_${stamp}.xml"/>
This works only if hibernate.cfg.xml is accessible by classpath1.
At the same time I needed to provide classpathref in tag as well. But here it only needs liquibase library.
I guess classpath1 should be used only to find liquibase, while classpathref in tag should be used to find hibernate.cfg.xml.
Could you please clarify that to me?
Maybe I am doing something totally wrong…