-
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
Properly espace properties in archetype generation #10845
Conversation
I assume this is correct, but I am really lacking context here :) |
For an absolute minimal quickfix that is totally focussing only on But given how the Btw, the generation produces: <properties>
<!-- ... -->
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<!-- ... -->
</properties>
<!-- ... -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin> so we are leaving the users under the impression that they can change the property for the compiler plugin to get another version but this won't work. |
cbbdbbf
to
dbc5049
Compare
@famod you're right, my patch was incomplete. I fixed it. Note that it doesn't fix the bom issue. I just want the escaping to work OK. As mentioned I'm not sure I understand everything you did in #10829 but I think just escaping the properties is the way to go. Agreed the Azure one is working differently but that will be for another day. |
@gsmet The current escaping mechanism is just too much voodoo in my opinion (YAGNI). I mean it is your decision but can I help you to understand what I did in #10829? PS: The story changes if we really want to filter things at build time (when the archetype is built). But that is not the case today. |
Yeah, I think I prefer the escaping thing. It's not that voodoo to me, you escape the properties you do not want filtering to replace. I'm working on porting your other patch to this approach, will push it to this PR soon. |
Ok. I'd just like to point out that in terms of Maven less is more. If you can stick to the convention: do it! |
I agree. I like consistency but I'm really worried the approach chosen for the Azure archetype will bite us at some point. I included your second commit in the PR adjusted to the new approach with some changes:
Could you have a look? I tested the creation of each archetype and it was OK but a second pair of eyes could help. |
That being said, with #10849 coming, we will not need the second commit in 1.6.1. It's probably better to keep it for 1.7 altogether. |
Just to understand correctly: So this PR is replacing both #10829 and #10836?
You mean only 1.8 -> 11 in pom.xml? But what is actually needed to support 11 for Azure?
Unfortunately I don't have time righty now to re-test the archetypes but I'll look at the code for sure.
Makes perfect sense! |
LGTM! |
Yes, it replaces both.
Yes.
Apparently Azure Functions do not support 11 yet. So we need to stick to 8 for them and we will upgrade later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding an approval so you can backport whenever you need to.
Y'all added more information than I want to know and absolutely trust you to find the best solution
I partially backported it: only the first commit has been backported to 1.6.1.Final. |
Supposed to supersede #10829 .
@famod I'm not sure I understand completely what you did in your PR but this looks like a far less intrusive patch and IMHO is correct. Could you have a look?
Thanks!