From 1caa349a206f13e3a023af3bc53da75b8a5dae33 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 3 Apr 2019 12:34:20 +1100 Subject: [PATCH 01/13] updated bom versions Signed-off-by: Greg Wilkins --- jetty-bom/pom.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index 94d2e1cec4b..7deea067eb9 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -6,7 +6,7 @@ 4.0.0 jetty-bom - 9.3.25.v20180904 + 9.3.26-SNAPSHOT Jetty :: Bom Jetty BOM artifact http://www.eclipse.org/jetty @@ -103,17 +103,17 @@ org.eclipse.jetty cdi-core - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty cdi-servlet - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty cdi-websocket - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty @@ -138,12 +138,12 @@ org.eclipse.jetty jetty-gcloud-memcached-session-manager - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty jetty-gcloud-session-manager - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty @@ -228,17 +228,17 @@ org.eclipse.jetty jetty-osgi-boot - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty jetty-osgi-boot-jsp - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty jetty-osgi-boot-warurl - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty @@ -303,37 +303,37 @@ org.eclipse.jetty javax-websocket-client-impl - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty javax-websocket-server-impl - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty javax-websocket-api - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty javax-websocket-client - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty javax-websocket-common - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty javax-websocket-server - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty javax-websocket-servlet - 9.3.25-SNAPSHOT + 9.3.26-SNAPSHOT org.eclipse.jetty From 61b1a217deb8e435c5fb9ddc79e8039e96cee039 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 3 Apr 2019 12:34:46 +1100 Subject: [PATCH 02/13] updated release script versions Signed-off-by: Greg Wilkins --- scripts/release-jetty.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release-jetty.sh b/scripts/release-jetty.sh index a9f7f5ea6b9..697497991b2 100755 --- a/scripts/release-jetty.sh +++ b/scripts/release-jetty.sh @@ -141,7 +141,7 @@ if proceedyn "Are you sure you want to release using above? (y/N)" n; then # This is equivalent to 'mvn release:prepare' if proceedyn "Update project.versions for $VER_RELEASE? (Y/n)" y; then - mvn org.codehaus.mojo:versions-maven-plugin:2.5:set \ + mvn org.codehaus.mojo:versions-maven-plugin:2.7:set \ -DoldVersion="$VER_CURRENT" \ -DnewVersion="$VER_RELEASE" \ -DprocessAllModules=true From 7ec6d2fb32c89dd94037e982aca26971b1eface8 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 3 Apr 2019 13:06:51 +1100 Subject: [PATCH 03/13] Updating to version 9.3.26.v20190403 --- VERSION.txt | 7 +- aggregates/jetty-all-compact3/pom.xml | 2 +- aggregates/jetty-all/pom.xml | 2 +- apache-jsp/pom.xml | 2 +- apache-jstl/pom.xml | 2 +- examples/async-rest/async-rest-jar/pom.xml | 2 +- examples/async-rest/async-rest-webapp/pom.xml | 2 +- examples/async-rest/pom.xml | 2 +- examples/embedded/pom.xml | 2 +- examples/pom.xml | 2 +- jetty-alpn/jetty-alpn-client/pom.xml | 2 +- jetty-alpn/jetty-alpn-java-client/pom.xml | 2 +- jetty-alpn/jetty-alpn-java-server/pom.xml | 2 +- jetty-alpn/jetty-alpn-server/pom.xml | 2 +- jetty-alpn/pom.xml | 2 +- jetty-annotations/pom.xml | 2 +- jetty-ant/pom.xml | 2 +- jetty-bom/pom.xml | 74 +++++++++---------- jetty-cdi/cdi-core/pom.xml | 2 +- jetty-cdi/cdi-full-servlet/pom.xml | 2 +- jetty-cdi/cdi-servlet/pom.xml | 2 +- jetty-cdi/cdi-websocket/pom.xml | 2 +- jetty-cdi/pom.xml | 2 +- jetty-cdi/test-cdi-webapp/pom.xml | 2 +- jetty-client/pom.xml | 2 +- jetty-continuation/pom.xml | 2 +- jetty-deploy/pom.xml | 2 +- jetty-distribution/pom.xml | 2 +- jetty-documentation/pom.xml | 2 +- jetty-fcgi/fcgi-client/pom.xml | 2 +- jetty-fcgi/fcgi-server/pom.xml | 2 +- jetty-fcgi/pom.xml | 2 +- .../pom.xml | 2 +- .../jetty-gcloud-session-manager/pom.xml | 2 +- jetty-gcloud/pom.xml | 2 +- jetty-hazelcast/pom.xml | 2 +- jetty-http-spi/pom.xml | 2 +- jetty-http/pom.xml | 2 +- jetty-http2/http2-alpn-tests/pom.xml | 2 +- jetty-http2/http2-client/pom.xml | 2 +- jetty-http2/http2-common/pom.xml | 2 +- jetty-http2/http2-hpack/pom.xml | 2 +- .../http2-http-client-transport/pom.xml | 2 +- jetty-http2/http2-server/pom.xml | 2 +- jetty-http2/pom.xml | 2 +- jetty-infinispan/pom.xml | 2 +- jetty-io/pom.xml | 2 +- jetty-jaas/pom.xml | 2 +- jetty-jaspi/pom.xml | 2 +- jetty-jmx/pom.xml | 2 +- jetty-jndi/pom.xml | 2 +- jetty-jspc-maven-plugin/pom.xml | 2 +- jetty-maven-plugin/pom.xml | 2 +- jetty-monitor/pom.xml | 2 +- jetty-nosql/pom.xml | 2 +- jetty-osgi/jetty-osgi-alpn/pom.xml | 2 +- jetty-osgi/jetty-osgi-boot-jsp/pom.xml | 2 +- jetty-osgi/jetty-osgi-boot-warurl/pom.xml | 2 +- jetty-osgi/jetty-osgi-boot/pom.xml | 2 +- jetty-osgi/jetty-osgi-httpservice/pom.xml | 2 +- jetty-osgi/pom.xml | 2 +- jetty-osgi/test-jetty-osgi-context/pom.xml | 2 +- jetty-osgi/test-jetty-osgi-fragment/pom.xml | 2 +- jetty-osgi/test-jetty-osgi-webapp/pom.xml | 2 +- jetty-osgi/test-jetty-osgi/pom.xml | 2 +- jetty-plus/pom.xml | 2 +- jetty-proxy/pom.xml | 2 +- jetty-quickstart/pom.xml | 2 +- jetty-rewrite/pom.xml | 2 +- jetty-runner/pom.xml | 2 +- jetty-security/pom.xml | 2 +- jetty-server/pom.xml | 2 +- jetty-servlet/pom.xml | 2 +- jetty-servlets/pom.xml | 2 +- jetty-spring/pom.xml | 2 +- jetty-start/pom.xml | 2 +- jetty-util-ajax/pom.xml | 2 +- jetty-util/pom.xml | 2 +- jetty-webapp/pom.xml | 2 +- .../javax-websocket-client-impl/pom.xml | 2 +- .../javax-websocket-server-impl/pom.xml | 2 +- jetty-websocket/pom.xml | 2 +- jetty-websocket/websocket-api/pom.xml | 2 +- jetty-websocket/websocket-client/pom.xml | 2 +- jetty-websocket/websocket-common/pom.xml | 2 +- jetty-websocket/websocket-server/pom.xml | 2 +- jetty-websocket/websocket-servlet/pom.xml | 2 +- jetty-xml/pom.xml | 2 +- pom.xml | 2 +- tests/pom.xml | 2 +- tests/test-continuation/pom.xml | 2 +- tests/test-http-client-transport/pom.xml | 2 +- tests/test-integration/pom.xml | 2 +- tests/test-jmx/jmx-webapp-it/pom.xml | 2 +- tests/test-jmx/jmx-webapp/pom.xml | 2 +- tests/test-jmx/pom.xml | 2 +- tests/test-loginservice/pom.xml | 2 +- tests/test-quickstart/pom.xml | 2 +- tests/test-sessions/pom.xml | 2 +- .../test-gcloud-memcached-sessions/pom.xml | 2 +- .../test-gcloud-sessions/pom.xml | 2 +- .../test-sessions/test-hash-sessions/pom.xml | 2 +- .../test-infinispan-sessions/pom.xml | 2 +- .../test-sessions/test-jdbc-sessions/pom.xml | 2 +- .../test-mongodb-sessions/pom.xml | 2 +- .../test-sessions-common/pom.xml | 2 +- tests/test-webapps/pom.xml | 2 +- tests/test-webapps/test-jaas-webapp/pom.xml | 2 +- tests/test-webapps/test-jetty-webapp/pom.xml | 2 +- tests/test-webapps/test-jndi-webapp/pom.xml | 2 +- .../test-webapps/test-mock-resources/pom.xml | 2 +- tests/test-webapps/test-proxy-webapp/pom.xml | 2 +- tests/test-webapps/test-servlet-spec/pom.xml | 2 +- .../test-container-initializer/pom.xml | 2 +- .../test-spec-webapp/pom.xml | 2 +- .../test-web-fragment/pom.xml | 2 +- .../test-webapps/test-webapp-rfc2616/pom.xml | 2 +- 117 files changed, 158 insertions(+), 153 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 4187fa28817..ea67ac43e55 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,4 +1,9 @@ -jetty-9.3.26-SNAPSHOT +jetty-9.3.26.v20190403 - 03 April 2019 + + 3487 Test WebAppClassLoader does not definePackage + + 3461 gzip request customizer + + 3302 Supporting host:ip in X-Forwarded-For + + Updated ALPN to JDK 8u202. + + 2954 Report badmessage cause jetty-9.3.25.v20180904 - 04 September 2018 + 2135 Android 8.1 needs direct buffers for SSL/TLS to work diff --git a/aggregates/jetty-all-compact3/pom.xml b/aggregates/jetty-all-compact3/pom.xml index 0df0fdec62b..d49ac19e77c 100644 --- a/aggregates/jetty-all-compact3/pom.xml +++ b/aggregates/jetty-all-compact3/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../../pom.xml 4.0.0 diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml index d74b2d63e07..1c0f8c63e21 100644 --- a/aggregates/jetty-all/pom.xml +++ b/aggregates/jetty-all/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../../pom.xml 4.0.0 diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index a17a6d0cd9a..f8b383f190d 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 apache-jsp diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml index 44a5d2fc3f9..a533edbf4fb 100644 --- a/apache-jstl/pom.xml +++ b/apache-jstl/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 apache-jstl diff --git a/examples/async-rest/async-rest-jar/pom.xml b/examples/async-rest/async-rest-jar/pom.xml index ebe83497878..2474ee20b0c 100644 --- a/examples/async-rest/async-rest-jar/pom.xml +++ b/examples/async-rest/async-rest-jar/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty example-async-rest - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 org.eclipse.jetty.example-async-rest diff --git a/examples/async-rest/async-rest-webapp/pom.xml b/examples/async-rest/async-rest-webapp/pom.xml index 76fc8951017..6cc9ecbc39e 100644 --- a/examples/async-rest/async-rest-webapp/pom.xml +++ b/examples/async-rest/async-rest-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty example-async-rest - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 org.eclipse.jetty.example-async-rest diff --git a/examples/async-rest/pom.xml b/examples/async-rest/pom.xml index edcb2dd8830..12a3da57f6f 100644 --- a/examples/async-rest/pom.xml +++ b/examples/async-rest/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.examples examples-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index a50d78bcbe6..aa77c6f06fe 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.examples examples-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/examples/pom.xml b/examples/pom.xml index de046ebe5bb..0e054c1f0e5 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml org.eclipse.jetty.examples diff --git a/jetty-alpn/jetty-alpn-client/pom.xml b/jetty-alpn/jetty-alpn-client/pom.xml index d39ff25320e..edfd9961600 100644 --- a/jetty-alpn/jetty-alpn-client/pom.xml +++ b/jetty-alpn/jetty-alpn-client/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-alpn-client diff --git a/jetty-alpn/jetty-alpn-java-client/pom.xml b/jetty-alpn/jetty-alpn-java-client/pom.xml index 7d19310b9b5..cbae050494f 100644 --- a/jetty-alpn/jetty-alpn-java-client/pom.xml +++ b/jetty-alpn/jetty-alpn-java-client/pom.xml @@ -6,7 +6,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-alpn/jetty-alpn-java-server/pom.xml b/jetty-alpn/jetty-alpn-java-server/pom.xml index 13315a2844b..ba71797935e 100644 --- a/jetty-alpn/jetty-alpn-java-server/pom.xml +++ b/jetty-alpn/jetty-alpn-java-server/pom.xml @@ -5,7 +5,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-alpn/jetty-alpn-server/pom.xml b/jetty-alpn/jetty-alpn-server/pom.xml index 8cef8ed4447..0bcae5db4c1 100644 --- a/jetty-alpn/jetty-alpn-server/pom.xml +++ b/jetty-alpn/jetty-alpn-server/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-alpn-server diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index ef4517934ca..2d280537320 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-alpn-parent diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index 18022ee86b6..e17a72c9eab 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-annotations diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml index 9a39485be37..8b550690679 100644 --- a/jetty-ant/pom.xml +++ b/jetty-ant/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-ant diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index 7deea067eb9..a907be62083 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -6,7 +6,7 @@ 4.0.0 jetty-bom - 9.3.26-SNAPSHOT + 9.3.26.v20190403 Jetty :: Bom Jetty BOM artifact http://www.eclipse.org/jetty @@ -98,7 +98,7 @@ org.eclipse.jetty jetty-annotations - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty @@ -118,22 +118,22 @@ org.eclipse.jetty jetty-client - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-continuation - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty.fcgi fcgi-server - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty.fcgi fcgi-server - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty @@ -148,82 +148,82 @@ org.eclipse.jetty jetty-hazelcast - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-http - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty.http2 http2-client - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty.http2 http2-common - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty.http2 http2-hpack - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty.http2 http2-http-client-transport - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty.http2 http2-server - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-http-spi - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-infinispan - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-io - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-jaas - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-jaspi - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-jmx - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-jndi - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-monitor - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-nosql - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty @@ -243,62 +243,62 @@ org.eclipse.jetty jetty-plus - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-proxy - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-quickstart - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-rewrite - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-security - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-server - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-servlet - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-servlets - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-spring - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-util - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-util-ajax - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-webapp - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty @@ -338,18 +338,18 @@ org.eclipse.jetty jetty-xml - 9.3.26-SNAPSHOT + 9.3.26.v20190403 org.eclipse.jetty jetty-distribution - 9.3.26-SNAPSHOT + 9.3.26.v20190403 zip org.eclipse.jetty jetty-distribution - 9.3.26-SNAPSHOT + 9.3.26.v20190403 tar.gz diff --git a/jetty-cdi/cdi-core/pom.xml b/jetty-cdi/cdi-core/pom.xml index baa9ef6577a..71fa6a6277c 100644 --- a/jetty-cdi/cdi-core/pom.xml +++ b/jetty-cdi/cdi-core/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 cdi-core diff --git a/jetty-cdi/cdi-full-servlet/pom.xml b/jetty-cdi/cdi-full-servlet/pom.xml index 8b8e0d0e4b1..85eb2163265 100644 --- a/jetty-cdi/cdi-full-servlet/pom.xml +++ b/jetty-cdi/cdi-full-servlet/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 cdi-full-servlet diff --git a/jetty-cdi/cdi-servlet/pom.xml b/jetty-cdi/cdi-servlet/pom.xml index 3e0fb793347..10696134004 100644 --- a/jetty-cdi/cdi-servlet/pom.xml +++ b/jetty-cdi/cdi-servlet/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 cdi-servlet diff --git a/jetty-cdi/cdi-websocket/pom.xml b/jetty-cdi/cdi-websocket/pom.xml index 271d181b7aa..8e8cdd3eb0d 100644 --- a/jetty-cdi/cdi-websocket/pom.xml +++ b/jetty-cdi/cdi-websocket/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 cdi-websocket diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index a62f9c15580..4224355a292 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 org.eclipse.jetty.cdi diff --git a/jetty-cdi/test-cdi-webapp/pom.xml b/jetty-cdi/test-cdi-webapp/pom.xml index 9e0c58fad51..473220a3043 100644 --- a/jetty-cdi/test-cdi-webapp/pom.xml +++ b/jetty-cdi/test-cdi-webapp/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 test-cdi-webapp diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index f770458a0cc..a397e39d45e 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml index 3f73d4d2d87..83a5e353182 100644 --- a/jetty-continuation/pom.xml +++ b/jetty-continuation/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-continuation diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index 07ebe56d85d..056d6f44752 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-deploy diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 9ac219878ab..352c0784644 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-distribution diff --git a/jetty-documentation/pom.xml b/jetty-documentation/pom.xml index e99090460c1..f5ab74d8ff4 100644 --- a/jetty-documentation/pom.xml +++ b/jetty-documentation/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 jetty-documentation Jetty :: Documentation diff --git a/jetty-fcgi/fcgi-client/pom.xml b/jetty-fcgi/fcgi-client/pom.xml index 89db76a3be2..bbbca428645 100644 --- a/jetty-fcgi/fcgi-client/pom.xml +++ b/jetty-fcgi/fcgi-client/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.fcgi fcgi-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index 99400921541..a1126e74d6c 100644 --- a/jetty-fcgi/fcgi-server/pom.xml +++ b/jetty-fcgi/fcgi-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.fcgi fcgi-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-fcgi/pom.xml b/jetty-fcgi/pom.xml index 008a7b87e23..79f96141d83 100644 --- a/jetty-fcgi/pom.xml +++ b/jetty-fcgi/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml b/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml index 72c4c84c32e..42924d02166 100644 --- a/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml +++ b/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.gcloud gcloud-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml index f93f0e2706e..f87cbfa7f34 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml +++ b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.gcloud gcloud-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-gcloud/pom.xml b/jetty-gcloud/pom.xml index 4f06a0b3c2f..5e54e3f7cf0 100644 --- a/jetty-gcloud/pom.xml +++ b/jetty-gcloud/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-hazelcast/pom.xml b/jetty-hazelcast/pom.xml index 5eac93d3727..f5f11225fee 100644 --- a/jetty-hazelcast/pom.xml +++ b/jetty-hazelcast/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-hazelcast diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index bb67e023e7a..f0fa86d0069 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-http-spi diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index aec01c96acf..538886ec529 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-http diff --git a/jetty-http2/http2-alpn-tests/pom.xml b/jetty-http2/http2-alpn-tests/pom.xml index df0de9987c9..2fddae32661 100644 --- a/jetty-http2/http2-alpn-tests/pom.xml +++ b/jetty-http2/http2-alpn-tests/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-http2/http2-client/pom.xml b/jetty-http2/http2-client/pom.xml index 48523fa1c19..85d973564f9 100644 --- a/jetty-http2/http2-client/pom.xml +++ b/jetty-http2/http2-client/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-http2/http2-common/pom.xml b/jetty-http2/http2-common/pom.xml index b504eaec5ff..824ab8f9d97 100644 --- a/jetty-http2/http2-common/pom.xml +++ b/jetty-http2/http2-common/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-http2/http2-hpack/pom.xml b/jetty-http2/http2-hpack/pom.xml index ccc404d802a..9e3b62acb0b 100644 --- a/jetty-http2/http2-hpack/pom.xml +++ b/jetty-http2/http2-hpack/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-http2/http2-http-client-transport/pom.xml b/jetty-http2/http2-http-client-transport/pom.xml index 699a5b5e700..5335defcd4b 100644 --- a/jetty-http2/http2-http-client-transport/pom.xml +++ b/jetty-http2/http2-http-client-transport/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-http2/http2-server/pom.xml b/jetty-http2/http2-server/pom.xml index 60641373251..30abe5f4903 100644 --- a/jetty-http2/http2-server/pom.xml +++ b/jetty-http2/http2-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-http2/pom.xml b/jetty-http2/pom.xml index 5dd75aa50b3..6dc56079f83 100644 --- a/jetty-http2/pom.xml +++ b/jetty-http2/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-infinispan/pom.xml b/jetty-infinispan/pom.xml index 8bf01928bc6..8124a531103 100644 --- a/jetty-infinispan/pom.xml +++ b/jetty-infinispan/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-infinispan diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml index 6144f51fbcf..efc6c06577b 100644 --- a/jetty-io/pom.xml +++ b/jetty-io/pom.xml @@ -2,7 +2,7 @@ jetty-project org.eclipse.jetty - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-io diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index 767592ca63c..ce51ed0ac42 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-jaas diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml index d5dd7da3086..07ae7f4d694 100644 --- a/jetty-jaspi/pom.xml +++ b/jetty-jaspi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-jaspi diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index 14110402cf2..e39d7ade2de 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-jmx diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index 8516b15f68f..b7c3072ca26 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-jndi diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml index 5c293cd3eed..529c769c84b 100644 --- a/jetty-jspc-maven-plugin/pom.xml +++ b/jetty-jspc-maven-plugin/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-jspc-maven-plugin diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index c4763ee8a73..75ee56efe6b 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-maven-plugin diff --git a/jetty-monitor/pom.xml b/jetty-monitor/pom.xml index f38fb9932a3..53dda3b180d 100644 --- a/jetty-monitor/pom.xml +++ b/jetty-monitor/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-monitor diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml index 7d91403fc60..7e822e7319f 100644 --- a/jetty-nosql/pom.xml +++ b/jetty-nosql/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-nosql diff --git a/jetty-osgi/jetty-osgi-alpn/pom.xml b/jetty-osgi/jetty-osgi-alpn/pom.xml index da3b2d72ac3..bf63f6fe3c1 100644 --- a/jetty-osgi/jetty-osgi-alpn/pom.xml +++ b/jetty-osgi/jetty-osgi-alpn/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-osgi-alpn diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml index 0ab52984bc9..5c0f67ee286 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-osgi-boot-jsp diff --git a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml index 002ddf9df44..027b9615a0b 100644 --- a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index ef53810a31f..f94eb9d7526 100644 --- a/jetty-osgi/jetty-osgi-boot/pom.xml +++ b/jetty-osgi/jetty-osgi-boot/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-osgi-boot diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml index 4372e4f3c78..55118a74df8 100644 --- a/jetty-osgi/jetty-osgi-httpservice/pom.xml +++ b/jetty-osgi/jetty-osgi-httpservice/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-httpservice diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 03f2da51ac1..d13121a9905 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml index 1640f817a28..2f39bca9c36 100644 --- a/jetty-osgi/test-jetty-osgi-context/pom.xml +++ b/jetty-osgi/test-jetty-osgi-context/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 test-jetty-osgi-context diff --git a/jetty-osgi/test-jetty-osgi-fragment/pom.xml b/jetty-osgi/test-jetty-osgi-fragment/pom.xml index 1723824168f..5750951106f 100644 --- a/jetty-osgi/test-jetty-osgi-fragment/pom.xml +++ b/jetty-osgi/test-jetty-osgi-fragment/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml index 9ade1022c5e..b6fa8190b36 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml +++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 7ba73519d1e..8eafe3f1062 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index 843578387f2..b5063dd108a 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-plus diff --git a/jetty-proxy/pom.xml b/jetty-proxy/pom.xml index 890a8ba7883..dc7848f0d86 100644 --- a/jetty-proxy/pom.xml +++ b/jetty-proxy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-proxy diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index 83239bd5729..59929de5dc1 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 org.eclipse.jetty diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml index 6ff620dfbfe..919d013047d 100644 --- a/jetty-rewrite/pom.xml +++ b/jetty-rewrite/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-rewrite diff --git a/jetty-runner/pom.xml b/jetty-runner/pom.xml index 09c9bdd9d34..d49f5b2bba5 100644 --- a/jetty-runner/pom.xml +++ b/jetty-runner/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-runner diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index eb847de5578..958b32e36b4 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-security diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml index 01fbb9648b3..69cabcdd8e4 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-server diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index 3d74eefec31..e52e6ede6be 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-servlet diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index 2d9c6c7ca25..62a2b549545 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-servlets diff --git a/jetty-spring/pom.xml b/jetty-spring/pom.xml index e1ad8241f05..6871a291c18 100644 --- a/jetty-spring/pom.xml +++ b/jetty-spring/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-spring diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml index 93a923ae689..ad8c5223e4a 100644 --- a/jetty-start/pom.xml +++ b/jetty-start/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-start diff --git a/jetty-util-ajax/pom.xml b/jetty-util-ajax/pom.xml index 2fa2f5701d4..2db83000884 100644 --- a/jetty-util-ajax/pom.xml +++ b/jetty-util-ajax/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-util-ajax diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 1597b0759dd..0b46d983460 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-util diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index 95a93593abf..3050838902d 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-webapp diff --git a/jetty-websocket/javax-websocket-client-impl/pom.xml b/jetty-websocket/javax-websocket-client-impl/pom.xml index 7d993104b17..c0550138c2e 100644 --- a/jetty-websocket/javax-websocket-client-impl/pom.xml +++ b/jetty-websocket/javax-websocket-client-impl/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-websocket/javax-websocket-server-impl/pom.xml b/jetty-websocket/javax-websocket-server-impl/pom.xml index ae29b521508..3be3be597ac 100644 --- a/jetty-websocket/javax-websocket-server-impl/pom.xml +++ b/jetty-websocket/javax-websocket-server-impl/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index 965eb238f09..9956e4bb2da 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-websocket/websocket-api/pom.xml b/jetty-websocket/websocket-api/pom.xml index 56d4e5a0e57..add02af9d0a 100644 --- a/jetty-websocket/websocket-api/pom.xml +++ b/jetty-websocket/websocket-api/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index cbce40bc370..a85a8e98054 100644 --- a/jetty-websocket/websocket-client/pom.xml +++ b/jetty-websocket/websocket-client/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index 492fba103ed..7434fcdaf4c 100644 --- a/jetty-websocket/websocket-common/pom.xml +++ b/jetty-websocket/websocket-common/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index 540374852b2..d01b680cf8d 100644 --- a/jetty-websocket/websocket-server/pom.xml +++ b/jetty-websocket/websocket-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index b879bb67406..193ea425da9 100644 --- a/jetty-websocket/websocket-servlet/pom.xml +++ b/jetty-websocket/websocket-servlet/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml index fe34e0e299e..655d3188952 100644 --- a/jetty-xml/pom.xml +++ b/jetty-xml/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jetty-xml diff --git a/pom.xml b/pom.xml index 56f269deb2d..6be76865fed 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 Jetty :: Project http://www.eclipse.org/jetty pom diff --git a/tests/pom.xml b/tests/pom.xml index 40aa5ee39e3..6340c266dc1 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml org.eclipse.jetty.tests diff --git a/tests/test-continuation/pom.xml b/tests/test-continuation/pom.xml index e008e94edfb..6d8c71ed8a3 100644 --- a/tests/test-continuation/pom.xml +++ b/tests/test-continuation/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/tests/test-http-client-transport/pom.xml b/tests/test-http-client-transport/pom.xml index e0c777dd1c1..18e788bcbdb 100644 --- a/tests/test-http-client-transport/pom.xml +++ b/tests/test-http-client-transport/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index f55e340594f..44eab34eca4 100644 --- a/tests/test-integration/pom.xml +++ b/tests/test-integration/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 test-integration diff --git a/tests/test-jmx/jmx-webapp-it/pom.xml b/tests/test-jmx/jmx-webapp-it/pom.xml index c959131c2af..d4a4d2e88df 100644 --- a/tests/test-jmx/jmx-webapp-it/pom.xml +++ b/tests/test-jmx/jmx-webapp-it/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-jmx-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 jmx-webapp-it diff --git a/tests/test-jmx/jmx-webapp/pom.xml b/tests/test-jmx/jmx-webapp/pom.xml index 775b4ddb323..a35f2c246d1 100644 --- a/tests/test-jmx/jmx-webapp/pom.xml +++ b/tests/test-jmx/jmx-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-jmx-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 jmx-webapp war diff --git a/tests/test-jmx/pom.xml b/tests/test-jmx/pom.xml index 4421ac9148f..b6fcc5e7f79 100644 --- a/tests/test-jmx/pom.xml +++ b/tests/test-jmx/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 4.0.0 test-jmx-parent diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml index 2a184fab528..c2ccf6d6f24 100644 --- a/tests/test-loginservice/pom.xml +++ b/tests/test-loginservice/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-loginservice Jetty Tests :: Login Service diff --git a/tests/test-quickstart/pom.xml b/tests/test-quickstart/pom.xml index 409e88aa309..3c942f5d075 100644 --- a/tests/test-quickstart/pom.xml +++ b/tests/test-quickstart/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml index 6f16eff2a58..03d1005babc 100644 --- a/tests/test-sessions/pom.xml +++ b/tests/test-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-sessions-parent Jetty Tests :: Sessions :: Parent diff --git a/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml b/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml index e31bb7cc343..eae51cb58ae 100644 --- a/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml +++ b/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-gcloud-memcached-sessions Jetty Tests :: Sessions :: GCloud with Memcached diff --git a/tests/test-sessions/test-gcloud-sessions/pom.xml b/tests/test-sessions/test-gcloud-sessions/pom.xml index a9b261b85f7..c142c92c8fd 100644 --- a/tests/test-sessions/test-gcloud-sessions/pom.xml +++ b/tests/test-sessions/test-gcloud-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-gcloud-sessions Jetty Tests :: Sessions :: GCloud diff --git a/tests/test-sessions/test-hash-sessions/pom.xml b/tests/test-sessions/test-hash-sessions/pom.xml index 6a99e907486..69a628787fb 100644 --- a/tests/test-sessions/test-hash-sessions/pom.xml +++ b/tests/test-sessions/test-hash-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-hash-sessions Jetty Tests :: Sessions :: Hash diff --git a/tests/test-sessions/test-infinispan-sessions/pom.xml b/tests/test-sessions/test-infinispan-sessions/pom.xml index ac6db1b49e0..42442a5a071 100644 --- a/tests/test-sessions/test-infinispan-sessions/pom.xml +++ b/tests/test-sessions/test-infinispan-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-infinispan-sessions Jetty Tests :: Sessions :: Infinispan diff --git a/tests/test-sessions/test-jdbc-sessions/pom.xml b/tests/test-sessions/test-jdbc-sessions/pom.xml index 9c09f461cbc..d467788899c 100644 --- a/tests/test-sessions/test-jdbc-sessions/pom.xml +++ b/tests/test-sessions/test-jdbc-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-jdbc-sessions Jetty Tests :: Sessions :: JDBC diff --git a/tests/test-sessions/test-mongodb-sessions/pom.xml b/tests/test-sessions/test-mongodb-sessions/pom.xml index d99300f9f16..b71442b3e2d 100644 --- a/tests/test-sessions/test-mongodb-sessions/pom.xml +++ b/tests/test-sessions/test-mongodb-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-mongodb-sessions Jetty Tests :: Sessions :: Mongo diff --git a/tests/test-sessions/test-sessions-common/pom.xml b/tests/test-sessions/test-sessions-common/pom.xml index 4bdab9696b1..91406768f51 100644 --- a/tests/test-sessions/test-sessions-common/pom.xml +++ b/tests/test-sessions/test-sessions-common/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-sessions-common Jetty Tests :: Sessions :: Common diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index 2043cb730b8..010fa50b4e3 100644 --- a/tests/test-webapps/pom.xml +++ b/tests/test-webapps/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml test-webapps-parent diff --git a/tests/test-webapps/test-jaas-webapp/pom.xml b/tests/test-webapps/test-jaas-webapp/pom.xml index a6724ead9d5..36e0aec91ea 100644 --- a/tests/test-webapps/test-jaas-webapp/pom.xml +++ b/tests/test-webapps/test-jaas-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-jaas-webapp Jetty Tests :: WebApp :: JAAS diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml index 9ba2b6ddf35..cd991e41747 100644 --- a/tests/test-webapps/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/tests/test-webapps/test-jndi-webapp/pom.xml b/tests/test-webapps/test-jndi-webapp/pom.xml index 2f76a51d848..db6f470c863 100644 --- a/tests/test-webapps/test-jndi-webapp/pom.xml +++ b/tests/test-webapps/test-jndi-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-jndi-webapp Jetty Tests :: WebApp :: JNDI diff --git a/tests/test-webapps/test-mock-resources/pom.xml b/tests/test-webapps/test-mock-resources/pom.xml index 370b9a3caeb..6c0baf96aee 100644 --- a/tests/test-webapps/test-mock-resources/pom.xml +++ b/tests/test-webapps/test-mock-resources/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 Jetty Tests :: WebApp :: Mock Resources test-mock-resources diff --git a/tests/test-webapps/test-proxy-webapp/pom.xml b/tests/test-webapps/test-proxy-webapp/pom.xml index 72d6f7e6b8a..b7bcaf201a3 100644 --- a/tests/test-webapps/test-proxy-webapp/pom.xml +++ b/tests/test-webapps/test-proxy-webapp/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 ../pom.xml 4.0.0 diff --git a/tests/test-webapps/test-servlet-spec/pom.xml b/tests/test-webapps/test-servlet-spec/pom.xml index d585ace3003..d59d1b3b915 100644 --- a/tests/test-webapps/test-servlet-spec/pom.xml +++ b/tests/test-webapps/test-servlet-spec/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-servlet-spec-parent Jetty Tests :: Spec Test WebApp :: Parent diff --git a/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml b/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml index b77bfb94945..9e4930175f9 100644 --- a/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-container-initializer jar diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml index 289964a8b78..5c4478b27e6 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 Jetty Tests :: Webapps :: Spec Webapp test-spec-webapp diff --git a/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml b/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml index d4766420f18..9d103defc96 100644 --- a/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml index 7e447dc0f57..8ec7ff6f3ac 100644 --- a/tests/test-webapps/test-webapp-rfc2616/pom.xml +++ b/tests/test-webapps/test-webapp-rfc2616/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26-SNAPSHOT + 9.3.26.v20190403 test-webapp-rfc2616 Jetty Tests :: WebApp :: RFC2616 From 9f4b3542cb85b5c33c47aa2288822862176221be Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 3 Apr 2019 17:32:08 +1100 Subject: [PATCH 04/13] Updating to version 9.3.27-SNAPSHOT --- VERSION.txt | 2 + aggregates/jetty-all-compact3/pom.xml | 2 +- aggregates/jetty-all/pom.xml | 2 +- apache-jsp/pom.xml | 2 +- apache-jstl/pom.xml | 2 +- examples/async-rest/async-rest-jar/pom.xml | 2 +- examples/async-rest/async-rest-webapp/pom.xml | 2 +- examples/async-rest/pom.xml | 2 +- examples/embedded/pom.xml | 2 +- examples/pom.xml | 2 +- jetty-alpn/jetty-alpn-client/pom.xml | 2 +- jetty-alpn/jetty-alpn-java-client/pom.xml | 2 +- jetty-alpn/jetty-alpn-java-server/pom.xml | 2 +- jetty-alpn/jetty-alpn-server/pom.xml | 2 +- jetty-alpn/pom.xml | 2 +- jetty-annotations/pom.xml | 2 +- jetty-ant/pom.xml | 2 +- jetty-bom/pom.xml | 72 +++++++++---------- jetty-cdi/cdi-core/pom.xml | 2 +- jetty-cdi/cdi-full-servlet/pom.xml | 2 +- jetty-cdi/cdi-servlet/pom.xml | 2 +- jetty-cdi/cdi-websocket/pom.xml | 2 +- jetty-cdi/pom.xml | 2 +- jetty-cdi/test-cdi-webapp/pom.xml | 2 +- jetty-client/pom.xml | 2 +- jetty-continuation/pom.xml | 2 +- jetty-deploy/pom.xml | 2 +- jetty-distribution/pom.xml | 2 +- jetty-documentation/pom.xml | 2 +- jetty-fcgi/fcgi-client/pom.xml | 2 +- jetty-fcgi/fcgi-server/pom.xml | 2 +- jetty-fcgi/pom.xml | 2 +- .../pom.xml | 2 +- .../jetty-gcloud-session-manager/pom.xml | 2 +- jetty-gcloud/pom.xml | 2 +- jetty-hazelcast/pom.xml | 2 +- jetty-http-spi/pom.xml | 2 +- jetty-http/pom.xml | 2 +- jetty-http2/http2-alpn-tests/pom.xml | 2 +- jetty-http2/http2-client/pom.xml | 2 +- jetty-http2/http2-common/pom.xml | 2 +- jetty-http2/http2-hpack/pom.xml | 2 +- .../http2-http-client-transport/pom.xml | 2 +- jetty-http2/http2-server/pom.xml | 2 +- jetty-http2/pom.xml | 2 +- jetty-infinispan/pom.xml | 2 +- jetty-io/pom.xml | 2 +- jetty-jaas/pom.xml | 2 +- jetty-jaspi/pom.xml | 2 +- jetty-jmx/pom.xml | 2 +- jetty-jndi/pom.xml | 2 +- jetty-jspc-maven-plugin/pom.xml | 2 +- jetty-maven-plugin/pom.xml | 2 +- jetty-monitor/pom.xml | 2 +- jetty-nosql/pom.xml | 2 +- jetty-osgi/jetty-osgi-alpn/pom.xml | 2 +- jetty-osgi/jetty-osgi-boot-jsp/pom.xml | 2 +- jetty-osgi/jetty-osgi-boot-warurl/pom.xml | 2 +- jetty-osgi/jetty-osgi-boot/pom.xml | 2 +- jetty-osgi/jetty-osgi-httpservice/pom.xml | 2 +- jetty-osgi/pom.xml | 2 +- jetty-osgi/test-jetty-osgi-context/pom.xml | 2 +- jetty-osgi/test-jetty-osgi-fragment/pom.xml | 2 +- jetty-osgi/test-jetty-osgi-webapp/pom.xml | 2 +- jetty-osgi/test-jetty-osgi/pom.xml | 2 +- jetty-plus/pom.xml | 2 +- jetty-proxy/pom.xml | 2 +- jetty-quickstart/pom.xml | 2 +- jetty-rewrite/pom.xml | 2 +- jetty-runner/pom.xml | 2 +- jetty-security/pom.xml | 2 +- jetty-server/pom.xml | 2 +- jetty-servlet/pom.xml | 2 +- jetty-servlets/pom.xml | 2 +- jetty-spring/pom.xml | 2 +- jetty-start/pom.xml | 2 +- jetty-util-ajax/pom.xml | 2 +- jetty-util/pom.xml | 2 +- jetty-webapp/pom.xml | 2 +- .../javax-websocket-client-impl/pom.xml | 2 +- .../javax-websocket-server-impl/pom.xml | 2 +- jetty-websocket/pom.xml | 2 +- jetty-websocket/websocket-api/pom.xml | 2 +- jetty-websocket/websocket-client/pom.xml | 2 +- jetty-websocket/websocket-common/pom.xml | 2 +- jetty-websocket/websocket-server/pom.xml | 2 +- jetty-websocket/websocket-servlet/pom.xml | 2 +- jetty-xml/pom.xml | 2 +- pom.xml | 2 +- tests/pom.xml | 2 +- tests/test-continuation/pom.xml | 2 +- tests/test-http-client-transport/pom.xml | 2 +- tests/test-integration/pom.xml | 2 +- tests/test-jmx/jmx-webapp-it/pom.xml | 2 +- tests/test-jmx/jmx-webapp/pom.xml | 2 +- tests/test-jmx/pom.xml | 2 +- tests/test-loginservice/pom.xml | 2 +- tests/test-quickstart/pom.xml | 2 +- tests/test-sessions/pom.xml | 2 +- .../test-gcloud-memcached-sessions/pom.xml | 2 +- .../test-gcloud-sessions/pom.xml | 2 +- .../test-sessions/test-hash-sessions/pom.xml | 2 +- .../test-infinispan-sessions/pom.xml | 2 +- .../test-sessions/test-jdbc-sessions/pom.xml | 2 +- .../test-mongodb-sessions/pom.xml | 2 +- .../test-sessions-common/pom.xml | 2 +- tests/test-webapps/pom.xml | 2 +- tests/test-webapps/test-jaas-webapp/pom.xml | 2 +- tests/test-webapps/test-jetty-webapp/pom.xml | 2 +- tests/test-webapps/test-jndi-webapp/pom.xml | 2 +- .../test-webapps/test-mock-resources/pom.xml | 2 +- tests/test-webapps/test-proxy-webapp/pom.xml | 2 +- tests/test-webapps/test-servlet-spec/pom.xml | 2 +- .../test-container-initializer/pom.xml | 2 +- .../test-spec-webapp/pom.xml | 2 +- .../test-web-fragment/pom.xml | 2 +- .../test-webapps/test-webapp-rfc2616/pom.xml | 2 +- 117 files changed, 153 insertions(+), 151 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index ea67ac43e55..f7ca600044f 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,3 +1,5 @@ +jetty-9.3.27-SNAPSHOT + jetty-9.3.26.v20190403 - 03 April 2019 + 3487 Test WebAppClassLoader does not definePackage + 3461 gzip request customizer diff --git a/aggregates/jetty-all-compact3/pom.xml b/aggregates/jetty-all-compact3/pom.xml index d49ac19e77c..094f802b0eb 100644 --- a/aggregates/jetty-all-compact3/pom.xml +++ b/aggregates/jetty-all-compact3/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml index 1c0f8c63e21..7c47fbb5027 100644 --- a/aggregates/jetty-all/pom.xml +++ b/aggregates/jetty-all/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index f8b383f190d..a3f21300309 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 apache-jsp diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml index a533edbf4fb..aedff09ae43 100644 --- a/apache-jstl/pom.xml +++ b/apache-jstl/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 apache-jstl diff --git a/examples/async-rest/async-rest-jar/pom.xml b/examples/async-rest/async-rest-jar/pom.xml index 2474ee20b0c..a80fdf9ffdd 100644 --- a/examples/async-rest/async-rest-jar/pom.xml +++ b/examples/async-rest/async-rest-jar/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty example-async-rest - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 org.eclipse.jetty.example-async-rest diff --git a/examples/async-rest/async-rest-webapp/pom.xml b/examples/async-rest/async-rest-webapp/pom.xml index 6cc9ecbc39e..26b21560ed5 100644 --- a/examples/async-rest/async-rest-webapp/pom.xml +++ b/examples/async-rest/async-rest-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty example-async-rest - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 org.eclipse.jetty.example-async-rest diff --git a/examples/async-rest/pom.xml b/examples/async-rest/pom.xml index 12a3da57f6f..371c7d845c5 100644 --- a/examples/async-rest/pom.xml +++ b/examples/async-rest/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.examples examples-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index aa77c6f06fe..48591a026b3 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.examples examples-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/examples/pom.xml b/examples/pom.xml index 0e054c1f0e5..c8a7ee70823 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml org.eclipse.jetty.examples diff --git a/jetty-alpn/jetty-alpn-client/pom.xml b/jetty-alpn/jetty-alpn-client/pom.xml index edfd9961600..7c55cc7df50 100644 --- a/jetty-alpn/jetty-alpn-client/pom.xml +++ b/jetty-alpn/jetty-alpn-client/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-alpn-client diff --git a/jetty-alpn/jetty-alpn-java-client/pom.xml b/jetty-alpn/jetty-alpn-java-client/pom.xml index cbae050494f..de1852061cb 100644 --- a/jetty-alpn/jetty-alpn-java-client/pom.xml +++ b/jetty-alpn/jetty-alpn-java-client/pom.xml @@ -6,7 +6,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-alpn/jetty-alpn-java-server/pom.xml b/jetty-alpn/jetty-alpn-java-server/pom.xml index ba71797935e..e64ce1742bf 100644 --- a/jetty-alpn/jetty-alpn-java-server/pom.xml +++ b/jetty-alpn/jetty-alpn-java-server/pom.xml @@ -5,7 +5,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-alpn/jetty-alpn-server/pom.xml b/jetty-alpn/jetty-alpn-server/pom.xml index 0bcae5db4c1..e778792d609 100644 --- a/jetty-alpn/jetty-alpn-server/pom.xml +++ b/jetty-alpn/jetty-alpn-server/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-alpn-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-alpn-server diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index 2d280537320..cc689ac4b5b 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-alpn-parent diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index e17a72c9eab..9a616471202 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-annotations diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml index 8b550690679..b71cd08a91d 100644 --- a/jetty-ant/pom.xml +++ b/jetty-ant/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-ant diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index a907be62083..122a16c603d 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -98,7 +98,7 @@ org.eclipse.jetty jetty-annotations - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty @@ -118,22 +118,22 @@ org.eclipse.jetty jetty-client - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-continuation - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty.fcgi fcgi-server - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty.fcgi fcgi-server - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty @@ -148,82 +148,82 @@ org.eclipse.jetty jetty-hazelcast - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-http - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty.http2 http2-client - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty.http2 http2-common - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty.http2 http2-hpack - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty.http2 http2-http-client-transport - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty.http2 http2-server - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-http-spi - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-infinispan - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-io - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-jaas - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-jaspi - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-jmx - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-jndi - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-monitor - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-nosql - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty @@ -243,62 +243,62 @@ org.eclipse.jetty jetty-plus - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-proxy - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-quickstart - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-rewrite - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-security - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-server - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-servlet - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-servlets - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-spring - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-util - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-util-ajax - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-webapp - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty @@ -338,18 +338,18 @@ org.eclipse.jetty jetty-xml - 9.3.26.v20190403 + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-distribution - 9.3.26.v20190403 + 9.3.27-SNAPSHOT zip org.eclipse.jetty jetty-distribution - 9.3.26.v20190403 + 9.3.27-SNAPSHOT tar.gz diff --git a/jetty-cdi/cdi-core/pom.xml b/jetty-cdi/cdi-core/pom.xml index 71fa6a6277c..f97e9363ed9 100644 --- a/jetty-cdi/cdi-core/pom.xml +++ b/jetty-cdi/cdi-core/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 cdi-core diff --git a/jetty-cdi/cdi-full-servlet/pom.xml b/jetty-cdi/cdi-full-servlet/pom.xml index 85eb2163265..7f17a12e275 100644 --- a/jetty-cdi/cdi-full-servlet/pom.xml +++ b/jetty-cdi/cdi-full-servlet/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 cdi-full-servlet diff --git a/jetty-cdi/cdi-servlet/pom.xml b/jetty-cdi/cdi-servlet/pom.xml index 10696134004..f554336d962 100644 --- a/jetty-cdi/cdi-servlet/pom.xml +++ b/jetty-cdi/cdi-servlet/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 cdi-servlet diff --git a/jetty-cdi/cdi-websocket/pom.xml b/jetty-cdi/cdi-websocket/pom.xml index 8e8cdd3eb0d..8ea4fbb789b 100644 --- a/jetty-cdi/cdi-websocket/pom.xml +++ b/jetty-cdi/cdi-websocket/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 cdi-websocket diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index 4224355a292..4182a364443 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 org.eclipse.jetty.cdi diff --git a/jetty-cdi/test-cdi-webapp/pom.xml b/jetty-cdi/test-cdi-webapp/pom.xml index 473220a3043..141b91d24da 100644 --- a/jetty-cdi/test-cdi-webapp/pom.xml +++ b/jetty-cdi/test-cdi-webapp/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 test-cdi-webapp diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index a397e39d45e..9308c2f5720 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml index 83a5e353182..8065465a0c5 100644 --- a/jetty-continuation/pom.xml +++ b/jetty-continuation/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-continuation diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index 056d6f44752..11cee503d2c 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-deploy diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 352c0784644..fab75d5c756 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-distribution diff --git a/jetty-documentation/pom.xml b/jetty-documentation/pom.xml index f5ab74d8ff4..45d15c09719 100644 --- a/jetty-documentation/pom.xml +++ b/jetty-documentation/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT jetty-documentation Jetty :: Documentation diff --git a/jetty-fcgi/fcgi-client/pom.xml b/jetty-fcgi/fcgi-client/pom.xml index bbbca428645..a7ba63ea980 100644 --- a/jetty-fcgi/fcgi-client/pom.xml +++ b/jetty-fcgi/fcgi-client/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.fcgi fcgi-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index a1126e74d6c..0b6fe0a6641 100644 --- a/jetty-fcgi/fcgi-server/pom.xml +++ b/jetty-fcgi/fcgi-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.fcgi fcgi-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-fcgi/pom.xml b/jetty-fcgi/pom.xml index 79f96141d83..51ddc094e5a 100644 --- a/jetty-fcgi/pom.xml +++ b/jetty-fcgi/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml b/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml index 42924d02166..5c868c6a3a3 100644 --- a/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml +++ b/jetty-gcloud/jetty-gcloud-memcached-session-manager/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.gcloud gcloud-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml index f87cbfa7f34..fb40beebc0c 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml +++ b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.gcloud gcloud-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-gcloud/pom.xml b/jetty-gcloud/pom.xml index 5e54e3f7cf0..121dc052a4c 100644 --- a/jetty-gcloud/pom.xml +++ b/jetty-gcloud/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-hazelcast/pom.xml b/jetty-hazelcast/pom.xml index f5f11225fee..5807e4fb559 100644 --- a/jetty-hazelcast/pom.xml +++ b/jetty-hazelcast/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-hazelcast diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index f0fa86d0069..cdf4f949289 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-http-spi diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index 538886ec529..f40d43438cd 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-http diff --git a/jetty-http2/http2-alpn-tests/pom.xml b/jetty-http2/http2-alpn-tests/pom.xml index 2fddae32661..878fadbaf18 100644 --- a/jetty-http2/http2-alpn-tests/pom.xml +++ b/jetty-http2/http2-alpn-tests/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-client/pom.xml b/jetty-http2/http2-client/pom.xml index 85d973564f9..f90005e0a0d 100644 --- a/jetty-http2/http2-client/pom.xml +++ b/jetty-http2/http2-client/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-common/pom.xml b/jetty-http2/http2-common/pom.xml index 824ab8f9d97..90a94cbb1ed 100644 --- a/jetty-http2/http2-common/pom.xml +++ b/jetty-http2/http2-common/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-hpack/pom.xml b/jetty-http2/http2-hpack/pom.xml index 9e3b62acb0b..76b0c87988f 100644 --- a/jetty-http2/http2-hpack/pom.xml +++ b/jetty-http2/http2-hpack/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-http-client-transport/pom.xml b/jetty-http2/http2-http-client-transport/pom.xml index 5335defcd4b..08d6f4a139a 100644 --- a/jetty-http2/http2-http-client-transport/pom.xml +++ b/jetty-http2/http2-http-client-transport/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-server/pom.xml b/jetty-http2/http2-server/pom.xml index 30abe5f4903..7e69398ae08 100644 --- a/jetty-http2/http2-server/pom.xml +++ b/jetty-http2/http2-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.http2 http2-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-http2/pom.xml b/jetty-http2/pom.xml index 6dc56079f83..a306f1a878e 100644 --- a/jetty-http2/pom.xml +++ b/jetty-http2/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-infinispan/pom.xml b/jetty-infinispan/pom.xml index 8124a531103..2065504f8ac 100644 --- a/jetty-infinispan/pom.xml +++ b/jetty-infinispan/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-infinispan diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml index efc6c06577b..d6d40294438 100644 --- a/jetty-io/pom.xml +++ b/jetty-io/pom.xml @@ -2,7 +2,7 @@ jetty-project org.eclipse.jetty - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-io diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index ce51ed0ac42..8b0cb3c9820 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-jaas diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml index 07ae7f4d694..e4f3520b66b 100644 --- a/jetty-jaspi/pom.xml +++ b/jetty-jaspi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-jaspi diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index e39d7ade2de..2ae8a9efaff 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-jmx diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index b7c3072ca26..edce7857f83 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-jndi diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml index 529c769c84b..810c1cbce59 100644 --- a/jetty-jspc-maven-plugin/pom.xml +++ b/jetty-jspc-maven-plugin/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-jspc-maven-plugin diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index 75ee56efe6b..c1c4dbf2b73 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-maven-plugin diff --git a/jetty-monitor/pom.xml b/jetty-monitor/pom.xml index 53dda3b180d..f5a9b241e0d 100644 --- a/jetty-monitor/pom.xml +++ b/jetty-monitor/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-monitor diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml index 7e822e7319f..cb7e089942c 100644 --- a/jetty-nosql/pom.xml +++ b/jetty-nosql/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-nosql diff --git a/jetty-osgi/jetty-osgi-alpn/pom.xml b/jetty-osgi/jetty-osgi-alpn/pom.xml index bf63f6fe3c1..cf350f4c1ba 100644 --- a/jetty-osgi/jetty-osgi-alpn/pom.xml +++ b/jetty-osgi/jetty-osgi-alpn/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-osgi-alpn diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml index 5c0f67ee286..4f97952016d 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-osgi-boot-jsp diff --git a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml index 027b9615a0b..50580fded3b 100644 --- a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index f94eb9d7526..d585da29b17 100644 --- a/jetty-osgi/jetty-osgi-boot/pom.xml +++ b/jetty-osgi/jetty-osgi-boot/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-osgi-boot diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml index 55118a74df8..ca8173f6231 100644 --- a/jetty-osgi/jetty-osgi-httpservice/pom.xml +++ b/jetty-osgi/jetty-osgi-httpservice/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-httpservice diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index d13121a9905..ee6ccf2a3d8 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml index 2f39bca9c36..7f1a2ea9c0d 100644 --- a/jetty-osgi/test-jetty-osgi-context/pom.xml +++ b/jetty-osgi/test-jetty-osgi-context/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 test-jetty-osgi-context diff --git a/jetty-osgi/test-jetty-osgi-fragment/pom.xml b/jetty-osgi/test-jetty-osgi-fragment/pom.xml index 5750951106f..3abe0ac6823 100644 --- a/jetty-osgi/test-jetty-osgi-fragment/pom.xml +++ b/jetty-osgi/test-jetty-osgi-fragment/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml index b6fa8190b36..746b39318de 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml +++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 8eafe3f1062..c015a37bfd1 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index b5063dd108a..568f07b288a 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-plus diff --git a/jetty-proxy/pom.xml b/jetty-proxy/pom.xml index dc7848f0d86..f5f553f004d 100644 --- a/jetty-proxy/pom.xml +++ b/jetty-proxy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-proxy diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index 59929de5dc1..85aa76992bb 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 org.eclipse.jetty diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml index 919d013047d..fae706086a4 100644 --- a/jetty-rewrite/pom.xml +++ b/jetty-rewrite/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-rewrite diff --git a/jetty-runner/pom.xml b/jetty-runner/pom.xml index d49f5b2bba5..7f0a4a11dbc 100644 --- a/jetty-runner/pom.xml +++ b/jetty-runner/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-runner diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index 958b32e36b4..583c4c4a6d7 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-security diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml index 69cabcdd8e4..e78a8dbf059 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-server diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index e52e6ede6be..1b444b2eb4c 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-servlet diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index 62a2b549545..10e57c0a296 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-servlets diff --git a/jetty-spring/pom.xml b/jetty-spring/pom.xml index 6871a291c18..7fee27aa875 100644 --- a/jetty-spring/pom.xml +++ b/jetty-spring/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-spring diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml index ad8c5223e4a..617367efc2e 100644 --- a/jetty-start/pom.xml +++ b/jetty-start/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-start diff --git a/jetty-util-ajax/pom.xml b/jetty-util-ajax/pom.xml index 2db83000884..a689b5556fc 100644 --- a/jetty-util-ajax/pom.xml +++ b/jetty-util-ajax/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-util-ajax diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 0b46d983460..7d9d246c4d2 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-util diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index 3050838902d..99e3484e14f 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-webapp diff --git a/jetty-websocket/javax-websocket-client-impl/pom.xml b/jetty-websocket/javax-websocket-client-impl/pom.xml index c0550138c2e..78034bb65c1 100644 --- a/jetty-websocket/javax-websocket-client-impl/pom.xml +++ b/jetty-websocket/javax-websocket-client-impl/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/javax-websocket-server-impl/pom.xml b/jetty-websocket/javax-websocket-server-impl/pom.xml index 3be3be597ac..fd1f3ea245a 100644 --- a/jetty-websocket/javax-websocket-server-impl/pom.xml +++ b/jetty-websocket/javax-websocket-server-impl/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index 9956e4bb2da..a72dd06084a 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-api/pom.xml b/jetty-websocket/websocket-api/pom.xml index add02af9d0a..19ca3e6a719 100644 --- a/jetty-websocket/websocket-api/pom.xml +++ b/jetty-websocket/websocket-api/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index a85a8e98054..e80ff8a6374 100644 --- a/jetty-websocket/websocket-client/pom.xml +++ b/jetty-websocket/websocket-client/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index 7434fcdaf4c..67d69ccccc7 100644 --- a/jetty-websocket/websocket-common/pom.xml +++ b/jetty-websocket/websocket-common/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index d01b680cf8d..3dc35015b9e 100644 --- a/jetty-websocket/websocket-server/pom.xml +++ b/jetty-websocket/websocket-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index 193ea425da9..1ad87f642c4 100644 --- a/jetty-websocket/websocket-servlet/pom.xml +++ b/jetty-websocket/websocket-servlet/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.websocket websocket-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml index 655d3188952..7eb5bbfbeb3 100644 --- a/jetty-xml/pom.xml +++ b/jetty-xml/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jetty-xml diff --git a/pom.xml b/pom.xml index 6be76865fed..fca0aeb4c45 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT Jetty :: Project http://www.eclipse.org/jetty pom diff --git a/tests/pom.xml b/tests/pom.xml index 6340c266dc1..208e7fc872b 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml org.eclipse.jetty.tests diff --git a/tests/test-continuation/pom.xml b/tests/test-continuation/pom.xml index 6d8c71ed8a3..e6333976800 100644 --- a/tests/test-continuation/pom.xml +++ b/tests/test-continuation/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/tests/test-http-client-transport/pom.xml b/tests/test-http-client-transport/pom.xml index 18e788bcbdb..3654831803c 100644 --- a/tests/test-http-client-transport/pom.xml +++ b/tests/test-http-client-transport/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index 44eab34eca4..403e399dca6 100644 --- a/tests/test-integration/pom.xml +++ b/tests/test-integration/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 test-integration diff --git a/tests/test-jmx/jmx-webapp-it/pom.xml b/tests/test-jmx/jmx-webapp-it/pom.xml index d4a4d2e88df..a68deea3969 100644 --- a/tests/test-jmx/jmx-webapp-it/pom.xml +++ b/tests/test-jmx/jmx-webapp-it/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-jmx-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 jmx-webapp-it diff --git a/tests/test-jmx/jmx-webapp/pom.xml b/tests/test-jmx/jmx-webapp/pom.xml index a35f2c246d1..8f1a38d3b7a 100644 --- a/tests/test-jmx/jmx-webapp/pom.xml +++ b/tests/test-jmx/jmx-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-jmx-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT jmx-webapp war diff --git a/tests/test-jmx/pom.xml b/tests/test-jmx/pom.xml index b6fcc5e7f79..8bf1be41bb6 100644 --- a/tests/test-jmx/pom.xml +++ b/tests/test-jmx/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT 4.0.0 test-jmx-parent diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml index c2ccf6d6f24..db96814c816 100644 --- a/tests/test-loginservice/pom.xml +++ b/tests/test-loginservice/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-loginservice Jetty Tests :: Login Service diff --git a/tests/test-quickstart/pom.xml b/tests/test-quickstart/pom.xml index 3c942f5d075..14763f89e02 100644 --- a/tests/test-quickstart/pom.xml +++ b/tests/test-quickstart/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml index 03d1005babc..e5442d997e9 100644 --- a/tests/test-sessions/pom.xml +++ b/tests/test-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-sessions-parent Jetty Tests :: Sessions :: Parent diff --git a/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml b/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml index eae51cb58ae..a729f7131d1 100644 --- a/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml +++ b/tests/test-sessions/test-gcloud-memcached-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-gcloud-memcached-sessions Jetty Tests :: Sessions :: GCloud with Memcached diff --git a/tests/test-sessions/test-gcloud-sessions/pom.xml b/tests/test-sessions/test-gcloud-sessions/pom.xml index c142c92c8fd..ee16848ca97 100644 --- a/tests/test-sessions/test-gcloud-sessions/pom.xml +++ b/tests/test-sessions/test-gcloud-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-gcloud-sessions Jetty Tests :: Sessions :: GCloud diff --git a/tests/test-sessions/test-hash-sessions/pom.xml b/tests/test-sessions/test-hash-sessions/pom.xml index 69a628787fb..4e6117be70f 100644 --- a/tests/test-sessions/test-hash-sessions/pom.xml +++ b/tests/test-sessions/test-hash-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-hash-sessions Jetty Tests :: Sessions :: Hash diff --git a/tests/test-sessions/test-infinispan-sessions/pom.xml b/tests/test-sessions/test-infinispan-sessions/pom.xml index 42442a5a071..ad026a3aa97 100644 --- a/tests/test-sessions/test-infinispan-sessions/pom.xml +++ b/tests/test-sessions/test-infinispan-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-infinispan-sessions Jetty Tests :: Sessions :: Infinispan diff --git a/tests/test-sessions/test-jdbc-sessions/pom.xml b/tests/test-sessions/test-jdbc-sessions/pom.xml index d467788899c..392feedd9db 100644 --- a/tests/test-sessions/test-jdbc-sessions/pom.xml +++ b/tests/test-sessions/test-jdbc-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-jdbc-sessions Jetty Tests :: Sessions :: JDBC diff --git a/tests/test-sessions/test-mongodb-sessions/pom.xml b/tests/test-sessions/test-mongodb-sessions/pom.xml index b71442b3e2d..38a57762dd6 100644 --- a/tests/test-sessions/test-mongodb-sessions/pom.xml +++ b/tests/test-sessions/test-mongodb-sessions/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-mongodb-sessions Jetty Tests :: Sessions :: Mongo diff --git a/tests/test-sessions/test-sessions-common/pom.xml b/tests/test-sessions/test-sessions-common/pom.xml index 91406768f51..14e6067e1f9 100644 --- a/tests/test-sessions/test-sessions-common/pom.xml +++ b/tests/test-sessions/test-sessions-common/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-sessions-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-sessions-common Jetty Tests :: Sessions :: Common diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index 010fa50b4e3..56e4ac9e788 100644 --- a/tests/test-webapps/pom.xml +++ b/tests/test-webapps/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests tests-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml test-webapps-parent diff --git a/tests/test-webapps/test-jaas-webapp/pom.xml b/tests/test-webapps/test-jaas-webapp/pom.xml index 36e0aec91ea..14bbcdfeb42 100644 --- a/tests/test-webapps/test-jaas-webapp/pom.xml +++ b/tests/test-webapps/test-jaas-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-jaas-webapp Jetty Tests :: WebApp :: JAAS diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml index cd991e41747..841f7374747 100644 --- a/tests/test-webapps/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/tests/test-webapps/test-jndi-webapp/pom.xml b/tests/test-webapps/test-jndi-webapp/pom.xml index db6f470c863..91e7ca83f7d 100644 --- a/tests/test-webapps/test-jndi-webapp/pom.xml +++ b/tests/test-webapps/test-jndi-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-jndi-webapp Jetty Tests :: WebApp :: JNDI diff --git a/tests/test-webapps/test-mock-resources/pom.xml b/tests/test-webapps/test-mock-resources/pom.xml index 6c0baf96aee..11df973303d 100644 --- a/tests/test-webapps/test-mock-resources/pom.xml +++ b/tests/test-webapps/test-mock-resources/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT Jetty Tests :: WebApp :: Mock Resources test-mock-resources diff --git a/tests/test-webapps/test-proxy-webapp/pom.xml b/tests/test-webapps/test-proxy-webapp/pom.xml index b7bcaf201a3..16ba25197ed 100644 --- a/tests/test-webapps/test-proxy-webapp/pom.xml +++ b/tests/test-webapps/test-proxy-webapp/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT ../pom.xml 4.0.0 diff --git a/tests/test-webapps/test-servlet-spec/pom.xml b/tests/test-webapps/test-servlet-spec/pom.xml index d59d1b3b915..9e908984508 100644 --- a/tests/test-webapps/test-servlet-spec/pom.xml +++ b/tests/test-webapps/test-servlet-spec/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-servlet-spec-parent Jetty Tests :: Spec Test WebApp :: Parent diff --git a/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml b/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml index 9e4930175f9..27622a8a22a 100644 --- a/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-container-initializer jar diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml index 5c4478b27e6..98f55ec5a6c 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT Jetty Tests :: Webapps :: Spec Webapp test-spec-webapp diff --git a/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml b/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml index 9d103defc96..0a3b276c719 100644 --- a/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml index 8ec7ff6f3ac..16eca1dde17 100644 --- a/tests/test-webapps/test-webapp-rfc2616/pom.xml +++ b/tests/test-webapps/test-webapp-rfc2616/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.tests test-webapps-parent - 9.3.26.v20190403 + 9.3.27-SNAPSHOT test-webapp-rfc2616 Jetty Tests :: WebApp :: RFC2616 From c0c29963392f51342b30b0065e5793812de00630 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 3 Apr 2019 18:18:48 +1100 Subject: [PATCH 05/13] fixed annotationtest Signed-off-by: Greg Wilkins --- .../src/main/java/com/acme/test/AnnotationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/AnnotationTest.java b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/AnnotationTest.java index f28e04f8a64..ceb14e049ca 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/AnnotationTest.java +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/AnnotationTest.java @@ -206,10 +206,10 @@ public class AnnotationTest extends HttpServlet boolean fragInitParamResult = "123".equals(config.getInitParameter("extra1")) && "345".equals(config.getInitParameter("extra2")); out.println("

Result: "+(fragInitParamResult? "PASS": "FAIL")+"

"); - __HandlesTypes = Arrays.asList( "javax.servlet.GenericServlet", "javax.servlet.http.HttpServlet", "com.acme.test.AsyncListenerServlet", + "com.acme.test.ClassLoaderServlet", "com.acme.test.AnnotationTest", "com.acme.test.RoleAnnotationTest", "com.acme.test.MultiPartTest", From 6051d135f281bc5ab08610a829fcaac5846a3e16 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 3 Apr 2019 17:31:25 +1000 Subject: [PATCH 06/13] fix version in pom and use trick from 9.4.x branch with flatten-maven-plugin Signed-off-by: olivier lamy --- jetty-bom/pom.xml | 151 ++++++++++++++++------------------------------ 1 file changed, 53 insertions(+), 98 deletions(-) diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index 122a16c603d..bbc0e29ffc5 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -1,96 +1,51 @@ - - org.eclipse.jetty - jetty-parent - 25 - 4.0.0 jetty-bom - 9.3.26.v20190403 Jetty :: Bom Jetty BOM artifact http://www.eclipse.org/jetty - 1995 pom - - github - https://github.com/eclipse/jetty.project/issues - - - - - Apache Software License - Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - - Eclipse Public License - Version 1.0 - http://www.eclipse.org/org/documents/epl-v10.php - - - - - http://www.eclipse.org/jetty - UTF-8 - 1.4 - - - - scm:git:https://github.com/eclipse/jetty.project.git - scm:git:git@github.com:eclipse/jetty.project.git - https://github.com/eclipse/jetty.project - - - - - oss.sonatype.org - Jetty Staging Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - oss.sonatype.org - Jetty Snapshot Repository - https://oss.sonatype.org/content/repositories/jetty-snapshots/ - - - jetty.eclipse.website - scp://build.eclipse.org:/home/data/httpd/download.eclipse.org/jetty/${project.version}/ - - + + org.eclipse.jetty + jetty-project + 9.3.27-SNAPSHOT + - - - - org.apache.maven.plugins - maven-release-plugin - 2.5 - - false - deploy - -Peclipse-release - clean install - forked-path - - - - org.apache.maven.plugins - maven-source-plugin - 3.0.1 - - true - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.0-M1 - - true - - - - + + + org.codehaus.mojo + flatten-maven-plugin + 1.0.1 + + ${project.build.directory} + flattened-pom.xml + bom + true + + remove + remove + + + + + flatten + + flatten + + process-resources + + + flatten-clean + + clean + + clean + + + + @@ -103,17 +58,17 @@ org.eclipse.jetty cdi-core - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty cdi-servlet - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty cdi-websocket - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty @@ -138,12 +93,12 @@ org.eclipse.jetty jetty-gcloud-memcached-session-manager - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-gcloud-session-manager - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty @@ -228,17 +183,17 @@ org.eclipse.jetty jetty-osgi-boot - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-osgi-boot-jsp - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty jetty-osgi-boot-warurl - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty @@ -303,37 +258,37 @@ org.eclipse.jetty javax-websocket-client-impl - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty javax-websocket-server-impl - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty javax-websocket-api - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty javax-websocket-client - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty javax-websocket-common - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty javax-websocket-server - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty javax-websocket-servlet - 9.3.26-SNAPSHOT + 9.3.27-SNAPSHOT org.eclipse.jetty From b9b1ade5daa0b926c252af29fab5664ba39a8402 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 3 Apr 2019 18:08:07 +1000 Subject: [PATCH 07/13] Jetty 9.3.x same jenkinsfile as 9.4.x (#3522) * use same Jenkinsfile as 9.4.x Signed-off-by: olivier lamy * use only jdk8 even for javadoc Signed-off-by: olivier lamy --- Jenkinsfile | 227 ++++++++++++++++++---------------------------------- 1 file changed, 77 insertions(+), 150 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6d98a5333cc..1eb73441ed8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,165 +1,92 @@ #!groovy -node { - // System Dependent Locations - def mvntool = tool name: 'maven3', type: 'hudson.tasks.Maven$MavenInstallation' - def jdktool = tool name: 'jdk8', type: 'hudson.model.JDK' +pipeline { + agent any + // save some io during the build + options { durabilityHint('PERFORMANCE_OPTIMIZED') } + stages { + stage("Parallel Stage") { + parallel { + stage("Build / Test - JDK8") { + agent { node { label 'linux' } } + options { timeout(time: 120, unit: 'MINUTES') } + steps { + mavenBuild("jdk8", "-Pmongodb install", "maven3", false) + // Collect up the jacoco execution results (only on main build) + jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class', + exclusionPattern: '' + + // build tools + '**/org/eclipse/jetty/ant/**' + + ',**/org/eclipse/jetty/maven/**' + + ',**/org/eclipse/jetty/jspc/**' + + // example code / documentation + ',**/org/eclipse/jetty/embedded/**' + + ',**/org/eclipse/jetty/asyncrest/**' + + ',**/org/eclipse/jetty/demo/**' + + // special environments / late integrations + ',**/org/eclipse/jetty/gcloud/**' + + ',**/org/eclipse/jetty/infinispan/**' + + ',**/org/eclipse/jetty/osgi/**' + + ',**/org/eclipse/jetty/spring/**' + + ',**/org/eclipse/jetty/http/spi/**' + + // test classes + ',**/org/eclipse/jetty/tests/**' + + ',**/org/eclipse/jetty/test/**', + execPattern: '**/target/jacoco.exec', + classPattern: '**/target/classes', + sourcePattern: '**/src/main/java' + warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']] + maven_invoker reportsFilenamePattern: "**/target/invoker-reports/BUILD*.xml", invokerBuildDir: "**/target/it" + } + } - // Environment - List mvnEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"] - mvnEnv.add("MAVEN_OPTS=-Xms256m -Xmx1024m -Djava.awt.headless=true") + stage("Build Javadoc") { + agent { node { label 'linux' } } + options { timeout(time: 30, unit: 'MINUTES') } + steps { + mavenBuild("jdk8", "install javadoc:javadoc -DskipTests", "maven3", true) + warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'JavaDoc'], [parserName: 'Java']] + } + } - try - { - stage('Checkout') { - checkout scm - } - } catch (Exception e) { - notifyBuild("Checkout Failure") - throw e - } - - try - { - stage('Compile') { - withEnv(mvnEnv) { - timeout(time: 15, unit: 'MINUTES') { - sh "mvn -B clean install -Dtest=None" + stage("Build Compact3") { + agent { node { label 'linux' } } + options { timeout(time: 120, unit: 'MINUTES') } + steps { + mavenBuild("jdk8", "-Pcompact3 install -DskipTests", "maven3", true) + warnings consoleParsers: [[parserName: 'Maven'], [parserName: 'Java']] + } } } } - } catch(Exception e) { - notifyBuild("Compile Failure") - throw e - } - - try - { - stage('Javadoc') { - withEnv(mvnEnv) { - timeout(time: 20, unit: 'MINUTES') { - sh "mvn -B javadoc:javadoc" - } - } - } - } catch(Exception e) { - notifyBuild("Javadoc Failure") - throw e - } - - try - { - stage('Test') { - withEnv(mvnEnv) { - timeout(time: 90, unit: 'MINUTES') { - // Run test phase / ignore test failures - sh "mvn -B install -Dmaven.test.failure.ignore=true" - // Report failures in the jenkins UI - step([$class: 'JUnitResultArchiver', - testResults: '**/target/surefire-reports/TEST-*.xml']) - // Collect up the jacoco execution results - def jacocoExcludes = - // build tools - "**/org/eclipse/jetty/ant/**" + - ",**/org/eclipse/jetty/maven/**" + - ",**/org/eclipse/jetty/jspc/**" + - // example code / documentation - ",**/org/eclipse/jetty/embedded/**" + - ",**/org/eclipse/jetty/asyncrest/**" + - ",**/org/eclipse/jetty/demo/**" + - // special environments / late integrations - ",**/org/eclipse/jetty/gcloud/**" + - ",**/org/eclipse/jetty/infinispan/**" + - ",**/org/eclipse/jetty/osgi/**" + - ",**/org/eclipse/jetty/spring/**" + - ",**/org/eclipse/jetty/http/spi/**" + - // test classes - ",**/org/eclipse/jetty/tests/**" + - ",**/org/eclipse/jetty/test/**"; - step([$class: 'JacocoPublisher', - inclusionPattern: '**/org/eclipse/jetty/**/*.class', - exclusionPattern: jacocoExcludes, - execPattern: '**/target/jacoco.exec', - classPattern: '**/target/classes', - sourcePattern: '**/src/main/java']) - // Report on Maven and Javadoc warnings - step([$class: 'WarningsPublisher', - consoleParsers: [ - [parserName: 'Maven'], - [parserName: 'JavaDoc'], - [parserName: 'JavaC'] - ]]) - } - if(isUnstable()) - { - notifyBuild("Unstable / Test Errors") - } - } - } - } catch(Exception e) { - notifyBuild("Test Failure") - throw e - } - - try - { - stage 'Compact3' - - dir("aggregates/jetty-all-compact3") { - withEnv(mvnEnv) { - sh "mvn -B -Pcompact3 clean install" - } - } - } catch(Exception e) { - notifyBuild("Compact3 Failure") - throw e } } -// True if this build is part of the "active" branches -// for Jetty. -def isActiveBranch() -{ - def branchName = "${env.BRANCH_NAME}" - return ( branchName == "master" || - branchName.startsWith("jetty-") ); -} +/** + * To other developers, if you are using this method above, please use the following syntax. + * + * mavenBuild("", " " + * + * @param jdk the jdk tool name (in jenkins) to use for this build + * @param cmdline the command line in " "`format. + * @return the Jenkinsfile step representing a maven build + */ +def mavenBuild(jdk, cmdline, mvnName, junitPublishDisabled) { + def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}" // ".repository" // + def settingsName = 'oss-settings.xml' + def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true' -// Test if the Jenkins Pipeline or Step has marked the -// current build as unstable -def isUnstable() -{ - return currentBuild.result == "UNSTABLE" -} - -// Send a notification about the build status -def notifyBuild(String buildStatus) -{ - if ( !isActiveBranch() ) - { - // don't send notifications on transient branches - return + withMaven( + maven: mvnName, + jdk: "$jdk", + publisherStrategy: 'EXPLICIT', + globalMavenSettingsConfig: settingsName, + options: [junitPublisher(disabled: junitPublishDisabled),mavenLinkerPublisher(disabled: false),pipelineGraphPublisher(disabled: false)], + mavenOpts: mavenOpts, + mavenLocalRepo: localRepo) { + // Some common Maven command line + provided command line + sh "mvn -V -B -T3 -e -Dmaven.test.failure.ignore=true -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME } - - // default the value - buildStatus = buildStatus ?: "UNKNOWN" - - def email = "${env.EMAILADDRESS}" - def summary = "${env.JOB_NAME}#${env.BUILD_NUMBER} - ${buildStatus}" - def detail = """

Job: ${env.JOB_NAME} [#${env.BUILD_NUMBER}]

-

${buildStatus}

- - - - -
Build${env.BUILD_URL}
Console${env.BUILD_URL}console
Test Report${env.BUILD_URL}testReport/
- """ - - emailext ( - to: email, - subject: summary, - body: detail - ) } // vim: et:ts=2:sw=2:ft=groovy From 0638ad1bd9fafd97e802f5cc3065272fbba1a78d Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 3 Apr 2019 18:48:55 +1000 Subject: [PATCH 08/13] do not activate mongodb test Signed-off-by: olivier lamy --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1eb73441ed8..6f4be90b3b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { agent { node { label 'linux' } } options { timeout(time: 120, unit: 'MINUTES') } steps { - mavenBuild("jdk8", "-Pmongodb install", "maven3", false) + mavenBuild("jdk8", "install", "maven3", false) // Collect up the jacoco execution results (only on main build) jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class', exclusionPattern: '' + From edaefdbb3bd999c59bad1a41647117f42e8c37ff Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 3 Apr 2019 11:56:07 -0500 Subject: [PATCH 09/13] Fixing CRLF files --- .../src/main/asciidoc/index-docinfo.xml | 184 ++-- .../jetty/http/spi/HttpSpiContextHandler.java | 324 +++---- .../jetty/http/spi/JettyHttpContext.java | 222 ++--- .../http/spi/JettyHttpExchangeDelegate.java | 466 +++++----- .../http/spi/JettyHttpServerProvider.java | 160 ++-- .../jetty/maven/plugin/JettyDeployWar.java | 156 ++-- .../jetty/security/AliasedConstraintTest.java | 364 ++++---- .../jetty/servlets/ThreadStarvationTest.java | 818 +++++++++--------- .../org/eclipse/jetty/start/BaseHomeTest.java | 428 ++++----- .../jetty/start/ConfigurationAssert.java | 568 ++++++------ 10 files changed, 1845 insertions(+), 1845 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/index-docinfo.xml b/jetty-documentation/src/main/asciidoc/index-docinfo.xml index 8fcb9cf2f2b..8a6f6c2bf36 100644 --- a/jetty-documentation/src/main/asciidoc/index-docinfo.xml +++ b/jetty-documentation/src/main/asciidoc/index-docinfo.xml @@ -1,96 +1,96 @@ 1995-2017 Mort Bay Consulting Pty. Ltd. - - - - {revnumber} - - - - + + + + {revnumber} + + + + This documentation is produced and contributed to under the Eclipse Public License v1.0. - - - - - jetty - servlet - servlet-api - cometd - http - websocket - eclipse - maven - java - server - software - - - - - Jan - Bartel - - - Jetty - Project Lead - - - - - Thomas - Becker - - - Jetty - Committer - - - - - Simone - Bordet - - - Jetty - Committer - - - - - Joakim - Erdfelt - - - Jetty - Committer - - - - - Jesse - McConnell - - - Jetty - Committer - - - - - Greg - Wilkins - - - Jetty - Project Lead - - - - - Shirley - Boulay - - - + + + + + jetty + servlet + servlet-api + cometd + http + websocket + eclipse + maven + java + server + software + + + + + Jan + Bartel + + + Jetty + Project Lead + + + + + Thomas + Becker + + + Jetty + Committer + + + + + Simone + Bordet + + + Jetty + Committer + + + + + Joakim + Erdfelt + + + Jetty + Committer + + + + + Jesse + McConnell + + + Jetty + Committer + + + + + Greg + Wilkins + + + Jetty + Project Lead + + + + + Shirley + Boulay + + + diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java index 8e9028836b7..0627db74bcc 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java @@ -1,162 +1,162 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.List; -import java.util.Map; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.ContextHandler; -import org.eclipse.jetty.util.StringUtil; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; - -import com.sun.net.httpserver.Authenticator; -import com.sun.net.httpserver.Authenticator.Result; -import com.sun.net.httpserver.HttpContext; -import com.sun.net.httpserver.HttpExchange; -import com.sun.net.httpserver.HttpHandler; -import com.sun.net.httpserver.HttpPrincipal; - -/** - * Jetty handler that bridges requests to {@link HttpHandler}. - */ -public class HttpSpiContextHandler extends ContextHandler -{ - public static final Logger LOG = Log.getLogger(HttpSpiContextHandler.class); - - private HttpContext _httpContext; - - private HttpHandler _httpHandler; - - public HttpSpiContextHandler(HttpContext httpContext, HttpHandler httpHandler) - { - this._httpContext = httpContext; - this._httpHandler = httpHandler; - } - - @Override - public void doScope(String target, Request baseRequest, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException - { - if (!target.startsWith(getContextPath())) - { - return; - } - - HttpExchange jettyHttpExchange; - if (baseRequest.isSecure()) - { - jettyHttpExchange = new JettyHttpsExchange(_httpContext,req,resp); - } - else - { - jettyHttpExchange = new JettyHttpExchange(_httpContext,req,resp); - } - - // TODO: add filters processing - - try - { - Authenticator auth = _httpContext.getAuthenticator(); - if (auth != null) - { - handleAuthentication(resp,jettyHttpExchange,auth); - } - else - { - _httpHandler.handle(jettyHttpExchange); - } - } - catch (Exception ex) - { - LOG.debug(ex); - PrintWriter writer = new PrintWriter(jettyHttpExchange.getResponseBody()); - - resp.setStatus(500); - writer.println("

HTTP ERROR: 500

"); - writer.println("
INTERNAL_SERVER_ERROR
"); - writer.println("

RequestURI=" + StringUtil.sanitizeXmlString(req.getRequestURI()) + "

"); - - if (LOG.isDebugEnabled()) - { - writer.println("
");
-                ex.printStackTrace(writer);
-                writer.println("
"); - } - - baseRequest.getHttpChannel().getHttpConfiguration().writePoweredBy(writer,"

","

"); - - writer.close(); - } - finally - { - baseRequest.setHandled(true); - } - - } - - private void handleAuthentication(HttpServletResponse resp, HttpExchange httpExchange, Authenticator auth) throws IOException - { - Result result = auth.authenticate(httpExchange); - if (result instanceof Authenticator.Failure) - { - int rc = ((Authenticator.Failure)result).getResponseCode(); - for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) - { - for (String value : header.getValue()) - resp.addHeader(header.getKey(),value); - } - resp.sendError(rc); - } - else if (result instanceof Authenticator.Retry) - { - int rc = ((Authenticator.Retry)result).getResponseCode(); - for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) - { - for (String value : header.getValue()) - resp.addHeader(header.getKey(),value); - } - resp.setStatus(rc); - resp.flushBuffer(); - } - else if (result instanceof Authenticator.Success) - { - HttpPrincipal principal = ((Authenticator.Success)result).getPrincipal(); - ((JettyExchange)httpExchange).setPrincipal(principal); - _httpHandler.handle(httpExchange); - } - } - - public HttpHandler getHttpHandler() - { - return _httpHandler; - } - - public void setHttpHandler(HttpHandler handler) - { - this._httpHandler = handler; - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.ContextHandler; +import org.eclipse.jetty.util.StringUtil; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; + +import com.sun.net.httpserver.Authenticator; +import com.sun.net.httpserver.Authenticator.Result; +import com.sun.net.httpserver.HttpContext; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpPrincipal; + +/** + * Jetty handler that bridges requests to {@link HttpHandler}. + */ +public class HttpSpiContextHandler extends ContextHandler +{ + public static final Logger LOG = Log.getLogger(HttpSpiContextHandler.class); + + private HttpContext _httpContext; + + private HttpHandler _httpHandler; + + public HttpSpiContextHandler(HttpContext httpContext, HttpHandler httpHandler) + { + this._httpContext = httpContext; + this._httpHandler = httpHandler; + } + + @Override + public void doScope(String target, Request baseRequest, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException + { + if (!target.startsWith(getContextPath())) + { + return; + } + + HttpExchange jettyHttpExchange; + if (baseRequest.isSecure()) + { + jettyHttpExchange = new JettyHttpsExchange(_httpContext,req,resp); + } + else + { + jettyHttpExchange = new JettyHttpExchange(_httpContext,req,resp); + } + + // TODO: add filters processing + + try + { + Authenticator auth = _httpContext.getAuthenticator(); + if (auth != null) + { + handleAuthentication(resp,jettyHttpExchange,auth); + } + else + { + _httpHandler.handle(jettyHttpExchange); + } + } + catch (Exception ex) + { + LOG.debug(ex); + PrintWriter writer = new PrintWriter(jettyHttpExchange.getResponseBody()); + + resp.setStatus(500); + writer.println("

HTTP ERROR: 500

"); + writer.println("
INTERNAL_SERVER_ERROR
"); + writer.println("

RequestURI=" + StringUtil.sanitizeXmlString(req.getRequestURI()) + "

"); + + if (LOG.isDebugEnabled()) + { + writer.println("
");
+                ex.printStackTrace(writer);
+                writer.println("
"); + } + + baseRequest.getHttpChannel().getHttpConfiguration().writePoweredBy(writer,"

","

"); + + writer.close(); + } + finally + { + baseRequest.setHandled(true); + } + + } + + private void handleAuthentication(HttpServletResponse resp, HttpExchange httpExchange, Authenticator auth) throws IOException + { + Result result = auth.authenticate(httpExchange); + if (result instanceof Authenticator.Failure) + { + int rc = ((Authenticator.Failure)result).getResponseCode(); + for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) + { + for (String value : header.getValue()) + resp.addHeader(header.getKey(),value); + } + resp.sendError(rc); + } + else if (result instanceof Authenticator.Retry) + { + int rc = ((Authenticator.Retry)result).getResponseCode(); + for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) + { + for (String value : header.getValue()) + resp.addHeader(header.getKey(),value); + } + resp.setStatus(rc); + resp.flushBuffer(); + } + else if (result instanceof Authenticator.Success) + { + HttpPrincipal principal = ((Authenticator.Success)result).getPrincipal(); + ((JettyExchange)httpExchange).setPrincipal(principal); + _httpHandler.handle(httpExchange); + } + } + + public HttpHandler getHttpHandler() + { + return _httpHandler; + } + + public void setHttpHandler(HttpHandler handler) + { + this._httpHandler = handler; + } + +} diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java index 39d2285addb..18b45d99ea5 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java @@ -1,111 +1,111 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.sun.net.httpserver.Authenticator; -import com.sun.net.httpserver.Filter; -import com.sun.net.httpserver.HttpHandler; -import com.sun.net.httpserver.HttpServer; - -/** - * Jetty implementation of {@link com.sun.net.httpserver.HttpContext} - */ -public class JettyHttpContext extends com.sun.net.httpserver.HttpContext -{ - - private HttpSpiContextHandler _jettyContextHandler; - - private HttpServer _server; - - private Map _attributes = new HashMap(); - - private List _filters = new ArrayList(); - - private Authenticator _authenticator; - - - protected JettyHttpContext(HttpServer server, String path, - HttpHandler handler) - { - this._server = server; - _jettyContextHandler = new HttpSpiContextHandler(this, handler); - _jettyContextHandler.setContextPath(path); - } - - protected HttpSpiContextHandler getJettyContextHandler() - { - return _jettyContextHandler; - } - - @Override - public HttpHandler getHandler() - { - return _jettyContextHandler.getHttpHandler(); - } - - @Override - public void setHandler(HttpHandler h) - { - _jettyContextHandler.setHttpHandler(h); - } - - @Override - public String getPath() - { - return _jettyContextHandler.getContextPath(); - } - - @Override - public HttpServer getServer() - { - return _server; - } - - @Override - public Map getAttributes() - { - return _attributes; - } - - @Override - public List getFilters() - { - return _filters; - } - - @Override - public Authenticator setAuthenticator(Authenticator auth) - { - Authenticator previous = _authenticator; - _authenticator = auth; - return previous; - } - - @Override - public Authenticator getAuthenticator() - { - return _authenticator; - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.sun.net.httpserver.Authenticator; +import com.sun.net.httpserver.Filter; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; + +/** + * Jetty implementation of {@link com.sun.net.httpserver.HttpContext} + */ +public class JettyHttpContext extends com.sun.net.httpserver.HttpContext +{ + + private HttpSpiContextHandler _jettyContextHandler; + + private HttpServer _server; + + private Map _attributes = new HashMap(); + + private List _filters = new ArrayList(); + + private Authenticator _authenticator; + + + protected JettyHttpContext(HttpServer server, String path, + HttpHandler handler) + { + this._server = server; + _jettyContextHandler = new HttpSpiContextHandler(this, handler); + _jettyContextHandler.setContextPath(path); + } + + protected HttpSpiContextHandler getJettyContextHandler() + { + return _jettyContextHandler; + } + + @Override + public HttpHandler getHandler() + { + return _jettyContextHandler.getHttpHandler(); + } + + @Override + public void setHandler(HttpHandler h) + { + _jettyContextHandler.setHttpHandler(h); + } + + @Override + public String getPath() + { + return _jettyContextHandler.getContextPath(); + } + + @Override + public HttpServer getServer() + { + return _server; + } + + @Override + public Map getAttributes() + { + return _attributes; + } + + @Override + public List getFilters() + { + return _filters; + } + + @Override + public Authenticator setAuthenticator(Authenticator auth) + { + Authenticator previous = _authenticator; + _authenticator = auth; + return previous; + } + + @Override + public Authenticator getAuthenticator() + { + return _authenticator; + } + +} diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java index 8d5d3afb0c0..556efbc81ce 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java @@ -1,233 +1,233 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.InetSocketAddress; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Enumeration; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.sun.net.httpserver.Headers; -import com.sun.net.httpserver.HttpContext; -import com.sun.net.httpserver.HttpExchange; -import com.sun.net.httpserver.HttpPrincipal; - -/** - * Jetty implementation of {@link com.sun.net.httpserver.HttpExchange} - */ -public class JettyHttpExchangeDelegate extends HttpExchange -{ - - private HttpContext _httpContext; - - private HttpServletRequest _req; - - private HttpServletResponse _resp; - - private Headers _responseHeaders = new Headers(); - - private int _responseCode = 0; - - private InputStream _is; - - private OutputStream _os; - - private HttpPrincipal _httpPrincipal; - - JettyHttpExchangeDelegate(HttpContext jaxWsContext, HttpServletRequest req, HttpServletResponse resp) - { - this._httpContext = jaxWsContext; - this._req = req; - this._resp = resp; - try - { - this._is = req.getInputStream(); - this._os = resp.getOutputStream(); - } - catch (IOException ex) - { - throw new RuntimeException(ex); - } - } - - @Override - public Headers getRequestHeaders() - { - Headers headers = new Headers(); - Enumeration en = _req.getHeaderNames(); - while (en.hasMoreElements()) - { - String name = (String)en.nextElement(); - Enumeration en2 = _req.getHeaders(name); - while (en2.hasMoreElements()) - { - String value = (String)en2.nextElement(); - headers.add(name,value); - } - } - return headers; - } - - @Override - public Headers getResponseHeaders() - { - return _responseHeaders; - } - - @Override - public URI getRequestURI() - { - try - { - String uriAsString = _req.getRequestURI(); - if (_req.getQueryString() != null) - { - uriAsString += "?" + _req.getQueryString(); - } - - return new URI(uriAsString); - } - catch (URISyntaxException ex) - { - throw new RuntimeException(ex); - } - } - - @Override - public String getRequestMethod() - { - return _req.getMethod(); - } - - @Override - public HttpContext getHttpContext() - { - return _httpContext; - } - - @Override - public void close() - { - try - { - _resp.getOutputStream().close(); - } - catch (IOException ex) - { - throw new RuntimeException(ex); - } - } - - @Override - public InputStream getRequestBody() - { - return _is; - } - - @Override - public OutputStream getResponseBody() - { - return _os; - } - - @Override - public void sendResponseHeaders(int rCode, long responseLength) throws IOException - { - this._responseCode = rCode; - - for (Map.Entry> stringListEntry : _responseHeaders.entrySet()) - { - String name = stringListEntry.getKey(); - List values = stringListEntry.getValue(); - - for (String value : values) - { - _resp.setHeader(name,value); - } - } - if (responseLength > 0) - { - _resp.setHeader("content-length","" + responseLength); - } - _resp.setStatus(rCode); - } - - @Override - public InetSocketAddress getRemoteAddress() - { - return new InetSocketAddress(_req.getRemoteAddr(),_req.getRemotePort()); - } - - @Override - public int getResponseCode() - { - return _responseCode; - } - - @Override - public InetSocketAddress getLocalAddress() - { - return new InetSocketAddress(_req.getLocalAddr(),_req.getLocalPort()); - } - - @Override - public String getProtocol() - { - return _req.getProtocol(); - } - - @Override - public Object getAttribute(String name) - { - return _req.getAttribute(name); - } - - @Override - public void setAttribute(String name, Object value) - { - _req.setAttribute(name,value); - } - - @Override - public void setStreams(InputStream i, OutputStream o) - { - _is = i; - _os = o; - } - - @Override - public HttpPrincipal getPrincipal() - { - return _httpPrincipal; - } - - public void setPrincipal(HttpPrincipal principal) - { - this._httpPrincipal = principal; - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Enumeration; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.sun.net.httpserver.Headers; +import com.sun.net.httpserver.HttpContext; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpPrincipal; + +/** + * Jetty implementation of {@link com.sun.net.httpserver.HttpExchange} + */ +public class JettyHttpExchangeDelegate extends HttpExchange +{ + + private HttpContext _httpContext; + + private HttpServletRequest _req; + + private HttpServletResponse _resp; + + private Headers _responseHeaders = new Headers(); + + private int _responseCode = 0; + + private InputStream _is; + + private OutputStream _os; + + private HttpPrincipal _httpPrincipal; + + JettyHttpExchangeDelegate(HttpContext jaxWsContext, HttpServletRequest req, HttpServletResponse resp) + { + this._httpContext = jaxWsContext; + this._req = req; + this._resp = resp; + try + { + this._is = req.getInputStream(); + this._os = resp.getOutputStream(); + } + catch (IOException ex) + { + throw new RuntimeException(ex); + } + } + + @Override + public Headers getRequestHeaders() + { + Headers headers = new Headers(); + Enumeration en = _req.getHeaderNames(); + while (en.hasMoreElements()) + { + String name = (String)en.nextElement(); + Enumeration en2 = _req.getHeaders(name); + while (en2.hasMoreElements()) + { + String value = (String)en2.nextElement(); + headers.add(name,value); + } + } + return headers; + } + + @Override + public Headers getResponseHeaders() + { + return _responseHeaders; + } + + @Override + public URI getRequestURI() + { + try + { + String uriAsString = _req.getRequestURI(); + if (_req.getQueryString() != null) + { + uriAsString += "?" + _req.getQueryString(); + } + + return new URI(uriAsString); + } + catch (URISyntaxException ex) + { + throw new RuntimeException(ex); + } + } + + @Override + public String getRequestMethod() + { + return _req.getMethod(); + } + + @Override + public HttpContext getHttpContext() + { + return _httpContext; + } + + @Override + public void close() + { + try + { + _resp.getOutputStream().close(); + } + catch (IOException ex) + { + throw new RuntimeException(ex); + } + } + + @Override + public InputStream getRequestBody() + { + return _is; + } + + @Override + public OutputStream getResponseBody() + { + return _os; + } + + @Override + public void sendResponseHeaders(int rCode, long responseLength) throws IOException + { + this._responseCode = rCode; + + for (Map.Entry> stringListEntry : _responseHeaders.entrySet()) + { + String name = stringListEntry.getKey(); + List values = stringListEntry.getValue(); + + for (String value : values) + { + _resp.setHeader(name,value); + } + } + if (responseLength > 0) + { + _resp.setHeader("content-length","" + responseLength); + } + _resp.setStatus(rCode); + } + + @Override + public InetSocketAddress getRemoteAddress() + { + return new InetSocketAddress(_req.getRemoteAddr(),_req.getRemotePort()); + } + + @Override + public int getResponseCode() + { + return _responseCode; + } + + @Override + public InetSocketAddress getLocalAddress() + { + return new InetSocketAddress(_req.getLocalAddr(),_req.getLocalPort()); + } + + @Override + public String getProtocol() + { + return _req.getProtocol(); + } + + @Override + public Object getAttribute(String name) + { + return _req.getAttribute(name); + } + + @Override + public void setAttribute(String name, Object value) + { + _req.setAttribute(name,value); + } + + @Override + public void setStreams(InputStream i, OutputStream o) + { + _is = i; + _os = o; + } + + @Override + public HttpPrincipal getPrincipal() + { + return _httpPrincipal; + } + + public void setPrincipal(HttpPrincipal principal) + { + this._httpPrincipal = principal; + } + +} diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java index 82575efa6c2..423b9420545 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java @@ -1,80 +1,80 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import com.sun.net.httpserver.HttpServer; -import com.sun.net.httpserver.HttpsServer; -import com.sun.net.httpserver.spi.HttpServerProvider; - -import java.io.IOException; -import java.net.InetSocketAddress; - -import org.eclipse.jetty.server.Handler; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.ContextHandlerCollection; -import org.eclipse.jetty.server.handler.DefaultHandler; -import org.eclipse.jetty.server.handler.HandlerCollection; -import org.eclipse.jetty.util.thread.QueuedThreadPool; -import org.eclipse.jetty.util.thread.ThreadPool; - -/** - * Jetty implementation of Java HTTP Server SPI - */ -public class JettyHttpServerProvider extends HttpServerProvider -{ - - private static Server _server; - - public static void setServer(Server server) - { - _server = server; - } - - @Override - public HttpServer createHttpServer(InetSocketAddress addr, int backlog) - throws IOException - { - Server server = _server; - boolean shared = true; - - if (server == null) - { - ThreadPool threadPool = new DelegatingThreadPool(new QueuedThreadPool()); - server = new Server(threadPool); - - HandlerCollection handlerCollection = new HandlerCollection(); - handlerCollection.setHandlers(new Handler[] {new ContextHandlerCollection(), new DefaultHandler()}); - server.setHandler(handlerCollection); - - shared = false; - } - - JettyHttpServer jettyHttpServer = new JettyHttpServer(server, shared); - if (addr != null) - jettyHttpServer.bind(addr, backlog); - return jettyHttpServer; - } - - @Override - public HttpsServer createHttpsServer(InetSocketAddress addr, int backlog) throws IOException - { - throw new UnsupportedOperationException(); - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import com.sun.net.httpserver.HttpServer; +import com.sun.net.httpserver.HttpsServer; +import com.sun.net.httpserver.spi.HttpServerProvider; + +import java.io.IOException; +import java.net.InetSocketAddress; + +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.ContextHandlerCollection; +import org.eclipse.jetty.server.handler.DefaultHandler; +import org.eclipse.jetty.server.handler.HandlerCollection; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.eclipse.jetty.util.thread.ThreadPool; + +/** + * Jetty implementation of Java HTTP Server SPI + */ +public class JettyHttpServerProvider extends HttpServerProvider +{ + + private static Server _server; + + public static void setServer(Server server) + { + _server = server; + } + + @Override + public HttpServer createHttpServer(InetSocketAddress addr, int backlog) + throws IOException + { + Server server = _server; + boolean shared = true; + + if (server == null) + { + ThreadPool threadPool = new DelegatingThreadPool(new QueuedThreadPool()); + server = new Server(threadPool); + + HandlerCollection handlerCollection = new HandlerCollection(); + handlerCollection.setHandlers(new Handler[] {new ContextHandlerCollection(), new DefaultHandler()}); + server.setHandler(handlerCollection); + + shared = false; + } + + JettyHttpServer jettyHttpServer = new JettyHttpServer(server, shared); + if (addr != null) + jettyHttpServer.bind(addr, backlog); + return jettyHttpServer; + } + + @Override + public HttpsServer createHttpsServer(InetSocketAddress addr, int backlog) throws IOException + { + throw new UnsupportedOperationException(); + } + +} diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java index d998a42e222..c63dadb3b17 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java @@ -1,78 +1,78 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.maven.plugin; - -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; - -/** - *

- * This goal is used to run Jetty with a pre-assembled war. - *

- *

- * It accepts exactly the same options as the run-war goal. - * However, it doesn't assume that the current artifact is a - * webapp and doesn't try to assemble it into a war before its execution. - * So using it makes sense only when used in conjunction with the - * war configuration parameter pointing to a pre-built WAR. - *

- *

- * This goal is useful e.g. for launching a web app in Jetty as a target for unit-tested - * HTTP client components. - *

- * - * @goal deploy-war - * @requiresDependencyResolution runtime - * @execute phase="validate" - * @description Deploy a pre-assembled war - * - */ -public class JettyDeployWar extends JettyRunWarMojo -{ - - - /** - * If true, the plugin should continue and not block. Otherwise the - * plugin will block further execution and you will need to use - * cntrl-c to stop it. - * - * - * @parameter default-value="true" - */ - protected boolean daemon = true; - - - @Override - public void execute() throws MojoExecutionException, MojoFailureException - { - nonblocking = daemon; - super.execute(); - } - - - - @Override - public void finishConfigurationBeforeStart() throws Exception - { - super.finishConfigurationBeforeStart(); - //only stop the server at shutdown if we are blocking - server.setStopAtShutdown(!nonblocking); - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.maven.plugin; + +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; + +/** + *

+ * This goal is used to run Jetty with a pre-assembled war. + *

+ *

+ * It accepts exactly the same options as the run-war goal. + * However, it doesn't assume that the current artifact is a + * webapp and doesn't try to assemble it into a war before its execution. + * So using it makes sense only when used in conjunction with the + * war configuration parameter pointing to a pre-built WAR. + *

+ *

+ * This goal is useful e.g. for launching a web app in Jetty as a target for unit-tested + * HTTP client components. + *

+ * + * @goal deploy-war + * @requiresDependencyResolution runtime + * @execute phase="validate" + * @description Deploy a pre-assembled war + * + */ +public class JettyDeployWar extends JettyRunWarMojo +{ + + + /** + * If true, the plugin should continue and not block. Otherwise the + * plugin will block further execution and you will need to use + * cntrl-c to stop it. + * + * + * @parameter default-value="true" + */ + protected boolean daemon = true; + + + @Override + public void execute() throws MojoExecutionException, MojoFailureException + { + nonblocking = daemon; + super.execute(); + } + + + + @Override + public void finishConfigurationBeforeStart() throws Exception + { + super.finishConfigurationBeforeStart(); + //only stop the server at shutdown if we are blocking + server.setStopAtShutdown(!nonblocking); + } + +} diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java index 0237b4174fe..164a7e27c12 100644 --- a/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java +++ b/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java @@ -1,182 +1,182 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.security; - -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.startsWith; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.eclipse.jetty.http.HttpStatus; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Handler; -import org.eclipse.jetty.server.LocalConnector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.ContextHandler; -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.server.session.SessionHandler; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.eclipse.jetty.util.security.Constraint; -import org.eclipse.jetty.util.security.Password; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameter; -import org.junit.runners.Parameterized.Parameters; - -/** - * Some requests for static data that is served by ResourceHandler, but some is secured. - *

- * This is mainly here to test security bypass techniques using aliased names that should be caught. - */ -@RunWith(Parameterized.class) -public class AliasedConstraintTest -{ - private static final String TEST_REALM = "TestRealm"; - private static Server server; - private static LocalConnector connector; - private static ConstraintSecurityHandler security; - - @BeforeClass - public static void startServer() throws Exception - { - server = new Server(); - connector = new LocalConnector(server); - server.setConnectors(new Connector[] { connector }); - - ContextHandler context = new ContextHandler(); - SessionHandler session = new SessionHandler(); - - HashLoginService loginService = new HashLoginService(TEST_REALM); - loginService.putUser("user0",new Password("password"),new String[] {}); - loginService.putUser("user",new Password("password"),new String[] { "user" }); - loginService.putUser("user2",new Password("password"),new String[] { "user" }); - loginService.putUser("admin",new Password("password"),new String[] { "user", "administrator" }); - loginService.putUser("user3",new Password("password"),new String[] { "foo" }); - - context.setContextPath("/ctx"); - context.setResourceBase(MavenTestingUtils.getTestResourceDir("docroot").getAbsolutePath()); - - HandlerList handlers = new HandlerList(); - handlers.setHandlers(new Handler[]{context,new DefaultHandler()}); - server.setHandler(handlers); - context.setHandler(session); - // context.addAliasCheck(new AllowSymLinkAliasChecker()); - - server.addBean(loginService); - - security = new ConstraintSecurityHandler(); - session.setHandler(security); - ResourceHandler handler = new ResourceHandler(); - security.setHandler(handler); - - List constraints = new ArrayList<>(); - - Constraint constraint0 = new Constraint(); - constraint0.setAuthenticate(true); - constraint0.setName("forbid"); - ConstraintMapping mapping0 = new ConstraintMapping(); - mapping0.setPathSpec("/forbid/*"); - mapping0.setConstraint(constraint0); - constraints.add(mapping0); - - Set knownRoles = new HashSet<>(); - knownRoles.add("user"); - knownRoles.add("administrator"); - - security.setConstraintMappings(constraints,knownRoles); - server.start(); - } - - @AfterClass - public static void stopServer() throws Exception - { - server.stop(); - } - - @Parameters(name = "{0}: {1}") - public static Collection data() - { - List data = new ArrayList<>(); - - final String OPENCONTENT = "this is open content"; - - data.add(new Object[] { "/ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); - data.add(new Object[] { "/ctx/ALL/index.txt", HttpStatus.NOT_FOUND_404, null }); - data.add(new Object[] { "/ctx/ALL/Fred/../index.txt", HttpStatus.NOT_FOUND_404, null }); - data.add(new Object[] { "/ctx/../bar/../ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); - data.add(new Object[] { "/ctx/forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); - data.add(new Object[] { "/ctx/all/../forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); - data.add(new Object[] { "/ctx/FoRbId/index.txt", HttpStatus.NOT_FOUND_404, null }); - - return data; - } - - @Parameter(value = 0) - public String uri; - - @Parameter(value = 1) - public int expectedStatusCode; - - @Parameter(value = 2) - public String expectedContent; - - @Test - public void testAccess() throws Exception - { - StringBuilder request = new StringBuilder(); - request.append("GET ").append(uri).append(" HTTP/1.1\r\n"); - request.append("Host: localhost\r\n"); - request.append("Connection: close\r\n"); - request.append("\r\n"); - - String response = connector.getResponses(request.toString()); - - switch (expectedStatusCode) - { - case 200: - assertThat(response,startsWith("HTTP/1.1 200 OK")); - break; - case 403: - assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); - break; - case 404: - assertThat(response,startsWith("HTTP/1.1 404 Not Found")); - break; - default: - fail("Write a handler for response status code: " + expectedStatusCode); - break; - } - - if (expectedContent != null) - { - assertThat(response,containsString("this is open content")); - } - } -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.security; + +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.startsWith; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.jetty.http.HttpStatus; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.LocalConnector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.ContextHandler; +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.server.session.SessionHandler; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.eclipse.jetty.util.security.Constraint; +import org.eclipse.jetty.util.security.Password; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +/** + * Some requests for static data that is served by ResourceHandler, but some is secured. + *

+ * This is mainly here to test security bypass techniques using aliased names that should be caught. + */ +@RunWith(Parameterized.class) +public class AliasedConstraintTest +{ + private static final String TEST_REALM = "TestRealm"; + private static Server server; + private static LocalConnector connector; + private static ConstraintSecurityHandler security; + + @BeforeClass + public static void startServer() throws Exception + { + server = new Server(); + connector = new LocalConnector(server); + server.setConnectors(new Connector[] { connector }); + + ContextHandler context = new ContextHandler(); + SessionHandler session = new SessionHandler(); + + HashLoginService loginService = new HashLoginService(TEST_REALM); + loginService.putUser("user0",new Password("password"),new String[] {}); + loginService.putUser("user",new Password("password"),new String[] { "user" }); + loginService.putUser("user2",new Password("password"),new String[] { "user" }); + loginService.putUser("admin",new Password("password"),new String[] { "user", "administrator" }); + loginService.putUser("user3",new Password("password"),new String[] { "foo" }); + + context.setContextPath("/ctx"); + context.setResourceBase(MavenTestingUtils.getTestResourceDir("docroot").getAbsolutePath()); + + HandlerList handlers = new HandlerList(); + handlers.setHandlers(new Handler[]{context,new DefaultHandler()}); + server.setHandler(handlers); + context.setHandler(session); + // context.addAliasCheck(new AllowSymLinkAliasChecker()); + + server.addBean(loginService); + + security = new ConstraintSecurityHandler(); + session.setHandler(security); + ResourceHandler handler = new ResourceHandler(); + security.setHandler(handler); + + List constraints = new ArrayList<>(); + + Constraint constraint0 = new Constraint(); + constraint0.setAuthenticate(true); + constraint0.setName("forbid"); + ConstraintMapping mapping0 = new ConstraintMapping(); + mapping0.setPathSpec("/forbid/*"); + mapping0.setConstraint(constraint0); + constraints.add(mapping0); + + Set knownRoles = new HashSet<>(); + knownRoles.add("user"); + knownRoles.add("administrator"); + + security.setConstraintMappings(constraints,knownRoles); + server.start(); + } + + @AfterClass + public static void stopServer() throws Exception + { + server.stop(); + } + + @Parameters(name = "{0}: {1}") + public static Collection data() + { + List data = new ArrayList<>(); + + final String OPENCONTENT = "this is open content"; + + data.add(new Object[] { "/ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); + data.add(new Object[] { "/ctx/ALL/index.txt", HttpStatus.NOT_FOUND_404, null }); + data.add(new Object[] { "/ctx/ALL/Fred/../index.txt", HttpStatus.NOT_FOUND_404, null }); + data.add(new Object[] { "/ctx/../bar/../ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); + data.add(new Object[] { "/ctx/forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); + data.add(new Object[] { "/ctx/all/../forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); + data.add(new Object[] { "/ctx/FoRbId/index.txt", HttpStatus.NOT_FOUND_404, null }); + + return data; + } + + @Parameter(value = 0) + public String uri; + + @Parameter(value = 1) + public int expectedStatusCode; + + @Parameter(value = 2) + public String expectedContent; + + @Test + public void testAccess() throws Exception + { + StringBuilder request = new StringBuilder(); + request.append("GET ").append(uri).append(" HTTP/1.1\r\n"); + request.append("Host: localhost\r\n"); + request.append("Connection: close\r\n"); + request.append("\r\n"); + + String response = connector.getResponses(request.toString()); + + switch (expectedStatusCode) + { + case 200: + assertThat(response,startsWith("HTTP/1.1 200 OK")); + break; + case 403: + assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); + break; + case 404: + assertThat(response,startsWith("HTTP/1.1 404 Not Found")); + break; + default: + fail("Write a handler for response status code: " + expectedStatusCode); + break; + } + + if (expectedContent != null) + { + assertThat(response,containsString("this is open content")); + } + } +} diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ThreadStarvationTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ThreadStarvationTest.java index 9a7ed1650f2..b52db506bc2 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ThreadStarvationTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ThreadStarvationTest.java @@ -1,409 +1,409 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.servlets; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.nio.ByteBuffer; -import java.nio.channels.SelectionKey; -import java.nio.channels.SocketChannel; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardOpenOption; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.BrokenBarrierException; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.CyclicBarrier; -import java.util.concurrent.Exchanger; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.eclipse.jetty.io.ManagedSelector; -import org.eclipse.jetty.io.SelectChannelEndPoint; -import org.eclipse.jetty.server.HttpChannel; -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.ServerConnector; -import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.servlet.DefaultServlet; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.eclipse.jetty.toolchain.test.TestTracker; -import org.eclipse.jetty.toolchain.test.annotation.Slow; -import org.eclipse.jetty.util.log.StacklessLogging; -import org.eclipse.jetty.util.thread.QueuedThreadPool; -import org.junit.After; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; - -public class ThreadStarvationTest -{ - @Rule - public TestTracker tracker = new TestTracker(); - private Server _server; - - @After - public void dispose() throws Exception - { - if (_server != null) - _server.stop(); - } - - @Test - @Slow - public void testDefaultServletSuccess() throws Exception - { - int maxThreads = 10; - QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads, maxThreads); - threadPool.setDetailedDump(true); - _server = new Server(threadPool); - - // Prepare a big file to download. - File directory = MavenTestingUtils.getTargetTestingDir(); - Files.createDirectories(directory.toPath()); - String resourceName = "resource.bin"; - Path resourcePath = Paths.get(directory.getPath(), resourceName); - try (OutputStream output = Files.newOutputStream(resourcePath, StandardOpenOption.CREATE, StandardOpenOption.WRITE)) - { - byte[] chunk = new byte[1024]; - Arrays.fill(chunk,(byte)'X'); - chunk[chunk.length-2]='\r'; - chunk[chunk.length-1]='\n'; - for (int i = 0; i < 256 * 1024; ++i) - output.write(chunk); - } - - final CountDownLatch writePending = new CountDownLatch(1); - ServerConnector connector = new ServerConnector(_server, 0, 1) - { - @Override - protected SelectChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException - { - return new SelectChannelEndPoint(channel, selectSet, key, getScheduler(), getIdleTimeout()) - { - @Override - protected void onIncompleteFlush() - { - super.onIncompleteFlush(); - writePending.countDown(); - } - }; - } - }; - connector.setIdleTimeout(Long.MAX_VALUE); - _server.addConnector(connector); - - ServletContextHandler context = new ServletContextHandler(_server, "/"); - context.setResourceBase(directory.toURI().toString()); - context.addServlet(DefaultServlet.class, "/*").setAsyncSupported(false); - _server.setHandler(context); - - _server.start(); - - List sockets = new ArrayList<>(); - for (int i = 0; i < maxThreads*2; ++i) - { - Socket socket = new Socket("localhost", connector.getLocalPort()); - sockets.add(socket); - OutputStream output = socket.getOutputStream(); - String request = "" + - "GET /" + resourceName + " HTTP/1.1\r\n" + - "Host: localhost\r\n" + - "\r\n"; - output.write(request.getBytes(StandardCharsets.UTF_8)); - output.flush(); - Thread.sleep(100); - } - - // Wait for a the servlet to block. - Assert.assertTrue(writePending.await(5, TimeUnit.SECONDS)); - - long expected = Files.size(resourcePath); - byte[] buffer = new byte[48 * 1024]; - List> totals = new ArrayList<>(); - for (Socket socket : sockets) - { - final Exchanger x = new Exchanger<>(); - totals.add(x); - final InputStream input = socket.getInputStream(); - - new Thread() - { - @Override - public void run() - { - long total=0; - try - { - // look for CRLFCRLF - StringBuilder header = new StringBuilder(); - int state=0; - while (state<4 && header.length()<2048) - { - int ch=input.read(); - if (ch<0) - break; - header.append((char)ch); - switch(state) - { - case 0: - if (ch=='\r') - state=1; - break; - case 1: - if (ch=='\n') - state=2; - else - state=0; - break; - case 2: - if (ch=='\r') - state=3; - else - state=0; - break; - case 3: - if (ch=='\n') - state=4; - else - state=0; - break; - } - } - - while (total x : totals) - { - Long total = x.exchange(-1L,10000,TimeUnit.SECONDS); - Assert.assertEquals(expected,total.longValue()); - } - - // We could read everything, good. - for (Socket socket : sockets) - socket.close(); - } - - @Test - public void testFailureStarvation() throws Exception - { - try (StacklessLogging stackless = new StacklessLogging(HttpChannel.class)) - { - int acceptors = 0; - int selectors = 1; - int maxThreads = 10; - final int barried=maxThreads-acceptors-selectors; - final CyclicBarrier barrier = new CyclicBarrier(barried); - - - QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads, maxThreads); - threadPool.setDetailedDump(true); - _server = new Server(threadPool); - - - ServerConnector connector = new ServerConnector(_server, acceptors, selectors) - { - @Override - protected SelectChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException - { - return new SelectChannelEndPoint(channel, selectSet, key, getScheduler(), getIdleTimeout()) - { - - @Override - public boolean flush(ByteBuffer... buffers) throws IOException - { - super.flush(buffers[0]); - throw new IOException("TEST FAILURE"); - } - - }; - } - }; - connector.setIdleTimeout(Long.MAX_VALUE); - _server.addConnector(connector); - - final AtomicInteger count = new AtomicInteger(0); - _server.setHandler(new AbstractHandler() - { - @Override - public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException - { - int c=count.getAndIncrement(); - try - { - if (c sockets = new ArrayList<>(); - for (int i = 0; i < maxThreads*2; ++i) - { - Socket socket = new Socket("localhost", connector.getLocalPort()); - sockets.add(socket); - OutputStream output = socket.getOutputStream(); - String request = "" + - "GET / HTTP/1.1\r\n" + - "Host: localhost\r\n" + - // "Connection: close\r\n" + - "\r\n"; - output.write(request.getBytes(StandardCharsets.UTF_8)); - output.flush(); - } - - - byte[] buffer = new byte[48 * 1024]; - List> totals = new ArrayList<>(); - for (Socket socket : sockets) - { - final Exchanger x = new Exchanger<>(); - totals.add(x); - final InputStream input = socket.getInputStream(); - - new Thread() - { - @Override - public void run() - { - int read=0; - try - { - // look for CRLFCRLF - StringBuilder header = new StringBuilder(); - int state=0; - while (state<4 && header.length()<2048) - { - int ch=input.read(); - if (ch<0) - break; - header.append((char)ch); - switch(state) - { - case 0: - if (ch=='\r') - state=1; - break; - case 1: - if (ch=='\n') - state=2; - else - state=0; - break; - case 2: - if (ch=='\r') - state=3; - else - state=0; - break; - case 3: - if (ch=='\n') - state=4; - else - state=0; - break; - } - } - - read=input.read(buffer); - } - catch (IOException e) - { - // e.printStackTrace(); - } - finally - { - try - { - x.exchange(read); - } - catch (InterruptedException e) - { - e.printStackTrace(); - } - } - } - }.start(); - } - - for (Exchanger x : totals) - { - Integer read = x.exchange(-1,10,TimeUnit.SECONDS); - Assert.assertEquals(-1,read.intValue()); - } - - // We could read everything, good. - for (Socket socket : sockets) - socket.close(); - - _server.stop(); - } - } -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.servlets; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.Socket; +import java.nio.ByteBuffer; +import java.nio.channels.SelectionKey; +import java.nio.channels.SocketChannel; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.BrokenBarrierException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.CyclicBarrier; +import java.util.concurrent.Exchanger; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.io.ManagedSelector; +import org.eclipse.jetty.io.SelectChannelEndPoint; +import org.eclipse.jetty.server.HttpChannel; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.eclipse.jetty.servlet.DefaultServlet; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.eclipse.jetty.toolchain.test.TestTracker; +import org.eclipse.jetty.toolchain.test.annotation.Slow; +import org.eclipse.jetty.util.log.StacklessLogging; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.junit.After; +import org.junit.Assert; +import org.junit.Rule; +import org.junit.Test; + +public class ThreadStarvationTest +{ + @Rule + public TestTracker tracker = new TestTracker(); + private Server _server; + + @After + public void dispose() throws Exception + { + if (_server != null) + _server.stop(); + } + + @Test + @Slow + public void testDefaultServletSuccess() throws Exception + { + int maxThreads = 10; + QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads, maxThreads); + threadPool.setDetailedDump(true); + _server = new Server(threadPool); + + // Prepare a big file to download. + File directory = MavenTestingUtils.getTargetTestingDir(); + Files.createDirectories(directory.toPath()); + String resourceName = "resource.bin"; + Path resourcePath = Paths.get(directory.getPath(), resourceName); + try (OutputStream output = Files.newOutputStream(resourcePath, StandardOpenOption.CREATE, StandardOpenOption.WRITE)) + { + byte[] chunk = new byte[1024]; + Arrays.fill(chunk,(byte)'X'); + chunk[chunk.length-2]='\r'; + chunk[chunk.length-1]='\n'; + for (int i = 0; i < 256 * 1024; ++i) + output.write(chunk); + } + + final CountDownLatch writePending = new CountDownLatch(1); + ServerConnector connector = new ServerConnector(_server, 0, 1) + { + @Override + protected SelectChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException + { + return new SelectChannelEndPoint(channel, selectSet, key, getScheduler(), getIdleTimeout()) + { + @Override + protected void onIncompleteFlush() + { + super.onIncompleteFlush(); + writePending.countDown(); + } + }; + } + }; + connector.setIdleTimeout(Long.MAX_VALUE); + _server.addConnector(connector); + + ServletContextHandler context = new ServletContextHandler(_server, "/"); + context.setResourceBase(directory.toURI().toString()); + context.addServlet(DefaultServlet.class, "/*").setAsyncSupported(false); + _server.setHandler(context); + + _server.start(); + + List sockets = new ArrayList<>(); + for (int i = 0; i < maxThreads*2; ++i) + { + Socket socket = new Socket("localhost", connector.getLocalPort()); + sockets.add(socket); + OutputStream output = socket.getOutputStream(); + String request = "" + + "GET /" + resourceName + " HTTP/1.1\r\n" + + "Host: localhost\r\n" + + "\r\n"; + output.write(request.getBytes(StandardCharsets.UTF_8)); + output.flush(); + Thread.sleep(100); + } + + // Wait for a the servlet to block. + Assert.assertTrue(writePending.await(5, TimeUnit.SECONDS)); + + long expected = Files.size(resourcePath); + byte[] buffer = new byte[48 * 1024]; + List> totals = new ArrayList<>(); + for (Socket socket : sockets) + { + final Exchanger x = new Exchanger<>(); + totals.add(x); + final InputStream input = socket.getInputStream(); + + new Thread() + { + @Override + public void run() + { + long total=0; + try + { + // look for CRLFCRLF + StringBuilder header = new StringBuilder(); + int state=0; + while (state<4 && header.length()<2048) + { + int ch=input.read(); + if (ch<0) + break; + header.append((char)ch); + switch(state) + { + case 0: + if (ch=='\r') + state=1; + break; + case 1: + if (ch=='\n') + state=2; + else + state=0; + break; + case 2: + if (ch=='\r') + state=3; + else + state=0; + break; + case 3: + if (ch=='\n') + state=4; + else + state=0; + break; + } + } + + while (total x : totals) + { + Long total = x.exchange(-1L,10000,TimeUnit.SECONDS); + Assert.assertEquals(expected,total.longValue()); + } + + // We could read everything, good. + for (Socket socket : sockets) + socket.close(); + } + + @Test + public void testFailureStarvation() throws Exception + { + try (StacklessLogging stackless = new StacklessLogging(HttpChannel.class)) + { + int acceptors = 0; + int selectors = 1; + int maxThreads = 10; + final int barried=maxThreads-acceptors-selectors; + final CyclicBarrier barrier = new CyclicBarrier(barried); + + + QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads, maxThreads); + threadPool.setDetailedDump(true); + _server = new Server(threadPool); + + + ServerConnector connector = new ServerConnector(_server, acceptors, selectors) + { + @Override + protected SelectChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException + { + return new SelectChannelEndPoint(channel, selectSet, key, getScheduler(), getIdleTimeout()) + { + + @Override + public boolean flush(ByteBuffer... buffers) throws IOException + { + super.flush(buffers[0]); + throw new IOException("TEST FAILURE"); + } + + }; + } + }; + connector.setIdleTimeout(Long.MAX_VALUE); + _server.addConnector(connector); + + final AtomicInteger count = new AtomicInteger(0); + _server.setHandler(new AbstractHandler() + { + @Override + public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException + { + int c=count.getAndIncrement(); + try + { + if (c sockets = new ArrayList<>(); + for (int i = 0; i < maxThreads*2; ++i) + { + Socket socket = new Socket("localhost", connector.getLocalPort()); + sockets.add(socket); + OutputStream output = socket.getOutputStream(); + String request = "" + + "GET / HTTP/1.1\r\n" + + "Host: localhost\r\n" + + // "Connection: close\r\n" + + "\r\n"; + output.write(request.getBytes(StandardCharsets.UTF_8)); + output.flush(); + } + + + byte[] buffer = new byte[48 * 1024]; + List> totals = new ArrayList<>(); + for (Socket socket : sockets) + { + final Exchanger x = new Exchanger<>(); + totals.add(x); + final InputStream input = socket.getInputStream(); + + new Thread() + { + @Override + public void run() + { + int read=0; + try + { + // look for CRLFCRLF + StringBuilder header = new StringBuilder(); + int state=0; + while (state<4 && header.length()<2048) + { + int ch=input.read(); + if (ch<0) + break; + header.append((char)ch); + switch(state) + { + case 0: + if (ch=='\r') + state=1; + break; + case 1: + if (ch=='\n') + state=2; + else + state=0; + break; + case 2: + if (ch=='\r') + state=3; + else + state=0; + break; + case 3: + if (ch=='\n') + state=4; + else + state=0; + break; + } + } + + read=input.read(buffer); + } + catch (IOException e) + { + // e.printStackTrace(); + } + finally + { + try + { + x.exchange(read); + } + catch (InterruptedException e) + { + e.printStackTrace(); + } + } + } + }.start(); + } + + for (Exchanger x : totals) + { + Integer read = x.exchange(-1,10,TimeUnit.SECONDS); + Assert.assertEquals(-1,read.intValue()); + } + + // We could read everything, good. + for (Socket socket : sockets) + socket.close(); + + _server.stop(); + } + } +} diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java index 18e61875841..aa43ca9d407 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java @@ -1,214 +1,214 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.start; - -import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.startsWith; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jetty.start.config.ConfigSources; -import org.eclipse.jetty.start.config.JettyBaseConfigSource; -import org.eclipse.jetty.start.config.JettyHomeConfigSource; -import org.eclipse.jetty.toolchain.test.IO; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.junit.Assert; -import org.junit.Test; - -public class BaseHomeTest -{ - public static void assertPathList(BaseHome hb, String message, List expected, PathFinder finder) - { - List actual = new ArrayList<>(); - for (Path path : finder.getHits()) - { - actual.add(hb.toShortForm(path.toFile())); - } - - if (actual.size() != expected.size()) - { - System.out.printf("Actual Path(s): %,d hits%n",actual.size()); - for (String path : actual) - { - System.out.printf(" %s%n",path); - } - System.out.printf("Expected Path(s): %,d entries%n",expected.size()); - for (String path : expected) - { - System.out.printf(" %s%n",path); - } - } - Assert.assertThat(message + ": " + Utils.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); - } - - public static void assertPathList(BaseHome hb, String message, List expected, List paths) - { - List actual = new ArrayList<>(); - for (Path path : paths) - { - actual.add(hb.toShortForm(path.toFile())); - } - - if (actual.size() != expected.size()) - { - System.out.printf("Actual Path(s): %,d hits%n",actual.size()); - for (String path : actual) - { - System.out.printf(" %s%n",path); - } - System.out.printf("Expected Path(s): %,d entries%n",expected.size()); - for (String path : expected) - { - System.out.printf(" %s%n",path); - } - } - Assert.assertThat(message + ": " + Utils.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); - } - - public static void assertFileList(BaseHome hb, String message, List expected, List files) - { - List actual = new ArrayList<>(); - for (File file : files) - { - actual.add(hb.toShortForm(file)); - } - Assert.assertThat(message + ": " + Utils.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); - } - - @Test - public void testGetPath_OnlyHome() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - Path startIni = hb.getPath("start.ini"); - - String ref = hb.toShortForm(startIni); - Assert.assertThat("Reference",ref,startsWith("${jetty.home}")); - - String contents = IO.readToString(startIni.toFile()); - Assert.assertThat("Contents",contents,containsString("Home Ini")); - } - - @Test - public void testGetPaths_OnlyHome() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - List paths = hb.getPaths("start.d/*"); - - List expected = new ArrayList<>(); - expected.add("${jetty.home}/start.d/jmx.ini"); - expected.add("${jetty.home}/start.d/jndi.ini"); - expected.add("${jetty.home}/start.d/jsp.ini"); - expected.add("${jetty.home}/start.d/logging.ini"); - expected.add("${jetty.home}/start.d/ssl.ini"); - FSTest.toOsSeparators(expected); - - assertPathList(hb,"Paths found",expected,paths); - } - - @Test - public void testGetPaths_OnlyHome_InisOnly() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - List paths = hb.getPaths("start.d/*.ini"); - - List expected = new ArrayList<>(); - expected.add("${jetty.home}/start.d/jmx.ini"); - expected.add("${jetty.home}/start.d/jndi.ini"); - expected.add("${jetty.home}/start.d/jsp.ini"); - expected.add("${jetty.home}/start.d/logging.ini"); - expected.add("${jetty.home}/start.d/ssl.ini"); - FSTest.toOsSeparators(expected); - - assertPathList(hb,"Paths found",expected,paths); - } - - @Test - public void testGetPaths_Both() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyBaseConfigSource(baseDir.toPath())); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - List paths = hb.getPaths("start.d/*.ini"); - - List expected = new ArrayList<>(); - expected.add("${jetty.base}/start.d/jmx.ini"); - expected.add("${jetty.home}/start.d/jndi.ini"); - expected.add("${jetty.home}/start.d/jsp.ini"); - expected.add("${jetty.base}/start.d/logging.ini"); - expected.add("${jetty.home}/start.d/ssl.ini"); - expected.add("${jetty.base}/start.d/myapp.ini"); - FSTest.toOsSeparators(expected); - - assertPathList(hb,"Paths found",expected,paths); - } - - @Test - public void testDefault() throws IOException - { - BaseHome bh = new BaseHome(); - Assert.assertThat("Home",bh.getHome(),notNullValue()); - Assert.assertThat("Base",bh.getBase(),notNullValue()); - } - - @Test - public void testGetPath_Both() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyBaseConfigSource(baseDir.toPath())); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - Path startIni = hb.getPath("start.ini"); - - String ref = hb.toShortForm(startIni); - Assert.assertThat("Reference",ref,startsWith("${jetty.base}")); - - String contents = IO.readToString(startIni.toFile()); - Assert.assertThat("Contents",contents,containsString("Base Ini")); - } -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.start; + +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.startsWith; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jetty.start.config.ConfigSources; +import org.eclipse.jetty.start.config.JettyBaseConfigSource; +import org.eclipse.jetty.start.config.JettyHomeConfigSource; +import org.eclipse.jetty.toolchain.test.IO; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.junit.Assert; +import org.junit.Test; + +public class BaseHomeTest +{ + public static void assertPathList(BaseHome hb, String message, List expected, PathFinder finder) + { + List actual = new ArrayList<>(); + for (Path path : finder.getHits()) + { + actual.add(hb.toShortForm(path.toFile())); + } + + if (actual.size() != expected.size()) + { + System.out.printf("Actual Path(s): %,d hits%n",actual.size()); + for (String path : actual) + { + System.out.printf(" %s%n",path); + } + System.out.printf("Expected Path(s): %,d entries%n",expected.size()); + for (String path : expected) + { + System.out.printf(" %s%n",path); + } + } + Assert.assertThat(message + ": " + Utils.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); + } + + public static void assertPathList(BaseHome hb, String message, List expected, List paths) + { + List actual = new ArrayList<>(); + for (Path path : paths) + { + actual.add(hb.toShortForm(path.toFile())); + } + + if (actual.size() != expected.size()) + { + System.out.printf("Actual Path(s): %,d hits%n",actual.size()); + for (String path : actual) + { + System.out.printf(" %s%n",path); + } + System.out.printf("Expected Path(s): %,d entries%n",expected.size()); + for (String path : expected) + { + System.out.printf(" %s%n",path); + } + } + Assert.assertThat(message + ": " + Utils.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); + } + + public static void assertFileList(BaseHome hb, String message, List expected, List files) + { + List actual = new ArrayList<>(); + for (File file : files) + { + actual.add(hb.toShortForm(file)); + } + Assert.assertThat(message + ": " + Utils.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); + } + + @Test + public void testGetPath_OnlyHome() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + Path startIni = hb.getPath("start.ini"); + + String ref = hb.toShortForm(startIni); + Assert.assertThat("Reference",ref,startsWith("${jetty.home}")); + + String contents = IO.readToString(startIni.toFile()); + Assert.assertThat("Contents",contents,containsString("Home Ini")); + } + + @Test + public void testGetPaths_OnlyHome() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + List paths = hb.getPaths("start.d/*"); + + List expected = new ArrayList<>(); + expected.add("${jetty.home}/start.d/jmx.ini"); + expected.add("${jetty.home}/start.d/jndi.ini"); + expected.add("${jetty.home}/start.d/jsp.ini"); + expected.add("${jetty.home}/start.d/logging.ini"); + expected.add("${jetty.home}/start.d/ssl.ini"); + FSTest.toOsSeparators(expected); + + assertPathList(hb,"Paths found",expected,paths); + } + + @Test + public void testGetPaths_OnlyHome_InisOnly() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + List paths = hb.getPaths("start.d/*.ini"); + + List expected = new ArrayList<>(); + expected.add("${jetty.home}/start.d/jmx.ini"); + expected.add("${jetty.home}/start.d/jndi.ini"); + expected.add("${jetty.home}/start.d/jsp.ini"); + expected.add("${jetty.home}/start.d/logging.ini"); + expected.add("${jetty.home}/start.d/ssl.ini"); + FSTest.toOsSeparators(expected); + + assertPathList(hb,"Paths found",expected,paths); + } + + @Test + public void testGetPaths_Both() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyBaseConfigSource(baseDir.toPath())); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + List paths = hb.getPaths("start.d/*.ini"); + + List expected = new ArrayList<>(); + expected.add("${jetty.base}/start.d/jmx.ini"); + expected.add("${jetty.home}/start.d/jndi.ini"); + expected.add("${jetty.home}/start.d/jsp.ini"); + expected.add("${jetty.base}/start.d/logging.ini"); + expected.add("${jetty.home}/start.d/ssl.ini"); + expected.add("${jetty.base}/start.d/myapp.ini"); + FSTest.toOsSeparators(expected); + + assertPathList(hb,"Paths found",expected,paths); + } + + @Test + public void testDefault() throws IOException + { + BaseHome bh = new BaseHome(); + Assert.assertThat("Home",bh.getHome(),notNullValue()); + Assert.assertThat("Base",bh.getBase(),notNullValue()); + } + + @Test + public void testGetPath_Both() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyBaseConfigSource(baseDir.toPath())); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + Path startIni = hb.getPath("start.ini"); + + String ref = hb.toShortForm(startIni); + Assert.assertThat("Reference",ref,startsWith("${jetty.base}")); + + String contents = IO.readToString(startIni.toFile()); + Assert.assertThat("Contents",contents,containsString("Base Ini")); + } +} diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java b/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java index fdf4a2d44c7..ebdbdaa42c8 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java @@ -1,284 +1,284 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.start; - -import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.greaterThanOrEqualTo; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.eclipse.jetty.start.Props.Prop; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.junit.Assert; - -public class ConfigurationAssert -{ - /** - * Given a provided StartArgs, assert that the configuration it has determined is valid based on values in a assert text file. - * - * @param baseHome - * the BaseHome used. Access it via {@link Main#getBaseHome()} - * @param args - * the StartArgs that has been processed via {@link Main#processCommandLine(String[])} - * @param filename - * the filename of the assertion values - * @throws FileNotFoundException if unable to find the configuration - * @throws IOException if unable to process the configuration - */ - public static void assertConfiguration(BaseHome baseHome, StartArgs args, String filename) throws FileNotFoundException, IOException - { - Path testResourcesDir = MavenTestingUtils.getTestResourcesDir().toPath().toRealPath(); - File file = MavenTestingUtils.getTestResourceFile(filename); - TextFile textFile = new TextFile(file.toPath()); - - // Validate XMLs (order is important) - List expectedXmls = new ArrayList<>(); - for (String line : textFile) - { - if (line.startsWith("XML|")) - { - expectedXmls.add(FS.separators(getValue(line))); - } - } - List actualXmls = new ArrayList<>(); - for (Path xml : args.getXmlFiles()) - { - actualXmls.add(shorten(baseHome,xml,testResourcesDir)); - } - assertOrdered("XML Resolution Order",expectedXmls,actualXmls); - - // Validate LIBs (order is not important) - List expectedLibs = new ArrayList<>(); - for (String line : textFile) - { - if (line.startsWith("LIB|")) - { - expectedLibs.add(FS.separators(getValue(line))); - } - } - List actualLibs = new ArrayList<>(); - for (File path : args.getClasspath()) - { - actualLibs.add(shorten(baseHome,path.toPath(),testResourcesDir)); - } - assertContainsUnordered("Libs",expectedLibs,actualLibs); - - // Validate PROPERTIES (order is not important) - Set expectedProperties = new HashSet<>(); - for (String line : textFile) - { - if (line.startsWith("PROP|")) - { - expectedProperties.add(getValue(line)); - } - } - List actualProperties = new ArrayList<>(); - for (Prop prop : args.getProperties()) - { - String name = prop.key; - if ("jetty.home".equals(name) || "jetty.base".equals(name) || - "user.dir".equals(name) || prop.origin.equals(Props.ORIGIN_SYSPROP) || - name.startsWith("java.")) - { - // strip these out from assertion, to make assertions easier. - continue; - } - actualProperties.add(prop.key + "=" + args.getProperties().expand(prop.value)); - } - assertContainsUnordered("Properties",expectedProperties,actualProperties); - - // Validate Downloads - List expectedDownloads = new ArrayList<>(); - for (String line : textFile) - { - if (line.startsWith("DOWNLOAD|")) - { - expectedDownloads.add(getValue(line)); - } - } - List actualDownloads = new ArrayList<>(); - for (FileArg darg : args.getFiles()) - { - if (darg.uri != null) - { - actualDownloads.add(String.format("%s|%s",darg.uri,darg.location)); - } - } - assertContainsUnordered("Downloads",expectedDownloads,actualDownloads); - - // Validate Files/Dirs creation - List expectedFiles = new ArrayList<>(); - for(String line: textFile) - { - if(line.startsWith("FILE|")) - { - expectedFiles.add(getValue(line)); - } - } - List actualFiles = new ArrayList<>(); - for(FileArg farg: args.getFiles()) - { - if(farg.uri == null) - { - actualFiles.add(farg.location); - } - } - assertContainsUnordered("Files/Dirs",expectedFiles,actualFiles); - } - - private static String shorten(BaseHome baseHome, Path path, Path testResourcesDir) - { - String value = baseHome.toShortForm(path); - if (value.startsWith("${")) - { - return value; - } - - if (path.startsWith(testResourcesDir)) - { - int len = testResourcesDir.toString().length(); - value = "${maven-test-resources}" + value.substring(len); - } - return value; - } - - public static void assertContainsUnordered(String msg, Collection expectedSet, Collection actualSet) - { - // same size? - boolean mismatch = expectedSet.size() != actualSet.size(); - - // test content - Set missing = new HashSet<>(); - for (String expected : expectedSet) - { - if (!actualSet.contains(expected)) - { - missing.add(expected); - } - } - - if (mismatch || missing.size() > 0) - { - // build up detailed error message - StringWriter message = new StringWriter(); - PrintWriter err = new PrintWriter(message); - - err.printf("%s: Assert Contains (Unordered)",msg); - if (mismatch) - { - err.print(" [size mismatch]"); - } - if (missing.size() >= 0) - { - err.printf(" [%d entries missing]",missing.size()); - } - err.println(); - err.printf("Actual Entries (size: %d)%n",actualSet.size()); - for (String actual : actualSet) - { - char indicator = expectedSet.contains(actual)?' ':'>'; - err.printf("%s| %s%n",indicator,actual); - } - err.printf("Expected Entries (size: %d)%n",expectedSet.size()); - for (String expected : expectedSet) - { - char indicator = actualSet.contains(expected)?' ':'>'; - err.printf("%s| %s%n",indicator,expected); - } - err.flush(); - Assert.fail(message.toString()); - } - } - - public static void assertOrdered(String msg, List expectedList, List actualList) - { - // same size? - boolean mismatch = expectedList.size() != actualList.size(); - - // test content - List badEntries = new ArrayList<>(); - int min = Math.min(expectedList.size(),actualList.size()); - int max = Math.max(expectedList.size(),actualList.size()); - for (int i = 0; i < min; i++) - { - if (!expectedList.get(i).equals(actualList.get(i))) - { - badEntries.add(i); - } - } - for (int i = min; i < max; i++) - { - badEntries.add(i); - } - - if (mismatch || badEntries.size() > 0) - { - // build up detailed error message - StringWriter message = new StringWriter(); - PrintWriter err = new PrintWriter(message); - - err.printf("%s: Assert Contains (Unordered)",msg); - if (mismatch) - { - err.print(" [size mismatch]"); - } - if (badEntries.size() >= 0) - { - err.printf(" [%d entries not matched]",badEntries.size()); - } - err.println(); - err.printf("Actual Entries (size: %d)%n",actualList.size()); - for (int i = 0; i < actualList.size(); i++) - { - String actual = actualList.get(i); - char indicator = badEntries.contains(i)?'>':' '; - err.printf("%s[%d] %s%n",indicator,i,actual); - } - - err.printf("Expected Entries (size: %d)%n",expectedList.size()); - for (int i = 0; i < expectedList.size(); i++) - { - String expected = expectedList.get(i); - char indicator = badEntries.contains(i)?'>':' '; - err.printf("%s[%d] %s%n",indicator,i,expected); - } - err.flush(); - Assert.fail(message.toString()); - } - } - - private static String getValue(String arg) - { - int idx = arg.indexOf('|'); - Assert.assertThat("Expecting '|' sign in [" + arg + "]",idx,greaterThanOrEqualTo(0)); - String value = arg.substring(idx + 1).trim(); - Assert.assertThat("Expecting Value after '|' in [" + arg + "]",value.length(),greaterThan(0)); - return value; - } -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.start; + +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.greaterThanOrEqualTo; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.jetty.start.Props.Prop; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.junit.Assert; + +public class ConfigurationAssert +{ + /** + * Given a provided StartArgs, assert that the configuration it has determined is valid based on values in a assert text file. + * + * @param baseHome + * the BaseHome used. Access it via {@link Main#getBaseHome()} + * @param args + * the StartArgs that has been processed via {@link Main#processCommandLine(String[])} + * @param filename + * the filename of the assertion values + * @throws FileNotFoundException if unable to find the configuration + * @throws IOException if unable to process the configuration + */ + public static void assertConfiguration(BaseHome baseHome, StartArgs args, String filename) throws FileNotFoundException, IOException + { + Path testResourcesDir = MavenTestingUtils.getTestResourcesDir().toPath().toRealPath(); + File file = MavenTestingUtils.getTestResourceFile(filename); + TextFile textFile = new TextFile(file.toPath()); + + // Validate XMLs (order is important) + List expectedXmls = new ArrayList<>(); + for (String line : textFile) + { + if (line.startsWith("XML|")) + { + expectedXmls.add(FS.separators(getValue(line))); + } + } + List actualXmls = new ArrayList<>(); + for (Path xml : args.getXmlFiles()) + { + actualXmls.add(shorten(baseHome,xml,testResourcesDir)); + } + assertOrdered("XML Resolution Order",expectedXmls,actualXmls); + + // Validate LIBs (order is not important) + List expectedLibs = new ArrayList<>(); + for (String line : textFile) + { + if (line.startsWith("LIB|")) + { + expectedLibs.add(FS.separators(getValue(line))); + } + } + List actualLibs = new ArrayList<>(); + for (File path : args.getClasspath()) + { + actualLibs.add(shorten(baseHome,path.toPath(),testResourcesDir)); + } + assertContainsUnordered("Libs",expectedLibs,actualLibs); + + // Validate PROPERTIES (order is not important) + Set expectedProperties = new HashSet<>(); + for (String line : textFile) + { + if (line.startsWith("PROP|")) + { + expectedProperties.add(getValue(line)); + } + } + List actualProperties = new ArrayList<>(); + for (Prop prop : args.getProperties()) + { + String name = prop.key; + if ("jetty.home".equals(name) || "jetty.base".equals(name) || + "user.dir".equals(name) || prop.origin.equals(Props.ORIGIN_SYSPROP) || + name.startsWith("java.")) + { + // strip these out from assertion, to make assertions easier. + continue; + } + actualProperties.add(prop.key + "=" + args.getProperties().expand(prop.value)); + } + assertContainsUnordered("Properties",expectedProperties,actualProperties); + + // Validate Downloads + List expectedDownloads = new ArrayList<>(); + for (String line : textFile) + { + if (line.startsWith("DOWNLOAD|")) + { + expectedDownloads.add(getValue(line)); + } + } + List actualDownloads = new ArrayList<>(); + for (FileArg darg : args.getFiles()) + { + if (darg.uri != null) + { + actualDownloads.add(String.format("%s|%s",darg.uri,darg.location)); + } + } + assertContainsUnordered("Downloads",expectedDownloads,actualDownloads); + + // Validate Files/Dirs creation + List expectedFiles = new ArrayList<>(); + for(String line: textFile) + { + if(line.startsWith("FILE|")) + { + expectedFiles.add(getValue(line)); + } + } + List actualFiles = new ArrayList<>(); + for(FileArg farg: args.getFiles()) + { + if(farg.uri == null) + { + actualFiles.add(farg.location); + } + } + assertContainsUnordered("Files/Dirs",expectedFiles,actualFiles); + } + + private static String shorten(BaseHome baseHome, Path path, Path testResourcesDir) + { + String value = baseHome.toShortForm(path); + if (value.startsWith("${")) + { + return value; + } + + if (path.startsWith(testResourcesDir)) + { + int len = testResourcesDir.toString().length(); + value = "${maven-test-resources}" + value.substring(len); + } + return value; + } + + public static void assertContainsUnordered(String msg, Collection expectedSet, Collection actualSet) + { + // same size? + boolean mismatch = expectedSet.size() != actualSet.size(); + + // test content + Set missing = new HashSet<>(); + for (String expected : expectedSet) + { + if (!actualSet.contains(expected)) + { + missing.add(expected); + } + } + + if (mismatch || missing.size() > 0) + { + // build up detailed error message + StringWriter message = new StringWriter(); + PrintWriter err = new PrintWriter(message); + + err.printf("%s: Assert Contains (Unordered)",msg); + if (mismatch) + { + err.print(" [size mismatch]"); + } + if (missing.size() >= 0) + { + err.printf(" [%d entries missing]",missing.size()); + } + err.println(); + err.printf("Actual Entries (size: %d)%n",actualSet.size()); + for (String actual : actualSet) + { + char indicator = expectedSet.contains(actual)?' ':'>'; + err.printf("%s| %s%n",indicator,actual); + } + err.printf("Expected Entries (size: %d)%n",expectedSet.size()); + for (String expected : expectedSet) + { + char indicator = actualSet.contains(expected)?' ':'>'; + err.printf("%s| %s%n",indicator,expected); + } + err.flush(); + Assert.fail(message.toString()); + } + } + + public static void assertOrdered(String msg, List expectedList, List actualList) + { + // same size? + boolean mismatch = expectedList.size() != actualList.size(); + + // test content + List badEntries = new ArrayList<>(); + int min = Math.min(expectedList.size(),actualList.size()); + int max = Math.max(expectedList.size(),actualList.size()); + for (int i = 0; i < min; i++) + { + if (!expectedList.get(i).equals(actualList.get(i))) + { + badEntries.add(i); + } + } + for (int i = min; i < max; i++) + { + badEntries.add(i); + } + + if (mismatch || badEntries.size() > 0) + { + // build up detailed error message + StringWriter message = new StringWriter(); + PrintWriter err = new PrintWriter(message); + + err.printf("%s: Assert Contains (Unordered)",msg); + if (mismatch) + { + err.print(" [size mismatch]"); + } + if (badEntries.size() >= 0) + { + err.printf(" [%d entries not matched]",badEntries.size()); + } + err.println(); + err.printf("Actual Entries (size: %d)%n",actualList.size()); + for (int i = 0; i < actualList.size(); i++) + { + String actual = actualList.get(i); + char indicator = badEntries.contains(i)?'>':' '; + err.printf("%s[%d] %s%n",indicator,i,actual); + } + + err.printf("Expected Entries (size: %d)%n",expectedList.size()); + for (int i = 0; i < expectedList.size(); i++) + { + String expected = expectedList.get(i); + char indicator = badEntries.contains(i)?'>':' '; + err.printf("%s[%d] %s%n",indicator,i,expected); + } + err.flush(); + Assert.fail(message.toString()); + } + } + + private static String getValue(String arg) + { + int idx = arg.indexOf('|'); + Assert.assertThat("Expecting '|' sign in [" + arg + "]",idx,greaterThanOrEqualTo(0)); + String value = arg.substring(idx + 1).trim(); + Assert.assertThat("Expecting Value after '|' in [" + arg + "]",value.length(),greaterThan(0)); + return value; + } +} From 1f046f44fea0e0c0139188882512fcafbc80e15f Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 3 Apr 2019 15:24:29 -0500 Subject: [PATCH 10/13] Fixing CRLF issues. Signed-off-by: Joakim Erdfelt --- .../jetty/http/spi/HttpSpiContextHandler.java | 324 +++++----- .../jetty/http/spi/JettyHttpContext.java | 222 +++---- .../http/spi/JettyHttpExchangeDelegate.java | 466 +++++++-------- .../http/spi/JettyHttpServerProvider.java | 160 ++--- .../jetty/maven/plugin/JettyDeployWar.java | 162 ++--- .../jetty/security/AliasedConstraintTest.java | 348 +++++------ .../org/eclipse/jetty/start/BaseHomeTest.java | 422 ++++++------- .../jetty/start/ConfigurationAssert.java | 562 +++++++++--------- 8 files changed, 1333 insertions(+), 1333 deletions(-) diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java index 2713682899d..7ba6bdaf626 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/HttpSpiContextHandler.java @@ -1,162 +1,162 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.List; -import java.util.Map; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.server.handler.ContextHandler; -import org.eclipse.jetty.util.StringUtil; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; - -import com.sun.net.httpserver.Authenticator; -import com.sun.net.httpserver.Authenticator.Result; -import com.sun.net.httpserver.HttpContext; -import com.sun.net.httpserver.HttpExchange; -import com.sun.net.httpserver.HttpHandler; -import com.sun.net.httpserver.HttpPrincipal; - -/** - * Jetty handler that bridges requests to {@link HttpHandler}. - */ -public class HttpSpiContextHandler extends ContextHandler -{ - public static final Logger LOG = Log.getLogger(HttpSpiContextHandler.class); - - private HttpContext _httpContext; - - private HttpHandler _httpHandler; - - public HttpSpiContextHandler(HttpContext httpContext, HttpHandler httpHandler) - { - this._httpContext = httpContext; - this._httpHandler = httpHandler; - } - - @Override - public void doScope(String target, Request baseRequest, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException - { - if (!target.startsWith(getContextPath())) - { - return; - } - - HttpExchange jettyHttpExchange; - if (baseRequest.isSecure()) - { - jettyHttpExchange = new JettyHttpsExchange(_httpContext,req,resp); - } - else - { - jettyHttpExchange = new JettyHttpExchange(_httpContext,req,resp); - } - - // TODO: add filters processing - - try - { - Authenticator auth = _httpContext.getAuthenticator(); - if (auth != null) - { - handleAuthentication(resp,jettyHttpExchange,auth); - } - else - { - _httpHandler.handle(jettyHttpExchange); - } - } - catch (Exception ex) - { - LOG.debug(ex); - PrintWriter writer = new PrintWriter(jettyHttpExchange.getResponseBody()); - - resp.setStatus(500); - writer.println("

HTTP ERROR: 500

"); - writer.println("
INTERNAL_SERVER_ERROR
"); - writer.println("

RequestURI=" + StringUtil.sanitizeXmlString(req.getRequestURI()) + "

"); - - if (LOG.isDebugEnabled()) - { - writer.println("
");
-                ex.printStackTrace(writer);
-                writer.println("
"); - } - - writer.println("

Powered by jetty://

"); - - writer.close(); - } - finally - { - baseRequest.setHandled(true); - } - - } - - private void handleAuthentication(HttpServletResponse resp, HttpExchange httpExchange, Authenticator auth) throws IOException - { - Result result = auth.authenticate(httpExchange); - if (result instanceof Authenticator.Failure) - { - int rc = ((Authenticator.Failure)result).getResponseCode(); - for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) - { - for (String value : header.getValue()) - resp.addHeader(header.getKey(),value); - } - resp.sendError(rc); - } - else if (result instanceof Authenticator.Retry) - { - int rc = ((Authenticator.Retry)result).getResponseCode(); - for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) - { - for (String value : header.getValue()) - resp.addHeader(header.getKey(),value); - } - resp.setStatus(rc); - resp.flushBuffer(); - } - else if (result instanceof Authenticator.Success) - { - HttpPrincipal principal = ((Authenticator.Success)result).getPrincipal(); - ((JettyExchange)httpExchange).setPrincipal(principal); - _httpHandler.handle(httpExchange); - } - } - - public HttpHandler getHttpHandler() - { - return _httpHandler; - } - - public void setHttpHandler(HttpHandler handler) - { - this._httpHandler = handler; - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.handler.ContextHandler; +import org.eclipse.jetty.util.StringUtil; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; + +import com.sun.net.httpserver.Authenticator; +import com.sun.net.httpserver.Authenticator.Result; +import com.sun.net.httpserver.HttpContext; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpPrincipal; + +/** + * Jetty handler that bridges requests to {@link HttpHandler}. + */ +public class HttpSpiContextHandler extends ContextHandler +{ + public static final Logger LOG = Log.getLogger(HttpSpiContextHandler.class); + + private HttpContext _httpContext; + + private HttpHandler _httpHandler; + + public HttpSpiContextHandler(HttpContext httpContext, HttpHandler httpHandler) + { + this._httpContext = httpContext; + this._httpHandler = httpHandler; + } + + @Override + public void doScope(String target, Request baseRequest, HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException + { + if (!target.startsWith(getContextPath())) + { + return; + } + + HttpExchange jettyHttpExchange; + if (baseRequest.isSecure()) + { + jettyHttpExchange = new JettyHttpsExchange(_httpContext,req,resp); + } + else + { + jettyHttpExchange = new JettyHttpExchange(_httpContext,req,resp); + } + + // TODO: add filters processing + + try + { + Authenticator auth = _httpContext.getAuthenticator(); + if (auth != null) + { + handleAuthentication(resp,jettyHttpExchange,auth); + } + else + { + _httpHandler.handle(jettyHttpExchange); + } + } + catch (Exception ex) + { + LOG.debug(ex); + PrintWriter writer = new PrintWriter(jettyHttpExchange.getResponseBody()); + + resp.setStatus(500); + writer.println("

HTTP ERROR: 500

"); + writer.println("
INTERNAL_SERVER_ERROR
"); + writer.println("

RequestURI=" + StringUtil.sanitizeXmlString(req.getRequestURI()) + "

"); + + if (LOG.isDebugEnabled()) + { + writer.println("
");
+                ex.printStackTrace(writer);
+                writer.println("
"); + } + + writer.println("

Powered by jetty://

"); + + writer.close(); + } + finally + { + baseRequest.setHandled(true); + } + + } + + private void handleAuthentication(HttpServletResponse resp, HttpExchange httpExchange, Authenticator auth) throws IOException + { + Result result = auth.authenticate(httpExchange); + if (result instanceof Authenticator.Failure) + { + int rc = ((Authenticator.Failure)result).getResponseCode(); + for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) + { + for (String value : header.getValue()) + resp.addHeader(header.getKey(),value); + } + resp.sendError(rc); + } + else if (result instanceof Authenticator.Retry) + { + int rc = ((Authenticator.Retry)result).getResponseCode(); + for (Map.Entry> header : httpExchange.getResponseHeaders().entrySet()) + { + for (String value : header.getValue()) + resp.addHeader(header.getKey(),value); + } + resp.setStatus(rc); + resp.flushBuffer(); + } + else if (result instanceof Authenticator.Success) + { + HttpPrincipal principal = ((Authenticator.Success)result).getPrincipal(); + ((JettyExchange)httpExchange).setPrincipal(principal); + _httpHandler.handle(httpExchange); + } + } + + public HttpHandler getHttpHandler() + { + return _httpHandler; + } + + public void setHttpHandler(HttpHandler handler) + { + this._httpHandler = handler; + } + +} diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java index 39d2285addb..18b45d99ea5 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpContext.java @@ -1,111 +1,111 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.sun.net.httpserver.Authenticator; -import com.sun.net.httpserver.Filter; -import com.sun.net.httpserver.HttpHandler; -import com.sun.net.httpserver.HttpServer; - -/** - * Jetty implementation of {@link com.sun.net.httpserver.HttpContext} - */ -public class JettyHttpContext extends com.sun.net.httpserver.HttpContext -{ - - private HttpSpiContextHandler _jettyContextHandler; - - private HttpServer _server; - - private Map _attributes = new HashMap(); - - private List _filters = new ArrayList(); - - private Authenticator _authenticator; - - - protected JettyHttpContext(HttpServer server, String path, - HttpHandler handler) - { - this._server = server; - _jettyContextHandler = new HttpSpiContextHandler(this, handler); - _jettyContextHandler.setContextPath(path); - } - - protected HttpSpiContextHandler getJettyContextHandler() - { - return _jettyContextHandler; - } - - @Override - public HttpHandler getHandler() - { - return _jettyContextHandler.getHttpHandler(); - } - - @Override - public void setHandler(HttpHandler h) - { - _jettyContextHandler.setHttpHandler(h); - } - - @Override - public String getPath() - { - return _jettyContextHandler.getContextPath(); - } - - @Override - public HttpServer getServer() - { - return _server; - } - - @Override - public Map getAttributes() - { - return _attributes; - } - - @Override - public List getFilters() - { - return _filters; - } - - @Override - public Authenticator setAuthenticator(Authenticator auth) - { - Authenticator previous = _authenticator; - _authenticator = auth; - return previous; - } - - @Override - public Authenticator getAuthenticator() - { - return _authenticator; - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.sun.net.httpserver.Authenticator; +import com.sun.net.httpserver.Filter; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; + +/** + * Jetty implementation of {@link com.sun.net.httpserver.HttpContext} + */ +public class JettyHttpContext extends com.sun.net.httpserver.HttpContext +{ + + private HttpSpiContextHandler _jettyContextHandler; + + private HttpServer _server; + + private Map _attributes = new HashMap(); + + private List _filters = new ArrayList(); + + private Authenticator _authenticator; + + + protected JettyHttpContext(HttpServer server, String path, + HttpHandler handler) + { + this._server = server; + _jettyContextHandler = new HttpSpiContextHandler(this, handler); + _jettyContextHandler.setContextPath(path); + } + + protected HttpSpiContextHandler getJettyContextHandler() + { + return _jettyContextHandler; + } + + @Override + public HttpHandler getHandler() + { + return _jettyContextHandler.getHttpHandler(); + } + + @Override + public void setHandler(HttpHandler h) + { + _jettyContextHandler.setHttpHandler(h); + } + + @Override + public String getPath() + { + return _jettyContextHandler.getContextPath(); + } + + @Override + public HttpServer getServer() + { + return _server; + } + + @Override + public Map getAttributes() + { + return _attributes; + } + + @Override + public List getFilters() + { + return _filters; + } + + @Override + public Authenticator setAuthenticator(Authenticator auth) + { + Authenticator previous = _authenticator; + _authenticator = auth; + return previous; + } + + @Override + public Authenticator getAuthenticator() + { + return _authenticator; + } + +} diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java index 8d5d3afb0c0..556efbc81ce 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java @@ -1,233 +1,233 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.InetSocketAddress; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Enumeration; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.sun.net.httpserver.Headers; -import com.sun.net.httpserver.HttpContext; -import com.sun.net.httpserver.HttpExchange; -import com.sun.net.httpserver.HttpPrincipal; - -/** - * Jetty implementation of {@link com.sun.net.httpserver.HttpExchange} - */ -public class JettyHttpExchangeDelegate extends HttpExchange -{ - - private HttpContext _httpContext; - - private HttpServletRequest _req; - - private HttpServletResponse _resp; - - private Headers _responseHeaders = new Headers(); - - private int _responseCode = 0; - - private InputStream _is; - - private OutputStream _os; - - private HttpPrincipal _httpPrincipal; - - JettyHttpExchangeDelegate(HttpContext jaxWsContext, HttpServletRequest req, HttpServletResponse resp) - { - this._httpContext = jaxWsContext; - this._req = req; - this._resp = resp; - try - { - this._is = req.getInputStream(); - this._os = resp.getOutputStream(); - } - catch (IOException ex) - { - throw new RuntimeException(ex); - } - } - - @Override - public Headers getRequestHeaders() - { - Headers headers = new Headers(); - Enumeration en = _req.getHeaderNames(); - while (en.hasMoreElements()) - { - String name = (String)en.nextElement(); - Enumeration en2 = _req.getHeaders(name); - while (en2.hasMoreElements()) - { - String value = (String)en2.nextElement(); - headers.add(name,value); - } - } - return headers; - } - - @Override - public Headers getResponseHeaders() - { - return _responseHeaders; - } - - @Override - public URI getRequestURI() - { - try - { - String uriAsString = _req.getRequestURI(); - if (_req.getQueryString() != null) - { - uriAsString += "?" + _req.getQueryString(); - } - - return new URI(uriAsString); - } - catch (URISyntaxException ex) - { - throw new RuntimeException(ex); - } - } - - @Override - public String getRequestMethod() - { - return _req.getMethod(); - } - - @Override - public HttpContext getHttpContext() - { - return _httpContext; - } - - @Override - public void close() - { - try - { - _resp.getOutputStream().close(); - } - catch (IOException ex) - { - throw new RuntimeException(ex); - } - } - - @Override - public InputStream getRequestBody() - { - return _is; - } - - @Override - public OutputStream getResponseBody() - { - return _os; - } - - @Override - public void sendResponseHeaders(int rCode, long responseLength) throws IOException - { - this._responseCode = rCode; - - for (Map.Entry> stringListEntry : _responseHeaders.entrySet()) - { - String name = stringListEntry.getKey(); - List values = stringListEntry.getValue(); - - for (String value : values) - { - _resp.setHeader(name,value); - } - } - if (responseLength > 0) - { - _resp.setHeader("content-length","" + responseLength); - } - _resp.setStatus(rCode); - } - - @Override - public InetSocketAddress getRemoteAddress() - { - return new InetSocketAddress(_req.getRemoteAddr(),_req.getRemotePort()); - } - - @Override - public int getResponseCode() - { - return _responseCode; - } - - @Override - public InetSocketAddress getLocalAddress() - { - return new InetSocketAddress(_req.getLocalAddr(),_req.getLocalPort()); - } - - @Override - public String getProtocol() - { - return _req.getProtocol(); - } - - @Override - public Object getAttribute(String name) - { - return _req.getAttribute(name); - } - - @Override - public void setAttribute(String name, Object value) - { - _req.setAttribute(name,value); - } - - @Override - public void setStreams(InputStream i, OutputStream o) - { - _is = i; - _os = o; - } - - @Override - public HttpPrincipal getPrincipal() - { - return _httpPrincipal; - } - - public void setPrincipal(HttpPrincipal principal) - { - this._httpPrincipal = principal; - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetSocketAddress; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Enumeration; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.sun.net.httpserver.Headers; +import com.sun.net.httpserver.HttpContext; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpPrincipal; + +/** + * Jetty implementation of {@link com.sun.net.httpserver.HttpExchange} + */ +public class JettyHttpExchangeDelegate extends HttpExchange +{ + + private HttpContext _httpContext; + + private HttpServletRequest _req; + + private HttpServletResponse _resp; + + private Headers _responseHeaders = new Headers(); + + private int _responseCode = 0; + + private InputStream _is; + + private OutputStream _os; + + private HttpPrincipal _httpPrincipal; + + JettyHttpExchangeDelegate(HttpContext jaxWsContext, HttpServletRequest req, HttpServletResponse resp) + { + this._httpContext = jaxWsContext; + this._req = req; + this._resp = resp; + try + { + this._is = req.getInputStream(); + this._os = resp.getOutputStream(); + } + catch (IOException ex) + { + throw new RuntimeException(ex); + } + } + + @Override + public Headers getRequestHeaders() + { + Headers headers = new Headers(); + Enumeration en = _req.getHeaderNames(); + while (en.hasMoreElements()) + { + String name = (String)en.nextElement(); + Enumeration en2 = _req.getHeaders(name); + while (en2.hasMoreElements()) + { + String value = (String)en2.nextElement(); + headers.add(name,value); + } + } + return headers; + } + + @Override + public Headers getResponseHeaders() + { + return _responseHeaders; + } + + @Override + public URI getRequestURI() + { + try + { + String uriAsString = _req.getRequestURI(); + if (_req.getQueryString() != null) + { + uriAsString += "?" + _req.getQueryString(); + } + + return new URI(uriAsString); + } + catch (URISyntaxException ex) + { + throw new RuntimeException(ex); + } + } + + @Override + public String getRequestMethod() + { + return _req.getMethod(); + } + + @Override + public HttpContext getHttpContext() + { + return _httpContext; + } + + @Override + public void close() + { + try + { + _resp.getOutputStream().close(); + } + catch (IOException ex) + { + throw new RuntimeException(ex); + } + } + + @Override + public InputStream getRequestBody() + { + return _is; + } + + @Override + public OutputStream getResponseBody() + { + return _os; + } + + @Override + public void sendResponseHeaders(int rCode, long responseLength) throws IOException + { + this._responseCode = rCode; + + for (Map.Entry> stringListEntry : _responseHeaders.entrySet()) + { + String name = stringListEntry.getKey(); + List values = stringListEntry.getValue(); + + for (String value : values) + { + _resp.setHeader(name,value); + } + } + if (responseLength > 0) + { + _resp.setHeader("content-length","" + responseLength); + } + _resp.setStatus(rCode); + } + + @Override + public InetSocketAddress getRemoteAddress() + { + return new InetSocketAddress(_req.getRemoteAddr(),_req.getRemotePort()); + } + + @Override + public int getResponseCode() + { + return _responseCode; + } + + @Override + public InetSocketAddress getLocalAddress() + { + return new InetSocketAddress(_req.getLocalAddr(),_req.getLocalPort()); + } + + @Override + public String getProtocol() + { + return _req.getProtocol(); + } + + @Override + public Object getAttribute(String name) + { + return _req.getAttribute(name); + } + + @Override + public void setAttribute(String name, Object value) + { + _req.setAttribute(name,value); + } + + @Override + public void setStreams(InputStream i, OutputStream o) + { + _is = i; + _os = o; + } + + @Override + public HttpPrincipal getPrincipal() + { + return _httpPrincipal; + } + + public void setPrincipal(HttpPrincipal principal) + { + this._httpPrincipal = principal; + } + +} diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java index 65acd613e3b..eb5f07eca92 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpServerProvider.java @@ -1,80 +1,80 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.http.spi; - -import java.io.IOException; -import java.net.InetSocketAddress; - -import org.eclipse.jetty.server.Handler; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.ContextHandlerCollection; -import org.eclipse.jetty.server.handler.DefaultHandler; -import org.eclipse.jetty.server.handler.HandlerCollection; -import org.eclipse.jetty.util.thread.QueuedThreadPool; -import org.eclipse.jetty.util.thread.ThreadPool; - -import com.sun.net.httpserver.HttpServer; -import com.sun.net.httpserver.HttpsServer; -import com.sun.net.httpserver.spi.HttpServerProvider; - -/** - * Jetty implementation of Java HTTP Server SPI - */ -public class JettyHttpServerProvider extends HttpServerProvider -{ - - private static Server _server; - - public static void setServer(Server server) - { - _server = server; - } - - @Override - public HttpServer createHttpServer(InetSocketAddress addr, int backlog) - throws IOException - { - Server server = _server; - boolean shared = true; - - if (server == null) - { - ThreadPool threadPool = new DelegatingThreadPool(new QueuedThreadPool()); - server = new Server(threadPool); - - HandlerCollection handlerCollection = new HandlerCollection(); - handlerCollection.setHandlers(new Handler[] {new ContextHandlerCollection(), new DefaultHandler()}); - server.setHandler(handlerCollection); - - shared = false; - } - - JettyHttpServer jettyHttpServer = new JettyHttpServer(server, shared); - if (addr != null) - jettyHttpServer.bind(addr, backlog); - return jettyHttpServer; - } - - @Override - public HttpsServer createHttpsServer(InetSocketAddress addr, int backlog) throws IOException - { - throw new UnsupportedOperationException(); - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.spi; + +import java.io.IOException; +import java.net.InetSocketAddress; + +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.ContextHandlerCollection; +import org.eclipse.jetty.server.handler.DefaultHandler; +import org.eclipse.jetty.server.handler.HandlerCollection; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.eclipse.jetty.util.thread.ThreadPool; + +import com.sun.net.httpserver.HttpServer; +import com.sun.net.httpserver.HttpsServer; +import com.sun.net.httpserver.spi.HttpServerProvider; + +/** + * Jetty implementation of Java HTTP Server SPI + */ +public class JettyHttpServerProvider extends HttpServerProvider +{ + + private static Server _server; + + public static void setServer(Server server) + { + _server = server; + } + + @Override + public HttpServer createHttpServer(InetSocketAddress addr, int backlog) + throws IOException + { + Server server = _server; + boolean shared = true; + + if (server == null) + { + ThreadPool threadPool = new DelegatingThreadPool(new QueuedThreadPool()); + server = new Server(threadPool); + + HandlerCollection handlerCollection = new HandlerCollection(); + handlerCollection.setHandlers(new Handler[] {new ContextHandlerCollection(), new DefaultHandler()}); + server.setHandler(handlerCollection); + + shared = false; + } + + JettyHttpServer jettyHttpServer = new JettyHttpServer(server, shared); + if (addr != null) + jettyHttpServer.bind(addr, backlog); + return jettyHttpServer; + } + + @Override + public HttpsServer createHttpsServer(InetSocketAddress addr, int backlog) throws IOException + { + throw new UnsupportedOperationException(); + } + +} diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java index 285d8d85e60..5b075511452 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyDeployWar.java @@ -1,81 +1,81 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.maven.plugin; - -import java.io.File; - -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; - -/** - *

- * This goal is used to run Jetty with a pre-assembled war. - *

- *

- * It accepts exactly the same options as the run-war goal. - * However, it doesn't assume that the current artifact is a - * webapp and doesn't try to assemble it into a war before its execution. - * So using it makes sense only when used in conjunction with the - * war configuration parameter pointing to a pre-built WAR. - *

- *

- * This goal is useful e.g. for launching a web app in Jetty as a target for unit-tested - * HTTP client components. - *

- * - * @goal deploy-war - * @requiresDependencyResolution runtime - * @execute phase="validate" - * @description Deploy a pre-assembled war - * - */ -public class JettyDeployWar extends JettyRunWarMojo -{ - - - /** - * If true, the plugin should continue and not block. Otherwise the - * plugin will block further execution and you will need to use - * cntrl-c to stop it. - * - * - * @parameter default-value="true" - */ - protected boolean daemon = true; - - - @Override - public void execute() throws MojoExecutionException, MojoFailureException - { - nonblocking = daemon; - super.execute(); - } - - - - @Override - public void finishConfigurationBeforeStart() throws Exception - { - super.finishConfigurationBeforeStart(); - //only stop the server at shutdown if we are blocking - server.setStopAtShutdown(!nonblocking); - - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.maven.plugin; + +import java.io.File; + +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; + +/** + *

+ * This goal is used to run Jetty with a pre-assembled war. + *

+ *

+ * It accepts exactly the same options as the run-war goal. + * However, it doesn't assume that the current artifact is a + * webapp and doesn't try to assemble it into a war before its execution. + * So using it makes sense only when used in conjunction with the + * war configuration parameter pointing to a pre-built WAR. + *

+ *

+ * This goal is useful e.g. for launching a web app in Jetty as a target for unit-tested + * HTTP client components. + *

+ * + * @goal deploy-war + * @requiresDependencyResolution runtime + * @execute phase="validate" + * @description Deploy a pre-assembled war + * + */ +public class JettyDeployWar extends JettyRunWarMojo +{ + + + /** + * If true, the plugin should continue and not block. Otherwise the + * plugin will block further execution and you will need to use + * cntrl-c to stop it. + * + * + * @parameter default-value="true" + */ + protected boolean daemon = true; + + + @Override + public void execute() throws MojoExecutionException, MojoFailureException + { + nonblocking = daemon; + super.execute(); + } + + + + @Override + public void finishConfigurationBeforeStart() throws Exception + { + super.finishConfigurationBeforeStart(); + //only stop the server at shutdown if we are blocking + server.setStopAtShutdown(!nonblocking); + + } + +} diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java index 00161f1125c..1ef2704f37a 100644 --- a/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java +++ b/jetty-security/src/test/java/org/eclipse/jetty/security/AliasedConstraintTest.java @@ -1,174 +1,174 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.security; - -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.eclipse.jetty.http.HttpStatus; -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.LocalConnector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.ContextHandler; -import org.eclipse.jetty.server.handler.ResourceHandler; -import org.eclipse.jetty.server.session.SessionHandler; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.eclipse.jetty.util.security.Constraint; -import org.eclipse.jetty.util.security.Password; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameter; -import org.junit.runners.Parameterized.Parameters; - -/** - * Some requests for static data that is served by ResourceHandler, but some is secured. - *

- * This is mainly here to test security bypass techniques using aliased names that should be caught. - */ -@RunWith(Parameterized.class) -public class AliasedConstraintTest -{ - private static final String TEST_REALM = "TestRealm"; - private static Server server; - private static LocalConnector connector; - private static ConstraintSecurityHandler security; - - @BeforeClass - public static void startServer() throws Exception - { - server = new Server(); - connector = new LocalConnector(server); - server.setConnectors(new Connector[] { connector }); - - ContextHandler context = new ContextHandler(); - SessionHandler session = new SessionHandler(); - - HashLoginService loginService = new HashLoginService(TEST_REALM); - loginService.putUser("user0",new Password("password"),new String[] {}); - loginService.putUser("user",new Password("password"),new String[] { "user" }); - loginService.putUser("user2",new Password("password"),new String[] { "user" }); - loginService.putUser("admin",new Password("password"),new String[] { "user", "administrator" }); - loginService.putUser("user3",new Password("password"),new String[] { "foo" }); - - context.setContextPath("/ctx"); - context.setResourceBase(MavenTestingUtils.getTestResourceDir("docroot").getAbsolutePath()); - server.setHandler(context); - context.setHandler(session); - // context.addAliasCheck(new AllowSymLinkAliasChecker()); - - server.addBean(loginService); - - security = new ConstraintSecurityHandler(); - session.setHandler(security); - ResourceHandler handler = new ResourceHandler(); - security.setHandler(handler); - - List constraints = new ArrayList<>(); - - Constraint constraint0 = new Constraint(); - constraint0.setAuthenticate(true); - constraint0.setName("forbid"); - ConstraintMapping mapping0 = new ConstraintMapping(); - mapping0.setPathSpec("/forbid/*"); - mapping0.setConstraint(constraint0); - constraints.add(mapping0); - - Set knownRoles = new HashSet<>(); - knownRoles.add("user"); - knownRoles.add("administrator"); - - security.setConstraintMappings(constraints,knownRoles); - server.start(); - } - - @AfterClass - public static void stopServer() throws Exception - { - server.stop(); - } - - @Parameters(name = "{0}: {1}") - public static Collection data() - { - List data = new ArrayList<>(); - - final String OPENCONTENT = "this is open content"; - - data.add(new Object[] { "/ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); - data.add(new Object[] { "/ctx/ALL/index.txt", HttpStatus.NOT_FOUND_404, null }); - data.add(new Object[] { "/ctx/ALL/Fred/../index.txt", HttpStatus.NOT_FOUND_404, null }); - data.add(new Object[] { "/ctx/../bar/../ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); - data.add(new Object[] { "/ctx/forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); - data.add(new Object[] { "/ctx/all/../forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); - data.add(new Object[] { "/ctx/FoRbId/index.txt", HttpStatus.NOT_FOUND_404, null }); - - return data; - } - - @Parameter(value = 0) - public String uri; - - @Parameter(value = 1) - public int expectedStatusCode; - - @Parameter(value = 2) - public String expectedContent; - - @Test - public void testAccess() throws Exception - { - StringBuilder request = new StringBuilder(); - request.append("GET ").append(uri).append(" HTTP/1.1\r\n"); - request.append("Host: localhost\r\n"); - request.append("Connection: close\r\n"); - request.append("\r\n"); - - String response = connector.getResponses(request.toString()); - - switch (expectedStatusCode) - { - case 200: - assertThat(response,startsWith("HTTP/1.1 200 OK")); - break; - case 403: - assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); - break; - case 404: - assertThat(response,startsWith("HTTP/1.1 404 Not Found")); - break; - default: - fail("Write a handler for response status code: " + expectedStatusCode); - break; - } - - if (expectedContent != null) - { - assertThat(response,containsString("this is open content")); - } - } -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.security; + +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.jetty.http.HttpStatus; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.LocalConnector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.ContextHandler; +import org.eclipse.jetty.server.handler.ResourceHandler; +import org.eclipse.jetty.server.session.SessionHandler; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.eclipse.jetty.util.security.Constraint; +import org.eclipse.jetty.util.security.Password; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +/** + * Some requests for static data that is served by ResourceHandler, but some is secured. + *

+ * This is mainly here to test security bypass techniques using aliased names that should be caught. + */ +@RunWith(Parameterized.class) +public class AliasedConstraintTest +{ + private static final String TEST_REALM = "TestRealm"; + private static Server server; + private static LocalConnector connector; + private static ConstraintSecurityHandler security; + + @BeforeClass + public static void startServer() throws Exception + { + server = new Server(); + connector = new LocalConnector(server); + server.setConnectors(new Connector[] { connector }); + + ContextHandler context = new ContextHandler(); + SessionHandler session = new SessionHandler(); + + HashLoginService loginService = new HashLoginService(TEST_REALM); + loginService.putUser("user0",new Password("password"),new String[] {}); + loginService.putUser("user",new Password("password"),new String[] { "user" }); + loginService.putUser("user2",new Password("password"),new String[] { "user" }); + loginService.putUser("admin",new Password("password"),new String[] { "user", "administrator" }); + loginService.putUser("user3",new Password("password"),new String[] { "foo" }); + + context.setContextPath("/ctx"); + context.setResourceBase(MavenTestingUtils.getTestResourceDir("docroot").getAbsolutePath()); + server.setHandler(context); + context.setHandler(session); + // context.addAliasCheck(new AllowSymLinkAliasChecker()); + + server.addBean(loginService); + + security = new ConstraintSecurityHandler(); + session.setHandler(security); + ResourceHandler handler = new ResourceHandler(); + security.setHandler(handler); + + List constraints = new ArrayList<>(); + + Constraint constraint0 = new Constraint(); + constraint0.setAuthenticate(true); + constraint0.setName("forbid"); + ConstraintMapping mapping0 = new ConstraintMapping(); + mapping0.setPathSpec("/forbid/*"); + mapping0.setConstraint(constraint0); + constraints.add(mapping0); + + Set knownRoles = new HashSet<>(); + knownRoles.add("user"); + knownRoles.add("administrator"); + + security.setConstraintMappings(constraints,knownRoles); + server.start(); + } + + @AfterClass + public static void stopServer() throws Exception + { + server.stop(); + } + + @Parameters(name = "{0}: {1}") + public static Collection data() + { + List data = new ArrayList<>(); + + final String OPENCONTENT = "this is open content"; + + data.add(new Object[] { "/ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); + data.add(new Object[] { "/ctx/ALL/index.txt", HttpStatus.NOT_FOUND_404, null }); + data.add(new Object[] { "/ctx/ALL/Fred/../index.txt", HttpStatus.NOT_FOUND_404, null }); + data.add(new Object[] { "/ctx/../bar/../ctx/all/index.txt", HttpStatus.OK_200, OPENCONTENT }); + data.add(new Object[] { "/ctx/forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); + data.add(new Object[] { "/ctx/all/../forbid/index.txt", HttpStatus.FORBIDDEN_403, null }); + data.add(new Object[] { "/ctx/FoRbId/index.txt", HttpStatus.NOT_FOUND_404, null }); + + return data; + } + + @Parameter(value = 0) + public String uri; + + @Parameter(value = 1) + public int expectedStatusCode; + + @Parameter(value = 2) + public String expectedContent; + + @Test + public void testAccess() throws Exception + { + StringBuilder request = new StringBuilder(); + request.append("GET ").append(uri).append(" HTTP/1.1\r\n"); + request.append("Host: localhost\r\n"); + request.append("Connection: close\r\n"); + request.append("\r\n"); + + String response = connector.getResponses(request.toString()); + + switch (expectedStatusCode) + { + case 200: + assertThat(response,startsWith("HTTP/1.1 200 OK")); + break; + case 403: + assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); + break; + case 404: + assertThat(response,startsWith("HTTP/1.1 404 Not Found")); + break; + default: + fail("Write a handler for response status code: " + expectedStatusCode); + break; + } + + if (expectedContent != null) + { + assertThat(response,containsString("this is open content")); + } + } +} diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java index 2166e7ce8c5..d4873795bab 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/BaseHomeTest.java @@ -1,211 +1,211 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.start; - -import static org.hamcrest.Matchers.*; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jetty.start.config.ConfigSources; -import org.eclipse.jetty.start.config.JettyBaseConfigSource; -import org.eclipse.jetty.start.config.JettyHomeConfigSource; -import org.eclipse.jetty.toolchain.test.IO; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.junit.Assert; -import org.junit.Test; - -public class BaseHomeTest -{ - public static void assertPathList(BaseHome hb, String message, List expected, PathFinder finder) - { - List actual = new ArrayList<>(); - for (Path path : finder.getHits()) - { - actual.add(hb.toShortForm(path.toFile())); - } - - if (actual.size() != expected.size()) - { - System.out.printf("Actual Path(s): %,d hits%n",actual.size()); - for (String path : actual) - { - System.out.printf(" %s%n",path); - } - System.out.printf("Expected Path(s): %,d entries%n",expected.size()); - for (String path : expected) - { - System.out.printf(" %s%n",path); - } - } - Assert.assertThat(message + ": " + Main.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); - } - - public static void assertPathList(BaseHome hb, String message, List expected, List paths) - { - List actual = new ArrayList<>(); - for (Path path : paths) - { - actual.add(hb.toShortForm(path.toFile())); - } - - if (actual.size() != expected.size()) - { - System.out.printf("Actual Path(s): %,d hits%n",actual.size()); - for (String path : actual) - { - System.out.printf(" %s%n",path); - } - System.out.printf("Expected Path(s): %,d entries%n",expected.size()); - for (String path : expected) - { - System.out.printf(" %s%n",path); - } - } - Assert.assertThat(message + ": " + Main.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); - } - - public static void assertFileList(BaseHome hb, String message, List expected, List files) - { - List actual = new ArrayList<>(); - for (File file : files) - { - actual.add(hb.toShortForm(file)); - } - Assert.assertThat(message + ": " + Main.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); - } - - @Test - public void testGetPath_OnlyHome() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - Path startIni = hb.getPath("start.ini"); - - String ref = hb.toShortForm(startIni); - Assert.assertThat("Reference",ref,startsWith("${jetty.home}")); - - String contents = IO.readToString(startIni.toFile()); - Assert.assertThat("Contents",contents,containsString("Home Ini")); - } - - @Test - public void testGetPaths_OnlyHome() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - List paths = hb.getPaths("start.d/*"); - - List expected = new ArrayList<>(); - expected.add("${jetty.home}/start.d/jmx.ini"); - expected.add("${jetty.home}/start.d/jndi.ini"); - expected.add("${jetty.home}/start.d/jsp.ini"); - expected.add("${jetty.home}/start.d/logging.ini"); - expected.add("${jetty.home}/start.d/ssl.ini"); - FSTest.toOsSeparators(expected); - - assertPathList(hb,"Paths found",expected,paths); - } - - @Test - public void testGetPaths_OnlyHome_InisOnly() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - List paths = hb.getPaths("start.d/*.ini"); - - List expected = new ArrayList<>(); - expected.add("${jetty.home}/start.d/jmx.ini"); - expected.add("${jetty.home}/start.d/jndi.ini"); - expected.add("${jetty.home}/start.d/jsp.ini"); - expected.add("${jetty.home}/start.d/logging.ini"); - expected.add("${jetty.home}/start.d/ssl.ini"); - FSTest.toOsSeparators(expected); - - assertPathList(hb,"Paths found",expected,paths); - } - - @Test - public void testGetPaths_Both() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyBaseConfigSource(baseDir.toPath())); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - List paths = hb.getPaths("start.d/*.ini"); - - List expected = new ArrayList<>(); - expected.add("${jetty.base}/start.d/jmx.ini"); - expected.add("${jetty.home}/start.d/jndi.ini"); - expected.add("${jetty.home}/start.d/jsp.ini"); - expected.add("${jetty.base}/start.d/logging.ini"); - expected.add("${jetty.home}/start.d/ssl.ini"); - expected.add("${jetty.base}/start.d/myapp.ini"); - FSTest.toOsSeparators(expected); - - assertPathList(hb,"Paths found",expected,paths); - } - - @Test - public void testDefault() throws IOException - { - BaseHome bh = new BaseHome(); - Assert.assertThat("Home",bh.getHome(),notNullValue()); - Assert.assertThat("Base",bh.getBase(),notNullValue()); - } - - @Test - public void testGetPath_Both() throws IOException - { - File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); - File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); - - ConfigSources config = new ConfigSources(); - config.add(new JettyBaseConfigSource(baseDir.toPath())); - config.add(new JettyHomeConfigSource(homeDir.toPath())); - - BaseHome hb = new BaseHome(config); - Path startIni = hb.getPath("start.ini"); - - String ref = hb.toShortForm(startIni); - Assert.assertThat("Reference",ref,startsWith("${jetty.base}")); - - String contents = IO.readToString(startIni.toFile()); - Assert.assertThat("Contents",contents,containsString("Base Ini")); - } -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.start; + +import static org.hamcrest.Matchers.*; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jetty.start.config.ConfigSources; +import org.eclipse.jetty.start.config.JettyBaseConfigSource; +import org.eclipse.jetty.start.config.JettyHomeConfigSource; +import org.eclipse.jetty.toolchain.test.IO; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.junit.Assert; +import org.junit.Test; + +public class BaseHomeTest +{ + public static void assertPathList(BaseHome hb, String message, List expected, PathFinder finder) + { + List actual = new ArrayList<>(); + for (Path path : finder.getHits()) + { + actual.add(hb.toShortForm(path.toFile())); + } + + if (actual.size() != expected.size()) + { + System.out.printf("Actual Path(s): %,d hits%n",actual.size()); + for (String path : actual) + { + System.out.printf(" %s%n",path); + } + System.out.printf("Expected Path(s): %,d entries%n",expected.size()); + for (String path : expected) + { + System.out.printf(" %s%n",path); + } + } + Assert.assertThat(message + ": " + Main.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); + } + + public static void assertPathList(BaseHome hb, String message, List expected, List paths) + { + List actual = new ArrayList<>(); + for (Path path : paths) + { + actual.add(hb.toShortForm(path.toFile())); + } + + if (actual.size() != expected.size()) + { + System.out.printf("Actual Path(s): %,d hits%n",actual.size()); + for (String path : actual) + { + System.out.printf(" %s%n",path); + } + System.out.printf("Expected Path(s): %,d entries%n",expected.size()); + for (String path : expected) + { + System.out.printf(" %s%n",path); + } + } + Assert.assertThat(message + ": " + Main.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); + } + + public static void assertFileList(BaseHome hb, String message, List expected, List files) + { + List actual = new ArrayList<>(); + for (File file : files) + { + actual.add(hb.toShortForm(file)); + } + Assert.assertThat(message + ": " + Main.join(actual,", "),actual,containsInAnyOrder(expected.toArray())); + } + + @Test + public void testGetPath_OnlyHome() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + Path startIni = hb.getPath("start.ini"); + + String ref = hb.toShortForm(startIni); + Assert.assertThat("Reference",ref,startsWith("${jetty.home}")); + + String contents = IO.readToString(startIni.toFile()); + Assert.assertThat("Contents",contents,containsString("Home Ini")); + } + + @Test + public void testGetPaths_OnlyHome() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + List paths = hb.getPaths("start.d/*"); + + List expected = new ArrayList<>(); + expected.add("${jetty.home}/start.d/jmx.ini"); + expected.add("${jetty.home}/start.d/jndi.ini"); + expected.add("${jetty.home}/start.d/jsp.ini"); + expected.add("${jetty.home}/start.d/logging.ini"); + expected.add("${jetty.home}/start.d/ssl.ini"); + FSTest.toOsSeparators(expected); + + assertPathList(hb,"Paths found",expected,paths); + } + + @Test + public void testGetPaths_OnlyHome_InisOnly() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + List paths = hb.getPaths("start.d/*.ini"); + + List expected = new ArrayList<>(); + expected.add("${jetty.home}/start.d/jmx.ini"); + expected.add("${jetty.home}/start.d/jndi.ini"); + expected.add("${jetty.home}/start.d/jsp.ini"); + expected.add("${jetty.home}/start.d/logging.ini"); + expected.add("${jetty.home}/start.d/ssl.ini"); + FSTest.toOsSeparators(expected); + + assertPathList(hb,"Paths found",expected,paths); + } + + @Test + public void testGetPaths_Both() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyBaseConfigSource(baseDir.toPath())); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + List paths = hb.getPaths("start.d/*.ini"); + + List expected = new ArrayList<>(); + expected.add("${jetty.base}/start.d/jmx.ini"); + expected.add("${jetty.home}/start.d/jndi.ini"); + expected.add("${jetty.home}/start.d/jsp.ini"); + expected.add("${jetty.base}/start.d/logging.ini"); + expected.add("${jetty.home}/start.d/ssl.ini"); + expected.add("${jetty.base}/start.d/myapp.ini"); + FSTest.toOsSeparators(expected); + + assertPathList(hb,"Paths found",expected,paths); + } + + @Test + public void testDefault() throws IOException + { + BaseHome bh = new BaseHome(); + Assert.assertThat("Home",bh.getHome(),notNullValue()); + Assert.assertThat("Base",bh.getBase(),notNullValue()); + } + + @Test + public void testGetPath_Both() throws IOException + { + File homeDir = MavenTestingUtils.getTestResourceDir("hb.1/home"); + File baseDir = MavenTestingUtils.getTestResourceDir("hb.1/base"); + + ConfigSources config = new ConfigSources(); + config.add(new JettyBaseConfigSource(baseDir.toPath())); + config.add(new JettyHomeConfigSource(homeDir.toPath())); + + BaseHome hb = new BaseHome(config); + Path startIni = hb.getPath("start.ini"); + + String ref = hb.toShortForm(startIni); + Assert.assertThat("Reference",ref,startsWith("${jetty.base}")); + + String contents = IO.readToString(startIni.toFile()); + Assert.assertThat("Contents",contents,containsString("Base Ini")); + } +} diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java b/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java index 2bdd2d7a730..b6a4fafb965 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java @@ -1,281 +1,281 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -package org.eclipse.jetty.start; - -import static org.hamcrest.Matchers.*; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.eclipse.jetty.start.Props.Prop; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.junit.Assert; - -public class ConfigurationAssert -{ - /** - * Given a provided StartArgs, assert that the configuration it has determined is valid based on values in a assert text file. - * - * @param baseHome - * the BaseHome used. Access it via {@link Main#getBaseHome()} - * @param args - * the StartArgs that has been processed via {@link Main#processCommandLine(String[])} - * @param filename - * the filename of the assertion values - * @throws IOException - */ - public static void assertConfiguration(BaseHome baseHome, StartArgs args, String filename) throws FileNotFoundException, IOException - { - Path testResourcesDir = MavenTestingUtils.getTestResourcesDir().toPath().toAbsolutePath(); - File file = MavenTestingUtils.getTestResourceFile(filename); - TextFile textFile = new TextFile(file.toPath()); - - // Validate XMLs (order is important) - List expectedXmls = new ArrayList<>(); - for (String line : textFile) - { - if (line.startsWith("XML|")) - { - expectedXmls.add(FS.separators(getValue(line))); - } - } - List actualXmls = new ArrayList<>(); - for (Path xml : args.getXmlFiles()) - { - actualXmls.add(shorten(baseHome,xml,testResourcesDir)); - } - assertOrdered("XML Resolution Order",expectedXmls,actualXmls); - - // Validate LIBs (order is not important) - List expectedLibs = new ArrayList<>(); - for (String line : textFile) - { - if (line.startsWith("LIB|")) - { - expectedLibs.add(FS.separators(getValue(line))); - } - } - List actualLibs = new ArrayList<>(); - for (File path : args.getClasspath()) - { - actualLibs.add(shorten(baseHome,path.toPath(),testResourcesDir)); - } - assertContainsUnordered("Libs",expectedLibs,actualLibs); - - // Validate PROPERTIES (order is not important) - Set expectedProperties = new HashSet<>(); - for (String line : textFile) - { - if (line.startsWith("PROP|")) - { - expectedProperties.add(getValue(line)); - } - } - List actualProperties = new ArrayList<>(); - for (Prop prop : args.getProperties()) - { - String name = prop.key; - if ("jetty.home".equals(name) || "jetty.base".equals(name) || - "user.dir".equals(name) || prop.origin.equals(Props.ORIGIN_SYSPROP)) - { - // strip these out from assertion, to make assertions easier. - continue; - } - actualProperties.add(prop.key + "=" + args.getProperties().expand(prop.value)); - } - assertContainsUnordered("Properties",expectedProperties,actualProperties); - - // Validate Downloads - List expectedDownloads = new ArrayList<>(); - for (String line : textFile) - { - if (line.startsWith("DOWNLOAD|")) - { - expectedDownloads.add(getValue(line)); - } - } - List actualDownloads = new ArrayList<>(); - for (FileArg darg : args.getFiles()) - { - if (darg.uri != null) - { - actualDownloads.add(String.format("%s|%s",darg.uri,darg.location)); - } - } - assertContainsUnordered("Downloads",expectedDownloads,actualDownloads); - - // Validate Files/Dirs creation - List expectedFiles = new ArrayList<>(); - for(String line: textFile) - { - if(line.startsWith("FILE|")) - { - expectedFiles.add(getValue(line)); - } - } - List actualFiles = new ArrayList<>(); - for(FileArg farg: args.getFiles()) - { - if(farg.uri == null) - { - actualFiles.add(farg.location); - } - } - assertContainsUnordered("Files/Dirs",expectedFiles,actualFiles); - } - - private static String shorten(BaseHome baseHome, Path path, Path testResourcesDir) - { - String value = baseHome.toShortForm(path); - if (value.startsWith("${")) - { - return value; - } - - if (path.startsWith(testResourcesDir)) - { - int len = testResourcesDir.toString().length(); - value = "${maven-test-resources}" + value.substring(len); - } - return value; - } - - public static void assertContainsUnordered(String msg, Collection expectedSet, Collection actualSet) - { - // same size? - boolean mismatch = expectedSet.size() != actualSet.size(); - - // test content - Set missing = new HashSet<>(); - for (String expected : expectedSet) - { - if (!actualSet.contains(expected)) - { - missing.add(expected); - } - } - - if (mismatch || missing.size() > 0) - { - // build up detailed error message - StringWriter message = new StringWriter(); - PrintWriter err = new PrintWriter(message); - - err.printf("%s: Assert Contains (Unordered)",msg); - if (mismatch) - { - err.print(" [size mismatch]"); - } - if (missing.size() >= 0) - { - err.printf(" [%d entries missing]",missing.size()); - } - err.println(); - err.printf("Actual Entries (size: %d)%n",actualSet.size()); - for (String actual : actualSet) - { - char indicator = expectedSet.contains(actual)?' ':'>'; - err.printf("%s| %s%n",indicator,actual); - } - err.printf("Expected Entries (size: %d)%n",expectedSet.size()); - for (String expected : expectedSet) - { - char indicator = actualSet.contains(expected)?' ':'>'; - err.printf("%s| %s%n",indicator,expected); - } - err.flush(); - Assert.fail(message.toString()); - } - } - - public static void assertOrdered(String msg, List expectedList, List actualList) - { - // same size? - boolean mismatch = expectedList.size() != actualList.size(); - - // test content - List badEntries = new ArrayList<>(); - int min = Math.min(expectedList.size(),actualList.size()); - int max = Math.max(expectedList.size(),actualList.size()); - for (int i = 0; i < min; i++) - { - if (!expectedList.get(i).equals(actualList.get(i))) - { - badEntries.add(i); - } - } - for (int i = min; i < max; i++) - { - badEntries.add(i); - } - - if (mismatch || badEntries.size() > 0) - { - // build up detailed error message - StringWriter message = new StringWriter(); - PrintWriter err = new PrintWriter(message); - - err.printf("%s: Assert Contains (Unordered)",msg); - if (mismatch) - { - err.print(" [size mismatch]"); - } - if (badEntries.size() >= 0) - { - err.printf(" [%d entries not matched]",badEntries.size()); - } - err.println(); - err.printf("Actual Entries (size: %d)%n",actualList.size()); - for (int i = 0; i < actualList.size(); i++) - { - String actual = actualList.get(i); - char indicator = badEntries.contains(i)?'>':' '; - err.printf("%s[%d] %s%n",indicator,i,actual); - } - - err.printf("Expected Entries (size: %d)%n",expectedList.size()); - for (int i = 0; i < expectedList.size(); i++) - { - String expected = expectedList.get(i); - char indicator = badEntries.contains(i)?'>':' '; - err.printf("%s[%d] %s%n",indicator,i,expected); - } - err.flush(); - Assert.fail(message.toString()); - } - } - - private static String getValue(String arg) - { - int idx = arg.indexOf('|'); - Assert.assertThat("Expecting '|' sign in [" + arg + "]",idx,greaterThanOrEqualTo(0)); - String value = arg.substring(idx + 1).trim(); - Assert.assertThat("Expecting Value after '|' in [" + arg + "]",value.length(),greaterThan(0)); - return value; - } -} +// +// ======================================================================== +// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.start; + +import static org.hamcrest.Matchers.*; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.jetty.start.Props.Prop; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.junit.Assert; + +public class ConfigurationAssert +{ + /** + * Given a provided StartArgs, assert that the configuration it has determined is valid based on values in a assert text file. + * + * @param baseHome + * the BaseHome used. Access it via {@link Main#getBaseHome()} + * @param args + * the StartArgs that has been processed via {@link Main#processCommandLine(String[])} + * @param filename + * the filename of the assertion values + * @throws IOException + */ + public static void assertConfiguration(BaseHome baseHome, StartArgs args, String filename) throws FileNotFoundException, IOException + { + Path testResourcesDir = MavenTestingUtils.getTestResourcesDir().toPath().toAbsolutePath(); + File file = MavenTestingUtils.getTestResourceFile(filename); + TextFile textFile = new TextFile(file.toPath()); + + // Validate XMLs (order is important) + List expectedXmls = new ArrayList<>(); + for (String line : textFile) + { + if (line.startsWith("XML|")) + { + expectedXmls.add(FS.separators(getValue(line))); + } + } + List actualXmls = new ArrayList<>(); + for (Path xml : args.getXmlFiles()) + { + actualXmls.add(shorten(baseHome,xml,testResourcesDir)); + } + assertOrdered("XML Resolution Order",expectedXmls,actualXmls); + + // Validate LIBs (order is not important) + List expectedLibs = new ArrayList<>(); + for (String line : textFile) + { + if (line.startsWith("LIB|")) + { + expectedLibs.add(FS.separators(getValue(line))); + } + } + List actualLibs = new ArrayList<>(); + for (File path : args.getClasspath()) + { + actualLibs.add(shorten(baseHome,path.toPath(),testResourcesDir)); + } + assertContainsUnordered("Libs",expectedLibs,actualLibs); + + // Validate PROPERTIES (order is not important) + Set expectedProperties = new HashSet<>(); + for (String line : textFile) + { + if (line.startsWith("PROP|")) + { + expectedProperties.add(getValue(line)); + } + } + List actualProperties = new ArrayList<>(); + for (Prop prop : args.getProperties()) + { + String name = prop.key; + if ("jetty.home".equals(name) || "jetty.base".equals(name) || + "user.dir".equals(name) || prop.origin.equals(Props.ORIGIN_SYSPROP)) + { + // strip these out from assertion, to make assertions easier. + continue; + } + actualProperties.add(prop.key + "=" + args.getProperties().expand(prop.value)); + } + assertContainsUnordered("Properties",expectedProperties,actualProperties); + + // Validate Downloads + List expectedDownloads = new ArrayList<>(); + for (String line : textFile) + { + if (line.startsWith("DOWNLOAD|")) + { + expectedDownloads.add(getValue(line)); + } + } + List actualDownloads = new ArrayList<>(); + for (FileArg darg : args.getFiles()) + { + if (darg.uri != null) + { + actualDownloads.add(String.format("%s|%s",darg.uri,darg.location)); + } + } + assertContainsUnordered("Downloads",expectedDownloads,actualDownloads); + + // Validate Files/Dirs creation + List expectedFiles = new ArrayList<>(); + for(String line: textFile) + { + if(line.startsWith("FILE|")) + { + expectedFiles.add(getValue(line)); + } + } + List actualFiles = new ArrayList<>(); + for(FileArg farg: args.getFiles()) + { + if(farg.uri == null) + { + actualFiles.add(farg.location); + } + } + assertContainsUnordered("Files/Dirs",expectedFiles,actualFiles); + } + + private static String shorten(BaseHome baseHome, Path path, Path testResourcesDir) + { + String value = baseHome.toShortForm(path); + if (value.startsWith("${")) + { + return value; + } + + if (path.startsWith(testResourcesDir)) + { + int len = testResourcesDir.toString().length(); + value = "${maven-test-resources}" + value.substring(len); + } + return value; + } + + public static void assertContainsUnordered(String msg, Collection expectedSet, Collection actualSet) + { + // same size? + boolean mismatch = expectedSet.size() != actualSet.size(); + + // test content + Set missing = new HashSet<>(); + for (String expected : expectedSet) + { + if (!actualSet.contains(expected)) + { + missing.add(expected); + } + } + + if (mismatch || missing.size() > 0) + { + // build up detailed error message + StringWriter message = new StringWriter(); + PrintWriter err = new PrintWriter(message); + + err.printf("%s: Assert Contains (Unordered)",msg); + if (mismatch) + { + err.print(" [size mismatch]"); + } + if (missing.size() >= 0) + { + err.printf(" [%d entries missing]",missing.size()); + } + err.println(); + err.printf("Actual Entries (size: %d)%n",actualSet.size()); + for (String actual : actualSet) + { + char indicator = expectedSet.contains(actual)?' ':'>'; + err.printf("%s| %s%n",indicator,actual); + } + err.printf("Expected Entries (size: %d)%n",expectedSet.size()); + for (String expected : expectedSet) + { + char indicator = actualSet.contains(expected)?' ':'>'; + err.printf("%s| %s%n",indicator,expected); + } + err.flush(); + Assert.fail(message.toString()); + } + } + + public static void assertOrdered(String msg, List expectedList, List actualList) + { + // same size? + boolean mismatch = expectedList.size() != actualList.size(); + + // test content + List badEntries = new ArrayList<>(); + int min = Math.min(expectedList.size(),actualList.size()); + int max = Math.max(expectedList.size(),actualList.size()); + for (int i = 0; i < min; i++) + { + if (!expectedList.get(i).equals(actualList.get(i))) + { + badEntries.add(i); + } + } + for (int i = min; i < max; i++) + { + badEntries.add(i); + } + + if (mismatch || badEntries.size() > 0) + { + // build up detailed error message + StringWriter message = new StringWriter(); + PrintWriter err = new PrintWriter(message); + + err.printf("%s: Assert Contains (Unordered)",msg); + if (mismatch) + { + err.print(" [size mismatch]"); + } + if (badEntries.size() >= 0) + { + err.printf(" [%d entries not matched]",badEntries.size()); + } + err.println(); + err.printf("Actual Entries (size: %d)%n",actualList.size()); + for (int i = 0; i < actualList.size(); i++) + { + String actual = actualList.get(i); + char indicator = badEntries.contains(i)?'>':' '; + err.printf("%s[%d] %s%n",indicator,i,actual); + } + + err.printf("Expected Entries (size: %d)%n",expectedList.size()); + for (int i = 0; i < expectedList.size(); i++) + { + String expected = expectedList.get(i); + char indicator = badEntries.contains(i)?'>':' '; + err.printf("%s[%d] %s%n",indicator,i,expected); + } + err.flush(); + Assert.fail(message.toString()); + } + } + + private static String getValue(String arg) + { + int idx = arg.indexOf('|'); + Assert.assertThat("Expecting '|' sign in [" + arg + "]",idx,greaterThanOrEqualTo(0)); + String value = arg.substring(idx + 1).trim(); + Assert.assertThat("Expecting Value after '|' in [" + arg + "]",value.length(),greaterThan(0)); + return value; + } +} From ca77bd384a2970cabbbdab25cf6251c6fb76cd21 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 3 Apr 2019 16:28:26 -0500 Subject: [PATCH 11/13] Issue #3319 - Refactoring DefaultServlet Index/Listing + Now generates valid HTML5 + Now allows column sort Signed-off-by: Joakim Erdfelt --- .../jetty/embedded/FastFileServer.java | 4 +- .../jetty/server/handler/ResourceHandler.java | 3 +- .../eclipse/jetty/servlet/DefaultServlet.java | 3 +- .../jetty/servlet/DefaultServletTest.java | 21 +- .../eclipse/jetty/util/resource/Resource.java | 271 +++++++++++++++--- .../util/resource/ResourceCollators.java | 101 +++++++ jetty-util/src/main/resources/jetty-dir.css | 36 ++- 7 files changed, 373 insertions(+), 66 deletions(-) create mode 100644 jetty-util/src/main/java/org/eclipse/jetty/util/resource/ResourceCollators.java diff --git a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/FastFileServer.java b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/FastFileServer.java index 3e1610b9c17..72c1c915961 100644 --- a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/FastFileServer.java +++ b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/FastFileServer.java @@ -25,7 +25,6 @@ import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.nio.channels.FileChannel.MapMode; import java.nio.file.StandardOpenOption; - import javax.servlet.AsyncContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -115,7 +114,8 @@ public class FastFileServer } String listing = Resource.newResource(file).getListHTML( request.getRequestURI(), - request.getPathInfo().lastIndexOf("/") > 0); + request.getPathInfo().lastIndexOf("/") > 0, + request.getQueryString()); response.setContentType("text/html; charset=utf-8"); response.getWriter().println(listing); return; diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java index 367958c7da9..dcfc4bb107d 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java @@ -23,7 +23,6 @@ import java.io.OutputStream; import java.net.MalformedURLException; import java.nio.ByteBuffer; import java.nio.channels.ReadableByteChannel; - import javax.servlet.AsyncContext; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; @@ -589,7 +588,7 @@ public class ResourceHandler extends HandlerWrapper { if (_directory) { - String listing = resource.getListHTML(request.getRequestURI(),request.getPathInfo().lastIndexOf("/") > 0); + String listing = resource.getListHTML(request.getRequestURI(),request.getPathInfo().lastIndexOf("/") > 0, request.getQueryString()); response.setContentType("text/html; charset=UTF-8"); response.getWriter().println(listing); } diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java index fcd43db176b..a4071e09ed6 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java @@ -29,7 +29,6 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.StringTokenizer; - import javax.servlet.AsyncContext; import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; @@ -845,7 +844,7 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory else if (_contextHandler.getBaseResource() instanceof ResourceCollection) resource=_contextHandler.getBaseResource().addPath(pathInContext); - String dir = resource.getListHTML(base,pathInContext.length()>1); + String dir = resource.getListHTML(base,pathInContext.length()>1, request.getQueryString()); if (dir==null) { response.sendError(HttpServletResponse.SC_FORBIDDEN, diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DefaultServletTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DefaultServletTest.java index fd3a81ea977..a2813ad4ef1 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DefaultServletTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DefaultServletTest.java @@ -18,8 +18,6 @@ package org.eclipse.jetty.servlet; -import static org.junit.Assert.assertTrue; - import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -28,7 +26,6 @@ import java.nio.file.Files; import java.util.EnumSet; import java.util.regex.Matcher; import java.util.regex.Pattern; - import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.FilterChain; @@ -54,6 +51,8 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import static org.junit.Assert.assertTrue; + public class DefaultServletTest { @Rule @@ -133,9 +132,14 @@ public class DefaultServletTest /* create some content in the docroot */ File resBase = testdir.getFile("docroot"); FS.ensureDirExists(resBase); - assertTrue(new File(resBase, "one").mkdir()); + File one = new File(resBase, "one"); + assertTrue(one.mkdir()); assertTrue(new File(resBase, "two").mkdir()); assertTrue(new File(resBase, "three").mkdir()); + + File alert = new File(one, "onmouseclick='alert(oops)'"); + FS.touch(alert); + if (!OS.IS_WINDOWS) { assertTrue("Creating dir 'f??r' (Might not work in Windows)", new File(resBase, "f??r").mkdir()); @@ -163,6 +167,15 @@ public class DefaultServletTest } assertResponseNotContains("