Author: brett
Date: Thu Jun 9 16:22:34 2005
New Revision: 189856
URL: http://svn.apache.org/viewcvs?rev=189856&view=rev
Log:
PR: MNG-451
Submitted by: Kenney Westerhof
Reviewed by: Brett Porter
make configurator configurable!
Modified:
maven/components/trunk/maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java
maven/components/trunk/maven-site/src/site/xdoc/developers/mojo-api-specification.xml
Modified:
maven/components/trunk/maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java
URL:
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java?rev=189856&r1=189855&r2=189856&view=diff
==============================================================================
---
maven/components/trunk/maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java
(original)
+++
maven/components/trunk/maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java
Thu Jun 9 16:22:34 2005
@@ -51,6 +51,7 @@
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 @@
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 @@
return descriptors;
}
-}
\ No newline at end of file
+}
Modified:
maven/components/trunk/maven-site/src/site/xdoc/developers/mojo-api-specification.xml
URL:
http://svn.apache.org/viewcvs/maven/components/trunk/maven-site/src/site/xdoc/developers/mojo-api-specification.xml?rev=189856&r1=189855&r2=189856&view=diff
==============================================================================
---
maven/components/trunk/maven-site/src/site/xdoc/developers/mojo-api-specification.xml
(original)
+++
maven/components/trunk/maven-site/src/site/xdoc/developers/mojo-api-specification.xml
Thu Jun 9 16:22:34 2005
@@ -332,10 +332,13 @@
</tr>
<tr>
<td>configurator</td>
- <td>none (detected)</td>
+ <td>@configurator <roleHint></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>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]