PR: MNG-451

Submitted by: Kenney Westerhof
Reviewed by:  Brett Porter

make configurator configurable!


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@189856 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-06-09 23:22:34 +00:00
parent e84dc8c753
commit 379863a946
2 changed files with 19 additions and 3 deletions

View File

@ -51,6 +51,7 @@ public class JavaMojoDescriptorExtractor
implements MojoDescriptorExtractor
{
public static final String MAVEN_PLUGIN_INSTANTIATION = "instantiationStrategy";
public static final String CONFIGURATOR = "configurator";
public static final String PARAMETER = "parameter";
@ -145,6 +146,18 @@ public class JavaMojoDescriptorExtractor
mojoDescriptor.setExecutionStrategy( MojoDescriptor.SINGLE_PASS_EXEC_STRATEGY );
}
// ----------------------------------------------------------------------
// Configurator hint
// ----------------------------------------------------------------------
DocletTag configurator = findInClassHierarchy( javaClass, CONFIGURATOR );
if ( configurator != null )
{
mojoDescriptor.setComponentConfigurator( configurator.getValue() );
}
// ----------------------------------------------------------------------
// Goal name
// ----------------------------------------------------------------------
@ -406,4 +419,4 @@ public class JavaMojoDescriptorExtractor
return descriptors;
}
}
}

View File

@ -332,10 +332,13 @@
</tr>
<tr>
<td>configurator</td>
<td>none (detected)</td>
<td>@configurator &lt;roleHint&gt;</td>
<td>No</td>
<td>The configurator type to use when injecting parameter values
into this Mojo. <i>NOTE: This will only be used in very special
into this Mojo. The value is normally deduced from the
Mojo's implementation language, but can be specified to
allow a custom ComponentConfigurator implementation to be used.
<i>NOTE: This will only be used in very special
cases, using a highly controlled vocabulary of possible values.
(Elements like this are why it's a good idea to use the
descriptor tools.)</i></td>