rewrite-maven-plugin
rewrite-maven-plugin copied to clipboard
Order of parsed Maven modules is sometimes not correct
What version of OpenRewrite are you using?
I am using
- OpenRewrite v8.5.1
- Maven plugin v5.2.6
What is the smallest, simplest way to reproduce the problem?
should fail because module-a/pom.xml should be parsed last as it depends on module-b/pom.xml
It parses this project
and the Maven build order is:
Whereas the order of parsing is multi-module-1, module-a, module-b
Are you interested in [contributing a fix to OpenRewrite]
I will provide a PR.
I fixed the link to the test, @timtebeek.
This one is starting to make more sense after seeing the work done in
- https://github.com/openrewrite/rewrite-maven-plugin/pull/720
I don't think the work there will have fixed this issue too, but it does help me understand and validate the work you've done in
- https://github.com/openrewrite/rewrite-maven-plugin/pull/601
@philippe-granet did you ever come across the problem outlined in this issue and the attached pull request #601 ? Seems like something that could have affected you too, especially when running in parallel, so wondering if you have any insight there.
What could be the impacts if the poms are loaded out of order?
I'm not sure what exact problem Fabian had; do you recall @fabapp2?
@timtebeek Sorry, I lost sight of this issue. IIRC the "problem" surfaced in tests when the expected order of poms did not match their build order calculated by Maven. I can't recall if this was actually a problem but I'd assume the order of build files to be critical to work correctly?