I found this problem when i am using maven project that is built as a one-jar via corresponding maven plugin.
I am having liquibase as dependency in pom.xml and maven builds it as jar file and this jar resides inside maven one-jar file as a library.
When liquibase classes are used they can’t be found because liquibase classloader is trying to find them in current jar that is maven one-jar, but not in liquibase.jar.
I would like to know is it bug of liquibase or did it develop so? My project is very dependent on this.
Does anyone have thoughts about this?
Curious if this ever got resolved? Just ran into the same problem today. Thanks.
It seems no.
OK - can you provide any more information… Does not work for me… Thanks for any information… (FYI - it works fine when I run it in Eclipse - just not when bundled with one-jar.)
Exception in thread “main” java.lang.reflect.InvocationTargetException
My one-jar expanded to show version information…
jar tf target/********-1.0.0-SNAPSHOT.one-jar.jar
Well, i comletely forgot about this issue and didn’t think that anyone would write here
It works correct in IDE because there is a difference how a classloader works in IDE and in one-jar. I can’t remember how it exactly works actually. You can try to debug and find out
I can advice you only change one-jar to maven-shade plugin if one-jar is not critical.
Liquibase expects a Liquibase-Packages entry in a MANIFEST.MF file in your classpath. Is that getting clobbered by one-jar?
I wouldn’t say that. One-jar has his own MANIFEST.MF. The manifest of Liquibase is inside liquibase-core-.jar.
I don’t know will Liquibase work if you put Liquibase-Packages entry to one-jar manifest.
So, did anyone find a solution to this issue?