Class path problem with custom change in Maven plugin.

Hi all,

I’m having a problem with a custom change that I’ve written.  It includes code that loads a Spring context configuration file that it attempts to load from the class path.  However, Spring says it cannot find the file.  I’m curious if the class path used by the Liquibase plugin is the same as that used by Maven when it runs the plugin.  (This same style of context loading works great for other Maven plugins.)  I do have another custom change that seems to execute without problem, but it only uses JAR files on the class path.

Any thoughts?
Thanks,
Dave

What version of liquibase are you using?  The latest available in the maven repository (1.9) or another version?

Nathan

We are using 1.9.3 of the liquibase-core and 1.9.3 of the liquibase-plugin.  I tried 1.9.4, but I got a NullPointerException trying to run the update goal.

I’m still looking for a solution to this problem.  Basically, I’ve got a CustomerChangeTask that get executed as part of the liquibase:update run.  Within that code, I attempt to load a Spring configuration file so that I can take advantage of some existing service components during my update.  It’s during the attempt to load that configuration file that things go south.  Apparently, the “target/classes” directory is simply not on the class path at the time the update is running.

For my purposes, it would be OK to just somehow force the issue.  Under normal execution circumstances, I think the files will be found on the class path.  It seems to be only when executing the plugin directly from the Maven command line that I run into issues.

Thanks,
Dave

Glad you have a work-around.  I created an issue for it (http://liquibase.jira.com/browse/CORE-534) so it gets addressed.

Thanks for reporting the problem

Nathan