This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 197db2d7edc HDDS-15558. Prevent addition of deprecated style CLI
options (#10891)
197db2d7edc is described below
commit 197db2d7edc4d780deca0d899c09f116e989c76f
Author: Shuo Huang <[email protected]>
AuthorDate: Thu Jul 30 17:13:48 2026 +0800
HDDS-15558. Prevent addition of deprecated style CLI options (#10891)
---
.../ozone/annotations/CliOptionStyleProcessor.java | 123 +++++++++++++++++++++
hadoop-hdds/cli-common/pom.xml | 11 ++
hadoop-hdds/server-scm/pom.xml | 6 +
hadoop-ozone/cli-admin/pom.xml | 11 ++
.../ozone/admin/om/LifecycleResumeSubCommand.java | 5 +-
.../ozone/admin/om/LifecycleStatusSubCommand.java | 5 +-
.../ozone/admin/om/LifecycleSuspendSubCommand.java | 5 +-
hadoop-ozone/cli-debug/pom.xml | 11 ++
hadoop-ozone/cli-repair/pom.xml | 11 ++
hadoop-ozone/cli-shell/pom.xml | 11 ++
hadoop-ozone/freon/pom.xml | 11 ++
hadoop-ozone/iceberg/pom.xml | 18 ++-
hadoop-ozone/insight/pom.xml | 17 ++-
hadoop-ozone/ozone-manager/pom.xml | 11 +-
hadoop-ozone/tools/pom.xml | 11 ++
hadoop-ozone/vapor/pom.xml | 11 ++
16 files changed, 260 insertions(+), 18 deletions(-)
diff --git
a/hadoop-hdds/annotations/src/main/java/org/apache/ozone/annotations/CliOptionStyleProcessor.java
b/hadoop-hdds/annotations/src/main/java/org/apache/ozone/annotations/CliOptionStyleProcessor.java
new file mode 100644
index 00000000000..0aec138dd7d
--- /dev/null
+++
b/hadoop-hdds/annotations/src/main/java/org/apache/ozone/annotations/CliOptionStyleProcessor.java
@@ -0,0 +1,123 @@
+/*
+ * 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.
+ */
+
+package org.apache.ozone.annotations;
+
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.regex.Pattern;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.SimpleAnnotationValueVisitor8;
+import javax.tools.Diagnostic;
+
+/**
+ * Validates that picocli options use the preferred Ozone CLI option style.
+ */
+@SupportedAnnotationTypes(CliOptionStyleProcessor.OPTION_ANNOTATION)
+public class CliOptionStyleProcessor extends AbstractProcessor {
+
+ static final String OPTION_ANNOTATION = "picocli.CommandLine.Option";
+ private static final String NAMES_ATTRIBUTE = "names";
+ private static final Pattern CAMEL_CASE = Pattern.compile("--.*[A-Z].*");
+ private static final Pattern UNDER_SCORE = Pattern.compile("--.*_.*");
+
+ @Override
+ public SourceVersion getSupportedSourceVersion() {
+ return SourceVersion.latestSupported();
+ }
+
+ @Override
+ public boolean process(Set<? extends TypeElement> annotations,
+ RoundEnvironment roundEnv) {
+ for (TypeElement annotation : annotations) {
+ if (OPTION_ANNOTATION.contentEquals(annotation.getQualifiedName())) {
+ roundEnv.getElementsAnnotatedWith(annotation)
+ .forEach(this::checkOptionNames);
+ }
+ }
+ return false;
+ }
+
+ private void checkOptionNames(Element element) {
+ for (AnnotationMirror annotation : element.getAnnotationMirrors()) {
+ if (isOptionAnnotation(annotation)) {
+ checkOptionNames(element, annotation);
+ }
+ }
+ }
+
+ private boolean isOptionAnnotation(AnnotationMirror annotation) {
+ return OPTION_ANNOTATION.contentEquals(
+ annotation.getAnnotationType().asElement().toString());
+ }
+
+ private void checkOptionNames(Element element, AnnotationMirror annotation) {
+ for (Entry<? extends ExecutableElement, ? extends AnnotationValue> entry :
+ annotation.getElementValues().entrySet()) {
+ if (entry.getKey().getSimpleName().contentEquals(NAMES_ATTRIBUTE)) {
+ checkOptionNameValues(element, annotation, entry.getValue());
+ }
+ }
+ }
+
+ private void checkOptionNameValues(Element element, AnnotationMirror
annotation,
+ AnnotationValue value) {
+ value.accept(new SimpleAnnotationValueVisitor8<Void, Void>() {
+ @Override
+ public Void visitArray(List<? extends AnnotationValue> values,
+ Void unused) {
+ values.forEach(v -> checkOptionNameValues(element, annotation, v));
+ return null;
+ }
+
+ @Override
+ public Void visitString(String option, Void unused) {
+ checkOptionName(option, element, annotation, value);
+ return null;
+ }
+ }, null);
+ }
+
+ private void checkOptionName(String option, Element element,
+ AnnotationMirror annotation, AnnotationValue value) {
+ if (hasDeprecatedStyle(option)) {
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR,
+ String.format("CLI option '%s' uses a deprecated style. New options "
+ + "should use --dash-separated-style long names or "
+ + "single-character short names.", option),
+ element, annotation, value);
+ }
+ }
+
+ private static boolean hasDeprecatedStyle(String option) {
+ if (option.startsWith("--")) {
+ return CAMEL_CASE.matcher(option).matches()
+ || UNDER_SCORE.matcher(option).matches();
+ }
+ return option.startsWith("-") && option.length() > 2;
+ }
+
+}
diff --git a/hadoop-hdds/cli-common/pom.xml b/hadoop-hdds/cli-common/pom.xml
index 38de9741a1e..1ace7bb68ac 100644
--- a/hadoop-hdds/cli-common/pom.xml
+++ b/hadoop-hdds/cli-common/pom.xml
@@ -51,6 +51,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
@@ -67,6 +72,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -80,6 +90,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git a/hadoop-hdds/server-scm/pom.xml b/hadoop-hdds/server-scm/pom.xml
index 8c5293d9efa..5a8a779e4e2 100644
--- a/hadoop-hdds/server-scm/pom.xml
+++ b/hadoop-hdds/server-scm/pom.xml
@@ -169,6 +169,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-docs</artifactId>
@@ -255,6 +260,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.apache.hadoop.hdds.conf.ConfigFileGenerator</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>org.apache.ozone.annotations.ReplicateAnnotationProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git a/hadoop-ozone/cli-admin/pom.xml b/hadoop-ozone/cli-admin/pom.xml
index 0fad986a5b8..a9fbfe69280 100644
--- a/hadoop-ozone/cli-admin/pom.xml
+++ b/hadoop-ozone/cli-admin/pom.xml
@@ -128,6 +128,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<!-- required for @MetaInfServices at compile-time, but not at runtime
-->
<groupId>org.kohsuke.metainf-services</groupId>
@@ -166,6 +171,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -179,6 +189,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git
a/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleResumeSubCommand.java
b/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleResumeSubCommand.java
index 69f6c66a90d..a25840ced70 100644
---
a/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleResumeSubCommand.java
+++
b/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleResumeSubCommand.java
@@ -38,13 +38,13 @@ public class LifecycleResumeSubCommand implements
Callable<Void> {
private LifecycleSubCommand parent;
@CommandLine.Option(
- names = {"-id", "--service-id"},
+ names = {"--service-id"},
description = "Ozone Manager Service ID"
)
private String omServiceId;
@CommandLine.Option(
- names = {"-host", "--service-host"},
+ names = {"--service-host"},
description = "Ozone Manager Host"
)
private String omHost;
@@ -70,4 +70,3 @@ protected PrintStream out() {
return System.out;
}
}
-
diff --git
a/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleStatusSubCommand.java
b/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleStatusSubCommand.java
index a443471391a..ea0ce071c55 100644
---
a/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleStatusSubCommand.java
+++
b/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleStatusSubCommand.java
@@ -39,13 +39,13 @@ public class LifecycleStatusSubCommand implements
Callable<Void> {
private LifecycleSubCommand parent;
@CommandLine.Option(
- names = {"-id", "--service-id"},
+ names = {"--service-id"},
description = "Ozone Manager Service ID"
)
private String omServiceId;
@CommandLine.Option(
- names = {"-host", "--service-host"},
+ names = {"--service-host"},
description = "Ozone Manager Host"
)
private String omHost;
@@ -86,4 +86,3 @@ protected PrintStream out() {
return System.out;
}
}
-
diff --git
a/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleSuspendSubCommand.java
b/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleSuspendSubCommand.java
index 8a420c3d41b..86d4513d588 100644
---
a/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleSuspendSubCommand.java
+++
b/hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/LifecycleSuspendSubCommand.java
@@ -39,13 +39,13 @@ public class LifecycleSuspendSubCommand implements
Callable<Void> {
private LifecycleSubCommand parent;
@CommandLine.Option(
- names = {"-id", "--service-id"},
+ names = {"--service-id"},
description = "Ozone Manager Service ID"
)
private String omServiceId;
@CommandLine.Option(
- names = {"-host", "--service-host"},
+ names = {"--service-host"},
description = "Ozone Manager Host"
)
private String omHost;
@@ -73,4 +73,3 @@ protected PrintStream out() {
return System.out;
}
}
-
diff --git a/hadoop-ozone/cli-debug/pom.xml b/hadoop-ozone/cli-debug/pom.xml
index 63b54ec94b6..f7d574804c2 100644
--- a/hadoop-ozone/cli-debug/pom.xml
+++ b/hadoop-ozone/cli-debug/pom.xml
@@ -204,6 +204,11 @@
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<!-- required for @MetaInfServices at compile-time, but not at runtime
-->
<groupId>org.kohsuke.metainf-services</groupId>
@@ -262,6 +267,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -275,6 +285,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git a/hadoop-ozone/cli-repair/pom.xml b/hadoop-ozone/cli-repair/pom.xml
index 1e79d1ad13e..9d83143d3a0 100644
--- a/hadoop-ozone/cli-repair/pom.xml
+++ b/hadoop-ozone/cli-repair/pom.xml
@@ -138,6 +138,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<!-- required for @MetaInfServices at compile-time, but not at runtime
-->
<groupId>org.kohsuke.metainf-services</groupId>
@@ -201,6 +206,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -214,6 +224,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git a/hadoop-ozone/cli-shell/pom.xml b/hadoop-ozone/cli-shell/pom.xml
index 015ad13b59b..b03bbe033d6 100644
--- a/hadoop-ozone/cli-shell/pom.xml
+++ b/hadoop-ozone/cli-shell/pom.xml
@@ -115,6 +115,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<!-- required for @MetaInfServices at compile-time, but not at runtime
-->
<groupId>org.kohsuke.metainf-services</groupId>
@@ -154,6 +159,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -167,6 +177,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git a/hadoop-ozone/freon/pom.xml b/hadoop-ozone/freon/pom.xml
index 9bde7cf3395..9637ec3200d 100644
--- a/hadoop-ozone/freon/pom.xml
+++ b/hadoop-ozone/freon/pom.xml
@@ -138,6 +138,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<!-- required for @MetaInfServices at compile-time, but not at runtime
-->
<groupId>org.kohsuke.metainf-services</groupId>
@@ -166,6 +171,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -179,6 +189,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git a/hadoop-ozone/iceberg/pom.xml b/hadoop-ozone/iceberg/pom.xml
index d881afce137..8171192901e 100644
--- a/hadoop-ozone/iceberg/pom.xml
+++ b/hadoop-ozone/iceberg/pom.xml
@@ -109,7 +109,6 @@
</exclusion>
</exclusions>
</dependency>
-
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-cli-common</artifactId>
@@ -127,6 +126,12 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
@@ -208,7 +213,16 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <proc>none</proc>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ <annotationProcessors>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
+ </annotationProcessors>
</configuration>
</plugin>
<plugin>
diff --git a/hadoop-ozone/insight/pom.xml b/hadoop-ozone/insight/pom.xml
index 35f4f67b8a0..cc68cb5fe7a 100644
--- a/hadoop-ozone/insight/pom.xml
+++ b/hadoop-ozone/insight/pom.xml
@@ -100,6 +100,11 @@
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
@@ -126,8 +131,16 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <!-- no annotation processor, ConfigGroup and Config are only used
for finding annotation at runtime -->
- <proc>none</proc>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ <annotationProcessors>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
+ </annotationProcessors>
</configuration>
</plugin>
<plugin>
diff --git a/hadoop-ozone/ozone-manager/pom.xml
b/hadoop-ozone/ozone-manager/pom.xml
index 169751a8eb8..0715e3e9563 100644
--- a/hadoop-ozone/ozone-manager/pom.xml
+++ b/hadoop-ozone/ozone-manager/pom.xml
@@ -233,6 +233,11 @@
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-docs</artifactId>
@@ -266,11 +271,6 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.ozone</groupId>
- <artifactId>hdds-annotation-processing</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-common</artifactId>
@@ -334,6 +334,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.apache.hadoop.hdds.conf.ConfigFileGenerator</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>org.apache.ozone.annotations.OmRequestFeatureValidatorProcessor</annotationProcessor>
<annotationProcessor>org.apache.ozone.annotations.RegisterValidatorProcessor</annotationProcessor>
</annotationProcessors>
diff --git a/hadoop-ozone/tools/pom.xml b/hadoop-ozone/tools/pom.xml
index 3ffab37b2b2..9e26438e94f 100644
--- a/hadoop-ozone/tools/pom.xml
+++ b/hadoop-ozone/tools/pom.xml
@@ -98,6 +98,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<!-- required for @MetaInfServices at compile-time, but not at runtime
-->
<groupId>org.kohsuke.metainf-services</groupId>
@@ -173,6 +178,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -186,6 +196,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
diff --git a/hadoop-ozone/vapor/pom.xml b/hadoop-ozone/vapor/pom.xml
index 78342bc6b0a..41f7132fa3f 100644
--- a/hadoop-ozone/vapor/pom.xml
+++ b/hadoop-ozone/vapor/pom.xml
@@ -150,6 +150,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<!-- required for @MetaInfServices at compile-time, but not at runtime
-->
<groupId>org.kohsuke.metainf-services</groupId>
@@ -178,6 +183,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.ozone</groupId>
+ <artifactId>hdds-annotation-processing</artifactId>
+ <version>${hdds.version}</version>
+ </path>
<path>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
@@ -191,6 +201,7 @@
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.kohsuke.metainf_services.AnnotationProcessorImpl</annotationProcessor>
+
<annotationProcessor>org.apache.ozone.annotations.CliOptionStyleProcessor</annotationProcessor>
<annotationProcessor>picocli.codegen.aot.graalvm.processor.NativeImageConfigGeneratorProcessor</annotationProcessor>
</annotationProcessors>
</configuration>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]