-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
since refacoring of ClassLoaderResourceAccessor in 4..0.0-beta2, searchPath "classpath*:" is not handled anymore correctly #1595
Comments
After having tested different version, it looks the issue was introduced by the refactoring of ClassLoaderResourceAccessor already in 4.0.0-beta2: liquibase/liquibase-core/src/main/java/liquibase/resource/ClassLoaderResourceAccessor.java Line 219 in bfabfdf
|
Hi @chadoc Thank you for bringing this to our attention. Since you have identified the code that was changed, if you have a suggested fix, you can create a PR and reference this issue. |
Same as @oleksanderkorn. Liqubase 4.0.0 works fine, but 4.2.2 creates an ampty stream. |
Similar setup to @oleksanderkorn ( |
That should have continued to work, I'll try to replicate it and debug it to see what is going on. |
PR #1665 should fix this. |
➤ Wesley Willard commented: Looks good |
➤ Nargiz Huss commented: Liquibase Version: 4.2.2 I was able to replicate the issue using xml file. Fix works in 4.3.0-LB-714-SNAPSHOT |
Still not working on 4.3.1. SpringResourceAccessor:168 replaces the classpath*: then spring is not searching on all jars.
|
Environment
Liquibase Version: 4.2.2
Liquibase Integration & Version: spring-boot 2.3.7.RELEASE
Liquibase Extension(s) & Version: -
Database Vendor & Version: Postgres (but doesn't matter)
Operating System Type & Version: Linux mint (but doesn't matter)
Description
includeAll in a spring-boot project with a searchPath containing a "classpath*:" doesn't find anything.
Steps To Reproduce
Define an "includeAll" task in a spring boot project with a searchPath set to "classpath*:db/changelog" and changelog files available on the searchPath failed because not found
`
path: classpath*:db/changelog
`
Actual Behavior
Doesn't find changelogs
Expected/Desired Behavior
Should find changelog to include
Screenshots (if appropriate)
Additional Context
Problem comes from SpringResourceAccessor.finalizeSearchPath method which expect to always have "classpath:classpath:" and in that case, path is "classpath:classpath*:" so not replaced.
liquibase/liquibase-core/src/main/java/liquibase/integration/spring/SpringResourceAccessor.java
Line 157 in aae1f01
The text was updated successfully, but these errors were encountered: