-
Notifications
You must be signed in to change notification settings - Fork 2.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
Devmode, Liquibase: Changelog file is found twice if located in another Maven module #10411
Comments
/cc @quarkusio/devtools |
cc @tkalmar @harthorst (team members) |
This seems like the gift that keeps on giving... |
I'll take a look tomorrow if no one else does before then |
For this case there is a German saying that would go something like: After the bug is before the bug. 😄 Might be a stupid idea, but I am wondering whether devmode should (in general) try to filter out resources from jars in case they are "mappable" to |
Not sure TBH, I need to look into this and see what is causing it. |
This is the clash from our internal project (obfuscated):
|
Thanks |
And this is where both are found: https://github.com/liquibase/liquibase/blob/v3.8.9/liquibase-core/src/main/java/liquibase/util/StreamUtil.java#L186 |
I forgot to mention that we are using a custom In this context we already use a So in case your solution is based on a special "filtering" CL via |
What I describe next is basically for @aloubyansky. This problem occurs because the Quarkus Runtime Classloader loads the resource from the path (as the So the question is: Should sibling (yet dependency) module's the jar not be added to dev jar's classpath in this case (as it's a module that is discovered by bootstrap), or should bootstrap not pick up this module at all? I am assuming the first option is correct... |
Could this duplication also explain the CCE I am seeing here? |
Not sure about that one, haven't checked. But my guess would be that it's unrelated |
@geoand are you saying the local module appears on the cp as a jar and as a classes dir? |
Yes exactly. As a jar it's on the classpath of the dev jar (coming from m2) - this is what I assume should be removed. |
Yes. Is there a reproducer? |
Yup, it's mentioned in the description of the issue: https://github.com/famod/quarkus-liquibase-dup |
Ok, thanks. Just to clarify, were you going to fix it @geoand ? Or do you want me to take care of that? |
I'll look at it in morning and let you know if I need help. |
I'd like to get #9919 in first though to avoid rebasing it again. |
Sure thing |
Ensure that duplicates don't end up in dev mode CP in multi-module projects
Describe the bug
Application startup fails in Devmode if I try to auto-migrate with a changelog file that comes from another Maven module because Liquibase finds it two times on the classpath (once in the jar and once from the module
target
).Expected behavior
No failure. In Devmode, the one from
target
should be used, IMHO.Actual behavior
To Reproduce
Steps to reproduce the behavior:
(this is just the official quickstart split into two modules and without h2 tcp, which caused problems on my machine)
mvn clean install
(includes a test)java -jar app/target/liquibase-dup-app-1.0-SNAPSHOT-runner.jar
mvn quarkus:dev -f app
(or without-f
from withinapp
)Configuration
Screenshots
n/a
Environment (please complete the following information):
uname -a
orver
:java -version
:1.4.2.Final
,1.5.2.Final
,1.6.0.CR1
mvnw --version
orgradlew --version
):Apache Maven 3.6.3
Additional context
There have been two fixes before, but both adressed Gradle:
The text was updated successfully, but these errors were encountered: