shadow icon indicating copy to clipboard operation
shadow copied to clipboard

Support joining manifest entries (Needed for Liquibase)

Open davidmc24 opened this issue 10 years ago • 0 comments

Liquibase's ServiceLocator scans all manifests in the classpath for a Liquibase-Package entry, splits it on ",", and uses this as a list of packages for classpath scanning.

In my case with Liquibase 3.1.1 (affected by CORE-1879, when the Liquibase-Package entry isn't present (default with shadow plugin without doing anything special), it results in attempts to migrate failing:

Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR Exception in thread "main" liquibase.exception.UnexpectedLiquibaseException: Cannot find ChangeLogHistoryService for mysql
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:724)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at liquibase.Liquibase.update(Liquibase.java:196)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at io.dropwizard.migrations.DbMigrateCommand.run(DbMigrateCommand.java:57)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at io.dropwizard.cli.Cli.run(Cli.java:70)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at io.dropwizard.Application.run(Application.java:72)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at java.lang.reflect.Method.invoke(Method.java:483)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at census.standin.App.main(App.groovy:27)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
Fri Feb 20 2015 14:45:56 GMT-0500 (EST) [App/0] ERR at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)

Upgrading Liquibase to 3.2.0 or manually including the Liquibase-Package entry in the manifest work as workarounds. If we identify other cases where this pattern is used, it might be worth including a transformer.

davidmc24 avatar Feb 20 '15 20:02 davidmc24