slachiewicz opened a new issue, #1277:
URL: https://github.com/apache/maven-plugin-tools/issues/1277

   Follow-up to #1080, from [this 
comment](https://github.com/apache/maven-plugin-tools/issues/1080#issuecomment-6875683876).
   
   Mojo descriptors are built with two third-party libraries: ASM reads the 
annotations from bytecode (`DefaultMojoAnnotationsScanner` and its visitors), 
and javaparser-core with the symbol solver reads Javadoc from sources 
(`JavaSourceModel`, the `converter` package).
   
   Proposal: a custom doclet on the JDK's `jdk.javadoc.doclet` API, run in 
process through `ToolProvider.getSystemDocumentationTool()`, as the 
configuration collector in apache/maven-resolver@46da42c does. The doclet would:
   
   - read `@Mojo`, `@Parameter`, `@Component` and `@Execute` as 
`javax.lang.model` elements, so ASM can go;
   - convert the description and the standard tags (`@since`, `@deprecated`, 
`@see`, inline `{@link}`, `{@code}`, `{@value}`) from `DocTree` nodes into the 
descriptor's `description`, `since` and `deprecated` fields;
   - pick up Markdown doc comments (`///`) when it runs on JDK 23 or later.
   
   Open questions:
   
   - Mojos that extend classes from dependencies: the doclet has no source for 
them, so ASM or a `-sources.jar` lookup may have to stay for that path.
   - The doclet API needs JDK 9 or later; the 3.x line targets Java 8.
   - The annotation processor approach suggested in #1080 is the alternative. 
The doclet runs from the plugin goal and does not change how users compile.
   
   Done when the plugin descriptors and `plugin-help.xml` produced by the 
existing ITs are unchanged, and `maven-plugin-tools-annotations` no longer 
depends on javaparser or ASM.
   


-- 
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]

Reply via email to