quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.87k stars 2.71k forks source link

Static assets overwrite #41449

Open gbourant opened 5 months ago

gbourant commented 5 months ago

Description

I have the following project structure and the project-b has a (maven) dependency to project-a.

If i run quarkus:dev on project-b, it displays the index.html and logo.svg of project-a.

It would be great if project-a's static asses get overwritten if they exist in project-b's META-INF/resources directory.

project-a/ ├─ src/ │ ├─ main/ │ │ ├─ resources/ │ │ │ ├─ META-INF/ │ │ │ │ ├─ resources/ │ │ │ │ │ ├─ index.html │ │ │ │ │ ├─ logo.svg

project-b/ ├─ src/ │ ├─ main/ │ │ ├─ resources/ │ │ │ ├─ META-INF/ │ │ │ │ ├─ resources/ │ │ │ │ │ ├─ index.html │ │ │ │ │ ├─ logo.svg

Implementation ideas

No response

cescoffier commented 2 months ago

The resources are loading from the classloader. So, the order depends on the classloader order. I'm wondering if we can influence it in this case.

@ia3andy Did you already encounter this?

cescoffier commented 5 days ago

This might be related to @dmlloyd work on classlaoders.

dmlloyd commented 20 hours ago

Any proposal for run time class loading (#43749) should include child-first resource loading as a feature.