cstamas opened a new pull request #46:
URL: https://github.com/apache/maven-plugin-tools/pull/46
The issue describes following situation: developer uses
modern Java level and uses Mojo annotations to create a
maven plugin. Everything works (compile), but maven-plugin-plugin
fails to extract the mojo descriptors.
Reason is simple: javadoc extractor (powered by QDox) chokes on
same modern Java language features (like record is in issue).
So, proposal:
Extend extractors iface with following fields:
* getName() -- just to simplify their handling in code (no need to hold on
map).
* isDeprecated() -- IMO, we should deprecate Javadoc mojo descriptor
extraction, and
if used, Maven should WARN to migrate to Annotations.
* getGroupKey() -- this defines "extractor" groups and ordering within it
Currently we have two extractors in same group "java": the annotation
extractor
and javadoc/qdox extractor. Their run order is _undefined currently_.
This proposal implements following changes:
* extractors are SORTED by groupKey before being used (so defined exectution
ordering)
* extractors of same group are ordered (annotations then javadoc)
* javadoc extractor is DEPRECATED (isDeprecated returns true)
* MojoScanner is modified, that IF a deprecated extractor is on turn, but
there ARE
discovered components in same group, it is skipped.
This may look as tailored to java case, but is actually future proof. This
will fix out of the box the MPLUGIN-373 for example, where legacy bits
within maven-plugin-plugin prevents user to use modern Java and modern tools.
On the other hand, this may need more, things like:
* allow run of deprecated extractors?
--
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]