Cannot load classpath resource in a CustomTaskChange

I had asked about this same problem back in December, but I don’t think I ever found a solution.  Now, I’m facing the same problem again, but I don’t think I can so easily step around it as last time.

I have a CustomTaskChange that loads a Spring context configuration.  This context contains the various beans I need to perform the migration tasks at hand, without re-writing a lot of code in more traditional JDBC style.  I can make this configuration work in a test mode, but when I run “mvn liquibase:update” it fails to find my Spring context file on the classpath.  I can see that the context file is in target/classes, though.  Currently, my plugin is configured as follows:

                            org.liquibase                 liquibase-plugin                                     ${project.build.directory}/classes/schema/changelog.xml                     ${harvey.database.driver}                     ${harvey.database.url}                     ${harvey.database.username}                     ${harvey.database.password}                     production                     ${project.classpath}                            

Any help?
Thanks!
Dave

I’m still not that strong on how the maven classloaders work.  Is there anyone who has worked with this issue that can help?

Nathan

For the time being, I’ve worked around this problem by calling the Liquibase command line processor directly using the exec-maven-plugin.  That way, I can provide my own classpath.

I noticed in the documentation for the liquibase-plugin that, since 1.6.1.0, all files are resolved from the “test” classpath.  So, perhaps this problem created is by design, but I don’t really understand why we would specifically exclude the main path.  Here is a link to the page:

http://www.liquibase.org/manual/maven

That’s my best guess, for now.
Dave

That could be.  I created http://liquibase.jira.com/browse/CORE-566 to track the issue

Nathan

Nathan,
If I can find the time, I might be interested in helping out.  Who should I contact about that?
Thanks,
Dave

Any help would be great.  You can email me at nathan at voxland.net or post to the developer forum. 

The svn repository is at http://liquibase.jira.com

Nathan