diff --git a/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Component.java b/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Component.java index ad3aabd..0339cdf 100644 --- a/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Component.java +++ b/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Component.java @@ -49,16 +49,4 @@ public @interface Component * @return the role-hint */ String roleHint() default ""; - - /** - * is the component required? - * @return true if the Mojo should fail when the component cannot be injected - */ - boolean required() default true; - - /** - * ignored... - * @return - */ - boolean readonly() default true; } diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java index 1f45d01..73fdb1d 100644 --- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java +++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/JavaAnnotationsMojoDescriptorExtractor.java @@ -510,11 +510,11 @@ public class JavaAnnotationsMojoDescriptorExtractor parameter.setName( componentAnnotationContent.getFieldName() ); parameter.setRequirement( new Requirement( componentAnnotationContent.role(), componentAnnotationContent.roleHint() ) ); - parameter.setEditable( false ); parameter.setDeprecated( componentAnnotationContent.getDeprecated() ); parameter.setSince( componentAnnotationContent.getSince() ); + // same behaviour as JavaMojoDescriptorExtractor - //parameter.setRequired( componentAnnotationContent.required() ); + //parameter.setRequired( ... ); parameter.setEditable( false ); mojoDescriptor.addParameter( parameter ); } diff --git a/maven-plugin-tools-java/src/site/apt/index.apt b/maven-plugin-tools-java/src/site/apt/index.apt index 94cd31c..e5e6bb6 100644 --- a/maven-plugin-tools-java/src/site/apt/index.apt +++ b/maven-plugin-tools-java/src/site/apt/index.apt @@ -72,8 +72,6 @@ public class MyMojo /** * @component role="..." roleHint="..." - * @readonly - * @required * @since * @deprecated */ @@ -93,4 +91,4 @@ public class MyMojo * {{{/developers/mojo-api-specification.html#The_Descriptor_and_Annotations}Mojo API Specification}} - * {{{/ref/current/maven-plugin-api/plugin.html}META-INF/maven/plugin.xml plugin descriptor}} + * {{{/ref/current/maven-plugin-api/plugin.html}<<>> plugin descriptor}}