Message-ID: <2074292582.1411.1429362872106.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1410_1744482718.1429362872106" ------=_Part_1410_1744482718.1429362872106 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Many Mojos (e.g. the compiler) execute in different phases of th= e build lifecycle using different "configurations". With the curr= ent JavaDoc and MNG-2521 annotations, a Mojo cannot be annotated with more = than one goal. Multiple "configurations" are done by subclassing = a Mojo for each "configuration", e.g. CompilerMojo and TestCompil= erMojo, which are virtually identical except parameter annotations and attr= ibute names. With MNG-2521, the proposal is to extend the annotations to al= low a Mojo to be annotated with multiple goals.=20
For this, list annotations should be introduced for each annotation (Goa= l, Parameter and Component). Each member of the list should have an optiona= l attribute specifying for which goal the annotation is. If this attribute = is missing, the annotation should be valid for all goals.=20
Example for a CompilerMojo=20 =20
Saves two classes and some typing.=20
When a parameter needs to have different names for different goals (e.g.= "includes" and "testIncludes"), you can use setters:= p>=20=20
On the long run, it would be nice to decouple a parameter name from the = underlying attribute or method name, and allow the parameter name to be spe= cified in the annotation.