We're updating the issue view to help you get more done. 

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:

1 2 3 4 5 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:

1 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

Status

Assignee

Unassigned

Reporter

Andrea Vencato

Labels

None

Components

Fix versions

Affects versions

3.6.2

Priority

Major