From 6087031469487e23b5e7055d0d4e65e2ce96fcbd Mon Sep 17 00:00:00 2001 From: Marc Strapetz Date: Tue, 3 Jan 2017 18:12:05 +0100 Subject: [PATCH] Get rid of javax.servlet API dependency for core org.eclipse.jgit Change-Id: I57d5d4fab7e0b1bd4cf5f1850e8569c8ac5def88 Signed-off-by: Marc Strapetz Signed-off-by: Andrey Loskutov --- org.eclipse.jgit/BUCK | 1 - org.eclipse.jgit/META-INF/MANIFEST.MF | 1 - org.eclipse.jgit/pom.xml | 5 ----- .../jgit/transport/ServiceMayNotContinueException.java | 9 ++++----- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/org.eclipse.jgit/BUCK b/org.eclipse.jgit/BUCK index 2bae6dcf25..73e2080576 100644 --- a/org.eclipse.jgit/BUCK +++ b/org.eclipse.jgit/BUCK @@ -9,7 +9,6 @@ java_library( '//lib:javaewah', '//lib:jsch', '//lib:httpcomponents', - '//lib:servlet-api', '//lib:slf4j-api', ], visibility = ['PUBLIC'], diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index 867c20acaf..903b0118ba 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -140,7 +140,6 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", com.jcraft.jsch;version="[0.1.37,0.2.0)", javax.crypto, javax.net.ssl, - javax.servlet.http;version="[2.5.0,3.2.0)", org.slf4j;version="[1.7.0,2.0.0)", org.xml.sax, org.xml.sax.helpers diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index 75ea7996d9..6465a00b69 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -89,11 +89,6 @@ slf4j-api - - javax.servlet - javax.servlet-api - provided - diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java index 81c5da3c78..87c9a50038 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java @@ -45,8 +45,6 @@ package org.eclipse.jgit.transport; import java.io.IOException; -import javax.servlet.http.HttpServletResponse; - import org.eclipse.jgit.internal.JGitText; /** @@ -55,6 +53,7 @@ import org.eclipse.jgit.internal.JGitText; * @since 2.0 */ public class ServiceMayNotContinueException extends IOException { + private static final int FORBIDDEN = 403; private static final long serialVersionUID = 1L; private final int statusCode; @@ -63,7 +62,7 @@ public class ServiceMayNotContinueException extends IOException { /** Initialize with no message. */ public ServiceMayNotContinueException() { // Do not set a message. - statusCode = HttpServletResponse.SC_FORBIDDEN; + statusCode = FORBIDDEN; } /** @@ -73,7 +72,7 @@ public class ServiceMayNotContinueException extends IOException { */ public ServiceMayNotContinueException(String msg) { super(msg); - statusCode = HttpServletResponse.SC_FORBIDDEN; + statusCode = FORBIDDEN; } /** @@ -99,7 +98,7 @@ public class ServiceMayNotContinueException extends IOException { */ public ServiceMayNotContinueException(String msg, Throwable cause) { super(msg, cause); - statusCode = HttpServletResponse.SC_FORBIDDEN; + statusCode = FORBIDDEN; } /** -- 2.39.5