Open skazaruddin opened 3 months ago
hi! We ought to be parsing the configured timeout after this PR
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.
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.
Description:
Currently, the rewrite-maven module does not support server configuration details from the tag in the settings.xml file because the MavenMojoProjectParser class in the "rewrite-maven-plugin" does not read this configuration while creating the MavenSettings object before setting the MavenExecutionContextView. As a result, during runtime the operations that depend on these configurations do not function as expected, even though the "rewrite-maven" module has unit tests for it. e.g. reading timeouts from the tag.
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 tag, are correctly utilized at runtime.
MavenMojoProjectParser.buildSettings()
method to read and incorporate the<configuration>
tag from thesettings.xml
file while creating the MavenSettings object. This will ensure that all server configurations, including timeouts specified in the