Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinston Prakash2012-02-02 16:17:46 -0500
committerWinston Prakash2012-02-02 16:17:46 -0500
commitc3660797c88bef0d767d5fc11c6bfc43ed206015 (patch)
tree4262efeead9e7e36479aef823cf6aad98f32960e
parent60d074d0bc24ae7fe1302680cc35de24c3ac2272 (diff)
downloadorg.eclipse.hudson.core-c3660797c88bef0d767d5fc11c6bfc43ed206015.tar.gz
org.eclipse.hudson.core-c3660797c88bef0d767d5fc11c6bfc43ed206015.tar.xz
org.eclipse.hudson.core-c3660797c88bef0d767d5fc11c6bfc43ed206015.zip
Remove the dependency on the external library metainf-services in the core due to IP/Provenance concern. Add the service lookup directly at META-INF/services folder
-rw-r--r--hudson-core/pom.xml8
-rw-r--r--hudson-core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java4
-rw-r--r--hudson-core/src/main/java/hudson/cli/handlers/TopLevelItemOptionHandler.java4
-rw-r--r--hudson-core/src/main/java/hudson/init/InitReactorListener.java3
-rw-r--r--hudson-core/src/main/java/hudson/init/InitStrategy.java3
-rw-r--r--hudson-core/src/main/resources/META-INF/services/org.kohsuke.args4j.spi.OptionHandler2
6 files changed, 6 insertions, 18 deletions
diff --git a/hudson-core/pom.xml b/hudson-core/pom.xml
index a5f20763..4c7ec616 100644
--- a/hudson-core/pom.xml
+++ b/hudson-core/pom.xml
@@ -62,7 +62,6 @@
<jmdns.version>3.4.0</jmdns.version>
<winsw.version>1.9</winsw.version>
<sezpoz.version>1.9</sezpoz.version>
- <metainf-services.version>1.1</metainf-services.version>
<asm-all.version>2.2.3</asm-all.version>
<jline.version>0.9.94</jline.version>
@@ -656,13 +655,6 @@
</dependency>
<dependency>
- <groupId>org.kohsuke.metainf-services</groupId>
- <artifactId>metainf-services</artifactId>
- <version>${metainf-services.version}</version>
- <optional>true</optional>
- </dependency>
-
- <dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
<version>${xpp3.version}</version>
diff --git a/hudson-core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java b/hudson-core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
index 642745a5..c4b618cb 100644
--- a/hudson-core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
+++ b/hudson-core/src/main/java/hudson/cli/handlers/AbstractProjectOptionHandler.java
@@ -24,14 +24,12 @@ import org.kohsuke.args4j.OptionDef;
import org.kohsuke.args4j.spi.OptionHandler;
import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
-import org.kohsuke.MetaInfServices;
/**
- * Refer to {@link AbstractProject} by its name.
+ * Refer to {@link AbstractProject} by its name. Registered at META-INF/services.
*
* @author Kohsuke Kawaguchi
*/
-@MetaInfServices
public class AbstractProjectOptionHandler extends OptionHandler<AbstractProject> {
public AbstractProjectOptionHandler(CmdLineParser parser, OptionDef option, Setter<AbstractProject> setter) {
super(parser, option, setter);
diff --git a/hudson-core/src/main/java/hudson/cli/handlers/TopLevelItemOptionHandler.java b/hudson-core/src/main/java/hudson/cli/handlers/TopLevelItemOptionHandler.java
index 608d93ca..4882f892 100644
--- a/hudson-core/src/main/java/hudson/cli/handlers/TopLevelItemOptionHandler.java
+++ b/hudson-core/src/main/java/hudson/cli/handlers/TopLevelItemOptionHandler.java
@@ -17,7 +17,6 @@ package hudson.cli.handlers;
import hudson.model.AbstractProject;
import hudson.model.Hudson;
import hudson.model.TopLevelItem;
-import org.kohsuke.MetaInfServices;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.OptionDef;
@@ -26,11 +25,10 @@ import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
/**
- * Refers to {@link TopLevelItem} by its name.
+ * Refers to {@link TopLevelItem} by its name. Registered at META-INF/services.
*
* @author Kohsuke Kawaguchi
*/
-@MetaInfServices
public class TopLevelItemOptionHandler extends OptionHandler<TopLevelItem> {
public TopLevelItemOptionHandler(CmdLineParser parser, OptionDef option, Setter<TopLevelItem> setter) {
super(parser, option, setter);
diff --git a/hudson-core/src/main/java/hudson/init/InitReactorListener.java b/hudson-core/src/main/java/hudson/init/InitReactorListener.java
index 04eb7efb..b929bf74 100644
--- a/hudson-core/src/main/java/hudson/init/InitReactorListener.java
+++ b/hudson-core/src/main/java/hudson/init/InitReactorListener.java
@@ -15,7 +15,6 @@
package hudson.init;
import org.jvnet.hudson.reactor.ReactorListener;
-import org.kohsuke.MetaInfServices;
import hudson.model.Hudson;
/**
@@ -27,7 +26,7 @@ import hudson.model.Hudson;
* inside {@code WEB-INF/lib} instead.
*
* <p>
- * To register, put {@link MetaInfServices} on your implementation.
+ * Register your implementation at META-INF/services.
*
* @author Kohsuke Kawaguchi
* @see Hudson#buildReactorListener()
diff --git a/hudson-core/src/main/java/hudson/init/InitStrategy.java b/hudson-core/src/main/java/hudson/init/InitStrategy.java
index b2f65ec7..4f56493e 100644
--- a/hudson-core/src/main/java/hudson/init/InitStrategy.java
+++ b/hudson-core/src/main/java/hudson/init/InitStrategy.java
@@ -14,7 +14,6 @@
package hudson.init;
-import org.kohsuke.MetaInfServices;
import org.jvnet.hudson.reactor.Task;
import java.io.File;
@@ -37,7 +36,7 @@ import hudson.util.Service;
* inside {@code WEB-INF/lib} instead.
*
* <p>
- * To register, put {@link MetaInfServices} on your implementation.
+ * Register your implementation at META-INF/services.
*
* @author Kohsuke Kawaguchi
*/
diff --git a/hudson-core/src/main/resources/META-INF/services/org.kohsuke.args4j.spi.OptionHandler b/hudson-core/src/main/resources/META-INF/services/org.kohsuke.args4j.spi.OptionHandler
new file mode 100644
index 00000000..21d3e856
--- /dev/null
+++ b/hudson-core/src/main/resources/META-INF/services/org.kohsuke.args4j.spi.OptionHandler
@@ -0,0 +1,2 @@
+hudson.cli.handlers.AbstractProjectOptionHandler
+hudson.cli.handlers.TopLevelItemOptionHandler

Back to the top