AbstractResourceAccessor#convertToPath(String, String) fails for processing includeAll from Classpath

Description

Given:

  • A main changelog: db/db-changelog.xml

  • with some include like: <include file="db-changelog-14.12.xml" relativeToChangelogFile="true" />

  • with some includeAll like: <includeAll path="14.1/portal-XY/" relativeToChangelogFile="true" />

  • And all changelogs are inside jar files of the classpath

Works:

  • include a single changlog via <include ... />

Doesn't work:

  • include folder/packages with sets of changlogs via <includeAll ... />

I think the bug/cause happens in AbstractResourceAccessor#convertToPath(String,String) called by ClassLoaderResourceAccessor#list(..).
Inside convertToPath(..) the a check happens via 'baseUrl.toExternalForm().startsWith("file:")' ... this works well inside the file system but if the changlog is inside a JAR-File, then the protocoll of the URL differs, it isprefixed with 'jar:'. A baseUrl in a external form into a jar looks like: 'jar:file:/path/to/artefact.jar!/db/changelog.xml'

Environment

OpenJDK 1.7, Tomcat 7, Spring 3.2

Reporter

Tino Rink

Components

Fix versions

Affects versions

Priority

Critical
Configure