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                                     ${}/classes/schema/changelog.xml                     ${harvey.database.driver}                     ${harvey.database.url}                     ${harvey.database.username}                     ${harvey.database.password}                     production                     ${project.classpath}                            

Any help?

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


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, 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:

That’s my best guess, for now.

That could be.  I created to track the issue


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

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

The svn repository is at