Message-ID: <1518606073.91351.1397836893195.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_91350_948913798.1397836893195" ------=_Part_91350_948913798.1397836893195 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
With the current Mojo descriptor extractor, it is possible to in= herit Mojo annotations from parent classes, but not across projects. With t= his, it is e.g. not possible to subclass a "built-in" Maven mojo = and inherit the annotations, or to refactor common Mojo code into a separat= e "Base Mojo" project, because the subclass lives in a different = project. Since the annotation inheritance also only looks at parent classes= , it is not possible to have annotated Mojo interfaces, e.g. for a Compiler= which has different implementations.=20
To allow this, it should be possible to specify a list of prototypes for= a Mojo. The descriptor extractor would then load the descriptors of these = prototypes (from the plugin.xml) and merge them into a base descriptor for = the Mojo, allowing it to inherit the annotations.=20
Example with MNG-2521 annotations:=20 =20
For convenience, the groupId and artifactId default to the current proje= ct's values, and the goal to the current annotation's goal.=20
For this to work, the descriptor extractors should also create descripto= rs for annotated interfaces and abstract classes. These should be written i= nto the plugin.xml and filtered out by the PluginDiscoverer, so they cannot= be accessed normally.