includeAll can't resolve relativeToChangelogFile path within a jar file

Description

I have a jar file that contains my changelogs.
This jar is a dependency of a project that executes all the changelogs contained.
This si my jar layout


I also included my main changeLog File.
Liquibase can't resolve relative path inside the jar, I find out that the problem (and the solution) is here:

AbstractResourceAccessor.convertToPath(final String relativeTo, final String path) { ... return convertToPath(new File(relativeTo).getParent() + '/' + path); ... }

You can't do new File(relativeTo).getParent() inside a jar
My solution is to change the code to this:

return FilenameUtils.concat(FilenameUtils.getFullPath(relativeTo), path)

EDIT:
I'm totally wrong, my case is a corner case, new File(relativeTo).getParent() return null because relativeTo is "db.changelog-master.json" without a parent folder....

Environment

java 8
gradle 5.2

Attachments

2
  • 19 Feb 2019, 04:26 PM
  • 19 Feb 2019, 04:25 PM

Activity

Show:

Nathan Voxland July 16, 2019 at 7:18 PM

Moving to 3.7.0 release

Nathan Voxland March 20, 2019 at 8:30 PM

Fixed

Details

Reporter

Fix versions

Affects versions

Priority

Created February 19, 2019 at 4:47 PM
Updated July 16, 2019 at 7:18 PM
Resolved July 16, 2019 at 7:18 PM

Flag notifications