From 8f804a31b5b47817f8239d96a56de156d6effabb Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Sat, 28 Apr 2012 21:23:35 +0000 Subject: [PATCH] add missing annotation parameters git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/branches/MPLUGIN-189@1331838 13f79535-47bb-0310-9956-ffa450edef68 --- .../tools/plugin/annotations/Component.java | 1 + .../tools/plugin/annotations/Execute.java | 12 +++++++ .../maven/tools/plugin/annotations/Goal.java | 1 + .../plugin/annotations/LifecyclePhase.java | 1 + .../tools/plugin/annotations/Parameter.java | 12 +++++++ .../tools/plugin/annotations/ThreadSafe.java | 33 ++++++++++++++++--- 6 files changed, 56 insertions(+), 4 deletions(-) diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java index bc6240b..95b1e83 100644 --- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java +++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Component.java @@ -27,6 +27,7 @@ import java.lang.annotation.Target; /** * @author Olivier Lamy + * @since 3.0 */ @Documented @Retention( RetentionPolicy.RUNTIME ) diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java index 6fd8e0f..3b13bfb 100644 --- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java +++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Execute.java @@ -18,9 +18,21 @@ package org.apache.maven.tools.plugin.annotations; * under the License. */ +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + /** * @author Olivier Lamy + * @since 3.0 */ +@Documented +@Retention( RetentionPolicy.RUNTIME ) +@Target( ElementType.TYPE ) +@Inherited public @interface Execute { LifecyclePhase phase() default LifecyclePhase.NONE; diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java index 784fd63..b56bd1f 100644 --- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java +++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Goal.java @@ -28,6 +28,7 @@ import java.lang.annotation.Target; /** * @author Olivier Lamy + * @since 3.0 */ @Documented @Retention( RetentionPolicy.RUNTIME ) diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java index ab01368..3db6bf1 100644 --- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java +++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/LifecyclePhase.java @@ -20,6 +20,7 @@ package org.apache.maven.tools.plugin.annotations; /** * @author Olivier Lamy + * @since 3.0 */ public enum LifecyclePhase { diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java index 7a0dac9..4db182a 100644 --- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java +++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/Parameter.java @@ -18,9 +18,21 @@ package org.apache.maven.tools.plugin.annotations; * under the License. */ +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + /** * @author Olivier Lamy + * @since 3.0 */ +@Documented +@Retention( RetentionPolicy.RUNTIME ) +@Target( { ElementType.FIELD, ElementType.METHOD } ) +@Inherited public @interface Parameter { String alias() default ""; diff --git a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java index c0f9f41..4ad2389 100644 --- a/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java +++ b/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/annotations/ThreadSafe.java @@ -1,17 +1,42 @@ package org.apache.maven.tools.plugin.annotations; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * @author Olivier Lamy + * @since 3.0 + */ @Documented @Inherited -@Retention( RUNTIME ) -@Target( { TYPE } ) +@Retention( RetentionPolicy.RUNTIME ) +@Target( { ElementType.TYPE } ) public @interface ThreadSafe { boolean value() default true;