From 478c73cc37b515e4b10b8c1d8f3ff4f7e388fb5b Mon Sep 17 00:00:00 2001 From: Basil Crow <me@basilcrow.com> Date: Fri, 15 Nov 2024 11:17:13 -0800 Subject: [PATCH] Register `OptionHandler` through `META-INF/services/annotations` and Annotation Indexer rather than `META-INF/services` and Commons Discovery --- pom.xml | 6 ------ .../credentials/cli/CredentialsStoreOptionHandler.java | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 7879fd4fb..374702930 100644 --- a/pom.xml +++ b/pom.xml @@ -124,12 +124,6 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.kohsuke.metainf-services</groupId> - <artifactId>metainf-services</artifactId> - <version>1.11</version> - <scope>provided</scope> - </dependency> <dependency> <groupId>org.xmlunit</groupId> <artifactId>xmlunit-matchers</artifactId> diff --git a/src/main/java/com/cloudbees/plugins/credentials/cli/CredentialsStoreOptionHandler.java b/src/main/java/com/cloudbees/plugins/credentials/cli/CredentialsStoreOptionHandler.java index 9a57ff931..bac04ad8a 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/cli/CredentialsStoreOptionHandler.java +++ b/src/main/java/com/cloudbees/plugins/credentials/cli/CredentialsStoreOptionHandler.java @@ -25,7 +25,7 @@ import com.cloudbees.plugins.credentials.CredentialsSelectHelper; import com.cloudbees.plugins.credentials.CredentialsStore; -import org.kohsuke.MetaInfServices; +import hudson.cli.declarative.OptionHandlerExtension; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.CmdLineParser; import org.kohsuke.args4j.OptionDef; @@ -38,7 +38,7 @@ * * @since 2.1.1 */ -@MetaInfServices(OptionHandler.class) +@OptionHandlerExtension public class CredentialsStoreOptionHandler extends OptionHandler<CredentialsStore> { /** * {@inheritDoc}