jira-importer commented on issue #513: URL: https://github.com/apache/maven-javadoc-plugin/issues/513#issuecomment-2957332607
**[Benjamin Bentmann](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=bentmann)** commented As the existing patch most likely does not solve MJAVADOC-143, I would like to propose another approach. To my knowledge, the target platform for the plugin is Java 1.4, allowing the usage of regular expressions. Therefore, this patch tries to find the (first occurrence of the) pattern "#.#(.#)", leaving most of the parsing to the regex engine. Besides, the patch falls back to the output from stdout, if stderr is empty. I did not find any spec that guarantees that the version output will be on stderr, so I felt this would help robustness. Furthermore, a unit test is added to check the proper parsing of the various version outputs mentioned in this issue so far. As far as I got from the commit logs, the source of this whole problem (i.e. the additions made to support MJAVADOC-98) just exists to support another but exceptional use case. Having robustness in mind, the exceptional cases should have as less impact on the default case as possible. Therefore, the patch completely avoids calling getJavadocVersion() if the javadoc executable is not specified in the POM, i.e when the default javadoc for the currently running JVM is used as in previous versions of the plugin always the case. NOTE: The patch includes one TODO that somebody should deal with. It's rather a philosophical concern that the project leader should decide. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
