-
Notifications
You must be signed in to change notification settings - Fork 82
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
maven.compiler.release
set in parent is not recognized in child module
#523
Comments
…upgrade. Before these changes if no property or maven compiler plugin configured java version no change would be made. Fixes #514
Additional info: I observe, that |
Thanks for the reproducer @pzygielo ! Next steps would be to turn this into a runnable unit test and see that it's resolved. For the aggregator poms I'm not sure how you'd handle those separately, as we would like to set the property in parent poms, not each submodule. How would you recognize those cases? /cc @sambsnyd for visibility |
That's what I'd like to see as well. My reference to modified aggregator in comment above was probably unnecessary, as in my case this aggregator is also a parent (which does not need to be the case in general - but I can't tell about plain aggregator yet). |
I must say this is quite annoying because it adds it everywhere when your microservices & libraries inherit the I haven’t checked, but wouldn’t it also override a higher java version specified in a parent? Would you think it is some kind of regression or has it always been like this? |
I have not seen this in 2.20.0. |
…arent, but smartly - only override numeric values - if any property is detected, don't add maven.compiler.release
…arent, but smartly - only override numeric values - if any property is detected, don't add maven.compiler.release
…arent, but smartly - only override numeric values - if any property is detected, don't add maven.compiler.release
maven.compiler.release
which is defined in parent is not recognized in child module and patch for explicit overriding property is generated byUpgradeToJava17
recipe.What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am using the Maven plugin, and my project is a multi-module project.
What is the smallest, simplest way to reproduce the problem?
https://github.com/pzrep/openrewrite-migrate-compiler-release-in-child/
What did you expect to see?
No patch generated by recipe as property inherited from parent is good enough.
What did you see instead?
Patch generated by recipe (step: Show applied changes): https://github.com/pzrep/openrewrite-migrate-compiler-release-in-child/actions/runs/10196871940/job/28208511361?pr=2
8d15935#commitcomment-144892557
The text was updated successfully, but these errors were encountered: