Support Reading `<configuration>` Tag from settings.xml in `MavenMojoProjectParser.buildSettings()` so that config like connection timeout can be passed to rewrite-maven module
Description:
Currently, the rewrite-maven module does not support server configuration details from the
Link to the Code:
https://github.com/openrewrite/rewrite-maven-plugin/blob/7e86a021a44645340f92592b9fc244e6e47ea3f9/src/main/java/org/openrewrite/maven/MavenMojoProjectParser.java#L663
Proposed Enhancement:
Enhance the MavenMojoProjectParser.buildSettings() method to read and incorporate the <configuration> tag from the settings.xml file while creating the MavenSettings object. This will ensure that all server configurations, including timeouts specified in the
hi! We ought to be parsing the configured timeout after this PR
- https://github.com/openrewrite/rewrite/pull/4302
Note that we do not support all configuration options there, but a singular <timeout> should work. Is that not working for you?
Proactively closing this issue; let me know if I misunderstood & we'll reopen! A clear example of what input ought to be parsed if not already ought to help then.
Hi @timtebeek , It's not working for me and the reason is the "rewrite-maven-plugin" is not reading the <timeout> from <configuration> tag inside <server> tag in settings.xml. Ideally, the MavenMojoParser should read the timeout field, then create ServerConfiguration object and pass it in below mentioned line, so that the Server object in MavenSettings will the timeout value.
https://github.com/openrewrite/rewrite-maven-plugin/blob/7e86a021a44645340f92592b9fc244e6e47ea3f9/src/main/java/org/openrewrite/maven/MavenMojoProjectParser.java#L704
Then, the pull request will work fine, as it will receive, the MavenSettings object with timeout value inside Configuration object.
Thanks for the feedback. Perhaps an example file or even a PR that fixes this could help then, as I'm still a bit confused.