ClassLoaderResourceAccessor cannot read jar path resources from SpringLiquibase

Description

While using SpringLiquibase bean to auto-apply changesets from jar dependecy, ClassLoaderResourceAccessor is failed to read resources like: jar:file:/path/to/jar!/my/resource/path

Environment

Spring project.

Activity

Show:

János Háber February 7, 2018 at 10:28 AM

A little addition, a beginning in the list method:

if (!fileUrls.hasMoreElements() && (path.startsWith("jar:") || path.startsWith("file:"))) { fileUrls = new Vector<URL>(Arrays.asList(new URL(path))).elements(); }

it will skip the zip zip: and wsjar but later (in the while cycle) you will use it...

So I think the correct code block:

if (!fileUrls.hasMoreElements() && (path.startsWith("jar:") || path.startsWith("file:")) || path.startsWith("zip:") || path.startsWith("wsjar:")) { fileUrls = new Vector<>(Arrays.asList(new URL(path))).elements(); }

Nathan Voxland January 18, 2018 at 6:11 AM

Merged pull request

Sviatoslav November 16, 2017 at 9:02 AM

Fixed

Details

Reporter

Fix versions

Affects versions

Priority

Created November 16, 2017 at 8:55 AM
Updated February 7, 2018 at 10:28 AM
Resolved January 18, 2018 at 6:11 AM