Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Jetty12 + EE10 #2876

Draft
wants to merge 69 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
d1c5e55
Remove the hadoop-auth module from source
epugh Nov 2, 2024
af5a296
Remove build tooling integrations
epugh Nov 2, 2024
9b533ed
Remove from login screen.
epugh Nov 2, 2024
480f8f7
First path of removing related docs
epugh Nov 2, 2024
b5e6cff
Missed this core file
epugh Nov 2, 2024
72f4457
Light edits to get ref guide build to pass
epugh Nov 2, 2024
a86505e
Remove hadoop version
epugh Nov 2, 2024
b46987f
Precommit told me to regenerate versions.lock after removing hadoop-auth
epugh Nov 2, 2024
b7e33ca
Post 'checkUnusedConstraints' step
epugh Nov 2, 2024
e6ca759
Post updateLicenses step
epugh Nov 2, 2024
4bf733b
Remove no longer required libraries.
epugh Nov 2, 2024
9569b95
Respond to feedback
epugh Nov 5, 2024
fb3a0e0
One last eradication
epugh Nov 5, 2024
83a5d05
Proper way to change htaccess.
epugh Nov 5, 2024
760b0c9
Respond to warning from build
epugh Nov 6, 2024
029dc5b
Restore some permissions that are used by the HDFS module
epugh Nov 6, 2024
a2cba05
Back out change, we have another JIRA to cover this work.
epugh Nov 6, 2024
90316c3
Format fix
epugh Nov 6, 2024
59e28b0
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 16, 2024
d8fd76d
update from main
epugh Nov 16, 2024
0ce563e
Merge remote-tracking branch 'apache/main' into fork/epugh/SOLR-17540
malliaridis Nov 16, 2024
1b8894e
Update locks and sync commons-text version downgrade
malliaridis Nov 16, 2024
70754d8
Remove unused dependencies from catalogs
malliaridis Nov 16, 2024
4409b27
Jetty12 + EE8 \u1F680
iamsanjay Nov 19, 2024
336f0d3
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 20, 2024
0189004
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 21, 2024
d8b3d00
Strip out kerberous support in Auth tool.
epugh Nov 22, 2024
90853fc
Update Jetty deps for s3mock
iamsanjay Nov 22, 2024
a718562
Merge branch 'main' into jetty12_ee8
iamsanjay Nov 22, 2024
9f8f9c5
Strip kerberos out of the hdfs module
epugh Nov 22, 2024
fd24abc
Remove Kerberos specific functions from HttpSolrClient
epugh Nov 22, 2024
30f4bd6
Doc cleanups
epugh Nov 22, 2024
5e1bc75
add missing licenses
iamsanjay Nov 22, 2024
dbc0a08
adding permissions to solr test policy
iamsanjay Nov 22, 2024
930d17f
Strip out Kerberos
epugh Nov 22, 2024
a3a8acc
useShortName was only implemented in Kerberos, so remove it.
epugh Nov 22, 2024
3ed7ddf
No longer support Kerberos for Solr on HDFS
epugh Nov 22, 2024
b42274e
Track that Kerberos has been removed
epugh Nov 23, 2024
7de517b
Align changes to both files to reflect each other.
epugh Nov 24, 2024
66d5d1d
Revert "No longer support Kerberos for Solr on HDFS"
epugh Nov 24, 2024
716ee09
restore removed docs that are still relevant
epugh Nov 24, 2024
5425d73
Restore permissions needed by hdfs and crossdc
epugh Nov 24, 2024
a1e67bc
Fix TestHttpServletRequestGetter
iamsanjay Nov 25, 2024
d3594a4
tidy
iamsanjay Nov 25, 2024
7bd7259
jetty xml changes
iamsanjay Nov 25, 2024
31e58a1
versions.lock updated
iamsanjay Nov 25, 2024
dfe667f
Merge remote-tracking branch 'upstream/main' into SOLR-17540
epugh Nov 27, 2024
a20d775
Simplify method signature
epugh Nov 27, 2024
69d5831
Update major-changes-in-solr-10.adoc
epugh Nov 27, 2024
6ca7d16
Track changes
epugh Nov 27, 2024
e3f30c6
Set DefaultSessionIdManager on Server
iamsanjay Nov 28, 2024
1413157
Merge branch 'main' into jetty12_ee8
iamsanjay Nov 28, 2024
9634c1c
removed extra logging annotation
iamsanjay Nov 28, 2024
fa2c41e
workaround for removing headers
iamsanjay Nov 28, 2024
8ba85f5
Backout changes to HDFS and kerberos security.
epugh Nov 30, 2024
52adc6f
Update usage to reflect Kerberos being gone.
epugh Dec 1, 2024
d4a905d
Attempt to clarify why we mention Kerberos and Hadoop Auth in comments
epugh Dec 2, 2024
ea09711
Remove dead logic. Tested locally using basic auth.
epugh Dec 2, 2024
bc20356
Highlight why we mention Kerberos....
epugh Dec 2, 2024
f0cfc42
merge
iamsanjay Dec 6, 2024
60308aa
adding versions.lock
iamsanjay Dec 6, 2024
35acabe
versions.lock
iamsanjay Dec 6, 2024
894b52f
ee10 switch
iamsanjay Dec 8, 2024
72c9cf9
Fix a metric test
iamsanjay Dec 9, 2024
be9b7fb
Merge main
iamsanjay Dec 9, 2024
62e1249
Fix JettyWebappTest
iamsanjay Dec 9, 2024
8fb561f
Merge main
iamsanjay Dec 10, 2024
c3c2f1c
Merge remove hadoop-auth changes
iamsanjay Dec 10, 2024
f7d900b
Upgrade to EE10
iamsanjay Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
[versions]
adobe-testing-s3mock = "2.17.0"
amazon-awssdk = "2.26.19"
adobe-testing-s3mock = "3.9.1"
amazon-awssdk = "2.28.11"
# @keep Antora version used in ref-guide
antora = "3.1.4"
# @keep Most recent commit as of 2022-06-24, this repo does not have tags
Expand Down Expand Up @@ -82,7 +82,8 @@ cybozulabs-langdetect = "1.1-20120112"
diffplug-spotless = "6.5.2"
dropwizard-metrics = "4.2.26"
eclipse-ecj = "3.39.0"
eclipse-jetty = "10.0.22"
# eclipse-jetty = "10.0.22"
eclipse-jetty = "12.0.10"
eclipse-jettytoolchain = "4.0.6"
# @keep jgit version used by git-status.gradle
eclipse-jgit = "6.7.0.202309050840-r"
Expand Down Expand Up @@ -138,7 +139,7 @@ jayway-jsonpath = "2.9.0"
jctools = "4.0.5"
jersey = "3.1.9"
# TODO Sync with jersey versions
jersey-containers = "2.39.1"
jersey-containers = "3.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go with jersey version 3.1.9 if possible, so that we can remove this entry completely (see line above).

# @keep for version alignment
joda-time = "2.8.1"
junit = "4.13.2"
Expand Down Expand Up @@ -295,7 +296,7 @@ bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk18on", version.ref
carrot2-core = { module = "org.carrot2:carrot2-core", version.ref = "carrot2-core" }
carrotsearch-hppc = { module = "com.carrotsearch:hppc", version.ref = "carrotsearch-hppc" }
carrotsearch-randomizedtesting-runner = { module = "com.carrotsearch.randomizedtesting:randomizedtesting-runner", version.ref = "carrotsearch-randomizedtesting" }
# @keep transitive dependency for version alignment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why this changed

# @keep transitive depenxdency for version alignment
checkerframework-qual = { module = "org.checkerframework:checker-qual", version.ref = "checkerframework" }
codehaus-woodstox-stax2api = { module = "org.codehaus.woodstox:stax2-api", version.ref = "codehaus-woodstox" }
commonscli-commonscli = { module = "commons-cli:commons-cli", version.ref = "commons-cli" }
Expand All @@ -305,7 +306,8 @@ commonsio-commonsio = { module = "commons-io:commons-io", version.ref = "commons
cybozulabs-langdetect = { module = "com.cybozu.labs:langdetect", version.ref = "cybozulabs-langdetect" }
dropwizard-metrics-core = { module = "io.dropwizard.metrics:metrics-core", version.ref = "dropwizard-metrics" }
dropwizard-metrics-graphite = { module = "io.dropwizard.metrics:metrics-graphite", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jetty10 = { module = "io.dropwizard.metrics:metrics-jetty10", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jetty12 = { module = "io.dropwizard.metrics:metrics-jetty12", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jetty12-ee10 = { module = "io.dropwizard.metrics:metrics-jetty12-ee10", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jmx = { module = "io.dropwizard.metrics:metrics-jmx", version.ref = "dropwizard-metrics" }
dropwizard-metrics-jvm = { module = "io.dropwizard.metrics:metrics-jvm", version.ref = "dropwizard-metrics" }
dropwizard-metrics-servlets = { module = "io.dropwizard.metrics:metrics-servlets", version.ref = "dropwizard-metrics" }
Expand All @@ -315,23 +317,29 @@ eclipse-jetty-alpnjavaserver = { module = "org.eclipse.jetty:jetty-alpn-java-ser
eclipse-jetty-alpnserver = { module = "org.eclipse.jetty:jetty-alpn-server", version.ref = "eclipse-jetty" }
eclipse-jetty-client = { module = "org.eclipse.jetty:jetty-client", version.ref = "eclipse-jetty" }
eclipse-jetty-deploy = { module = "org.eclipse.jetty:jetty-deploy", version.ref = "eclipse-jetty" }
eclipse-jetty-ee = { module = "org.eclipse.jetty:jetty-ee", version.ref = "eclipse-jetty" }
eclipse-jetty-ee10-webapp = { module = "org.eclipse.jetty.ee10:jetty-ee10-webapp", version.ref = "eclipse-jetty" }
eclipse-jetty-ee8-nested = { module = "org.eclipse.jetty.ee8:jetty-ee8-nested", version.ref = "eclipse-jetty" }
eclipse-jetty-ee8-servlet = { module = "org.eclipse.jetty.ee8:jetty-ee8-servlet", version.ref = "eclipse-jetty" }
eclipse-jetty-ee8-servlets = { module = "org.eclipse.jetty.ee8:jetty-ee8-servlets", version.ref = "eclipse-jetty" }
eclipse-jetty-ee8-webapp = { module = "org.eclipse.jetty.ee8:jetty-ee8-webapp", version.ref = "eclipse-jetty" }
eclipse-jetty-http = { module = "org.eclipse.jetty:jetty-http", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-client = { module = "org.eclipse.jetty.http2:http2-client", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-common = { module = "org.eclipse.jetty.http2:http2-common", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-hpack = { module = "org.eclipse.jetty.http2:http2-hpack", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-httpclienttransport = { module = "org.eclipse.jetty.http2:http2-http-client-transport", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-server = { module = "org.eclipse.jetty.http2:http2-server", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-client = { module = "org.eclipse.jetty.http2:jetty-http2-client", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-common = { module = "org.eclipse.jetty.http2:jetty-http2-common", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-hpack = { module = "org.eclipse.jetty.http2:jetty-http2-hpack", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-httpclienttransport = { module = "org.eclipse.jetty.http2:jetty-http2-client-transport", version.ref = "eclipse-jetty" }
eclipse-jetty-http2-server = { module = "org.eclipse.jetty.http2:jetty-http2-server", version.ref = "eclipse-jetty" }
eclipse-jetty-io = { module = "org.eclipse.jetty:jetty-io", version.ref = "eclipse-jetty" }
eclipse-jetty-jmx = { module = "org.eclipse.jetty:jetty-jmx", version.ref = "eclipse-jetty" }
eclipse-jetty-jndi = { module = "org.eclipse.jetty:jetty-jndi", version.ref = "eclipse-jetty" }
eclipse-jetty-plus = { module = "org.eclipse.jetty:jetty-plus", version.ref = "eclipse-jetty" }
eclipse-jetty-rewrite = { module = "org.eclipse.jetty:jetty-rewrite", version.ref = "eclipse-jetty" }
eclipse-jetty-security = { module = "org.eclipse.jetty:jetty-security", version.ref = "eclipse-jetty" }
eclipse-jetty-server = { module = "org.eclipse.jetty:jetty-server", version.ref = "eclipse-jetty" }
eclipse-jetty-servlet = { module = "org.eclipse.jetty:jetty-servlet", version.ref = "eclipse-jetty" }
eclipse-jetty-servlets = { module = "org.eclipse.jetty:jetty-servlets", version.ref = "eclipse-jetty" }
eclipse-jetty-session = { module = "org.eclipse.jetty:jetty-session", version.ref = "eclipse-jetty" }
eclipse-jetty-start = { module = "org.eclipse.jetty:jetty-start", version.ref = "eclipse-jetty" }
eclipse-jetty-toolchain-servletapi = { module = "org.eclipse.jetty.toolchain:jetty-servlet-api", version.ref = "eclipse-jettytoolchain" }
eclipse-jetty-util = { module = "org.eclipse.jetty:jetty-util", version.ref = "eclipse-jetty" }
eclipse-jetty-webapp = { module = "org.eclipse.jetty:jetty-webapp", version.ref = "eclipse-jetty" }
eclipse-jetty-xml = { module = "org.eclipse.jetty:jetty-xml", version.ref = "eclipse-jetty" }
eclipse-jgit-jgit = { module = "org.eclipse.jgit:org.eclipse.jgit", version.ref = "eclipse-jgit" }
fasterxml-jackson-bom = { module = "com.fasterxml.jackson:jackson-bom", version.ref = "fasterxml" }
Expand Down
8 changes: 8 additions & 0 deletions gradle/testing/randomization/policies/solr-tests.policy
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ grant {

// needed by s3mock
permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.fs";
permission java.lang.RuntimePermission "accessSystemModules";

// needed for kafka mockito
permission java.lang.RuntimePermission "manageProcess";
Expand Down Expand Up @@ -252,8 +253,15 @@ grant {
permission java.io.FilePermission "${aws.configFile}", "read,readlink";
permission java.io.FilePermission "${user.home}${/}.aws${/}-", "read,readlink";

// GCS
permission java.io.FilePermission "${user.home}${/}.config${/}gcloud${/}properties", "read,readlink";
permission java.io.FilePermission "${user.home}${/}.config${/}gcloud${/}active_config", "read,readlink";
permission java.io.FilePermission "${user.home}${/}.config${/}gcloud${/}configurations${/}config_default", "read,readlink";


// expanded to a wildcard if set, allows all networking everywhere
permission java.net.SocketPermission "${solr.internal.network.permission}", "accept,listen,connect,resolve";
permission java.net.SocketPermission "metadata.google.internal:80", "connect,resolve";

// Run java
permission java.io.FilePermission "${java.home}${/}-", "execute";
Expand Down
3 changes: 2 additions & 1 deletion solr/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ dependencies {
testImplementation libs.apache.lucene.testframework

testImplementation libs.eclipse.jetty.server
testImplementation libs.eclipse.jetty.servlet
testImplementation libs.eclipse.jetty.ee8.servlet
testImplementation libs.eclipse.jetty.util

testImplementation libs.carrotsearch.randomizedtesting.runner
testImplementation libs.junit.junit
Expand Down
7 changes: 6 additions & 1 deletion solr/core/src/java/org/apache/solr/api/V2HttpCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,12 @@ protected void executeCoreRequest(SolrQueryResponse rsp) {
// SolrCore counter
core.close();
core = null;
response.getHeaderNames().stream().forEach(name -> response.setHeader(name, null));
// Skip specific headers
// workaround for response.setHeader(name, null)
response.getHeaderNames().stream()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good for now IMO.

Longer term I'd love to see this code go away in favor of having the v2 API stuff get handled by its own servlet, but we're pretty far from that being workable for now. It is a little hacky in the interim though 😦

.filter(name -> !name.equalsIgnoreCase("Content-Length"))
.forEach(name -> response.setHeader(name, ""));
response.setContentLength(-1);
invokeJerseyRequest(
cores, null, cores.getJerseyApplicationHandler(), cores.getRequestHandlers(), rsp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,14 @@ public class ShowFileRequestHandler extends RequestHandlerBase implements Permis
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

static {
KNOWN_MIME_TYPES = new HashSet<>(MimeTypes.getKnownMimeTypes());
KNOWN_MIME_TYPES = new HashSet<>();
for (MimeTypes.Type type : MimeTypes.Type.values()) {
KNOWN_MIME_TYPES.add(type.toString());
}
KNOWN_MIME_TYPES.add("text/xml");
KNOWN_MIME_TYPES.add("text/javascript");
KNOWN_MIME_TYPES.add("text/csv");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did csv/xhtml get added?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting from Jetty 11 these two mime types are not included in MimeTypes.Type, but we have tests that check if they are supported. Not sure if this could cause any issues with jetty though.

KNOWN_MIME_TYPES.add("application/xhtml+xml");
}

public ShowFileRequestHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.apache.http.protocol.HttpContext;
import org.apache.solr.core.SolrInfoBean;
import org.apache.solr.metrics.SolrMetricsContext;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.Request;

/**
* @lucene.experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import org.apache.solr.common.SpecProvider;
import org.apache.solr.common.util.CommandOperation;
import org.apache.solr.common.util.ValidatingJsonMap;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.Request;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -247,7 +247,8 @@ protected boolean interceptInternodeRequest(Request request) {
.encodeToString(
(principal.getName() + ":" + principal.getPassword())
.getBytes(StandardCharsets.UTF_8));
request.header(HttpHeaders.AUTHORIZATION, "Basic " + userPassBase64);
request.headers(
httpFields -> httpFields.add(HttpHeaders.AUTHORIZATION, "Basic " + userPassBase64));
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.apache.solr.core.CoreContainer;
import org.apache.solr.handler.admin.api.ModifyMultiPluginAuthConfigAPI;
import org.apache.solr.metrics.SolrMetricsContext;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.Request;

/**
* Authentication plugin that supports multiple Authorization schemes, such as Bearer and Basic. The
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import org.apache.solr.core.CoreContainer;
import org.apache.solr.request.SolrRequestInfo;
import org.apache.solr.util.CryptoKeys;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.Request;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -414,11 +414,12 @@ public void onBegin(Request request) {
if ("v1".equals(System.getProperty(SEND_VERSION))) {
preFetchedUser
.map(PKIAuthenticationPlugin.this::generateToken)
.ifPresent(token -> request.header(HEADER, token));
.ifPresent(token -> request.headers(httpFields -> httpFields.add(HEADER, token)));
} else {
preFetchedUser
.map(PKIAuthenticationPlugin.this::generateTokenV2)
.ifPresent(token -> request.header(HEADER_V2, token));
.ifPresent(
token -> request.headers(httpFields -> httpFields.add(HEADER_V2, token)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public String toString() {
// care when assembling the final response to check both the rollup and leader trackers on the
// aggregator node.
public void trackRequestResult(
org.eclipse.jetty.client.api.Response resp, InputStream respBody, boolean success) {
org.eclipse.jetty.client.Response resp, InputStream respBody, boolean success) {

// Returning Integer.MAX_VALUE here means there was no "rf" on the response, therefore we just
// need to increment our achieved rf if we are a leader, i.e. have a leaderTracker.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.apache.solr.common.SolrException;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.update.SolrCmdDistributor.SolrError;
import org.eclipse.jetty.client.api.Response;
import org.eclipse.jetty.client.Response;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.apache.solr.metrics.SolrMetricProducer;
import org.apache.solr.metrics.SolrMetricsContext;
import org.apache.solr.util.tracing.TraceUtils;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Result;
import org.eclipse.jetty.client.Request;
import org.eclipse.jetty.client.Result;

/**
* A HttpListenerFactory tracking metrics and distributed tracing. The Metrics are inspired and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import javax.servlet.http.HttpServletRequest;
import org.apache.http.HttpRequest;
import org.apache.solr.request.SolrQueryRequest;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.Request;

/** Utilities for distributed tracing. */
public class TraceUtils {
Expand Down
12 changes: 6 additions & 6 deletions solr/core/src/test/org/apache/solr/cli/PackageToolTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.server.handler.HandlerList;
import org.eclipse.jetty.server.handler.ResourceHandler;
import org.eclipse.jetty.util.resource.PathResourceFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
Expand Down Expand Up @@ -402,13 +402,13 @@ public void start() throws Exception {
server.setStopAtShutdown(true);

ResourceHandler resourceHandler = new ResourceHandler();
resourceHandler.setResourceBase(resourceDir);
resourceHandler.setDirectoriesListed(true);
resourceHandler.setBaseResource(new PathResourceFactory().newResource(resourceDir));

HandlerList handlers = new HandlerList();
handlers.setHandlers(new Handler[] {resourceHandler, new DefaultHandler()});
server.setHandler(handlers);
Handler.Sequence sequence = new Handler.Sequence();
sequence.addHandler(resourceHandler);
sequence.addHandler(new DefaultHandler());

server.setHandler(sequence);
server.start();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import org.apache.solr.util.RestTestBase;
import org.apache.solr.util.RestTestHarness;
import org.apache.solr.util.TimeOut;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.After;
import org.junit.Before;
import org.noggit.JSONParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.util.RestTestBase;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.After;
import org.junit.Test;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.SortedMap;
import java.util.TreeMap;
import org.apache.solr.util.RestTestBase;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.BeforeClass;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.SortedMap;
import java.util.TreeMap;
import org.apache.solr.util.RestTestBase;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.BeforeClass;
import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.commons.io.FileUtils;
import org.apache.solr.common.util.Utils;
import org.apache.solr.util.RestTestBase;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import java.util.TreeMap;
import org.apache.commons.io.file.PathUtils;
import org.apache.solr.util.RestTestBase;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.file.PathUtils;
import org.apache.solr.util.RestTestBase;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.util.BaseTestHarness;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.ee8.servlet.ServletHolder;
import org.junit.After;
import org.junit.Test;
import org.slf4j.Logger;
Expand Down
Loading
Loading