-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Qute: allow user project (or build-items) to override other templates with same id #43906
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
Comments
Hm, so what should be the rules like? A template from the root application archive overrides templates provided by dependencies/extensions?
In the sense of a We could assign a priority to all discovered templates (e.g. root=5, dependency/extension=3, |
add a new property: |
I don't think it's a good idea. From my exprience, non-default options are rarely used. OTOH it's a good idea to add a switch that can be used to revert the original behavior, i.e. |
@mkouba any update on this? |
I'm struggling to define the priority assignment rules. For example, I can imagine a use case where a template from |
That makes sense, is there an issue to achieve this? AFAIK resources on the same path are sorted depending on the build tool resolution, so it should be determinist and the src/main/resources should be the first. |
I'm not so sure this would work well in multi-module apps. Also my original question was about a use case where a template from a build item overrides some other template. Which in some use cases might not be what a user needs 🤷 . |
I would put priority, for example:
|
For multi-module apps I think it's the same as any classpath dependency |
After reading all this i got an idea which is kinda relevant but does not solve the original feature request but maybe can be implemented alongside. Instead of overwriting them maybe we can have all the templates under different "namespace". So if template hello.html exists in mutiple projects, you can still use it with the fully qualified name (project group id + artifact id + directory + etc) + the template name. You can already include templates that are under a different directory. |
In other words, application root has the highest priority and take precedence over templates from extensions and other dependencies, unless they're defined by a Also add @ia3andy correct? |
That sounds good to me.. |
Description
Currently having templates with same id result in an exception.
It would be nice to allow overriding templates provided by extensions or libraries in the Quarkus application.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: