YETUS-3 clean up audience annotations for move out of Hadoop. - package fixes - change documentation language to account for use in other projects - add IA.Public to Doclets - make use of yetus-project for parent
Signed-off-by: Allen Wittenauer <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/9575b650 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/9575b650 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/9575b650 Branch: refs/heads/master Commit: 9575b65068c970c0d27f5402609bcfc5ce1077e3 Parents: 01d63da Author: Sean Busbey <[email protected]> Authored: Sun Oct 11 00:38:16 2015 -0500 Committer: Sean Busbey <[email protected]> Committed: Thu Oct 15 20:01:07 2015 -0500 ---------------------------------------------------------------------- audience-annotations/pom.xml | 60 ++++++-------------- .../yetus/audience/InterfaceAudience.java | 11 ++-- .../yetus/audience/InterfaceStability.java | 8 +-- .../ExcludePrivateAnnotationsJDiffDoclet.java | 11 +++- ...ExcludePrivateAnnotationsStandardDoclet.java | 11 +++- .../IncludePublicAnnotationsStandardDoclet.java | 13 +++-- .../yetus/audience/tools/RootDocProcessor.java | 6 +- .../yetus/audience/tools/StabilityOptions.java | 2 +- .../yetus/audience/tools/package-info.java | 6 +- 9 files changed, 57 insertions(+), 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/pom.xml ---------------------------------------------------------------------- diff --git a/audience-annotations/pom.xml b/audience-annotations/pom.xml index 49c9204..040d9b3 100644 --- a/audience-annotations/pom.xml +++ b/audience-annotations/pom.xml @@ -23,57 +23,31 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-project</artifactId> - <version>3.0.0-SNAPSHOT</version> - <relativePath>../../hadoop-project</relativePath> + <groupId>org.apache.yetus</groupId> + <artifactId>yetus-project</artifactId> + <version>0.1.0-SNAPSHOT</version> + <relativePath>../yetus-project</relativePath> </parent> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-annotations</artifactId> - <version>3.0.0-SNAPSHOT</version> - <description>Apache Hadoop Annotations</description> - <name>Apache Hadoop Annotations</name> + <artifactId>audience-annotations</artifactId> + <description>Annotations for defining API boundaries and tools for managing javadocs</description> + <name>Apache Yetus - Audience Annotations</name> <packaging>jar</packaging> <dependencies> <dependency> <groupId>jdiff</groupId> <artifactId>jdiff</artifactId> + <version>1.0.9</version> <scope>provided</scope> + <optional>true</optional> + </dependency> + <dependency> + <!-- Version and location set in project pom --> + <groupId>jdk.tools</groupId> + <artifactId>jdk.tools</artifactId> + <scope>system</scope> + <!-- Mark as optional so that it isn't taken transitively --> + <optional>true</optional> </dependency> </dependencies> - - <profiles> - <profile> - <id>jdk1.7</id> - <activation> - <jdk>1.7</jdk> - </activation> - <dependencies> - <dependency> - <groupId>jdk.tools</groupId> - <artifactId>jdk.tools</artifactId> - <version>1.7</version> - <scope>system</scope> - <systemPath>${java.home}/../lib/tools.jar</systemPath> - </dependency> - </dependencies> - </profile> - <profile> - <id>jdk1.8</id> - <activation> - <jdk>1.8</jdk> - </activation> - <dependencies> - <dependency> - <groupId>jdk.tools</groupId> - <artifactId>jdk.tools</artifactId> - <version>1.8</version> - <scope>system</scope> - <systemPath>${java.home}/../lib/tools.jar</systemPath> - </dependency> - </dependencies> - </profile> - </profiles> - </project> http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java b/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java index 04d5511..e618040 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceAudience.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.classification; +package org.apache.yetus.audience; import java.lang.annotation.Documented; import java.lang.annotation.Retention; @@ -34,8 +34,9 @@ import java.lang.annotation.RetentionPolicy; * {@link Public}. Avoid using non public classes as these classes * could be removed or change in incompatible ways.</li> * - * <li>Hadoop projects must only use classes that are marked - * {@link LimitedPrivate} or {@link Public}</li> + * <li>Some projects may choose to give special consideration to related + * projects. Such consideration can be done by using the {@link LimitedPrivate} + * annotation with a named set of projects.</li> * * <li> Methods may have a different annotation that it is more restrictive * compared to the audience classification of the class. Example: A class @@ -54,7 +55,7 @@ public class InterfaceAudience { /** * Intended only for the project(s) specified in the annotation. - * For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase". + * For example, "Hadoop Common", "HDFS", "MapReduce", "ZooKeeper", "HBase". */ @Documented @Retention(RetentionPolicy.RUNTIME) @@ -63,7 +64,7 @@ public class InterfaceAudience { }; /** - * Intended for use only within Hadoop itself. + * Intended for use only within a given project. */ @Documented @Retention(RetentionPolicy.RUNTIME) http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java b/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java index 9ae3e98..4942221 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/InterfaceStability.java @@ -15,15 +15,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.classification; +package org.apache.yetus.audience; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate; -import org.apache.hadoop.classification.InterfaceAudience.Private; -import org.apache.hadoop.classification.InterfaceAudience.Public; +import org.apache.yetus.audience.InterfaceAudience.LimitedPrivate; +import org.apache.yetus.audience.InterfaceAudience.Private; +import org.apache.yetus.audience.InterfaceAudience.Public; /** * Annotation to inform users of how much to rely on a particular package, http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsJDiffDoclet.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsJDiffDoclet.java b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsJDiffDoclet.java index 5cc422f..9ad94ab 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsJDiffDoclet.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsJDiffDoclet.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.classification.tools; +package org.apache.yetus.audience.tools; import com.sun.javadoc.DocErrorReporter; import com.sun.javadoc.LanguageVersion; @@ -23,13 +23,18 @@ import com.sun.javadoc.RootDoc; import jdiff.JDiff; +import org.apache.yetus.audience.InterfaceAudience; +import org.apache.yetus.audience.InterfaceStability; + /** * A <a href="http://java.sun.com/javase/6/docs/jdk/api/javadoc/doclet/">Doclet</a> * for excluding elements that are annotated with - * {@link org.apache.hadoop.classification.InterfaceAudience.Private} or - * {@link org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate}. + * {@link org.apache.yetus.audience.InterfaceAudience.Private} or + * {@link org.apache.yetus.audience.InterfaceAudience.LimitedPrivate}. * It delegates to the JDiff Doclet, and takes the same options. */ [email protected] [email protected] public class ExcludePrivateAnnotationsJDiffDoclet { public static LanguageVersion languageVersion() { http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsStandardDoclet.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsStandardDoclet.java b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsStandardDoclet.java index 2176ea5..a0eb8b6 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsStandardDoclet.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/ExcludePrivateAnnotationsStandardDoclet.java @@ -15,20 +15,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.classification.tools; +package org.apache.yetus.audience.tools; import com.sun.javadoc.DocErrorReporter; import com.sun.javadoc.LanguageVersion; import com.sun.javadoc.RootDoc; import com.sun.tools.doclets.standard.Standard; +import org.apache.yetus.audience.InterfaceAudience; +import org.apache.yetus.audience.InterfaceStability; + /** * A <a href="http://java.sun.com/javase/6/docs/jdk/api/javadoc/doclet/">Doclet</a> * for excluding elements that are annotated with - * {@link org.apache.hadoop.classification.InterfaceAudience.Private} or - * {@link org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate}. + * {@link org.apache.yetus.audience.InterfaceAudience.Private} or + * {@link org.apache.yetus.audience.InterfaceAudience.LimitedPrivate}. * It delegates to the Standard Doclet, and takes the same options. */ [email protected] [email protected] public class ExcludePrivateAnnotationsStandardDoclet { public static LanguageVersion languageVersion() { http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/tools/IncludePublicAnnotationsStandardDoclet.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/IncludePublicAnnotationsStandardDoclet.java b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/IncludePublicAnnotationsStandardDoclet.java index 10d554d..ee6afd2 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/IncludePublicAnnotationsStandardDoclet.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/IncludePublicAnnotationsStandardDoclet.java @@ -15,24 +15,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.classification.tools; +package org.apache.yetus.audience.tools; import com.sun.javadoc.DocErrorReporter; import com.sun.javadoc.LanguageVersion; import com.sun.javadoc.RootDoc; import com.sun.tools.doclets.standard.Standard; +import org.apache.yetus.audience.InterfaceAudience; +import org.apache.yetus.audience.InterfaceStability; + /** * A <a href="http://java.sun.com/javase/6/docs/jdk/api/javadoc/doclet/">Doclet</a> * that only includes class-level elements that are annotated with - * {@link org.apache.hadoop.classification.InterfaceAudience.Public}. + * {@link org.apache.yetus.audience.InterfaceAudience.Public}. * Class-level elements with no annotation are excluded. * In addition, all elements that are annotated with - * {@link org.apache.hadoop.classification.InterfaceAudience.Private} or - * {@link org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate} + * {@link org.apache.yetus.audience.InterfaceAudience.Private} or + * {@link org.apache.yetus.audience.InterfaceAudience.LimitedPrivate} * are also excluded. * It delegates to the Standard Doclet, and takes the same options. */ [email protected] [email protected] public class IncludePublicAnnotationsStandardDoclet { public static LanguageVersion languageVersion() { http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/tools/RootDocProcessor.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/RootDocProcessor.java b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/RootDocProcessor.java index 8042f17..46d7fac 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/RootDocProcessor.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/RootDocProcessor.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.classification.tools; +package org.apache.yetus.audience.tools; import com.sun.javadoc.AnnotationDesc; import com.sun.javadoc.AnnotationTypeDoc; @@ -38,8 +38,8 @@ import java.util.List; import java.util.Map; import java.util.WeakHashMap; -import org.apache.hadoop.classification.InterfaceAudience; -import org.apache.hadoop.classification.InterfaceStability; +import org.apache.yetus.audience.InterfaceAudience; +import org.apache.yetus.audience.InterfaceStability; /** * Process the {@link RootDoc} by substituting with (nested) proxy objects that http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java index 5b2d70d..d8f0bbf 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/StabilityOptions.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.hadoop.classification.tools; +package org.apache.yetus.audience.tools; import com.sun.javadoc.DocErrorReporter; http://git-wip-us.apache.org/repos/asf/yetus/blob/9575b650/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java ---------------------------------------------------------------------- diff --git a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java index dc647c5..1ac8e49 100644 --- a/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java +++ b/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java @@ -15,8 +15,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ [email protected]({"Common", "Avro", "Chukwa", "HBase", "HDFS", - "Hive", "MapReduce", "Pig", "ZooKeeper"}) -package org.apache.hadoop.classification.tools; - -import org.apache.hadoop.classification.InterfaceAudience; +package org.apache.yetus.audience.tools;
