Closed pabl0rg closed 7 years ago
Looks like the kotlin std lib manifest, likely related to #432.
I only have a passing familiarity with Flyway, can you elaborate why this fails and how it relates to the manifest in the jar file?
The duplicate MANIFEST.MF is definitely a bug, looking into that, but I'm not sure about that first point.
Well, Flyway is just the concrete example but something about the classpath is different (possibly broken?) in 1.0.62+.
Flyway searches the classpath for *sql files. It may be that there is no bug in Kobalt. In that case, whatever changed between 1.0.60 and 1.0.62 would reveal a bug in Flyway.
I will take a look at changes between those releases and try to be more helpful.
I see your migration files at what appears the right place:
db/migration/V1_11__Create_tbl_bob.sql
db/migration/V1_12__Create_tbl_other.sql
Is this where Flyway expects them?
Yeah that's the weird thing. It must be something else about the classpath.
It's troubling that it used to work with an older version but I don't see anything immediately wrong with Kobalt right now. And the manifest you show at the top looks like it was generated by TeamCity? Not sure how it could have ended up in a Kobalt produced jar file (also not sure this has anything to do with the problem).
I will dig further. However, the teamcity manifest may come from kobalt's dependencies, as suggested by @ethauvin
How would that work?
By the way, I don't think #432 is a valid issue.
-- Cédric
On Thu, Apr 27, 2017 at 11:41 AM, Juan Liska notifications@github.com wrote:
I will dig further. However, the teamcity manifest may come from kobalt's dependencies, as suggested by @ethauvin https://github.com/ethauvin
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cbeust/kobalt/issues/435#issuecomment-297803104, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFoohlNrAtXM9gjmKWkxNx1P7opf4aeks5r0OFSgaJpZM4NKCWT .
You're right. It's not about the manifest.
This may be a Flyway bug. When I unzip the Kobalt 1.0.62 fatJar and add that directory to the classpath, flyway works OK. I will ping them about this (my company previously sponsored a fix for a classpath scanning problem).
Cool. Please reopen if needed.
The way Kobalt handles manifests in fat jars changed between 1.0.60 and 1.0.62 and now flyway migrations don't work, even though resources (sql scripts) are being zipped in the same place.
Also, Kobalt includes more than one MANIFEST.MF in the assembled fat jar with kobalt > 1.0.60
The only difference between the two jars is that with 1.0.60, the MANIFEST.MF is empty and 1.0.62 has a MANIFEST.MF but whatever is in there makes Flyway stop finding migrations in the classpath
You can reproduce the problem with this demo project.
Flyway works correctly with fat jar bundled by Kobalt 1.0.60
Flyway does not find migrations in fat jar bundled by Kobalt 1.0.62