From bb1d69ca5204dd1ce822d6a6b292dd309352e0b4 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 1 Aug 2017 10:47:04 -0700 Subject: [PATCH 001/147] Updating to version 9.3.21.M0 --- VERSION.txt | 29 +++++++---- 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 | 52 +++++++++---------- 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, 161 insertions(+), 150 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 181a2a4a2ae..39b92c63d6b 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,4 +1,23 @@ -jetty-9.3.21-SNAPSHOT +jetty-9.3.21.M0 - 01 August 2017 + + 1357 RolloverFileOutputStream: No rollout performed at midnight + + 1469 RolloverFileOutputStream: IllegalStateException Task already scheduled + + 1507 RolloverFileOutputStream: Negative delay Timer.schedule exception + + 1513 RolloverFileOutputStream: can't handle multiple instances + + 1655 Improve extensibility of ServerConnector + + 1661 AbstractProxyServlet onProxyResponseFailure Error + + 1664 IPAccessHandler CIDR IP range check is incorrect + + 1685 Update ALPN support for Java 8u141 + + 1687 HTTP2: Correcting missing callback notification when channel not found + + 1702 Update ALPN support for Java 8u144 + + 1703 Improve HttpInput failure logging + +jetty-9.3.20.v20170531 - 31 May 2017 + + 523 TLS close behaviour breaking session resumption + + 1108 Please improve logging in SslContextFactory when there are no approved + cipher suites + + 1527 Jetty BOM should not depend on jetty-parent + + 1556 A timing channel in Password.java + + 1567 XmlConfiguration will start the same object multiple times jetty-9.2.22.v20170606 - 06 June 2017 + 920 no main manifest attribute, in jetty-runner-9.2.19.v20160908.jar @@ -13,14 +32,6 @@ jetty-9.2.22.v20170606 - 06 June 2017 + 1556 A timing channel in Password.java + 1590 RolloverFileOutputStream not functioning in Jetty 9.2.21+ -jetty-9.3.20.v20170531 - 31 May 2017 - + 523 TLS close behaviour breaking session resumption - + 1108 Please improve logging in SslContextFactory when there are no approved - cipher suites - + 1527 Jetty BOM should not depend on jetty-parent - + 1556 A timing channel in Password.java - + 1567 XmlConfiguration will start the same object multiple times - jetty-9.3.19.v20170502 - 02 May 2017 + 877 Programmatic servlet mappings cannot override mappings from webdefault.xml using quickstart diff --git a/aggregates/jetty-all-compact3/pom.xml b/aggregates/jetty-all-compact3/pom.xml index 5aa2e6e6710..51d79c29db6 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.21-SNAPSHOT + 9.3.21.M0 ../../pom.xml 4.0.0 diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml index 0fdfc933f80..d667765a0ae 100644 --- a/aggregates/jetty-all/pom.xml +++ b/aggregates/jetty-all/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 ../../pom.xml 4.0.0 diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index 6cab0e1ba95..0fc0634fe6b 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 apache-jsp diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml index 0f009af2663..5c2443dcf68 100644 --- a/apache-jstl/pom.xml +++ b/apache-jstl/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 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 4dbdf35861f..e057286e3fb 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.21-SNAPSHOT + 9.3.21.M0 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 6d67f3c3770..52f07fdb226 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 org.eclipse.jetty.example-async-rest diff --git a/examples/async-rest/pom.xml b/examples/async-rest/pom.xml index 6d69ce383eb..e7fb6e1b878 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.21-SNAPSHOT + 9.3.21.M0 ../pom.xml 4.0.0 diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index e5222a2dde7..010e3ecd30d 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.examples examples-parent - 9.3.21-SNAPSHOT + 9.3.21.M0 ../pom.xml 4.0.0 diff --git a/examples/pom.xml b/examples/pom.xml index 9ea145f35e1..e817c6db5f0 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 ../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 bcfc77d688e..97acf2557ba 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.21-SNAPSHOT + 9.3.21.M0 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 a6dff724581..fc2cd7a5688 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-alpn/jetty-alpn-java-server/pom.xml b/jetty-alpn/jetty-alpn-java-server/pom.xml index 031de326579..380e66782bf 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-alpn/jetty-alpn-server/pom.xml b/jetty-alpn/jetty-alpn-server/pom.xml index b875aceaaac..c656f22ba9d 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-alpn-server diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index 03fe2b65db6..858e8ebd5d0 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-alpn-parent diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index 7f2c99da631..9f866503df4 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-annotations diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml index be183aecc42..f7a313c5e43 100644 --- a/jetty-ant/pom.xml +++ b/jetty-ant/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-ant diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index 3e3bb4528e7..145d4b1f938 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -98,7 +98,7 @@ org.eclipse.jetty jetty-annotations - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty @@ -123,12 +123,12 @@ org.eclipse.jetty jetty-client - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-continuation - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty @@ -143,52 +143,52 @@ org.eclipse.jetty jetty-http - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-http-spi - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-infinispan - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-io - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-jaas - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-jaspi - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-jmx - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-jndi - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-monitor - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-nosql - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty @@ -208,62 +208,62 @@ org.eclipse.jetty jetty-plus - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-proxy - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-quickstart - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-rewrite - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-security - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-server - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-servlet - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-servlets - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-spring - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-util - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-util-ajax - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty jetty-webapp - 9.3.21-SNAPSHOT + 9.3.21.M0 org.eclipse.jetty @@ -303,7 +303,7 @@ org.eclipse.jetty jetty-xml - 9.3.21-SNAPSHOT + 9.3.21.M0 diff --git a/jetty-cdi/cdi-core/pom.xml b/jetty-cdi/cdi-core/pom.xml index 73b83909501..b298959a89e 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 cdi-core diff --git a/jetty-cdi/cdi-full-servlet/pom.xml b/jetty-cdi/cdi-full-servlet/pom.xml index 4bdf941c878..5a2457956d9 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 cdi-full-servlet diff --git a/jetty-cdi/cdi-servlet/pom.xml b/jetty-cdi/cdi-servlet/pom.xml index 7596b1e3134..4982f69d706 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 cdi-servlet diff --git a/jetty-cdi/cdi-websocket/pom.xml b/jetty-cdi/cdi-websocket/pom.xml index 9970ae41c4f..1dddb1bbfa7 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 cdi-websocket diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index e53ac8940be..194b06348c5 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 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 582d3fde62d..731d8a49e33 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 test-cdi-webapp diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index 0f342bf51aa..87d0f3434d2 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml index c154a7a0c7e..6c307348d6f 100644 --- a/jetty-continuation/pom.xml +++ b/jetty-continuation/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-continuation diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index b9d8c062dc1..6a4a7bcc118 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-deploy diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 9bd773575d1..c095ef32ee6 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-distribution diff --git a/jetty-documentation/pom.xml b/jetty-documentation/pom.xml index c0604f24287..ca7d4db5922 100644 --- a/jetty-documentation/pom.xml +++ b/jetty-documentation/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 jetty-documentation Jetty :: Documentation diff --git a/jetty-fcgi/fcgi-client/pom.xml b/jetty-fcgi/fcgi-client/pom.xml index 7f7271ed1bf..c5bb627e909 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index dbc2775a3d1..123890173fd 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-fcgi/pom.xml b/jetty-fcgi/pom.xml index 7120a8bcbf2..e67a8925ca9 100644 --- a/jetty-fcgi/pom.xml +++ b/jetty-fcgi/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 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 a6e5e39b461..4411133d8f8 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml index cba7f83a23c..cd064d563d0 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-gcloud/pom.xml b/jetty-gcloud/pom.xml index 9976dce01c8..c5a3493dcc8 100644 --- a/jetty-gcloud/pom.xml +++ b/jetty-gcloud/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-hazelcast/pom.xml b/jetty-hazelcast/pom.xml index 163f40e24bd..16526fe5542 100644 --- a/jetty-hazelcast/pom.xml +++ b/jetty-hazelcast/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-hazelcast diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index 850ff9684bc..333f61d0635 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-http-spi diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index 8b8ca5cedb8..61b665dc9c3 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-http diff --git a/jetty-http2/http2-alpn-tests/pom.xml b/jetty-http2/http2-alpn-tests/pom.xml index 3c39df7d0b8..c1386b9fb1c 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-http2/http2-client/pom.xml b/jetty-http2/http2-client/pom.xml index fd63587b010..8c5464646e9 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-http2/http2-common/pom.xml b/jetty-http2/http2-common/pom.xml index 0039f02deb9..684a055aca8 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-http2/http2-hpack/pom.xml b/jetty-http2/http2-hpack/pom.xml index 074ea36e796..d9f7ba66fad 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-http2/http2-http-client-transport/pom.xml b/jetty-http2/http2-http-client-transport/pom.xml index 24c365678c1..5f76303cc45 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-http2/http2-server/pom.xml b/jetty-http2/http2-server/pom.xml index 69193835677..4aee3fabebb 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-http2/pom.xml b/jetty-http2/pom.xml index a037942815d..2a8dd11c68e 100644 --- a/jetty-http2/pom.xml +++ b/jetty-http2/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-infinispan/pom.xml b/jetty-infinispan/pom.xml index 12349736ca5..5615c7088cb 100644 --- a/jetty-infinispan/pom.xml +++ b/jetty-infinispan/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-infinispan diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml index 3b402b2aa54..0fd8a75a7f1 100644 --- a/jetty-io/pom.xml +++ b/jetty-io/pom.xml @@ -2,7 +2,7 @@ jetty-project org.eclipse.jetty - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-io diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index 44438364017..15a7a62a9ce 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-jaas diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml index 224bacaa474..3a7183916cf 100644 --- a/jetty-jaspi/pom.xml +++ b/jetty-jaspi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-jaspi diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index 4dce4eeb7cd..2e7f5c637e7 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-jmx diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index 8f0377cbb8d..a40b3f06048 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-jndi diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml index f775a25aeef..01f7bd8ec55 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-jspc-maven-plugin diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index 0a08d4ab4b3..31f445917e6 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-maven-plugin diff --git a/jetty-monitor/pom.xml b/jetty-monitor/pom.xml index e4266a8efd6..36855fc4a9e 100644 --- a/jetty-monitor/pom.xml +++ b/jetty-monitor/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-monitor diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml index 95d2b84fe3e..1cca723da55 100644 --- a/jetty-nosql/pom.xml +++ b/jetty-nosql/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-nosql diff --git a/jetty-osgi/jetty-osgi-alpn/pom.xml b/jetty-osgi/jetty-osgi-alpn/pom.xml index bfc169f6fdc..0045831d01d 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.21-SNAPSHOT + 9.3.21.M0 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 ee2f930ebd0..ca61810f988 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.21-SNAPSHOT + 9.3.21.M0 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 a2e8ec7ed5d..50025ae6eaa 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.21-SNAPSHOT + 9.3.21.M0 ../pom.xml 4.0.0 diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index 6e3274252ad..4038a9053d5 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.21-SNAPSHOT + 9.3.21.M0 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 c8117f8cb78..916d45c2afe 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-httpservice diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 4eee3e362d9..0a48b2f08cb 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml index e8a15f56895..84f6da85bdf 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.21-SNAPSHOT + 9.3.21.M0 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 bbb6148494c..b71091e21b6 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.21-SNAPSHOT + 9.3.21.M0 ../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 3d7fa29506c..9840c65e59e 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.21-SNAPSHOT + 9.3.21.M0 ../pom.xml 4.0.0 diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index c233239728c..896b84a8ad7 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.21-SNAPSHOT + 9.3.21.M0 ../pom.xml 4.0.0 diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index 5ac40f5f944..dd620550551 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-plus diff --git a/jetty-proxy/pom.xml b/jetty-proxy/pom.xml index d96b600b1ab..89252c2d53c 100644 --- a/jetty-proxy/pom.xml +++ b/jetty-proxy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-proxy diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index 28e3b080c86..546936fd3dd 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 org.eclipse.jetty diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml index d64918f1a7a..c634931b942 100644 --- a/jetty-rewrite/pom.xml +++ b/jetty-rewrite/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-rewrite diff --git a/jetty-runner/pom.xml b/jetty-runner/pom.xml index fda2a8879bd..3fe7dc3a4c3 100644 --- a/jetty-runner/pom.xml +++ b/jetty-runner/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-runner diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index 26c74d7c880..87497c918f7 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-security diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml index 2bfd6334db8..7484f3543bd 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-server diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index ab55f1b6f7a..dd87a386390 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-servlet diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index 9d8f89b859b..c81dcaa9b9f 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-servlets diff --git a/jetty-spring/pom.xml b/jetty-spring/pom.xml index d4f925f318c..629dd175720 100644 --- a/jetty-spring/pom.xml +++ b/jetty-spring/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-spring diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml index ac989df0b25..7fbc947f85f 100644 --- a/jetty-start/pom.xml +++ b/jetty-start/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-start diff --git a/jetty-util-ajax/pom.xml b/jetty-util-ajax/pom.xml index d1e679f7c3e..9dcf720422e 100644 --- a/jetty-util-ajax/pom.xml +++ b/jetty-util-ajax/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-util-ajax diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 2eef71c8eaa..10c07bdf38d 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-util diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index a4611643510..7ac997ea221 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 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 461d6a763e3..fa82fdddc2a 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-websocket/javax-websocket-server-impl/pom.xml b/jetty-websocket/javax-websocket-server-impl/pom.xml index ba0175987ba..1077a904e8a 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index ab7d3618a02..de8959dd86b 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-websocket/websocket-api/pom.xml b/jetty-websocket/websocket-api/pom.xml index 99feaef9b48..0ac0f39614b 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index 0b18d1cfd99..a8a0d4f1de2 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index c8ea88eec2d..da58f24340a 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index e52b774e305..8a4125e5d2c 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index 84c69c4da6b..66f97585fae 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml index c202a153384..b2016085770 100644 --- a/jetty-xml/pom.xml +++ b/jetty-xml/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 4.0.0 jetty-xml diff --git a/pom.xml b/pom.xml index 37ebc954921..92237d39903 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 Jetty :: Project http://www.eclipse.org/jetty pom diff --git a/tests/pom.xml b/tests/pom.xml index 41756a8aa4a..abc4289acb5 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.3.21.M0 ../pom.xml org.eclipse.jetty.tests diff --git a/tests/test-continuation/pom.xml b/tests/test-continuation/pom.xml index a2a59ab81df..7be1b19f344 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.21-SNAPSHOT + 9.3.21.M0 ../pom.xml 4.0.0 diff --git a/tests/test-http-client-transport/pom.xml b/tests/test-http-client-transport/pom.xml index 68eaf9507c6..7a6e92d36b0 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index 2c288f7bff2..43d30b81f7a 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.21-SNAPSHOT + 9.3.21.M0 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 329504fa78c..ca2f1321724 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.21-SNAPSHOT + 9.3.21.M0 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 0ca1c3c01d4..564eafe3b4f 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.21-SNAPSHOT + 9.3.21.M0 jmx-webapp war diff --git a/tests/test-jmx/pom.xml b/tests/test-jmx/pom.xml index 83c38b4e9a2..baf272e0204 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.21-SNAPSHOT + 9.3.21.M0 4.0.0 test-jmx-parent diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml index 35d1a009c3d..e139ad5bd98 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.21-SNAPSHOT + 9.3.21.M0 test-loginservice Jetty Tests :: Login Service diff --git a/tests/test-quickstart/pom.xml b/tests/test-quickstart/pom.xml index daf6edd5bd6..94180ee3fef 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.21-SNAPSHOT + 9.3.21.M0 ../pom.xml 4.0.0 diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml index d49aea676e1..8bc1c4580ee 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.21-SNAPSHOT + 9.3.21.M0 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 16541de188a..2771fc77ac8 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.21-SNAPSHOT + 9.3.21.M0 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 1aa7330b3e2..1bb6f135589 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.21-SNAPSHOT + 9.3.21.M0 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 4ddcb61d53f..04e8700b106 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.21-SNAPSHOT + 9.3.21.M0 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 4b45d847881..362372459ed 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.21-SNAPSHOT + 9.3.21.M0 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 81d5ccc433b..4eff22ab50f 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.21-SNAPSHOT + 9.3.21.M0 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 eb43327abf7..62d500ada0a 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.21-SNAPSHOT + 9.3.21.M0 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 ea41e521ac7..e98855f2aca 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.21-SNAPSHOT + 9.3.21.M0 test-sessions-common Jetty Tests :: Sessions :: Common diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index e20884bfe54..ef82f644ff2 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.21-SNAPSHOT + 9.3.21.M0 ../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 ba4107e5873..a4f067d9ff1 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.21-SNAPSHOT + 9.3.21.M0 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 4b64af97d99..5382fb11114 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.21-SNAPSHOT + 9.3.21.M0 ../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 9bc9441e177..082d980e9b0 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.21-SNAPSHOT + 9.3.21.M0 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 7bd03561d75..b37d20c2fe0 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.21-SNAPSHOT + 9.3.21.M0 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 41fde0dbe5c..00a5c762eed 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.21-SNAPSHOT + 9.3.21.M0 ../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 01b65aa81f6..e8fc10a3d6c 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.21-SNAPSHOT + 9.3.21.M0 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 c9871aa1b75..908705fc4a5 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.21-SNAPSHOT + 9.3.21.M0 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 7979d00e9b6..e5962f590c8 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.21-SNAPSHOT + 9.3.21.M0 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 4206464e260..c2598d68ee3 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.21-SNAPSHOT + 9.3.21.M0 Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar org.eclipse.jetty.tests diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml index ed018f6748e..820ed5a5b2a 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.21-SNAPSHOT + 9.3.21.M0 test-webapp-rfc2616 Jetty Tests :: WebApp :: RFC2616 From 11a544d6ac22bc8130b9b866b5dd501068bf4ffa Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 1 Aug 2017 11:26:37 -0700 Subject: [PATCH 002/147] Updating to version 9.3.22-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 | 52 +++++++++---------- 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, 143 insertions(+), 141 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 39b92c63d6b..cfb03ab486e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,3 +1,5 @@ +jetty-9.3.22-SNAPSHOT + jetty-9.3.21.M0 - 01 August 2017 + 1357 RolloverFileOutputStream: No rollout performed at midnight + 1469 RolloverFileOutputStream: IllegalStateException Task already scheduled diff --git a/aggregates/jetty-all-compact3/pom.xml b/aggregates/jetty-all-compact3/pom.xml index 51d79c29db6..003a71ebdfb 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.21.M0 + 9.3.22-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml index d667765a0ae..7a5a2f0e7ee 100644 --- a/aggregates/jetty-all/pom.xml +++ b/aggregates/jetty-all/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index 0fc0634fe6b..fceba850861 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 apache-jsp diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml index 5c2443dcf68..bc8b6cff3df 100644 --- a/apache-jstl/pom.xml +++ b/apache-jstl/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-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 e057286e3fb..f3d0c627aef 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.21.M0 + 9.3.22-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 52f07fdb226..a846370ada8 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.21.M0 + 9.3.22-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 e7fb6e1b878..5c76391bf8b 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.21.M0 + 9.3.22-SNAPSHOT ../pom.xml 4.0.0 diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index 010e3ecd30d..10f7ec35a02 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.examples examples-parent - 9.3.21.M0 + 9.3.22-SNAPSHOT ../pom.xml 4.0.0 diff --git a/examples/pom.xml b/examples/pom.xml index e817c6db5f0..9ecdb2d4212 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-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 97acf2557ba..5398ffda09b 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.21.M0 + 9.3.22-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 fc2cd7a5688..8b38cd1c701 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.21.M0 + 9.3.22-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 380e66782bf..24c76ea5157 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-alpn/jetty-alpn-server/pom.xml b/jetty-alpn/jetty-alpn-server/pom.xml index c656f22ba9d..85a76efa760 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-alpn-server diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index 858e8ebd5d0..72657c8b1c4 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-alpn-parent diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index 9f866503df4..eb408bae293 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-annotations diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml index f7a313c5e43..ab46158e0ef 100644 --- a/jetty-ant/pom.xml +++ b/jetty-ant/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-ant diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index 145d4b1f938..0ab76f09703 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -98,7 +98,7 @@ org.eclipse.jetty jetty-annotations - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty @@ -123,12 +123,12 @@ org.eclipse.jetty jetty-client - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-continuation - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty @@ -143,52 +143,52 @@ org.eclipse.jetty jetty-http - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-http-spi - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-infinispan - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-io - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-jaas - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-jaspi - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-jmx - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-jndi - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-monitor - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-nosql - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty @@ -208,62 +208,62 @@ org.eclipse.jetty jetty-plus - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-proxy - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-quickstart - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-rewrite - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-security - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-server - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-servlet - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-servlets - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-spring - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-util - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-util-ajax - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty jetty-webapp - 9.3.21.M0 + 9.3.22-SNAPSHOT org.eclipse.jetty @@ -303,7 +303,7 @@ org.eclipse.jetty jetty-xml - 9.3.21.M0 + 9.3.22-SNAPSHOT diff --git a/jetty-cdi/cdi-core/pom.xml b/jetty-cdi/cdi-core/pom.xml index b298959a89e..8223d912704 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.21.M0 + 9.3.22-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 5a2457956d9..d2f8af39559 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 cdi-full-servlet diff --git a/jetty-cdi/cdi-servlet/pom.xml b/jetty-cdi/cdi-servlet/pom.xml index 4982f69d706..fa9318343d2 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 cdi-servlet diff --git a/jetty-cdi/cdi-websocket/pom.xml b/jetty-cdi/cdi-websocket/pom.xml index 1dddb1bbfa7..2c8d1a27194 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 cdi-websocket diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index 194b06348c5..63f8d63b907 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-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 731d8a49e33..7d5ef0a6310 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 test-cdi-webapp diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index 87d0f3434d2..bdc59985acd 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml index 6c307348d6f..d6108e08885 100644 --- a/jetty-continuation/pom.xml +++ b/jetty-continuation/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-continuation diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index 6a4a7bcc118..b3be1a2103e 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-deploy diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index c095ef32ee6..b659b6197ee 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-distribution diff --git a/jetty-documentation/pom.xml b/jetty-documentation/pom.xml index ca7d4db5922..945d963d590 100644 --- a/jetty-documentation/pom.xml +++ b/jetty-documentation/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT jetty-documentation Jetty :: Documentation diff --git a/jetty-fcgi/fcgi-client/pom.xml b/jetty-fcgi/fcgi-client/pom.xml index c5bb627e909..fea61c888dc 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index 123890173fd..97c3e709d9e 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-fcgi/pom.xml b/jetty-fcgi/pom.xml index e67a8925ca9..01ec07b5cee 100644 --- a/jetty-fcgi/pom.xml +++ b/jetty-fcgi/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-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 4411133d8f8..48874dbec74 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.21.M0 + 9.3.22-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 cd064d563d0..4ddce9927f1 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-gcloud/pom.xml b/jetty-gcloud/pom.xml index c5a3493dcc8..24304c583f2 100644 --- a/jetty-gcloud/pom.xml +++ b/jetty-gcloud/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-hazelcast/pom.xml b/jetty-hazelcast/pom.xml index 16526fe5542..4703bc42ef4 100644 --- a/jetty-hazelcast/pom.xml +++ b/jetty-hazelcast/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-hazelcast diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index 333f61d0635..db2cb2e3b62 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-http-spi diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index 61b665dc9c3..7aa372e4eb2 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21.M0 + 9.3.22-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 c1386b9fb1c..1be1305436e 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-client/pom.xml b/jetty-http2/http2-client/pom.xml index 8c5464646e9..be5a124dcda 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-common/pom.xml b/jetty-http2/http2-common/pom.xml index 684a055aca8..807be9f9c01 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-hpack/pom.xml b/jetty-http2/http2-hpack/pom.xml index d9f7ba66fad..dee94dc73dd 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.21.M0 + 9.3.22-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 5f76303cc45..23bcefe196e 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-http2/http2-server/pom.xml b/jetty-http2/http2-server/pom.xml index 4aee3fabebb..81c805ddcd1 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-http2/pom.xml b/jetty-http2/pom.xml index 2a8dd11c68e..bedc2ace4c6 100644 --- a/jetty-http2/pom.xml +++ b/jetty-http2/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-infinispan/pom.xml b/jetty-infinispan/pom.xml index 5615c7088cb..cd3b48da395 100644 --- a/jetty-infinispan/pom.xml +++ b/jetty-infinispan/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-infinispan diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml index 0fd8a75a7f1..a86ebb2b575 100644 --- a/jetty-io/pom.xml +++ b/jetty-io/pom.xml @@ -2,7 +2,7 @@ jetty-project org.eclipse.jetty - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-io diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index 15a7a62a9ce..7f8822216a9 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-jaas diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml index 3a7183916cf..db03fafa835 100644 --- a/jetty-jaspi/pom.xml +++ b/jetty-jaspi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-jaspi diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index 2e7f5c637e7..9d54b973625 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-jmx diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index a40b3f06048..2460d9f7619 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-jndi diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml index 01f7bd8ec55..c2944624d9d 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-jspc-maven-plugin diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index 31f445917e6..e321498b043 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-maven-plugin diff --git a/jetty-monitor/pom.xml b/jetty-monitor/pom.xml index 36855fc4a9e..155426d542c 100644 --- a/jetty-monitor/pom.xml +++ b/jetty-monitor/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-monitor diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml index 1cca723da55..6f5e3c30432 100644 --- a/jetty-nosql/pom.xml +++ b/jetty-nosql/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-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 0045831d01d..4577a75e919 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.21.M0 + 9.3.22-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 ca61810f988..547741cbc12 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.21.M0 + 9.3.22-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 50025ae6eaa..0952f2a7e4d 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.21.M0 + 9.3.22-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 4038a9053d5..1973bdd1117 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.21.M0 + 9.3.22-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 916d45c2afe..30c16371908 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-httpservice diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 0a48b2f08cb..82ad0198cb0 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-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 84f6da85bdf..4822e7590a1 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.21.M0 + 9.3.22-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 b71091e21b6..b41ad9c266c 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.21.M0 + 9.3.22-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 9840c65e59e..ec24c86f150 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.21.M0 + 9.3.22-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 896b84a8ad7..7a86699b49e 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.21.M0 + 9.3.22-SNAPSHOT ../pom.xml 4.0.0 diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index dd620550551..9b73bcc14a2 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-plus diff --git a/jetty-proxy/pom.xml b/jetty-proxy/pom.xml index 89252c2d53c..bd2cfa647e4 100644 --- a/jetty-proxy/pom.xml +++ b/jetty-proxy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-proxy diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index 546936fd3dd..0d88e664956 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 org.eclipse.jetty diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml index c634931b942..38fe593b42f 100644 --- a/jetty-rewrite/pom.xml +++ b/jetty-rewrite/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-rewrite diff --git a/jetty-runner/pom.xml b/jetty-runner/pom.xml index 3fe7dc3a4c3..7ed0b93c151 100644 --- a/jetty-runner/pom.xml +++ b/jetty-runner/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-runner diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index 87497c918f7..2cacece608f 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-security diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml index 7484f3543bd..908e64b76db 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-server diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index dd87a386390..8a009b62a28 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-servlet diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index c81dcaa9b9f..141e3581a9b 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-servlets diff --git a/jetty-spring/pom.xml b/jetty-spring/pom.xml index 629dd175720..7927383f2bd 100644 --- a/jetty-spring/pom.xml +++ b/jetty-spring/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-spring diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml index 7fbc947f85f..e7ee42a9751 100644 --- a/jetty-start/pom.xml +++ b/jetty-start/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-start diff --git a/jetty-util-ajax/pom.xml b/jetty-util-ajax/pom.xml index 9dcf720422e..999719f36df 100644 --- a/jetty-util-ajax/pom.xml +++ b/jetty-util-ajax/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-util-ajax diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 10c07bdf38d..8340023f99c 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-util diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index 7ac997ea221..4ecce31c25b 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-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 fa82fdddc2a..3057b25afdb 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.21.M0 + 9.3.22-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 1077a904e8a..7dfb41ba0e7 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index de8959dd86b..46a430c78a4 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-api/pom.xml b/jetty-websocket/websocket-api/pom.xml index 0ac0f39614b..7bd404a5262 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index a8a0d4f1de2..c1c497edb58 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index da58f24340a..4d722fd9961 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index 8a4125e5d2c..05c81ac2940 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index 66f97585fae..95276a10d31 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml index b2016085770..e6eda86e395 100644 --- a/jetty-xml/pom.xml +++ b/jetty-xml/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT 4.0.0 jetty-xml diff --git a/pom.xml b/pom.xml index 92237d39903..c0bfb2be6b6 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT Jetty :: Project http://www.eclipse.org/jetty pom diff --git a/tests/pom.xml b/tests/pom.xml index abc4289acb5..eb1075851bb 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty jetty-project - 9.3.21.M0 + 9.3.22-SNAPSHOT ../pom.xml org.eclipse.jetty.tests diff --git a/tests/test-continuation/pom.xml b/tests/test-continuation/pom.xml index 7be1b19f344..e41307ee740 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.21.M0 + 9.3.22-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 7a6e92d36b0..9d7bf7ad266 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index 43d30b81f7a..77f9c074a1c 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.21.M0 + 9.3.22-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 ca2f1321724..b5ea092472d 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.21.M0 + 9.3.22-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 564eafe3b4f..bd29b827d27 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.21.M0 + 9.3.22-SNAPSHOT jmx-webapp war diff --git a/tests/test-jmx/pom.xml b/tests/test-jmx/pom.xml index baf272e0204..f52a19b1954 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.21.M0 + 9.3.22-SNAPSHOT 4.0.0 test-jmx-parent diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml index e139ad5bd98..d1257d0375c 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.21.M0 + 9.3.22-SNAPSHOT test-loginservice Jetty Tests :: Login Service diff --git a/tests/test-quickstart/pom.xml b/tests/test-quickstart/pom.xml index 94180ee3fef..187757463d7 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.21.M0 + 9.3.22-SNAPSHOT ../pom.xml 4.0.0 diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml index 8bc1c4580ee..3ac3ebb5e7a 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.21.M0 + 9.3.22-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 2771fc77ac8..56970bb5430 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.21.M0 + 9.3.22-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 1bb6f135589..9d4b23f19bf 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.21.M0 + 9.3.22-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 04e8700b106..83599a4b134 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.21.M0 + 9.3.22-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 362372459ed..7650aee522b 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.21.M0 + 9.3.22-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 4eff22ab50f..26b6559f9ec 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.21.M0 + 9.3.22-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 62d500ada0a..143d22eeff9 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.21.M0 + 9.3.22-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 e98855f2aca..b4d045bc425 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.21.M0 + 9.3.22-SNAPSHOT test-sessions-common Jetty Tests :: Sessions :: Common diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index ef82f644ff2..135b3c10a06 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.21.M0 + 9.3.22-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 a4f067d9ff1..9011dd260be 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.21.M0 + 9.3.22-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 5382fb11114..d425bf3afaf 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.21.M0 + 9.3.22-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 082d980e9b0..98b834d5afd 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.21.M0 + 9.3.22-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 b37d20c2fe0..7bded4d7d77 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.21.M0 + 9.3.22-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 00a5c762eed..19ed9bd9696 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.21.M0 + 9.3.22-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 e8fc10a3d6c..12247309e6c 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.21.M0 + 9.3.22-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 908705fc4a5..3c002117bf9 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.21.M0 + 9.3.22-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 e5962f590c8..e3af5cc5a69 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.21.M0 + 9.3.22-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 c2598d68ee3..e60c2408f97 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.21.M0 + 9.3.22-SNAPSHOT Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar org.eclipse.jetty.tests diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml index 820ed5a5b2a..862a3b761c6 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.21.M0 + 9.3.22-SNAPSHOT test-webapp-rfc2616 Jetty Tests :: WebApp :: RFC2616 From ab98caafbb4f8874dc2e2c84ab440983fa0d70e1 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 7 Jun 2017 09:56:58 -0700 Subject: [PATCH 003/147] Issue #1603 - fixing NPE in WebSocketServerFactory init --- .../server/WebSocketServerFactory.java | 22 +++--- .../server/WebSocketServerFactoryTest.java | 77 +++++++++++++++++++ 2 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServerFactoryTest.java diff --git a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java index a47d3a88b6e..b8c3abc164f 100644 --- a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java +++ b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java @@ -141,23 +141,18 @@ public class WebSocketServerFactory extends ContainerLifeCycle implements WebSoc private WebSocketServerFactory(ServletContext context, WebSocketPolicy policy, DecoratedObjectFactory objectFactory, Executor executor, ByteBufferPool bufferPool) { this.context = context; + this.defaultPolicy = policy; this.objectFactory = objectFactory; this.executor = executor; - - handshakes.put(HandshakeRFC6455.VERSION, new HandshakeRFC6455()); - - addBean(scheduler); - addBean(bufferPool); - - this.contextClassloader = Thread.currentThread().getContextClassLoader(); - - this.defaultPolicy = policy; - this.eventDriverFactory = new EventDriverFactory(this); this.bufferPool = bufferPool; - this.extensionFactory = new WebSocketExtensionFactory(this); - this.sessionFactories.add(new WebSocketSessionFactory(this)); this.creator = this; + this.contextClassloader = Thread.currentThread().getContextClassLoader(); + this.eventDriverFactory = new EventDriverFactory(this); + this.extensionFactory = new WebSocketExtensionFactory(this); + + this.handshakes.put(HandshakeRFC6455.VERSION, new HandshakeRFC6455()); + this.sessionFactories.add(new WebSocketSessionFactory(this)); // Create supportedVersions List versions = new ArrayList<>(); @@ -176,6 +171,9 @@ public class WebSocketServerFactory extends ContainerLifeCycle implements WebSoc rv.append(v); } supportedVersions = rv.toString(); + + addBean(scheduler); + addBean(bufferPool); } public void addSessionListener(WebSocketSession.Listener listener) diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServerFactoryTest.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServerFactoryTest.java new file mode 100644 index 00000000000..29b6b0cbddd --- /dev/null +++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServerFactoryTest.java @@ -0,0 +1,77 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.websocket.server; + +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.junit.Assert.assertThat; + +import java.util.concurrent.Executor; + +import org.eclipse.jetty.io.ByteBufferPool; +import org.eclipse.jetty.io.MappedByteBufferPool; +import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.component.ContainerLifeCycle; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; +import org.eclipse.jetty.util.log.StdErrLog; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.eclipse.jetty.websocket.api.WebSocketBehavior; +import org.eclipse.jetty.websocket.api.WebSocketPolicy; +import org.junit.Test; + +public class WebSocketServerFactoryTest +{ + private int setLogLevel(Class clazz, int newLevel) + { + int oldLevel = StdErrLog.LEVEL_DEFAULT; + Logger logger = Log.getLogger(clazz); + if (logger instanceof StdErrLog) + { + StdErrLog stdErrLog = (StdErrLog) logger; + oldLevel = stdErrLog.getLevel(); + stdErrLog.setLevel(newLevel); + } + + return oldLevel; + } + + @Test + public void testInit() + { + WebSocketPolicy policy = new WebSocketPolicy(WebSocketBehavior.SERVER); + Executor executor = new QueuedThreadPool(); + ByteBufferPool bufferPool = new MappedByteBufferPool(); + + int wsFactoryLevel = setLogLevel(WebSocketServerFactory.class, StdErrLog.LEVEL_DEBUG); + int abstractLifecycleLevel = setLogLevel(AbstractLifeCycle.class, StdErrLog.LEVEL_DEBUG); + int containerLifecycleLevel = setLogLevel(ContainerLifeCycle.class, StdErrLog.LEVEL_DEBUG); + try + { + WebSocketServerFactory wsFactory = new WebSocketServerFactory(policy, executor, bufferPool); + // The above init caused NPE due to bad constructor initialization order with debug active + assertThat("wsFactory.toString()", wsFactory.toString(), notNullValue()); + } + finally + { + setLogLevel(WebSocketServerFactory.class, wsFactoryLevel); + setLogLevel(AbstractLifeCycle.class, abstractLifecycleLevel); + setLogLevel(ContainerLifeCycle.class, containerLifecycleLevel); + } + } +} From 5b72d8a7333b50f333c2d48ac7854481b479db7b Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 7 Jun 2017 11:48:36 -0700 Subject: [PATCH 004/147] Issue #1604 - WebSocketContainer stop is now smarter --- .../websocket/jsr356/ClientContainer.java | 2 - .../jsr356/JettyClientContainerProvider.java | 59 +++++++++++++++---- 2 files changed, 49 insertions(+), 12 deletions(-) diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/ClientContainer.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/ClientContainer.java index 3b42c2b4640..8602a9acf7c 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/ClientContainer.java +++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/ClientContainer.java @@ -149,8 +149,6 @@ public class ClientContainer extends ContainerLifeCycle implements WebSocketCont this.endpointClientMetadataCache = new ConcurrentHashMap<>(); this.decoderFactory = new DecoderFactory(this,PrimitiveDecoderMetadataSet.INSTANCE); this.encoderFactory = new EncoderFactory(this,PrimitiveEncoderMetadataSet.INSTANCE); - - ShutdownThread.register(this); } /** diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java index f96f15c5855..da0b0fa9052 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java +++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java @@ -23,6 +23,9 @@ import java.lang.reflect.Method; import javax.websocket.ContainerProvider; import javax.websocket.WebSocketContainer; +import org.eclipse.jetty.util.component.ContainerLifeCycle; +import org.eclipse.jetty.util.thread.ShutdownThread; + /** * Client {@link ContainerProvider} implementation. *

@@ -59,6 +62,28 @@ public class JettyClientContainerProvider extends ContainerProvider } } + public Object getContextHandler() + { + try + { + // Equiv of: ContextHandler.Context context = ContextHandler.getCurrentContext() + Class clazzContextHandler = Class.forName("org.eclipse.jetty.server.handler.ContextHandler"); + Method methodGetContext = clazzContextHandler.getMethod("getCurrentContext"); + Object objContext = methodGetContext.invoke(null); + if (objContext == null) + return null; + + // Equiv of: ContextHandler handler = ContextHandler.getContextHandler(context); + Class clazzContext = objContext.getClass(); + Method methodGetContextHandler = clazzContextHandler.getMethod("getContextHandler", clazzContext); + return methodGetContextHandler.invoke(objContext); + } + catch (Throwable ignore) + { + return null; + } + } + /** * Used by {@link ContainerProvider#getWebSocketContainer()} to get a new instance * of the Client {@link WebSocketContainer}. @@ -81,24 +106,38 @@ public class JettyClientContainerProvider extends ContainerProvider catch (Throwable ignore) { } - + if (INSTANCE == null) { INSTANCE = new ClientContainer(); - } - - if (!INSTANCE.isStarted()) - { - try + + Object contextHandler = getContextHandler(); + if (contextHandler != null && contextHandler instanceof ContainerLifeCycle) { - INSTANCE.start(); + // Add as bean to contextHandler + // Allow startup to follow Jetty lifecycle + ((ContainerLifeCycle) contextHandler).addBean(INSTANCE, true); } - catch (Exception e) + else { - throw new RuntimeException("Unable to start Client Container", e); + // Static Initialization + // register JVM wide shutdown thread + ShutdownThread.register(INSTANCE); + + if (!INSTANCE.isStarted()) + { + try + { + INSTANCE.start(); + } + catch (Exception e) + { + throw new RuntimeException("Unable to start Client Container", e); + } + } } } - + return INSTANCE; } } From 0de3673132d6764e9a1ba4e7ec2d6dd42e673a04 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 7 Jun 2017 14:16:16 -0700 Subject: [PATCH 005/147] Issue #1605 - restoring default behavior of ContainerProvider.getWebSocketContainer() + Allowing users to reconfigure JettyClientContainerProvider to restore the Jetty 9.4.x behavior for singletons and ServerContainer behaviors --- .../jsr356/JettyClientContainerProvider.java | 169 +++++++++++++----- .../websocket/jsr356/AnnotatedEchoTest.java | 1 + .../jsr356/AnnotatedEndpointConfigTest.java | 1 + .../websocket/jsr356/ConfiguratorTest.java | 1 + .../jetty/websocket/jsr356/CookiesTest.java | 9 +- .../jsr356/DecoderReaderManySmallTest.java | 7 + .../websocket/jsr356/DecoderReaderTest.java | 9 +- .../jsr356/DelayedStartClientTest.java | 74 ++++++-- .../jetty/websocket/jsr356/EncoderTest.java | 9 +- .../websocket/jsr356/EndpointEchoTest.java | 4 + .../jsr356/MessageReceivingTest.java | 12 +- .../misbehaving/MisbehavingClassTest.java | 2 + .../DelayedStartClientOnServerTest.java | 84 ++++++--- 13 files changed, 281 insertions(+), 101 deletions(-) diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java index da0b0fa9052..0d79cec5276 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java +++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java @@ -24,42 +24,89 @@ import javax.websocket.ContainerProvider; import javax.websocket.WebSocketContainer; import org.eclipse.jetty.util.component.ContainerLifeCycle; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.thread.ShutdownThread; /** * Client {@link ContainerProvider} implementation. *

+ *

* Created by a {@link java.util.ServiceLoader} call in the * {@link javax.websocket.ContainerProvider#getWebSocketContainer()} call. + *

*/ public class JettyClientContainerProvider extends ContainerProvider { - private static Object lock = new Object(); - private static ClientContainer INSTANCE; + private static final Logger LOG = Log.getLogger(JettyClientContainerProvider.class); - public static ClientContainer getInstance() + private static boolean useSingleton = false; + private static WebSocketContainer INSTANCE; + private static boolean useServerContainer = false; + + private static Object lock = new Object(); + + /** + * Change calls to {@link ContainerProvider#getWebSocketContainer()} to always + * return a singleton instance of the same {@link WebSocketContainer} + * + * @param flag true to use a singleton instance of {@link WebSocketContainer} for all + * calls to {@link ContainerProvider#getWebSocketContainer()} + */ + @SuppressWarnings("unused") + public static void useSingleton(boolean flag) { - return INSTANCE; + JettyClientContainerProvider.useSingleton = flag; } - public static void stop() throws Exception + /** + * Test if {@link ContainerProvider#getWebSocketContainer()} will always + * return a singleton instance of the same {@link WebSocketContainer} + * + * @return true if using a singleton instance of {@link WebSocketContainer} for all + * calls to {@link ContainerProvider#getWebSocketContainer()} + */ + @SuppressWarnings("unused") + public static boolean willUseSingleton() { - synchronized (lock) - { - if (INSTANCE == null) - { - return; - } - - try - { - INSTANCE.stop(); - } - finally - { - INSTANCE = null; - } - } + return useSingleton; + } + + /** + * Add ability of calls to {@link ContainerProvider#getWebSocketContainer()} to + * find and return the {@link javax.websocket.server.ServerContainer} from the + * active {@code javax.servlet.ServletContext}. + *

+ *

+ * This will only work if the call to {@link ContainerProvider#getWebSocketContainer()} + * occurs within a thread being processed by the Servlet container. + *

+ * + * @param flag true to to use return the {@link javax.websocket.server.ServerContainer} + * from the active {@code javax.servlet.ServletContext} for all calls to + * {@link ContainerProvider#getWebSocketContainer()} from within a Servlet thread. + */ + @SuppressWarnings("unused") + public static void useServerContainer(boolean flag) + { + JettyClientContainerProvider.useServerContainer = flag; + } + + /** + * Test if {@link ContainerProvider#getWebSocketContainer()} has the ability to + * find and return the {@link javax.websocket.server.ServerContainer} from the + * active {@code javax.servlet.ServletContext}, before creating a new client based + * {@link WebSocketContainer}. + * + * @return true if {@link WebSocketContainer} returned from + * calls to {@link ContainerProvider#getWebSocketContainer()} could be the + * {@link javax.websocket.server.ServerContainer} + * from the active {@code javax.servlet.ServletContext} + */ + @SuppressWarnings("unused") + public static boolean willUseServerContainer() + { + return useServerContainer; } public Object getContextHandler() @@ -74,12 +121,13 @@ public class JettyClientContainerProvider extends ContainerProvider return null; // Equiv of: ContextHandler handler = ContextHandler.getContextHandler(context); - Class clazzContext = objContext.getClass(); - Method methodGetContextHandler = clazzContextHandler.getMethod("getContextHandler", clazzContext); - return methodGetContextHandler.invoke(objContext); + Class clazzServletContext = Class.forName("javax.servlet.ServletContext"); + Method methodGetContextHandler = clazzContextHandler.getMethod("getContextHandler", clazzServletContext); + return methodGetContextHandler.invoke(null, objContext); } catch (Throwable ignore) { + LOG.ignore(ignore); return null; } } @@ -93,52 +141,79 @@ public class JettyClientContainerProvider extends ContainerProvider { synchronized (lock) { - try + WebSocketContainer webSocketContainer = null; + Object contextHandler = getContextHandler(); + + if (useServerContainer && contextHandler != null) { - Class clazzServerContainer = Class.forName("org.eclipse.jetty.websocket.jsr356.server.ServerContainer"); - Method method = clazzServerContainer.getMethod("getWebSocketContainer"); - WebSocketContainer container = (WebSocketContainer) method.invoke(null); - if (container != null) + try { - return container; + // Attempt to use the ServerContainer attribute. + Method methodGetServletContext = contextHandler.getClass().getMethod("getServletContext"); + Object objServletContext = methodGetServletContext.invoke(contextHandler); + if (objServletContext != null) + { + Method methodGetAttribute = objServletContext.getClass().getMethod("getAttribute", String.class); + Object objServerContainer = methodGetAttribute.invoke(objServletContext, "javax.websocket.server.ServerContainer"); + if (objServerContainer != null && objServerContainer instanceof WebSocketContainer) + { + webSocketContainer = (WebSocketContainer) objServerContainer; + } + } + + } + catch (Throwable ignore) + { + LOG.ignore(ignore); + // continue, without server container } } - catch (Throwable ignore) + + if (useSingleton && INSTANCE != null) { + return INSTANCE; } - if (INSTANCE == null) + // Still no instance? + if (webSocketContainer == null) { - INSTANCE = new ClientContainer(); + // TODO: use cached Executor, ByteBufferPool, and HttpClient here + ClientContainer clientContainer = new ClientContainer(); - Object contextHandler = getContextHandler(); if (contextHandler != null && contextHandler instanceof ContainerLifeCycle) { // Add as bean to contextHandler // Allow startup to follow Jetty lifecycle - ((ContainerLifeCycle) contextHandler).addBean(INSTANCE, true); + ((ContainerLifeCycle) contextHandler).addBean(clientContainer); } else { // Static Initialization // register JVM wide shutdown thread - ShutdownThread.register(INSTANCE); - - if (!INSTANCE.isStarted()) + ShutdownThread.register(clientContainer); + } + + if (!clientContainer.isStarted()) + { + try { - try - { - INSTANCE.start(); - } - catch (Exception e) - { - throw new RuntimeException("Unable to start Client Container", e); - } + clientContainer.start(); + } + catch (Exception e) + { + throw new RuntimeException("Unable to start Client Container", e); } } + + webSocketContainer = clientContainer; } - return INSTANCE; + if (useSingleton) + { + INSTANCE = webSocketContainer; + } + + return webSocketContainer; } } } diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEchoTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEchoTest.java index e7a9ca544a5..e8c5df00d4c 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEchoTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEchoTest.java @@ -82,6 +82,7 @@ public class AnnotatedEchoTest public void testEcho() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server AnnotatedEchoClient echoer = new AnnotatedEchoClient(); Session session = container.connectToServer(echoer,serverUri); session.getBasicRemote().sendText("Echo"); diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEndpointConfigTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEndpointConfigTest.java index 91b7c4dd72a..2890dea0b01 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEndpointConfigTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/AnnotatedEndpointConfigTest.java @@ -84,6 +84,7 @@ public class AnnotatedEndpointConfigTest // Connect client WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server socket = new AnnotatedEndpointClient(); session = container.connectToServer(socket,serverUri); diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/ConfiguratorTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/ConfiguratorTest.java index cff86597328..9b5b7a310a1 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/ConfiguratorTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/ConfiguratorTest.java @@ -109,6 +109,7 @@ public class ConfiguratorTest public void testEndpointHandshakeInfo() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server EndpointEchoClient echoer = new EndpointEchoClient(); // Build Config diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/CookiesTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/CookiesTest.java index b1277b4b6c0..c88f2a7735f 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/CookiesTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/CookiesTest.java @@ -44,7 +44,6 @@ import org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest; import org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse; import org.junit.After; import org.junit.Assert; -import org.junit.Before; import org.junit.Test; public class CookiesTest @@ -72,12 +71,6 @@ public class CookiesTest server.stop(); } - @Before - public void resetClientContainer() throws Exception - { - JettyClientContainerProvider.stop(); - } - @Test public void testCookiesAreSentToServer() throws Exception { @@ -110,6 +103,7 @@ public class CookiesTest }); WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow it to stop ClientEndpointConfig.Builder builder = ClientEndpointConfig.Builder.create(); builder.configurator(new ClientEndpointConfig.Configurator() @@ -153,6 +147,7 @@ public class CookiesTest }); WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow it to stop ClientEndpointConfig.Builder builder = ClientEndpointConfig.Builder.create(); builder.configurator(new ClientEndpointConfig.Configurator() diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderManySmallTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderManySmallTest.java index c867b9a6e2e..2b7a1ba4ea7 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderManySmallTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderManySmallTest.java @@ -38,6 +38,7 @@ import javax.websocket.WebSocketContainer; import org.eclipse.jetty.toolchain.test.EventQueue; import org.eclipse.jetty.toolchain.test.TestTracker; +import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.websocket.common.frames.TextFrame; @@ -174,6 +175,12 @@ public class DecoderReaderManySmallTest { client = ContainerProvider.getWebSocketContainer(); } + + @After + public void stopClient() throws Exception + { + ((LifeCycle)client).stop(); + } @Before public void startServer() throws Exception diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderTest.java index e5f137b2257..c391bbd00b5 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DecoderReaderTest.java @@ -44,6 +44,7 @@ import org.eclipse.jetty.toolchain.test.EventQueue; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.toolchain.test.TestTracker; import org.eclipse.jetty.util.BufferUtil; +import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.websocket.common.WebSocketFrame; @@ -238,7 +239,13 @@ public class DecoderReaderTest { client = ContainerProvider.getWebSocketContainer(); } - + + @After + public void stopClient() throws Exception + { + ((LifeCycle)client).stop(); + } + @Before public void startServer() throws Exception { diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java index b72bd289851..af004bf2b07 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java @@ -24,46 +24,88 @@ import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.notNullValue; import static org.junit.Assert.assertThat; -import java.lang.management.ManagementFactory; -import java.lang.management.ThreadInfo; -import java.lang.management.ThreadMXBean; import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; import java.util.List; +import java.util.Set; +import java.util.concurrent.Executor; import javax.websocket.ContainerProvider; import javax.websocket.WebSocketContainer; -import org.junit.Before; +import org.eclipse.jetty.util.component.ContainerLifeCycle; +import org.eclipse.jetty.util.component.LifeCycle; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.junit.After; import org.junit.Test; public class DelayedStartClientTest { - @Before - public void stopClientContainer() throws Exception + WebSocketContainer container; + + @After + public void stopContainer() throws Exception { - JettyClientContainerProvider.stop(); + ((LifeCycle)container).stop(); } @Test public void testNoExtraHttpClientThreads() { - WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + container = ContainerProvider.getWebSocketContainer(); assertThat("Container", container, notNullValue()); - List threadNames = getThreadNames(); + List threadNames = getThreadNames((ContainerLifeCycle)container); assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); assertThat("Threads", threadNames, not(hasItem(containsString("HttpClient@")))); } - private List getThreadNames() + public static List getThreadNames(ContainerLifeCycle... containers) { - ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); - ThreadInfo[] threads = threadMXBean.dumpAllThreads(false, false); - List ret = new ArrayList<>(); - for (ThreadInfo info : threads) + List threadNames = new ArrayList<>(); + Set seen = new HashSet<>(); + for (ContainerLifeCycle container : containers) { - ret.add(info.getThreadName()); + if (container == null) + { + continue; + } + + findConfiguredThreadNames(seen, threadNames, container); + } + seen.clear(); + // System.out.println("Threads: " + threadNames.stream().collect(Collectors.joining(", ", "[", "]"))); + return threadNames; + } + + private static void findConfiguredThreadNames(Set seen, List threadNames, ContainerLifeCycle container) + { + if (seen.contains(container)) + { + // skip + return; + } + + seen.add(container); + + Collection executors = container.getBeans(Executor.class); + for (Executor executor : executors) + { + if (executor instanceof QueuedThreadPool) + { + QueuedThreadPool qtp = (QueuedThreadPool) executor; + threadNames.add(qtp.getName()); + } + else + { + System.err.println("### Executor: " + executor); + } + } + + for (ContainerLifeCycle child : container.getBeans(ContainerLifeCycle.class)) + { + findConfiguredThreadNames(seen, threadNames, child); } - return ret; } } diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EncoderTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EncoderTest.java index 7fb33f069d7..ae95501c319 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EncoderTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EncoderTest.java @@ -42,6 +42,7 @@ import javax.websocket.WebSocketContainer; import org.eclipse.jetty.toolchain.test.EventQueue; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.toolchain.test.TestTracker; +import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.websocket.common.test.BlockheadServer; @@ -236,7 +237,13 @@ public class EncoderTest { client = ContainerProvider.getWebSocketContainer(); } - + + @After + public void stopClient() throws Exception + { + ((LifeCycle)client).stop(); + } + @Before public void startServer() throws Exception { diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EndpointEchoTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EndpointEchoTest.java index c484a071601..d42076935e4 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EndpointEchoTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/EndpointEchoTest.java @@ -88,6 +88,7 @@ public class EndpointEchoTest public void testBasicEchoInstance() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server EndpointEchoClient echoer = new EndpointEchoClient(); Assert.assertThat(echoer,instanceOf(javax.websocket.Endpoint.class)); // Issue connect using instance of class that extends Endpoint @@ -104,6 +105,7 @@ public class EndpointEchoTest public void testBasicEchoClassref() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server // Issue connect using class reference (class extends Endpoint) Session session = container.connectToServer(EndpointEchoClient.class,serverUri); if (LOG.isDebugEnabled()) @@ -119,6 +121,7 @@ public class EndpointEchoTest public void testAbstractEchoInstance() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server EchoStringEndpoint echoer = new EchoStringEndpoint(); Assert.assertThat(echoer,instanceOf(javax.websocket.Endpoint.class)); // Issue connect using instance of class that extends abstract that extends Endpoint @@ -135,6 +138,7 @@ public class EndpointEchoTest public void testAbstractEchoClassref() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server // Issue connect using class reference (class that extends abstract that extends Endpoint) Session session = container.connectToServer(EchoStringEndpoint.class,serverUri); if (LOG.isDebugEnabled()) diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/MessageReceivingTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/MessageReceivingTest.java index f5445e4b0ae..1d41b5d5746 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/MessageReceivingTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/MessageReceivingTest.java @@ -39,8 +39,10 @@ import javax.websocket.WebSocketContainer; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.ContextHandler; +import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; +import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; @@ -100,10 +102,16 @@ public class MessageReceivingTest { } @Before - public void configureTest() { + public void initClient() { container = ContainerProvider.getWebSocketContainer(); } - + + @After + public void stopClient() throws Exception + { + ((LifeCycle)container).stop(); + } + /** * Method tests receiving of text messages at once. * diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/misbehaving/MisbehavingClassTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/misbehaving/MisbehavingClassTest.java index dcb92a76a4a..b050161fbab 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/misbehaving/MisbehavingClassTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/misbehaving/MisbehavingClassTest.java @@ -95,6 +95,7 @@ public class MisbehavingClassTest public void testEndpointRuntimeOnOpen() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server EndpointRuntimeOnOpen socket = new EndpointRuntimeOnOpen(); try (StacklessLogging logging = new StacklessLogging(EndpointRuntimeOnOpen.class, WebSocketSession.class)) @@ -117,6 +118,7 @@ public class MisbehavingClassTest public void testAnnotatedRuntimeOnOpen() throws Exception { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + server.addBean(container); // allow to shutdown with server AnnotatedRuntimeOnOpen socket = new AnnotatedRuntimeOnOpen(); try (StacklessLogging logging = new StacklessLogging(AnnotatedRuntimeOnOpen.class, WebSocketSession.class)) diff --git a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java index 24d854187cb..9a0282e4788 100644 --- a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java +++ b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java @@ -29,14 +29,15 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringWriter; -import java.lang.management.ManagementFactory; -import java.lang.management.ThreadInfo; -import java.lang.management.ThreadMXBean; import java.net.HttpURLConnection; import java.net.URI; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; import java.util.List; +import java.util.Set; +import java.util.concurrent.Executor; import java.util.stream.Collectors; import javax.servlet.ServletException; @@ -54,10 +55,11 @@ import javax.websocket.server.ServerEndpoint; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.util.IO; +import org.eclipse.jetty.util.component.ContainerLifeCycle; +import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.eclipse.jetty.websocket.api.util.WSURI; -import org.eclipse.jetty.websocket.jsr356.JettyClientContainerProvider; +import org.eclipse.jetty.websocket.jsr356.ClientContainer; import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer; -import org.junit.Before; import org.junit.Test; public class DelayedStartClientOnServerTest @@ -72,12 +74,6 @@ public class DelayedStartClientOnServerTest } } - @Before - public void stopClientContainer() throws Exception - { - JettyClientContainerProvider.stop(); - } - /** * Using the Client specific techniques of JSR356, connect to the echo socket * and perform an echo request. @@ -220,11 +216,10 @@ public class DelayedStartClientOnServerTest Server server = new Server(0); ServletContextHandler contextHandler = new ServletContextHandler(); server.setHandler(contextHandler); - WebSocketServerContainerInitializer.configureContext(contextHandler); try { server.start(); - List threadNames = getThreadNames(); + List threadNames = getThreadNames(server); assertNoHttpClientPoolThreads(threadNames); assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketClient@")))); @@ -235,7 +230,6 @@ public class DelayedStartClientOnServerTest } } - @Test public void testHttpClientThreads_AfterClientConnectTo() throws Exception { @@ -251,9 +245,9 @@ public class DelayedStartClientOnServerTest server.start(); String response = GET(server.getURI().resolve("/connect")); assertThat("Response", response, startsWith("Connected to ws://")); - List threadNames = getThreadNames(); + List threadNames = getThreadNames(server); assertNoHttpClientPoolThreads(threadNames); - assertThat("Threads", threadNames, hasItem(containsString("WebSocketClient@"))); + assertThat("Threads", threadNames, hasItem(containsString("WebSocketContainer@"))); } finally { @@ -276,7 +270,7 @@ public class DelayedStartClientOnServerTest server.start(); String response = GET(server.getURI().resolve("/connect")); assertThat("Response", response, startsWith("Connected to ws://")); - List threadNames = getThreadNames(); + List threadNames = getThreadNames((ContainerLifeCycle)container, server); assertNoHttpClientPoolThreads(threadNames); assertThat("Threads", threadNames, hasItem(containsString("WebSocketClient@"))); } @@ -300,8 +294,8 @@ public class DelayedStartClientOnServerTest { server.start(); String response = GET(server.getURI().resolve("/configure")); - assertThat("Response", response, startsWith("Configured " + ServerContainer.class.getName())); - List threadNames = getThreadNames(); + assertThat("Response", response, startsWith("Configured " + ClientContainer.class.getName())); + List threadNames = getThreadNames((ContainerLifeCycle)container, server); assertNoHttpClientPoolThreads(threadNames); assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketClient@")))); @@ -327,7 +321,7 @@ public class DelayedStartClientOnServerTest server.start(); String response = GET(server.getURI().resolve("/configure")); assertThat("Response", response, startsWith("Configured " + ServerContainer.class.getName())); - List threadNames = getThreadNames(); + List threadNames = getThreadNames((ContainerLifeCycle)container, server); assertNoHttpClientPoolThreads(threadNames); assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); } @@ -350,15 +344,51 @@ public class DelayedStartClientOnServerTest } } - private List getThreadNames() + public static List getThreadNames(ContainerLifeCycle... containers) { - ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); - ThreadInfo[] threads = threadMXBean.dumpAllThreads(false, false); - List ret = new ArrayList<>(); - for (ThreadInfo info : threads) + List threadNames = new ArrayList<>(); + Set seen = new HashSet<>(); + for (ContainerLifeCycle container : containers) { - ret.add(info.getThreadName()); + if (container == null) + { + continue; + } + + findConfiguredThreadNames(seen, threadNames, container); + } + seen.clear(); + // System.out.println("Threads: " + threadNames.stream().collect(Collectors.joining(", ", "[", "]"))); + return threadNames; + } + + private static void findConfiguredThreadNames(Set seen, List threadNames, ContainerLifeCycle container) + { + if (seen.contains(container)) + { + // skip + return; + } + + seen.add(container); + + Collection executors = container.getBeans(Executor.class); + for (Executor executor : executors) + { + if (executor instanceof QueuedThreadPool) + { + QueuedThreadPool qtp = (QueuedThreadPool) executor; + threadNames.add(qtp.getName()); + } + else + { + System.err.println("### Executor: " + executor); + } + } + + for (ContainerLifeCycle child : container.getBeans(ContainerLifeCycle.class)) + { + findConfiguredThreadNames(seen, threadNames, child); } - return ret; } } From af4962f842d707a76b556539548e11239b24e4e9 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 12 Jun 2017 09:23:23 -0700 Subject: [PATCH 006/147] Issue #1605 - common executor and bufferpool for jsr356 client --- .../jsr356/JettyClientContainerProvider.java | 28 +++++++++++-- .../DelayedStartClientOnServerTest.java | 2 +- .../common/scopes/SimpleContainerScope.java | 41 ++++++++++++++----- 3 files changed, 57 insertions(+), 14 deletions(-) diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java index 0d79cec5276..251d214abf0 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java +++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java @@ -19,14 +19,20 @@ package org.eclipse.jetty.websocket.jsr356; import java.lang.reflect.Method; +import java.util.concurrent.Executor; import javax.websocket.ContainerProvider; import javax.websocket.WebSocketContainer; +import org.eclipse.jetty.io.ByteBufferPool; +import org.eclipse.jetty.io.MappedByteBufferPool; import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; +import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.eclipse.jetty.util.thread.ShutdownThread; +import org.eclipse.jetty.websocket.api.WebSocketPolicy; +import org.eclipse.jetty.websocket.common.scopes.SimpleContainerScope; /** * Client {@link ContainerProvider} implementation. @@ -43,6 +49,8 @@ public class JettyClientContainerProvider extends ContainerProvider private static boolean useSingleton = false; private static WebSocketContainer INSTANCE; private static boolean useServerContainer = false; + private static Executor commonExecutor; + private static ByteBufferPool commonBufferPool; private static Object lock = new Object(); @@ -177,8 +185,22 @@ public class JettyClientContainerProvider extends ContainerProvider // Still no instance? if (webSocketContainer == null) { - // TODO: use cached Executor, ByteBufferPool, and HttpClient here - ClientContainer clientContainer = new ClientContainer(); + if (commonExecutor == null) + { + QueuedThreadPool threadPool = new QueuedThreadPool(); + String name = "Jsr356Client@" + hashCode(); + threadPool.setName(name); + threadPool.setDaemon(true); + commonExecutor = threadPool; + } + + if (commonBufferPool == null) + { + commonBufferPool = new MappedByteBufferPool(); + } + + SimpleContainerScope containerScope = new SimpleContainerScope(WebSocketPolicy.newClientPolicy(), commonBufferPool, commonExecutor, null); + ClientContainer clientContainer = new ClientContainer(containerScope); if (contextHandler != null && contextHandler instanceof ContainerLifeCycle) { @@ -192,7 +214,7 @@ public class JettyClientContainerProvider extends ContainerProvider // register JVM wide shutdown thread ShutdownThread.register(clientContainer); } - + if (!clientContainer.isStarted()) { try diff --git a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java index 9a0282e4788..ac43e595d7d 100644 --- a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java +++ b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java @@ -247,7 +247,7 @@ public class DelayedStartClientOnServerTest assertThat("Response", response, startsWith("Connected to ws://")); List threadNames = getThreadNames(server); assertNoHttpClientPoolThreads(threadNames); - assertThat("Threads", threadNames, hasItem(containsString("WebSocketContainer@"))); + assertThat("Threads", threadNames, hasItem(containsString("Jsr356Client@"))); } finally { diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/SimpleContainerScope.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/SimpleContainerScope.java index a82a7565584..5a8403022e3 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/SimpleContainerScope.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/SimpleContainerScope.java @@ -34,31 +34,52 @@ public class SimpleContainerScope extends ContainerLifeCycle implements WebSocke private final ByteBufferPool bufferPool; private final DecoratedObjectFactory objectFactory; private final WebSocketPolicy policy; - private Executor executor; + private final Executor executor; private SslContextFactory sslContextFactory; public SimpleContainerScope(WebSocketPolicy policy) { - this(policy,new MappedByteBufferPool(),new DecoratedObjectFactory()); + this(policy, new MappedByteBufferPool(), new DecoratedObjectFactory()); this.sslContextFactory = new SslContextFactory(); } public SimpleContainerScope(WebSocketPolicy policy, ByteBufferPool bufferPool) { - this(policy,bufferPool,new DecoratedObjectFactory()); + this(policy, bufferPool, new DecoratedObjectFactory()); } public SimpleContainerScope(WebSocketPolicy policy, ByteBufferPool bufferPool, DecoratedObjectFactory objectFactory) + { + this(policy, bufferPool, (Executor) null, objectFactory); + } + + public SimpleContainerScope(WebSocketPolicy policy, ByteBufferPool bufferPool, Executor executor, DecoratedObjectFactory objectFactory) { this.policy = policy; this.bufferPool = bufferPool; - this.objectFactory = objectFactory; - - QueuedThreadPool threadPool = new QueuedThreadPool(); - String name = "WebSocketContainer@" + hashCode(); - threadPool.setName(name); - threadPool.setDaemon(true); - this.executor = threadPool; + + if (objectFactory == null) + { + this.objectFactory = new DecoratedObjectFactory(); + } + else + { + this.objectFactory = objectFactory; + } + + if (executor == null) + { + QueuedThreadPool threadPool = new QueuedThreadPool(); + String name = "WebSocketContainer@" + hashCode(); + threadPool.setName(name); + threadPool.setDaemon(true); + this.executor = threadPool; + addBean(this.executor); + } + else + { + this.executor = executor; + } } @Override From 796da084b4bc40c855b9ed6b18ad12865aec0c38 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 16 Jun 2017 14:23:29 -0700 Subject: [PATCH 007/147] Issue #1625 - Support new IANA declared websocket close status codes --- .../jetty/websocket/api/StatusCode.java | 33 ++++++++++- .../websocket/client/SlowServerTest.java | 4 +- .../jetty/websocket/common/CloseInfo.java | 37 ++++++++---- .../jetty/websocket/common/CloseInfoTest.java | 19 ++----- .../websocket/server/ab/TestABCase3.java | 5 -- .../server/ab/TestABCase7_BadStatusCodes.java | 16 +++--- .../ab/TestABCase7_GoodStatusCodes.java | 5 +- .../test/resources/jetty-logging.properties | 56 +++++++++---------- 8 files changed, 106 insertions(+), 69 deletions(-) diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/StatusCode.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/StatusCode.java index 4dfe06c906b..3b4d8df23ff 100644 --- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/StatusCode.java +++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/StatusCode.java @@ -22,7 +22,7 @@ package org.eclipse.jetty.websocket.api; * The RFC 6455 specified status codes and IANA: WebSocket Close Code Number Registry */ -public class StatusCode +public final class StatusCode { /** * 1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled. @@ -137,6 +137,13 @@ public class StatusCode */ public final static int TRY_AGAIN_LATER = 1013; + /** + * 1014 indicates that a gateway or proxy received and invalid upstream response. + *

+ * See [hybi] WebSocket Subprotocol Close Code: Bad Gateway + */ + public final static int INVALID_UPSTREAM_RESPONSE = 1014; + /** * 1015 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. It is designated for use in applications expecting * a status code to indicate that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified). @@ -144,4 +151,28 @@ public class StatusCode * See RFC 6455, Section 7.4.1 Defined Status Codes. */ public final static int FAILED_TLS_HANDSHAKE = 1015; + + /** + * Test if provided status code can be sent/received on a WebSocket close. + *

+ * This honors the RFC6455 rules and IANA rules. + *

+ * @param statusCode the statusCode to test + * @return true if transmittable + */ + public static boolean isTransmittable(int statusCode) + { + return (statusCode == NORMAL) || + (statusCode == SHUTDOWN) || + (statusCode == PROTOCOL) || + (statusCode == BAD_DATA) || + (statusCode == BAD_PAYLOAD) || + (statusCode == POLICY_VIOLATION) || + (statusCode == MESSAGE_TOO_LARGE) || + (statusCode == REQUIRED_EXTENSION) || + (statusCode == SERVER_ERROR) || + (statusCode == SERVICE_RESTART) || + (statusCode == TRY_AGAIN_LATER) || + (statusCode == INVALID_UPSTREAM_RESPONSE); + } } diff --git a/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/SlowServerTest.java b/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/SlowServerTest.java index f2d76a2de35..3fae9a28704 100644 --- a/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/SlowServerTest.java +++ b/jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/SlowServerTest.java @@ -18,7 +18,7 @@ package org.eclipse.jetty.websocket.client; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.is; import java.net.URI; import java.util.concurrent.Future; @@ -34,9 +34,11 @@ import org.eclipse.jetty.websocket.common.test.IBlockheadServerConnection; import org.junit.After; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; +@Ignore("TODO: Flappy Test") public class SlowServerTest { @Rule diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/CloseInfo.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/CloseInfo.java index a411716c38d..0e1b3fc0b77 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/CloseInfo.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/CloseInfo.java @@ -33,7 +33,7 @@ import org.eclipse.jetty.websocket.common.frames.CloseFrame; public class CloseInfo { - private int statusCode; + private int statusCode = 0; private byte[] reasonBytes; public CloseInfo() @@ -71,11 +71,7 @@ public class CloseInfo if (validate) { - if ((statusCode < StatusCode.NORMAL) || (statusCode == StatusCode.UNDEFINED) || (statusCode == StatusCode.NO_CLOSE) - || (statusCode == StatusCode.NO_CODE) || ((statusCode > 1011) && (statusCode <= 2999)) || (statusCode >= 5000)) - { - throw new ProtocolException("Invalid close code: " + statusCode); - } + assertValidStatusCode(statusCode); } if (data.remaining() > 0) @@ -142,6 +138,27 @@ public class CloseInfo } } + private void assertValidStatusCode(int statusCode) + { + // Status Codes outside of RFC6455 defined scope + if ((statusCode <= 999) || (statusCode >= 5000)) + { + throw new ProtocolException("Out of range close status code: " + statusCode); + } + + // Status Codes not allowed to exist in a Close frame (per RFC6455) + if ((statusCode == StatusCode.NO_CLOSE) || (statusCode == StatusCode.NO_CODE) || (statusCode == StatusCode.FAILED_TLS_HANDSHAKE)) + { + throw new ProtocolException("Frame forbidden close status code: " + statusCode); + } + + // Status Code is in defined "reserved space" and is declared (all others are invalid) + if ((statusCode >= 1000) && (statusCode <= 2999) && !StatusCode.isTransmittable(statusCode)) + { + throw new ProtocolException("RFC6455 and IANA Undefined close status code: " + statusCode); + } + } + private ByteBuffer asByteBuffer() { if ((statusCode == StatusCode.NO_CLOSE) || (statusCode == StatusCode.NO_CODE) || (statusCode == (-1))) @@ -175,12 +192,10 @@ public class CloseInfo { CloseFrame frame = new CloseFrame(); frame.setFin(true); - if ((statusCode >= 1000) && (statusCode != StatusCode.NO_CLOSE) && (statusCode != StatusCode.NO_CODE)) + // Frame forbidden codes result in no status code (and no reason string) + if ((statusCode != StatusCode.NO_CLOSE) && (statusCode != StatusCode.NO_CODE) && (statusCode != StatusCode.FAILED_TLS_HANDSHAKE)) { - if (statusCode == StatusCode.FAILED_TLS_HANDSHAKE) - { - throw new ProtocolException("Close Frame with status code " + statusCode + " not allowed (per RFC6455)"); - } + assertValidStatusCode(statusCode); frame.setPayload(asByteBuffer()); } return frame; diff --git a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/CloseInfoTest.java b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/CloseInfoTest.java index 2966271f6a1..67f1d1e3c61 100644 --- a/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/CloseInfoTest.java +++ b/jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/CloseInfoTest.java @@ -22,17 +22,14 @@ import static org.eclipse.jetty.websocket.api.StatusCode.FAILED_TLS_HANDSHAKE; import static org.eclipse.jetty.websocket.api.StatusCode.NORMAL; import static org.eclipse.jetty.websocket.api.StatusCode.NO_CLOSE; import static org.eclipse.jetty.websocket.api.StatusCode.NO_CODE; -import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; import java.nio.ByteBuffer; import org.eclipse.jetty.util.BufferUtil; import org.eclipse.jetty.util.StringUtil; -import org.eclipse.jetty.websocket.api.ProtocolException; import org.eclipse.jetty.websocket.common.frames.CloseFrame; import org.junit.Test; @@ -99,17 +96,11 @@ public class CloseInfoTest assertThat("close.code",close.getStatusCode(),is(FAILED_TLS_HANDSHAKE)); assertThat("close.reason",close.getReason(),nullValue()); - try - { - @SuppressWarnings("unused") - CloseFrame frame = close.asFrame(); - fail("Expected " + ProtocolException.class.getName()); - } - catch (ProtocolException e) - { - // expected path - assertThat("ProtocolException message",e.getMessage(),containsString("not allowed (per RFC6455)")); - } + CloseFrame frame = close.asFrame(); + assertThat("close frame op code",frame.getOpCode(),is(OpCode.CLOSE)); + // should result in no payload + assertThat("close frame has payload",frame.hasPayload(),is(false)); + assertThat("close frame payload length",frame.getPayloadLength(),is(0)); } /** diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java index 891088018c1..4172de15563 100644 --- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java +++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.eclipse.jetty.toolchain.test.AdvancedRunner; import org.eclipse.jetty.util.log.StacklessLogging; import org.eclipse.jetty.websocket.api.StatusCode; import org.eclipse.jetty.websocket.common.CloseInfo; @@ -32,15 +31,11 @@ import org.eclipse.jetty.websocket.common.frames.BinaryFrame; import org.eclipse.jetty.websocket.common.frames.PingFrame; import org.eclipse.jetty.websocket.common.frames.TextFrame; import org.eclipse.jetty.websocket.common.test.Fuzzer; -import org.junit.Ignore; import org.junit.Test; -import org.junit.runner.RunWith; /** * Test various RSV violations */ -@Ignore -@RunWith(AdvancedRunner.class) public class TestABCase3 extends AbstractABCase { /** diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_BadStatusCodes.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_BadStatusCodes.java index a914953731a..fc02dc63bb2 100644 --- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_BadStatusCodes.java +++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_BadStatusCodes.java @@ -45,7 +45,7 @@ public class TestABCase7_BadStatusCodes extends AbstractABCase { private static final Logger LOG = Log.getLogger(TestABCase7_GoodStatusCodes.class); - @Parameters + @Parameters(name = "{1} / {0}") public static Collection data() { // The various Good UTF8 sequences as a String (hex form) @@ -54,13 +54,13 @@ public class TestABCase7_BadStatusCodes extends AbstractABCase // @formatter:off data.add(new Object[] { "7.9.1", 0 }); data.add(new Object[] { "7.9.2", 999 }); - data.add(new Object[] { "7.9.3", 1004 }); - data.add(new Object[] { "7.9.4", 1005 }); - data.add(new Object[] { "7.9.5", 1006 }); - data.add(new Object[] { "7.9.6", 1012 }); - data.add(new Object[] { "7.9.7", 1013 }); - data.add(new Object[] { "7.9.8", 1014 }); - data.add(new Object[] { "7.9.9", 1015 }); + data.add(new Object[] { "7.9.3", 1004 }); // RFC6455/UNDEFINED + data.add(new Object[] { "7.9.4", 1005 }); // RFC6455/Cannot Be Transmitted + data.add(new Object[] { "7.9.5", 1006 }); // RFC6455/Cannot Be Transmitted + // data.add(new Object[] { "7.9.6", 1012 }); - IANA Defined + // data.add(new Object[] { "7.9.7", 1013 }); - IANA Defined + // data.add(new Object[] { "7.9.8", 1014 }); - IANA Defined + data.add(new Object[] { "7.9.9", 1015 }); // RFC6455/Cannot Be Transmitted data.add(new Object[] { "7.9.10", 1016 }); data.add(new Object[] { "7.9.11", 1100 }); data.add(new Object[] { "7.9.12", 2000 }); diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_GoodStatusCodes.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_GoodStatusCodes.java index 7cb50f24b32..9dff95e8451 100644 --- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_GoodStatusCodes.java +++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7_GoodStatusCodes.java @@ -43,7 +43,7 @@ public class TestABCase7_GoodStatusCodes extends AbstractABCase { private static final Logger LOG = Log.getLogger(TestABCase7_GoodStatusCodes.class); - @Parameters + @Parameters(name = "{1} / {0}") public static Collection data() { // The various Good UTF8 sequences as a String (hex form) @@ -59,6 +59,9 @@ public class TestABCase7_GoodStatusCodes extends AbstractABCase data.add(new Object[] { "7.7.7", 1009 }); data.add(new Object[] { "7.7.8", 1010 }); data.add(new Object[] { "7.7.9", 1011 }); + data.add(new Object[] { "IANA Assigned", 1012 }); + data.add(new Object[] { "IANA Assigned", 1013 }); + data.add(new Object[] { "IANA Assigned", 1014 }); data.add(new Object[] { "7.7.10", 3000 }); data.add(new Object[] { "7.7.11", 3999 }); data.add(new Object[] { "7.7.12", 4000 }); diff --git a/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties b/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties index 924d0006cbb..2a711f20999 100644 --- a/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties +++ b/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties @@ -1,29 +1,29 @@ -org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -org.eclipse.jetty.LEVEL=WARN - -# org.eclipse.jetty.io.WriteFlusher.LEVEL=DEBUG -# org.eclipse.jetty.websocket.LEVEL=DEBUG -# org.eclipse.jetty.websocket.LEVEL=INFO -# org.eclipse.jetty.websocket.common.io.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.ab.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.Parser.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.Generator.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.ab.Fuzzer.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.blockhead.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.helper.LEVEL=DEBUG - -# org.eclipse.jetty.websocket.client.io.ConnectPromise.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.WebSocketSession_OPEN.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.io.IOState.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection_OPEN.LEVEL=DEBUG - -### Show state changes on BrowserDebugTool -# -- LEAVE THIS AT DEBUG LEVEL -- -org.eclipse.jetty.websocket.server.browser.LEVEL=DEBUG - -### Disabling intentional error out of RFCSocket -org.eclipse.jetty.websocket.server.helper.RFCSocket.LEVEL=OFF - -### Hiding Stack Traces from various test cases -org.eclipse.jetty.websocket.server.ab.ABSocket.STACKS=OFF +org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog +org.eclipse.jetty.LEVEL=WARN + +# org.eclipse.jetty.io.WriteFlusher.LEVEL=DEBUG +# org.eclipse.jetty.websocket.LEVEL=DEBUG +# org.eclipse.jetty.websocket.LEVEL=INFO +# org.eclipse.jetty.websocket.common.io.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.ab.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.Parser.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.Generator.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.ab.Fuzzer.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.blockhead.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.helper.LEVEL=DEBUG + +# org.eclipse.jetty.websocket.client.io.ConnectPromise.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.WebSocketSession_OPEN.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.io.IOState.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection_OPEN.LEVEL=DEBUG + +### Show state changes on BrowserDebugTool +# -- LEAVE THIS AT DEBUG LEVEL -- +org.eclipse.jetty.websocket.server.browser.LEVEL=DEBUG + +### Disabling intentional error out of RFCSocket +org.eclipse.jetty.websocket.server.helper.RFCSocket.LEVEL=OFF + +### Hiding Stack Traces from various test cases +org.eclipse.jetty.websocket.server.ab.ABSocket.STACKS=OFF org.eclipse.jetty.websocket.server.WebSocketCloseTest$FastFailSocket.STACKS=OFF \ No newline at end of file From a7bcac6d75d70a921e9a93a7b11def27ec32ac84 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 31 May 2017 15:24:57 -0700 Subject: [PATCH 008/147] Updating to version 9.3.20.v20170531 --- aggregates/jetty-all-compact3/pom.xml | 474 +++++----- aggregates/jetty-all/pom.xml | 464 ++++----- apache-jsp/pom.xml | 224 ++--- apache-jstl/pom.xml | 154 +-- examples/async-rest/async-rest-jar/pom.xml | 66 +- examples/async-rest/async-rest-webapp/pom.xml | 66 +- examples/async-rest/pom.xml | 34 +- examples/embedded/pom.xml | 282 +++--- examples/pom.xml | 68 +- jetty-alpn/jetty-alpn-client/pom.xml | 130 +-- jetty-alpn/jetty-alpn-java-client/pom.xml | 106 +-- jetty-alpn/jetty-alpn-java-server/pom.xml | 146 +-- jetty-alpn/jetty-alpn-server/pom.xml | 148 +-- jetty-alpn/pom.xml | 58 +- jetty-annotations/pom.xml | 142 +-- jetty-ant/pom.xml | 164 ++-- jetty-bom/pom.xml | 866 ++++++++--------- jetty-cdi/cdi-core/pom.xml | 142 +-- jetty-cdi/cdi-full-servlet/pom.xml | 106 +-- jetty-cdi/cdi-servlet/pom.xml | 180 ++-- jetty-cdi/cdi-websocket/pom.xml | 142 +-- jetty-cdi/pom.xml | 54 +- jetty-cdi/test-cdi-webapp/pom.xml | 174 ++-- jetty-client/pom.xml | 242 ++--- jetty-continuation/pom.xml | 66 +- jetty-deploy/pom.xml | 98 +- jetty-distribution/pom.xml | 866 ++++++++--------- jetty-documentation/pom.xml | 486 +++++----- jetty-fcgi/fcgi-client/pom.xml | 80 +- jetty-fcgi/fcgi-server/pom.xml | 134 +-- jetty-fcgi/pom.xml | 56 +- .../jetty-gcloud-session-manager/pom.xml | 334 +++---- jetty-gcloud/pom.xml | 46 +- jetty-http-spi/pom.xml | 128 +-- jetty-http/pom.xml | 140 +-- jetty-http2/http2-alpn-tests/pom.xml | 178 ++-- jetty-http2/http2-client/pom.xml | 138 +-- jetty-http2/http2-common/pom.xml | 116 +-- jetty-http2/http2-hpack/pom.xml | 126 +-- .../http2-http-client-transport/pom.xml | 230 ++--- jetty-http2/http2-server/pom.xml | 128 +-- jetty-http2/pom.xml | 70 +- jetty-infinispan/pom.xml | 98 +- jetty-io/pom.xml | 74 +- jetty-jaas/pom.xml | 76 +- jetty-jaspi/pom.xml | 144 +-- jetty-jmx/pom.xml | 92 +- jetty-jndi/pom.xml | 112 +-- jetty-jspc-maven-plugin/pom.xml | 246 ++--- jetty-maven-plugin/pom.xml | 348 +++---- jetty-monitor/pom.xml | 168 ++-- jetty-nosql/pom.xml | 100 +- jetty-osgi/jetty-osgi-alpn/pom.xml | 110 +-- jetty-osgi/jetty-osgi-boot-jsp/pom.xml | 272 +++--- jetty-osgi/jetty-osgi-boot-warurl/pom.xml | 98 +- jetty-osgi/jetty-osgi-boot/pom.xml | 224 ++--- jetty-osgi/jetty-osgi-httpservice/pom.xml | 176 ++-- jetty-osgi/pom.xml | 404 ++++---- jetty-osgi/test-jetty-osgi-context/pom.xml | 186 ++-- jetty-osgi/test-jetty-osgi-fragment/pom.xml | 98 +- jetty-osgi/test-jetty-osgi-webapp/pom.xml | 166 ++-- jetty-osgi/test-jetty-osgi/pom.xml | 882 +++++++++--------- jetty-plus/pom.xml | 118 +-- jetty-proxy/pom.xml | 134 +-- jetty-quickstart/pom.xml | 190 ++-- jetty-rewrite/pom.xml | 94 +- jetty-runner/pom.xml | 236 ++--- jetty-security/pom.xml | 112 +-- jetty-server/pom.xml | 156 ++-- jetty-servlet/pom.xml | 128 +-- jetty-servlets/pom.xml | 170 ++-- jetty-spring/pom.xml | 114 +-- jetty-start/pom.xml | 88 +- jetty-util-ajax/pom.xml | 86 +- jetty-util/pom.xml | 120 +-- jetty-webapp/pom.xml | 146 +-- .../javax-websocket-client-impl/pom.xml | 200 ++-- .../javax-websocket-server-impl/pom.xml | 150 +-- jetty-websocket/pom.xml | 96 +- jetty-websocket/websocket-api/pom.xml | 116 +-- jetty-websocket/websocket-client/pom.xml | 256 ++--- jetty-websocket/websocket-common/pom.xml | 162 ++-- jetty-websocket/websocket-server/pom.xml | 192 ++-- jetty-websocket/websocket-servlet/pom.xml | 100 +- jetty-xml/pom.xml | 76 +- tests/pom.xml | 126 +-- tests/test-continuation/pom.xml | 96 +- tests/test-http-client-transport/pom.xml | 286 +++--- tests/test-integration/pom.xml | 282 +++--- tests/test-jmx/jmx-webapp-it/pom.xml | 138 +-- tests/test-jmx/jmx-webapp/pom.xml | 84 +- tests/test-jmx/pom.xml | 34 +- tests/test-loginservice/pom.xml | 128 +-- tests/test-quickstart/pom.xml | 370 ++++---- tests/test-sessions/pom.xml | 50 +- .../test-gcloud-sessions/pom.xml | 188 ++-- .../test-sessions/test-hash-sessions/pom.xml | 110 +-- .../test-infinispan-sessions/pom.xml | 262 +++--- .../test-sessions/test-jdbc-sessions/pom.xml | 132 +-- .../test-memcached-sessions/pom.xml | 178 ++-- .../test-mongodb-sessions/pom.xml | 240 ++--- .../test-sessions-common/pom.xml | 78 +- tests/test-webapps/pom.xml | 84 +- tests/test-webapps/test-jaas-webapp/pom.xml | 160 ++-- tests/test-webapps/test-jetty-webapp/pom.xml | 504 +++++----- tests/test-webapps/test-jndi-webapp/pom.xml | 288 +++--- .../test-webapps/test-mock-resources/pom.xml | 138 +-- tests/test-webapps/test-proxy-webapp/pom.xml | 220 ++--- tests/test-webapps/test-servlet-spec/pom.xml | 60 +- .../test-container-initializer/pom.xml | 80 +- .../test-spec-webapp/pom.xml | 438 ++++----- .../test-web-fragment/pom.xml | 76 +- .../test-webapps/test-webapp-rfc2616/pom.xml | 112 +-- 113 files changed, 10154 insertions(+), 10154 deletions(-) diff --git a/aggregates/jetty-all-compact3/pom.xml b/aggregates/jetty-all-compact3/pom.xml index c47df531495..7ee03e52801 100644 --- a/aggregates/jetty-all-compact3/pom.xml +++ b/aggregates/jetty-all-compact3/pom.xml @@ -1,237 +1,237 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - ../../pom.xml - - 4.0.0 - org.eclipse.jetty.aggregate - jetty-all-compact3 - Jetty :: Aggregate :: All core Jetty suitable for Java 8 compact 3 profile - http://www.eclipse.org/jetty - - ${project.groupId}.all.compact3 - - - ${project.build.directory}/sources - - - org.apache.maven.plugins - maven-compiler-plugin - - 8 - 8 - - -profile - compact3 - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-dependencies - - unpack-dependencies - - - **/MANIFEST.MF,javax/** - javax - javax,org.eclipse.jetty.orbit,org.slf4j,org.ow2.asm - ${project.build.directory}/classes - false - true - - - - unpack-source - generate-sources - - unpack-dependencies - - - sources - **/* - - META-INF/**, - **/Servlet3Continuation*, - **/Jetty6Continuation*, - **/AppContextLeakPreventer*.java, - **/AWTLeakPreventer*.java, - **/IntrospectorCleaner*.java, - **/PostConstructAnnotationHandler*.java, - **/PreDestroyAnnotationHandler*.java, - **/ResourceAnnotationHandler*.java, - **/ResourcesAnnotationHandler*.java - - org.eclipse.jetty,org.eclipse.jetty.websocket - javax - javax,org.eclipse.jetty.orbit,org.slf4j,org.ow2.asm - ${project.build.directory}/sources - true - true - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - development - https://eclipse.org/jetty - ${user.name} - org.eclipse.jetty - https://raw.githubusercontent.com/eclipse/jetty.project/master/NOTICE.txt - Jetty - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - -Xdoclint:none --allow-script-in-comments - - - - javadoc-jar - compile - - jar - - - - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - true - - - - - - - - - org.eclipse.jetty - jetty-client - ${project.version} - provided - - - org.eclipse.jetty - jetty-deploy - ${project.version} - provided - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - provided - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - provided - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - provided - - - org.eclipse.jetty - jetty-plus - ${project.version} - provided - - - org.eclipse.jetty - jetty-annotations - ${project.version} - provided - - - org.eclipse.jetty - jetty-util - ${project.version} - provided - - - org.eclipse.jetty - jetty-jaspi - ${project.version} - provided - - - org.eclipse.jetty - jetty-jndi - ${project.version} - provided - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - provided - - - org.eclipse.jetty - jetty-servlets - ${project.version} - provided - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - provided - - - - javax.websocket - javax.websocket-api - compile - - - javax.servlet - javax.servlet-api - compile - - - javax.transaction - javax.transaction-api - compile - true - - - org.eclipse.jetty.orbit - javax.mail.glassfish - compile - true - - - org.slf4j - slf4j-api - compile - true - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + ../../pom.xml + + 4.0.0 + org.eclipse.jetty.aggregate + jetty-all-compact3 + Jetty :: Aggregate :: All core Jetty suitable for Java 8 compact 3 profile + http://www.eclipse.org/jetty + + ${project.groupId}.all.compact3 + + + ${project.build.directory}/sources + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + -profile + compact3 + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-dependencies + + unpack-dependencies + + + **/MANIFEST.MF,javax/** + javax + javax,org.eclipse.jetty.orbit,org.slf4j,org.ow2.asm + ${project.build.directory}/classes + false + true + + + + unpack-source + generate-sources + + unpack-dependencies + + + sources + **/* + + META-INF/**, + **/Servlet3Continuation*, + **/Jetty6Continuation*, + **/AppContextLeakPreventer*.java, + **/AWTLeakPreventer*.java, + **/IntrospectorCleaner*.java, + **/PostConstructAnnotationHandler*.java, + **/PreDestroyAnnotationHandler*.java, + **/ResourceAnnotationHandler*.java, + **/ResourcesAnnotationHandler*.java + + org.eclipse.jetty,org.eclipse.jetty.websocket + javax + javax,org.eclipse.jetty.orbit,org.slf4j,org.ow2.asm + ${project.build.directory}/sources + true + true + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + + + development + https://eclipse.org/jetty + ${user.name} + org.eclipse.jetty + https://raw.githubusercontent.com/eclipse/jetty.project/master/NOTICE.txt + Jetty + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + -Xdoclint:none --allow-script-in-comments + + + + javadoc-jar + compile + + jar + + + + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + true + + + + + + + + + org.eclipse.jetty + jetty-client + ${project.version} + provided + + + org.eclipse.jetty + jetty-deploy + ${project.version} + provided + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + provided + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + provided + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + provided + + + org.eclipse.jetty + jetty-plus + ${project.version} + provided + + + org.eclipse.jetty + jetty-annotations + ${project.version} + provided + + + org.eclipse.jetty + jetty-util + ${project.version} + provided + + + org.eclipse.jetty + jetty-jaspi + ${project.version} + provided + + + org.eclipse.jetty + jetty-jndi + ${project.version} + provided + + + org.eclipse.jetty + jetty-rewrite + ${project.version} + provided + + + org.eclipse.jetty + jetty-servlets + ${project.version} + provided + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + provided + + + + javax.websocket + javax.websocket-api + compile + + + javax.servlet + javax.servlet-api + compile + + + javax.transaction + javax.transaction-api + compile + true + + + org.eclipse.jetty.orbit + javax.mail.glassfish + compile + true + + + org.slf4j + slf4j-api + compile + true + + + diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml index d20d594368e..57e52dd9344 100644 --- a/aggregates/jetty-all/pom.xml +++ b/aggregates/jetty-all/pom.xml @@ -1,232 +1,232 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - ../../pom.xml - - 4.0.0 - org.eclipse.jetty.aggregate - jetty-all - Jetty :: Aggregate :: All core Jetty - UberJar for Core Jetty features - pom - http://www.eclipse.org/jetty - - ${project.build.directory}/${project.artifactId}-${project.version}-uber.jar - ${project.build.directory}/gen-resources - - - - - org.apache.maven.plugins - maven-resources-plugin - - - massage-manifest - generate-resources - - copy-resources - - - ${gen-resources-dir} - - - src/main/resources - true - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - org.eclipse.jetty.toolchain - jetty-build-support - 1.3 - - - - - uberjar - package - - shade - - - true - uber - ${uber-jar} - - - - ${gen-resources-dir} - - - - - *:* - - META-INF/LICENSE.txt - META-INF/*.MF - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - javax:* - org.eclipse.jetty.orbit:* - org.mortbay.jetty:* - org.mortbay.jetty.alpn:* - org.slf4j:* - org.ow2.asm:* - *:javax - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${uber-jar} - jar - uber - - - - - - - - - - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-jaspi - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - - - - org.eclipse.jetty - jetty-alpn-client - ${project.version} - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - - - org.eclipse.jetty.http2 - http2-client - ${project.version} - - - - javax.websocket - javax.websocket-api - - - javax.servlet - javax.servlet-api - - - javax.transaction - javax.transaction-api - - - org.eclipse.jetty.orbit - javax.mail.glassfish - - - org.slf4j - slf4j-api - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + ../../pom.xml + + 4.0.0 + org.eclipse.jetty.aggregate + jetty-all + Jetty :: Aggregate :: All core Jetty + UberJar for Core Jetty features + pom + http://www.eclipse.org/jetty + + ${project.build.directory}/${project.artifactId}-${project.version}-uber.jar + ${project.build.directory}/gen-resources + + + + + org.apache.maven.plugins + maven-resources-plugin + + + massage-manifest + generate-resources + + copy-resources + + + ${gen-resources-dir} + + + src/main/resources + true + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + org.eclipse.jetty.toolchain + jetty-build-support + 1.3 + + + + + uberjar + package + + shade + + + true + uber + ${uber-jar} + + + + ${gen-resources-dir} + + + + + *:* + + META-INF/LICENSE.txt + META-INF/*.MF + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + javax:* + org.eclipse.jetty.orbit:* + org.mortbay.jetty:* + org.mortbay.jetty.alpn:* + org.slf4j:* + org.ow2.asm:* + *:javax + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + package + + attach-artifact + + + + + ${uber-jar} + jar + uber + + + + + + + + + + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-jaspi + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + org.eclipse.jetty + jetty-rewrite + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + + + + org.eclipse.jetty + jetty-alpn-client + ${project.version} + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + + + org.eclipse.jetty.http2 + http2-client + ${project.version} + + + + javax.websocket + javax.websocket-api + + + javax.servlet + javax.servlet-api + + + javax.transaction + javax.transaction-api + + + org.eclipse.jetty.orbit + javax.mail.glassfish + + + org.slf4j + slf4j-api + + + diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index d00dde77d83..b658a53f904 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -1,112 +1,112 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - apache-jsp - Jetty :: Apache JSP Implementation - http://www.eclipse.org/jetty - jar - - ${project.groupId}.${project.artifactId} - - - - - org.apache.felix - maven-bundle-plugin - true - - - Jetty-specific ServletContainerInitializer for Jasper - org.eclipse.jetty.apache.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", - org.eclipse.jetty.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader;osgi.serviceloader=javax.servlet.ServletContainerInitializer,osgi.serviceloader;osgi.serviceloader=org.apache.juli.logging.Log - <_nouses>true - - - - - org.apache.maven.plugins - maven-jar-plugin - - - nolog-jar - - jar - - - nolog - - META-INF/services/org.apache.juli.logging.Log - - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - - - org.eclipse.jetty.toolchain - jetty-schemas - - - - - javax.servlet - javax.servlet-api - - - - - org.mortbay.jasper - apache-jsp - - - - - org.eclipse.jdt.core.compiler - ecj - - - - - org.eclipse.jetty - jetty-servlet - ${project.version} - tests - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + apache-jsp + Jetty :: Apache JSP Implementation + http://www.eclipse.org/jetty + jar + + ${project.groupId}.${project.artifactId} + + + + + org.apache.felix + maven-bundle-plugin + true + + + Jetty-specific ServletContainerInitializer for Jasper + org.eclipse.jetty.apache.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", + org.eclipse.jetty.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader;osgi.serviceloader=javax.servlet.ServletContainerInitializer,osgi.serviceloader;osgi.serviceloader=org.apache.juli.logging.Log + <_nouses>true + + + + + org.apache.maven.plugins + maven-jar-plugin + + + nolog-jar + + jar + + + nolog + + META-INF/services/org.apache.juli.logging.Log + + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + + + org.eclipse.jetty.toolchain + jetty-schemas + + + + + javax.servlet + javax.servlet-api + + + + + org.mortbay.jasper + apache-jsp + + + + + org.eclipse.jdt.core.compiler + ecj + + + + + org.eclipse.jetty + jetty-servlet + ${project.version} + tests + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml index 2de59430d77..e45ff2f6606 100644 --- a/apache-jstl/pom.xml +++ b/apache-jstl/pom.xml @@ -1,77 +1,77 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - apache-jstl - Apache :: JSTL module - http://tomcat.apache.org/taglibs/standard/ - jar - - ${project.groupId}.apache.jstl - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - - - org.apache.taglibs - taglibs-standard-spec - - - - - org.apache.taglibs - taglibs-standard-impl - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - org.eclipse.jetty - apache-jsp - ${project.version} - test - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + apache-jstl + Apache :: JSTL module + http://tomcat.apache.org/taglibs/standard/ + jar + + ${project.groupId}.apache.jstl + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + + + org.apache.taglibs + taglibs-standard-spec + + + + + org.apache.taglibs + taglibs-standard-impl + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + org.eclipse.jetty + apache-jsp + ${project.version} + test + + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + + + diff --git a/examples/async-rest/async-rest-jar/pom.xml b/examples/async-rest/async-rest-jar/pom.xml index 66dbe8f7b58..368ae881bd6 100644 --- a/examples/async-rest/async-rest-jar/pom.xml +++ b/examples/async-rest/async-rest-jar/pom.xml @@ -1,33 +1,33 @@ - - - org.eclipse.jetty - example-async-rest - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty.example-async-rest - example-async-rest-jar - jar - Example Async Rest :: Jar - http://www.eclipse.org/jetty - - ${project.groupId}.examples.asyc.rest - - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-util-ajax - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - + + + org.eclipse.jetty + example-async-rest + 9.4.7-SNAPSHOT + + 4.0.0 + org.eclipse.jetty.example-async-rest + example-async-rest-jar + jar + Example Async Rest :: Jar + http://www.eclipse.org/jetty + + ${project.groupId}.examples.asyc.rest + + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-util-ajax + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + diff --git a/examples/async-rest/async-rest-webapp/pom.xml b/examples/async-rest/async-rest-webapp/pom.xml index ebc71af66d9..b650dafae6a 100644 --- a/examples/async-rest/async-rest-webapp/pom.xml +++ b/examples/async-rest/async-rest-webapp/pom.xml @@ -1,33 +1,33 @@ - - - org.eclipse.jetty - example-async-rest - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty.example-async-rest - example-async-rest-webapp - war - Example Async Rest :: Webapp - - async-rest - - - - org.eclipse.jetty.example-async-rest - example-async-rest-jar - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - javax.servlet - javax.servlet-api - provided - - - + + + org.eclipse.jetty + example-async-rest + 9.4.7-SNAPSHOT + + 4.0.0 + org.eclipse.jetty.example-async-rest + example-async-rest-webapp + war + Example Async Rest :: Webapp + + async-rest + + + + org.eclipse.jetty.example-async-rest + example-async-rest-jar + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + javax.servlet + javax.servlet-api + provided + + + diff --git a/examples/async-rest/pom.xml b/examples/async-rest/pom.xml index 73ae49e27e9..555b5ef8cac 100644 --- a/examples/async-rest/pom.xml +++ b/examples/async-rest/pom.xml @@ -1,17 +1,17 @@ - - - org.eclipse.jetty.examples - examples-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - example-async-rest - pom - Example Async Rest - - async-rest-jar - async-rest-webapp - - + + + org.eclipse.jetty.examples + examples-parent + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + example-async-rest + pom + Example Async Rest + + async-rest-jar + async-rest-webapp + + diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index adc1b4d984c..592f26b261a 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -1,141 +1,141 @@ - - - org.eclipse.jetty.examples - examples-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - example-jetty-embedded - Example :: Jetty Embedded - Jetty Embedded Examples - http://www.eclipse.org/jetty - - ${project.groupId}.embedded - - - - - com.google.guava - guava - 18.0 - - - - org.eclipse.jetty - jetty-util-ajax - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - javax.transaction - javax.transaction-api - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - org.eclipse.jetty - jetty-jaas - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - org.eclipse.jetty.orbit - javax.mail.glassfish - - - org.eclipse.jetty.toolchain - jetty-test-helper - - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - + + + org.eclipse.jetty.examples + examples-parent + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + example-jetty-embedded + Example :: Jetty Embedded + Jetty Embedded Examples + http://www.eclipse.org/jetty + + ${project.groupId}.embedded + + + + + com.google.guava + guava + 18.0 + + + + org.eclipse.jetty + jetty-util-ajax + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + jetty-rewrite + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + javax.transaction + javax.transaction-api + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + org.eclipse.jetty + jetty-jaas + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + org.eclipse.jetty.orbit + javax.mail.glassfish + + + org.eclipse.jetty.toolchain + jetty-test-helper + + + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + + + diff --git a/examples/pom.xml b/examples/pom.xml index ada149dc692..7186628cf5e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -1,34 +1,34 @@ - - - 4.0.0 - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - ../pom.xml - - org.eclipse.jetty.examples - examples-parent - Jetty Examples :: Parent - pom - - - - org.codehaus.mojo - findbugs-maven-plugin - - - true - - - - - - - async-rest - embedded - - + + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + ../pom.xml + + org.eclipse.jetty.examples + examples-parent + Jetty Examples :: Parent + pom + + + + org.codehaus.mojo + findbugs-maven-plugin + + + true + + + + + + + async-rest + embedded + + diff --git a/jetty-alpn/jetty-alpn-client/pom.xml b/jetty-alpn/jetty-alpn-client/pom.xml index 436d7a06aa2..fda2d0844dd 100644 --- a/jetty-alpn/jetty-alpn-client/pom.xml +++ b/jetty-alpn/jetty-alpn-client/pom.xml @@ -1,65 +1,65 @@ - - - org.eclipse.jetty - jetty-alpn-parent - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-alpn-client - Jetty :: ALPN :: Client - - ${project.groupId}.alpn.client - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.alpn;resolution:=optional - - - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.alpn.* - - - - - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-alpn-parent + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-alpn-client + Jetty :: ALPN :: Client + + ${project.groupId}.alpn.client + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.alpn;resolution:=optional + + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.alpn.* + + + + + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-alpn/jetty-alpn-java-client/pom.xml b/jetty-alpn/jetty-alpn-java-client/pom.xml index 226cacf62da..b9fb1636ead 100644 --- a/jetty-alpn/jetty-alpn-java-client/pom.xml +++ b/jetty-alpn/jetty-alpn-java-client/pom.xml @@ -1,53 +1,53 @@ - - - - - org.eclipse.jetty - jetty-alpn-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - jetty-alpn-java-client - Jetty :: ALPN :: JDK9 Client Implementation - - - ${project.groupId}.alpn.java.client - - - - - - maven-compiler-plugin - - 1.9 - 1.9 - - - - - - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - - - - org.eclipse.jetty.http2 - http2-client - ${project.version} - test - - - - - + + + + + org.eclipse.jetty + jetty-alpn-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + jetty-alpn-java-client + Jetty :: ALPN :: JDK9 Client Implementation + + + ${project.groupId}.alpn.java.client + + + + + + maven-compiler-plugin + + 1.9 + 1.9 + + + + + + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + + + + org.eclipse.jetty.http2 + http2-client + ${project.version} + test + + + + + diff --git a/jetty-alpn/jetty-alpn-java-server/pom.xml b/jetty-alpn/jetty-alpn-java-server/pom.xml index b7ec1001ea6..99f22b75e9b 100644 --- a/jetty-alpn/jetty-alpn-java-server/pom.xml +++ b/jetty-alpn/jetty-alpn-java-server/pom.xml @@ -1,73 +1,73 @@ - - - - org.eclipse.jetty - jetty-alpn-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - jetty-alpn-java-server - Jetty :: ALPN :: JDK9 Server Implementation - - - ${project.groupId}.alpn.java.server - - - - - - maven-compiler-plugin - - 1.9 - 1.9 - - - - - - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - junit - junit - test - - - org.hamcrest - hamcrest-library - test - - - - + + + + org.eclipse.jetty + jetty-alpn-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + jetty-alpn-java-server + Jetty :: ALPN :: JDK9 Server Implementation + + + ${project.groupId}.alpn.java.server + + + + + + maven-compiler-plugin + + 1.9 + 1.9 + + + + + + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + junit + junit + test + + + org.hamcrest + hamcrest-library + test + + + + diff --git a/jetty-alpn/jetty-alpn-server/pom.xml b/jetty-alpn/jetty-alpn-server/pom.xml index cb0073849a9..67e6dd0c0b5 100644 --- a/jetty-alpn/jetty-alpn-server/pom.xml +++ b/jetty-alpn/jetty-alpn-server/pom.xml @@ -1,74 +1,74 @@ - - - org.eclipse.jetty - jetty-alpn-parent - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-alpn-server - Jetty :: ALPN :: Server - - ${project.groupId}.alpn.server - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.alpn.* - - - - org.codehaus.mojo - build-helper-maven-plugin - - - parse-version - - parse-version - - - alpn - ${alpn.api.version} - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle-symbolic-name};singleton:=true - org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}",* - - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-alpn-parent + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-alpn-server + Jetty :: ALPN :: Server + + ${project.groupId}.alpn.server + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.alpn.* + + + + org.codehaus.mojo + build-helper-maven-plugin + + + parse-version + + parse-version + + + alpn + ${alpn.api.version} + + + + + + org.apache.felix + maven-bundle-plugin + + + ${bundle-symbolic-name};singleton:=true + org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}",* + + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index 1bba2c7810c..ff866582df4 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -1,29 +1,29 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-alpn-parent - pom - Jetty :: ALPN :: Parent - - jetty-alpn-server - jetty-alpn-client - - - - jdk9 - - [1.9,) - - - jetty-alpn-java-client - jetty-alpn-java-server - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-alpn-parent + pom + Jetty :: ALPN :: Parent + + jetty-alpn-server + jetty-alpn-client + + + + jdk9 + + [1.9,) + + + jetty-alpn-java-client + jetty-alpn-java-server + + + + diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index 6eae9da4656..d9d959bcfec 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -1,71 +1,71 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-annotations - Jetty :: Servlet Annotations - Annotation support for deploying servlets in jetty. - http://www.eclipse.org/jetty - - ${project.groupId}.annotations - - - - - org.apache.felix - maven-bundle-plugin - true - - - osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.annotations.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-jndi - ${project.version} - test - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - javax.annotation - javax.annotation-api - - - org.ow2.asm - asm - - - org.ow2.asm - asm-commons - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-annotations + Jetty :: Servlet Annotations + Annotation support for deploying servlets in jetty. + http://www.eclipse.org/jetty + + ${project.groupId}.annotations + + + + + org.apache.felix + maven-bundle-plugin + true + + + osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.annotations.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-jndi + ${project.version} + test + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + javax.annotation + javax.annotation-api + + + org.ow2.asm + asm + + + org.ow2.asm + asm-commons + + + diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml index 41444181f21..5eb1da9e716 100644 --- a/jetty-ant/pom.xml +++ b/jetty-ant/pom.xml @@ -1,82 +1,82 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-ant - jar - Jetty :: Ant Plugin - - - org.eclipse.jetty.ant - - - - - maven-dependency-plugin - - - copy-lib-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty - org.eclipse.jetty.orbit,org.eclipse.jetty.websocket,org.eclipse.jetty.drafts - jetty-all,jetty-start - jar - ${project.build.directory}/test-lib - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - ant - ant - 1.6.5 - - - ant - ant-launcher - 1.6.5 - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-ant + jar + Jetty :: Ant Plugin + + + org.eclipse.jetty.ant + + + + + maven-dependency-plugin + + + copy-lib-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty + org.eclipse.jetty.orbit,org.eclipse.jetty.websocket,org.eclipse.jetty.drafts + jetty-all,jetty-start + jar + ${project.build.directory}/test-lib + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + ant + ant + 1.6.5 + + + ant + ant-launcher + 1.6.5 + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index 8444f223516..f021c1da502 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -1,433 +1,433 @@ - - org.eclipse.jetty - 4.0.0 - jetty-bom - 9.4.6-SNAPSHOT - 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.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 - 2.10.4 - - true - - - - - - - - - - org.eclipse.jetty - apache-jsp - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - apache-jstl - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-alpn-client - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-alpn-java-client - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-alpn-java-server - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-alpn-server - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-annotations - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-ant - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.cdi - cdi-core - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.cdi - cdi-full-servlet - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.cdi - cdi-servlet - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.cdi - cdi-websocket - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-client - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-continuation - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-deploy - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-distribution - 9.4.7-SNAPSHOT - zip - - - org.eclipse.jetty.fcgi - jetty-fcgi-client - 9.4.6-SNAPSHOT - - - org.eclipse.jetty.fcgi - jetty-fcgi-server - 9.4.6-SNAPSHOT - - - org.eclipse.jetty.gcloud - jetty-gcloud-session-manager - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-home - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-http - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.http2 - http2-client - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.http2 - http2-common - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.http2 - http2-hpack - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.http2 - http2-http-client-transport - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.http2 - http2-server - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-http-spi - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-infinispan - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-io - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-jaas - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-jaspi - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-jmx - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-jndi - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.memcached - jetty-memcached-sessions - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-monitor - 9.4.6-SNAPSHOT - - - org.eclipse.jetty - jetty-nosql - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.osgi - jetty-osgi-boot - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.osgi - jetty-osgi-boot-jsp - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.osgi - jetty-osgi-boot-warurl - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.osgi - jetty-httpservice - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-plus - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-proxy - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-quickstart - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-rewrite - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-security - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-server - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-servlet - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-servlets - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-spring - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-unixsocket - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-util - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-util-ajax - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - jetty-webapp - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.websocket - javax-websocket-client-impl - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.websocket - websocket-api - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.websocket - websocket-client - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.websocket - websocket-common - 9.4.7-SNAPSHOT - - - org.eclipse.jetty.websocket - websocket-server - 9.4.7-SNAPSHOT - - - org.eclipse.jetty - websocket-servlet - 9.4.6-SNAPSHOT - - - org.eclipse.jetty - jetty-xml - 9.4.7-SNAPSHOT - - - - - - - eclipse-release - - - - true - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - - - + + org.eclipse.jetty + 4.0.0 + jetty-bom + 9.4.6-SNAPSHOT + 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.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 + 2.10.4 + + true + + + + + + + + + + org.eclipse.jetty + apache-jsp + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + apache-jstl + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-alpn-client + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-alpn-java-client + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-alpn-java-server + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-alpn-server + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-annotations + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-ant + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.cdi + cdi-core + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.cdi + cdi-full-servlet + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.cdi + cdi-servlet + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.cdi + cdi-websocket + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-client + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-continuation + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-deploy + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-distribution + 9.4.7-SNAPSHOT + zip + + + org.eclipse.jetty.fcgi + jetty-fcgi-client + 9.4.6-SNAPSHOT + + + org.eclipse.jetty.fcgi + jetty-fcgi-server + 9.4.6-SNAPSHOT + + + org.eclipse.jetty.gcloud + jetty-gcloud-session-manager + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-home + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-http + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.http2 + http2-client + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.http2 + http2-common + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.http2 + http2-hpack + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.http2 + http2-http-client-transport + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.http2 + http2-server + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-http-spi + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-infinispan + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-io + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-jaas + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-jaspi + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-jmx + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-jndi + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.memcached + jetty-memcached-sessions + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-monitor + 9.4.6-SNAPSHOT + + + org.eclipse.jetty + jetty-nosql + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.osgi + jetty-osgi-boot + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.osgi + jetty-osgi-boot-jsp + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.osgi + jetty-osgi-boot-warurl + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.osgi + jetty-httpservice + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-plus + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-proxy + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-quickstart + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-rewrite + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-security + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-server + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-servlet + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-servlets + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-spring + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-unixsocket + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-util + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-util-ajax + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + jetty-webapp + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.websocket + javax-websocket-client-impl + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.websocket + websocket-api + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.websocket + websocket-client + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.websocket + websocket-common + 9.4.7-SNAPSHOT + + + org.eclipse.jetty.websocket + websocket-server + 9.4.7-SNAPSHOT + + + org.eclipse.jetty + websocket-servlet + 9.4.6-SNAPSHOT + + + org.eclipse.jetty + jetty-xml + 9.4.7-SNAPSHOT + + + + + + + eclipse-release + + + + true + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + + + + diff --git a/jetty-cdi/cdi-core/pom.xml b/jetty-cdi/cdi-core/pom.xml index 9c28dd939f4..c250052853b 100644 --- a/jetty-cdi/cdi-core/pom.xml +++ b/jetty-cdi/cdi-core/pom.xml @@ -1,71 +1,71 @@ - - - org.eclipse.jetty.cdi - jetty-cdi-parent - 9.4.7-SNAPSHOT - - 4.0.0 - cdi-core - Jetty :: CDI :: Core - - Core CDI routines for Jetty (Also useful for CDI/SE applications that dont need a server) - - http://www.eclipse.org/jetty - jar - - ${project.groupId}.core - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - javax.enterprise - cdi-api - 1.2 - - - javax.el - javax.el-api - - - - - org.jboss.weld - weld-core - ${weld.version} - test - - - org.jboss.weld.se - weld-se-core - ${weld.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - tests-jar - - test-jar - - - - - - - + + + org.eclipse.jetty.cdi + jetty-cdi-parent + 9.4.7-SNAPSHOT + + 4.0.0 + cdi-core + Jetty :: CDI :: Core + + Core CDI routines for Jetty (Also useful for CDI/SE applications that dont need a server) + + http://www.eclipse.org/jetty + jar + + ${project.groupId}.core + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + javax.enterprise + cdi-api + 1.2 + + + javax.el + javax.el-api + + + + + org.jboss.weld + weld-core + ${weld.version} + test + + + org.jboss.weld.se + weld-se-core + ${weld.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + tests-jar + + test-jar + + + + + + + diff --git a/jetty-cdi/cdi-full-servlet/pom.xml b/jetty-cdi/cdi-full-servlet/pom.xml index e930fdcaf01..51169d8a09a 100644 --- a/jetty-cdi/cdi-full-servlet/pom.xml +++ b/jetty-cdi/cdi-full-servlet/pom.xml @@ -1,53 +1,53 @@ - - - org.eclipse.jetty.cdi - jetty-cdi-parent - 9.4.7-SNAPSHOT - - 4.0.0 - cdi-full-servlet - Jetty :: CDI :: Dependencies - http://www.eclipse.org/jetty - pom - - 2.2.9.Final - - - - - org.eclipse.jetty.cdi - cdi-servlet - ${project.version} - - - - javax.annotation - javax.annotation-api - 1.2 - - - org.mortbay.jasper - apache-jsp - ${jsp.version} - - - + + + org.eclipse.jetty.cdi + jetty-cdi-parent + 9.4.7-SNAPSHOT + + 4.0.0 + cdi-full-servlet + Jetty :: CDI :: Dependencies + http://www.eclipse.org/jetty + pom + + 2.2.9.Final + + + + + org.eclipse.jetty.cdi + cdi-servlet + ${project.version} + + + + javax.annotation + javax.annotation-api + 1.2 + + + org.mortbay.jasper + apache-jsp + ${jsp.version} + + + diff --git a/jetty-cdi/cdi-servlet/pom.xml b/jetty-cdi/cdi-servlet/pom.xml index ae017c483c8..9ebb0454e0a 100644 --- a/jetty-cdi/cdi-servlet/pom.xml +++ b/jetty-cdi/cdi-servlet/pom.xml @@ -1,90 +1,90 @@ - - - org.eclipse.jetty.cdi - jetty-cdi-parent - 9.4.7-SNAPSHOT - - 4.0.0 - cdi-servlet - Jetty :: CDI :: Servlet - http://www.eclipse.org/jetty - jar - - 2.2.9.Final - ${project.groupId}.servlet - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - - - - - org.eclipse.jetty.cdi - cdi-core - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.jboss.weld.servlet - weld-servlet-core - ${weld.version} - - - javax.el - javax.el-api - - - org.jboss.spec.javax.el - jboss-el-api_3.0_spec - - - org.jboss.spec.javax.annotation - jboss-annotations-api_1.2_spec - - - org.jboss.spec.javax.interceptor - jboss-interceptors-api_1.2_spec - - - - - - org.eclipse.jetty - apache-jsp - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty.cdi + jetty-cdi-parent + 9.4.7-SNAPSHOT + + 4.0.0 + cdi-servlet + Jetty :: CDI :: Servlet + http://www.eclipse.org/jetty + jar + + 2.2.9.Final + ${project.groupId}.servlet + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + + + + org.eclipse.jetty.cdi + cdi-core + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.jboss.weld.servlet + weld-servlet-core + ${weld.version} + + + javax.el + javax.el-api + + + org.jboss.spec.javax.el + jboss-el-api_3.0_spec + + + org.jboss.spec.javax.annotation + jboss-annotations-api_1.2_spec + + + org.jboss.spec.javax.interceptor + jboss-interceptors-api_1.2_spec + + + + + + org.eclipse.jetty + apache-jsp + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-cdi/cdi-websocket/pom.xml b/jetty-cdi/cdi-websocket/pom.xml index cec6aa33d83..becba6d3713 100644 --- a/jetty-cdi/cdi-websocket/pom.xml +++ b/jetty-cdi/cdi-websocket/pom.xml @@ -1,71 +1,71 @@ - - - org.eclipse.jetty.cdi - jetty-cdi-parent - 9.4.7-SNAPSHOT - - 4.0.0 - cdi-websocket - Jetty :: CDI :: WebSocket - http://www.eclipse.org/jetty - jar - - 2.2.9.Final - ${project.groupId}.websocket - - - - - org.eclipse.jetty.cdi - cdi-core - ${project.version} - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - - - - org.eclipse.jetty - apache-jsp - ${project.version} - test - - - org.jboss.weld - weld-core - ${weld.version} - test - - - org.jboss.weld.se - weld-se-core - ${weld.version} - test - - - org.eclipse.jetty.cdi - cdi-core - ${project.version} - tests - test - - - org.eclipse.jetty.cdi - cdi-servlet - ${project.version} - test - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty.cdi + jetty-cdi-parent + 9.4.7-SNAPSHOT + + 4.0.0 + cdi-websocket + Jetty :: CDI :: WebSocket + http://www.eclipse.org/jetty + jar + + 2.2.9.Final + ${project.groupId}.websocket + + + + + org.eclipse.jetty.cdi + cdi-core + ${project.version} + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + + + + org.eclipse.jetty + apache-jsp + ${project.version} + test + + + org.jboss.weld + weld-core + ${weld.version} + test + + + org.jboss.weld.se + weld-se-core + ${weld.version} + test + + + org.eclipse.jetty.cdi + cdi-core + ${project.version} + tests + test + + + org.eclipse.jetty.cdi + cdi-servlet + ${project.version} + test + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index 02a9f449415..bf85944dfc5 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -1,27 +1,27 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty.cdi - jetty-cdi-parent - Jetty :: CDI :: Parent - http://www.eclipse.org/jetty - pom - - 2.4.3.Final - - - - cdi-core - cdi-servlet - cdi-full-servlet - cdi-websocket - test-cdi-webapp - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + org.eclipse.jetty.cdi + jetty-cdi-parent + Jetty :: CDI :: Parent + http://www.eclipse.org/jetty + pom + + 2.4.3.Final + + + + cdi-core + cdi-servlet + cdi-full-servlet + cdi-websocket + test-cdi-webapp + + + diff --git a/jetty-cdi/test-cdi-webapp/pom.xml b/jetty-cdi/test-cdi-webapp/pom.xml index 36c8e896dbf..a4532cde744 100644 --- a/jetty-cdi/test-cdi-webapp/pom.xml +++ b/jetty-cdi/test-cdi-webapp/pom.xml @@ -1,87 +1,87 @@ - - - - org.eclipse.jetty.cdi - jetty-cdi-parent - 9.4.7-SNAPSHOT - - 4.0.0 - test-cdi-webapp - war - Jetty :: CDI :: Test :: WebApp - http://www.eclipse.org/jetty - - UTF-8 - ${project.groupId}.cdi.webapp.noweld - - - - javax.servlet - javax.servlet-api - provided - - - javax.websocket - javax.websocket-api - provided - - - javax.enterprise - cdi-api - 1.1 - provided - - - org.jboss.weld.servlet - weld-servlet - ${weld.version} - test - - - - cdi-webapp - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-assembly-plugin - - - with-weld - package - - single - - - - src/assembly/with-weld.xml - - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - - - - org.eclipse.jetty.cdi - cdi-full-servlet - ${project.version} - pom - - - - - - + + + + org.eclipse.jetty.cdi + jetty-cdi-parent + 9.4.7-SNAPSHOT + + 4.0.0 + test-cdi-webapp + war + Jetty :: CDI :: Test :: WebApp + http://www.eclipse.org/jetty + + UTF-8 + ${project.groupId}.cdi.webapp.noweld + + + + javax.servlet + javax.servlet-api + provided + + + javax.websocket + javax.websocket-api + provided + + + javax.enterprise + cdi-api + 1.1 + provided + + + org.jboss.weld.servlet + weld-servlet + ${weld.version} + test + + + + cdi-webapp + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-assembly-plugin + + + with-weld + package + + single + + + + src/assembly/with-weld.xml + + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + + + + org.eclipse.jetty.cdi + cdi-full-servlet + ${project.version} + pom + + + + + + diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index c5009680e62..ecb82d78e21 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -1,121 +1,121 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - - 4.0.0 - jetty-client - Jetty :: Asynchronous HTTP Client - http://www.eclipse.org/jetty - - ${project.groupId}.client - target/test-policy - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.client.* - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - generate-test-resources - - unpack - - - - - org.eclipse.jetty.toolchain - jetty-test-policy - ${jetty-test-policy-version} - jar - true - **/*.keystore,**/*.pem - ${jetty.test.policy.loc} - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - hybrid - - - org.eclipse.jetty:jetty-http - org.eclipse.jetty:jetty-io - org.eclipse.jetty:jetty-util - - - - - org.eclipse.jetty.http - org.eclipse.jetty.client.shaded.http - - - org.eclipse.jetty.io - org.eclipse.jetty.client.shaded.io - - - org.eclipse.jetty.util - org.eclipse.jetty.client.shaded.util - - - - - - - - - - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty - jetty-security - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + + 4.0.0 + jetty-client + Jetty :: Asynchronous HTTP Client + http://www.eclipse.org/jetty + + ${project.groupId}.client + target/test-policy + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.client.* + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + generate-test-resources + + unpack + + + + + org.eclipse.jetty.toolchain + jetty-test-policy + ${jetty-test-policy-version} + jar + true + **/*.keystore,**/*.pem + ${jetty.test.policy.loc} + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + true + hybrid + + + org.eclipse.jetty:jetty-http + org.eclipse.jetty:jetty-io + org.eclipse.jetty:jetty-util + + + + + org.eclipse.jetty.http + org.eclipse.jetty.client.shaded.http + + + org.eclipse.jetty.io + org.eclipse.jetty.client.shaded.io + + + org.eclipse.jetty.util + org.eclipse.jetty.client.shaded.util + + + + + + + + + + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty + jetty-security + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml index 134fa182c39..6b526d8d6f2 100644 --- a/jetty-continuation/pom.xml +++ b/jetty-continuation/pom.xml @@ -1,33 +1,33 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-continuation - Jetty :: Continuation - Asynchronous API - http://www.eclipse.org/jetty - - ${project.groupId}.continuation - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.continuation.* - - - - - - - javax.servlet - javax.servlet-api - provided - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-continuation + Jetty :: Continuation + Asynchronous API + http://www.eclipse.org/jetty + + ${project.groupId}.continuation + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.continuation.* + + + + + + + javax.servlet + javax.servlet-api + provided + + + diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index a118eb6b171..788dd3758f2 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -1,49 +1,49 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-deploy - Jetty :: Deployers - Jetty deployers - http://www.eclipse.org/jetty - - ${project.groupId}.deploy - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.deploy.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-deploy + Jetty :: Deployers + Jetty deployers + http://www.eclipse.org/jetty + + ${project.groupId}.deploy + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.deploy.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 85944abf063..c791e5d1b23 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -1,433 +1,433 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-distribution - Jetty :: Distribution Assemblies - pom - - - ${basedir}/target/distribution - ${basedir}/target/home - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - copy-base-assembly-tree - process-resources - - copy-resources - - - false - true - ${assembly-directory} - - - ${basedir}/src/main/resources - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - popluate distribution from home - process-resources - - run - - - - - - - - - - - set jetty.sh - process-resources - - run - - - - - - - - - removeKeystore - process-resources - - run - - - - - - - - - - - org.apache.maven.plugins - maven-remote-resources-plugin - - - generate-resources - - process - - - - org.eclipse.jetty.toolchain:jetty-distribution-remote-resources:1.2 - - ${assembly-directory} - - - - - - maven-dependency-plugin - - - - unpack-jetty-home - generate-resources - - unpack - - - - - org.eclipse.jetty - jetty-home - ${project.version} - zip - true - ${home-directory} - - - META-INF/** - - - - - copy - process-resources - - copy - - - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test.war - - - org.eclipse.jetty.tests - test-jaas-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test-jaas.war - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test-jndi.war - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test-spec.war - - - org.eclipse.jetty - test-proxy-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - xref-proxy.war - - - org.eclipse.jetty.example-async-rest - example-async-rest-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - async-rest.war - - - - - - - unpack-test-webapp-config - process-resources - - unpack - - - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - - unpack-test-jaas-config - process-resources - - unpack - - - - - org.eclipse.jetty.tests - test-jaas-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - - unpack-test-jndi-config - process-resources - - unpack - - - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - - unpack-test-spec-config - process-resources - - unpack - - - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - unpack-documentation - process-resources - - unpack - - - - - org.eclipse.jetty - jetty-documentation - ${project.version} - html - zip - true - ${assembly-directory}/demo-base/webapps/doc - - - - - - - - org.codehaus.mojo - exec-maven-plugin - - - - setup home - process-classes - - org.eclipse.jetty.start.Main - - jetty.home=${assembly-directory} - jetty.base=${assembly-directory} - --add-to-start=server,deploy,websocket,ext,resources,jsp,jstl,http - - - - java - - - - - setup demo-base-startd - process-classes - - org.eclipse.jetty.start.Main - - jetty.home=${assembly-directory} - jetty.base=${assembly-directory}/demo-base - --add-to-startd=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https - - - - java - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - src/main/assembly/jetty-assembly.xml - - gnu - false - - - - package - - single - - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - true - - - - - org.codehaus.mojo - findbugs-maven-plugin - - true - - - - - - - - org.eclipse.jetty - jetty-home - ${project.version} - pom - - - org.eclipse.jetty - test-jetty-webapp - war - ${project.version} - - - org.eclipse.jetty - test-proxy-webapp - war - ${project.version} - - - org.eclipse.jetty.example-async-rest - example-async-rest-webapp - ${project.version} - war - - - org.eclipse.jetty - jetty-documentation - ${project.version} - html - zip - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-distribution + Jetty :: Distribution Assemblies + pom + + + ${basedir}/target/distribution + ${basedir}/target/home + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-base-assembly-tree + process-resources + + copy-resources + + + false + true + ${assembly-directory} + + + ${basedir}/src/main/resources + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + popluate distribution from home + process-resources + + run + + + + + + + + + + + set jetty.sh + process-resources + + run + + + + + + + + + removeKeystore + process-resources + + run + + + + + + + + + + + org.apache.maven.plugins + maven-remote-resources-plugin + + + generate-resources + + process + + + + org.eclipse.jetty.toolchain:jetty-distribution-remote-resources:1.2 + + ${assembly-directory} + + + + + + maven-dependency-plugin + + + + unpack-jetty-home + generate-resources + + unpack + + + + + org.eclipse.jetty + jetty-home + ${project.version} + zip + true + ${home-directory} + + + META-INF/** + + + + + copy + process-resources + + copy + + + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test.war + + + org.eclipse.jetty.tests + test-jaas-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test-jaas.war + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test-jndi.war + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test-spec.war + + + org.eclipse.jetty + test-proxy-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + xref-proxy.war + + + org.eclipse.jetty.example-async-rest + example-async-rest-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + async-rest.war + + + + + + + unpack-test-webapp-config + process-resources + + unpack + + + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + unpack-test-jaas-config + process-resources + + unpack + + + + + org.eclipse.jetty.tests + test-jaas-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + unpack-test-jndi-config + process-resources + + unpack + + + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + unpack-test-spec-config + process-resources + + unpack + + + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + unpack-documentation + process-resources + + unpack + + + + + org.eclipse.jetty + jetty-documentation + ${project.version} + html + zip + true + ${assembly-directory}/demo-base/webapps/doc + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + + setup home + process-classes + + org.eclipse.jetty.start.Main + + jetty.home=${assembly-directory} + jetty.base=${assembly-directory} + --add-to-start=server,deploy,websocket,ext,resources,jsp,jstl,http + + + + java + + + + + setup demo-base-startd + process-classes + + org.eclipse.jetty.start.Main + + jetty.home=${assembly-directory} + jetty.base=${assembly-directory}/demo-base + --add-to-startd=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https + + + + java + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + src/main/assembly/jetty-assembly.xml + + gnu + false + + + + package + + single + + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + true + + + + + org.codehaus.mojo + findbugs-maven-plugin + + true + + + + + + + + org.eclipse.jetty + jetty-home + ${project.version} + pom + + + org.eclipse.jetty + test-jetty-webapp + war + ${project.version} + + + org.eclipse.jetty + test-proxy-webapp + war + ${project.version} + + + org.eclipse.jetty.example-async-rest + example-async-rest-webapp + ${project.version} + war + + + org.eclipse.jetty + jetty-documentation + ${project.version} + html + zip + + + diff --git a/jetty-documentation/pom.xml b/jetty-documentation/pom.xml index b8d63038b6d..dbd241ffec5 100644 --- a/jetty-documentation/pom.xml +++ b/jetty-documentation/pom.xml @@ -1,243 +1,243 @@ - - - 4.0.0 - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - jetty-documentation - Jetty :: Documentation - pom - - ${project.build.directory}/current - - - - - maven-resources-plugin - - - copy-assets - process-resources - - copy-resources - - - - - src/main/resources - - ** - - - - ${html.directory} - - - - - - org.asciidoctor - asciidoctor-maven-plugin - - - output-html - compile - - process-asciidoc - - - docbook - book - index.adoc - - attributes+ - - true - true - true - ${project.version} - http://www.eclipse.org/jetty/javadoc/${project.version} - http://download.eclipse.org/jetty/stable-9/xref - ${basedir}/.. - https://github.com/eclipse/jetty.project/tree/jetty-9.4.x - http://central.maven.org/maven2 - ${project.version} - - - - - - - com.agilejava.docbkx - docbkx-maven-plugin - 2.0.17 - - - html - compile - - generate-html - - - css/docbook.css - ${project.basedir}/src/main/docbkx-stylesheet/html/docbook.xsl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${project.build.directory}/generated-docs - index.xml - ${project.build.directory}/docbkx/generated - true - true - - - - net.sf.docbook - docbook-xml - 5.1b4-all - resources - zip - runtime - - - net.sf.xslthl - xslthl - 2.0.1 - runtime - - - org.eclipse.jetty.toolchain - jetty-xslt-tools - 1.3 - runtime - - - - - maven-assembly-plugin - - - src/main/assembly/html.xml - - - - - make-assembly - package - - single - - - - - - - - - - generate-pdf - - - - com.agilejava.docbkx - docbkx-maven-plugin - - - generate-pdf - compile - - generate-pdf - - - index.xml - 1 - A4 - src/main/docbkx-stylesheet/fo/docbook.xsl - - - - - - net.sf.offo - fop-hyph - 1.2 - runtime - - - - - org.asciidoctor - asciidoctor-maven-plugin - - - org.asciidoctor - asciidoctorj-pdf - 1.5.0-alpha.11 - - - - - output-pdf - generate-sources - - process-asciidoc - - - pdf - rouge - index.adoc - - - ${project.version} - true - true - true - ${project.version} - http://download.eclipse.org/jetty/stable-9/apidocs - http://download.eclipse.org/jetty/stable-9/xref - ${basedir}/../jetty.project/ - https://github.com/eclipse/jetty.project/master - font - - - - - - - - - - - - - - - + + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + jetty-documentation + Jetty :: Documentation + pom + + ${project.build.directory}/current + + + + + maven-resources-plugin + + + copy-assets + process-resources + + copy-resources + + + + + src/main/resources + + ** + + + + ${html.directory} + + + + + + org.asciidoctor + asciidoctor-maven-plugin + + + output-html + compile + + process-asciidoc + + + docbook + book + index.adoc + + attributes+ + + true + true + true + ${project.version} + http://www.eclipse.org/jetty/javadoc/${project.version} + http://download.eclipse.org/jetty/stable-9/xref + ${basedir}/.. + https://github.com/eclipse/jetty.project/tree/jetty-9.4.x + http://central.maven.org/maven2 + ${project.version} + + + + + + + com.agilejava.docbkx + docbkx-maven-plugin + 2.0.17 + + + html + compile + + generate-html + + + css/docbook.css + ${project.basedir}/src/main/docbkx-stylesheet/html/docbook.xsl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${project.build.directory}/generated-docs + index.xml + ${project.build.directory}/docbkx/generated + true + true + + + + net.sf.docbook + docbook-xml + 5.1b4-all + resources + zip + runtime + + + net.sf.xslthl + xslthl + 2.0.1 + runtime + + + org.eclipse.jetty.toolchain + jetty-xslt-tools + 1.3 + runtime + + + + + maven-assembly-plugin + + + src/main/assembly/html.xml + + + + + make-assembly + package + + single + + + + + + + + + + generate-pdf + + + + com.agilejava.docbkx + docbkx-maven-plugin + + + generate-pdf + compile + + generate-pdf + + + index.xml + 1 + A4 + src/main/docbkx-stylesheet/fo/docbook.xsl + + + + + + net.sf.offo + fop-hyph + 1.2 + runtime + + + + + org.asciidoctor + asciidoctor-maven-plugin + + + org.asciidoctor + asciidoctorj-pdf + 1.5.0-alpha.11 + + + + + output-pdf + generate-sources + + process-asciidoc + + + pdf + rouge + index.adoc + + + ${project.version} + true + true + true + ${project.version} + http://download.eclipse.org/jetty/stable-9/apidocs + http://download.eclipse.org/jetty/stable-9/xref + ${basedir}/../jetty.project/ + https://github.com/eclipse/jetty.project/master + font + + + + - + + + + + + + + + + diff --git a/jetty-fcgi/fcgi-client/pom.xml b/jetty-fcgi/fcgi-client/pom.xml index 7bce605bb2f..8dc1b237537 100644 --- a/jetty-fcgi/fcgi-client/pom.xml +++ b/jetty-fcgi/fcgi-client/pom.xml @@ -1,40 +1,40 @@ - - - - org.eclipse.jetty.fcgi - fcgi-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - fcgi-client - Jetty :: FastCGI :: Client - - - ${project.groupId}.client - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - - + + + + org.eclipse.jetty.fcgi + fcgi-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + fcgi-client + Jetty :: FastCGI :: Client + + + ${project.groupId}.client + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + + diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index 62b9bc50373..606cd2afe59 100644 --- a/jetty-fcgi/fcgi-server/pom.xml +++ b/jetty-fcgi/fcgi-server/pom.xml @@ -1,67 +1,67 @@ - - - - org.eclipse.jetty.fcgi - fcgi-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - fcgi-server - Jetty :: FastCGI :: Server - - - ${project.groupId}.server - - - - - - - - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty.fcgi - fcgi-client - ${project.version} - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - + + + + org.eclipse.jetty.fcgi + fcgi-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + fcgi-server + Jetty :: FastCGI :: Server + + + ${project.groupId}.server + + + + + + + + + + javax.servlet + javax.servlet-api + + + org.eclipse.jetty.fcgi + fcgi-client + ${project.version} + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + + + diff --git a/jetty-fcgi/pom.xml b/jetty-fcgi/pom.xml index 590026f17e6..0fb0371c34e 100644 --- a/jetty-fcgi/pom.xml +++ b/jetty-fcgi/pom.xml @@ -1,28 +1,28 @@ - - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.fcgi - fcgi-parent - pom - Jetty :: FastCGI :: Parent - - - fcgi-client - fcgi-server - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - + + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.fcgi + fcgi-parent + pom + Jetty :: FastCGI :: Parent + + + fcgi-client + fcgi-server + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml index 8675c3e6211..d7b9f20b76b 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml +++ b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml @@ -1,167 +1,167 @@ - - - - org.eclipse.jetty.gcloud - gcloud-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - jetty-gcloud-session-manager - Jetty :: GCloud :: Session Manager - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - com.google.cloud - google-cloud-datastore - ${gcloud.version} - - - javax.servlet - servlet-api - - - javax.servlet - javax.servlet-api - - - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - ${project.groupId}.session - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.gcloud.session.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"; - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.0.0 - - - build-deps-file - generate-resources - - list - - - false - ${project.build.directory}/deps.txt - true - org.eclipse.jetty - true - runtime - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - process-deps - process-resources - - run - - - - - - - - - - process-mod - process-resources - - run - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - src/main/assembly/config.xml - - - - - - - - - + + + + org.eclipse.jetty.gcloud + gcloud-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + jetty-gcloud-session-manager + Jetty :: GCloud :: Session Manager + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + com.google.cloud + google-cloud-datastore + ${gcloud.version} + + + javax.servlet + servlet-api + + + javax.servlet + javax.servlet-api + + + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + ${project.groupId}.session + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.gcloud.session.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"; + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 + + + build-deps-file + generate-resources + + list + + + false + ${project.build.directory}/deps.txt + true + org.eclipse.jetty + true + runtime + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + process-deps + process-resources + + run + + + + + + + + + + process-mod + process-resources + + run + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + src/main/assembly/config.xml + + + + + + + + + diff --git a/jetty-gcloud/pom.xml b/jetty-gcloud/pom.xml index c65c638ca43..90cd936e417 100644 --- a/jetty-gcloud/pom.xml +++ b/jetty-gcloud/pom.xml @@ -1,23 +1,23 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.gcloud - gcloud-parent - pom - Jetty :: GCloud - - - 1.0.0 - - - - jetty-gcloud-session-manager - - - + + + + jetty-project + org.eclipse.jetty + 9.4.7-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.gcloud + gcloud-parent + pom + Jetty :: GCloud + + + 1.0.0 + + + + jetty-gcloud-session-manager + + + diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index 9b7a447e6fa..8c3d61a7faa 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -1,64 +1,64 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-http-spi - Jetty :: Http Service Provider Interface - http://www.eclipse.org/jetty - - ${project.groupId}.http.spi - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - com.sun.net.httpserver - http - 20070405 - provided - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.http.spi.* - - - - org.apache.felix - maven-bundle-plugin - true - - - Jetty Http SPI - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader; osgi.serviceloader=com.sun.net.httpserver.spi.HttpServerProvider - <_nouses>true - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-http-spi + Jetty :: Http Service Provider Interface + http://www.eclipse.org/jetty + + ${project.groupId}.http.spi + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + com.sun.net.httpserver + http + 20070405 + provided + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.http.spi.* + + + + org.apache.felix + maven-bundle-plugin + true + + + Jetty Http SPI + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader; osgi.serviceloader=com.sun.net.httpserver.spi.HttpServerProvider + <_nouses>true + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index 6f40141cfe6..de1a9467b29 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -1,70 +1,70 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-http - Jetty :: Http Utility - http://www.eclipse.org/jetty - - ${project.groupId}.http - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - org.apache.felix - maven-bundle-plugin - true - - - osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - - osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.http.* - - - - - - + + + + jetty-project + org.eclipse.jetty + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-http + Jetty :: Http Utility + http://www.eclipse.org/jetty + + ${project.groupId}.http + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + org.apache.felix + maven-bundle-plugin + true + + + osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional + + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder + + + + + org.apache.maven.plugins + maven-jar-plugin + + + test-jar + + test-jar + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.http.* + + + + + + diff --git a/jetty-http2/http2-alpn-tests/pom.xml b/jetty-http2/http2-alpn-tests/pom.xml index 9fd27c84797..825f56702fa 100644 --- a/jetty-http2/http2-alpn-tests/pom.xml +++ b/jetty-http2/http2-alpn-tests/pom.xml @@ -1,89 +1,89 @@ - - - - org.eclipse.jetty.http2 - http2-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - http2-alpn-tests - Jetty :: HTTP2 :: ALPN Tests - - - ${project.groupId}.alpn.tests - - - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - - - - - org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} - jar - false - ${project.build.directory}/alpn - - - - - - - - maven-surefire-plugin - - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - - - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - junit - junit - test - - - - + + + + org.eclipse.jetty.http2 + http2-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + http2-alpn-tests + Jetty :: HTTP2 :: ALPN Tests + + + ${project.groupId}.alpn.tests + + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + jar + false + ${project.build.directory}/alpn + + + + + + + + maven-surefire-plugin + + -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + + + + + + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + junit + junit + test + + + + diff --git a/jetty-http2/http2-client/pom.xml b/jetty-http2/http2-client/pom.xml index f0d3ecf4988..b214b2cb253 100644 --- a/jetty-http2/http2-client/pom.xml +++ b/jetty-http2/http2-client/pom.xml @@ -1,69 +1,69 @@ - - - - org.eclipse.jetty.http2 - http2-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - http2-client - Jetty :: HTTP2 :: Client - - - ${project.groupId}.client - - - - - - - - org.eclipse.jetty.http2 - http2-common - ${project.version} - - - org.eclipse.jetty - jetty-alpn-client - ${project.version} - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty - jetty-servlets - ${project.version} - test - - - org.eclipse.jetty - jetty-proxy - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - - + + + + org.eclipse.jetty.http2 + http2-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + http2-client + Jetty :: HTTP2 :: Client + + + ${project.groupId}.client + + + + + + + + org.eclipse.jetty.http2 + http2-common + ${project.version} + + + org.eclipse.jetty + jetty-alpn-client + ${project.version} + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty + jetty-servlets + ${project.version} + test + + + org.eclipse.jetty + jetty-proxy + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + + diff --git a/jetty-http2/http2-common/pom.xml b/jetty-http2/http2-common/pom.xml index 8f4eccbcd68..a719868b896 100644 --- a/jetty-http2/http2-common/pom.xml +++ b/jetty-http2/http2-common/pom.xml @@ -1,58 +1,58 @@ - - - - org.eclipse.jetty.http2 - http2-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - http2-common - Jetty :: HTTP2 :: Common - - - - org.eclipse.jetty.http2 - http2-hpack - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - ${project.groupId}.common - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.http2.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"; - - - - - - - - - + + + + org.eclipse.jetty.http2 + http2-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + http2-common + Jetty :: HTTP2 :: Common + + + + org.eclipse.jetty.http2 + http2-hpack + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + ${project.groupId}.common + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.http2.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"; + + + + + + + + + diff --git a/jetty-http2/http2-hpack/pom.xml b/jetty-http2/http2-hpack/pom.xml index 926787bd8c3..51d578d5d8c 100644 --- a/jetty-http2/http2-hpack/pom.xml +++ b/jetty-http2/http2-hpack/pom.xml @@ -1,63 +1,63 @@ - - - - org.eclipse.jetty.http2 - http2-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - http2-hpack - Jetty :: HTTP2 :: HPACK - - - ${project.groupId}.hpack - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-util-ajax - ${project.version} - test - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - Http2 Hpack - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader;osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder - <_nouses>true - - - - - - - + + + + org.eclipse.jetty.http2 + http2-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + http2-hpack + Jetty :: HTTP2 :: HPACK + + + ${project.groupId}.hpack + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-util-ajax + ${project.version} + test + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + Http2 Hpack + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader;osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder + <_nouses>true + + + + + + + diff --git a/jetty-http2/http2-http-client-transport/pom.xml b/jetty-http2/http2-http-client-transport/pom.xml index 33b3880c585..a68159a2f41 100644 --- a/jetty-http2/http2-http-client-transport/pom.xml +++ b/jetty-http2/http2-http-client-transport/pom.xml @@ -1,115 +1,115 @@ - - - - org.eclipse.jetty.http2 - http2-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - http2-http-client-transport - Jetty :: HTTP2 :: HTTP Client Transport - - - ${project.groupId}.client.http - - - - - jdk8 - - [1.8,1.9) - - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - - - - - org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} - jar - false - ${project.build.directory}/alpn - - - - - - - - maven-surefire-plugin - - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - - - - jdk9 - - [1.9,) - - - - org.eclipse.jetty - jetty-alpn-java-client - ${project.version} - - - org.eclipse.jetty - jetty-alpn-java-server - ${project.version} - test - - - - - - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.http2 - http2-client - ${project.version} - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - junit - junit - test - - - - + + + + org.eclipse.jetty.http2 + http2-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + http2-http-client-transport + Jetty :: HTTP2 :: HTTP Client Transport + + + ${project.groupId}.client.http + + + + + jdk8 + + [1.8,1.9) + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + jar + false + ${project.build.directory}/alpn + + + + + + + + maven-surefire-plugin + + -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + + + + + + + jdk9 + + [1.9,) + + + + org.eclipse.jetty + jetty-alpn-java-client + ${project.version} + + + org.eclipse.jetty + jetty-alpn-java-server + ${project.version} + test + + + + + + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.http2 + http2-client + ${project.version} + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + junit + junit + test + + + + diff --git a/jetty-http2/http2-server/pom.xml b/jetty-http2/http2-server/pom.xml index e61ca58a373..9dbac28b468 100644 --- a/jetty-http2/http2-server/pom.xml +++ b/jetty-http2/http2-server/pom.xml @@ -1,64 +1,64 @@ - - - - org.eclipse.jetty.http2 - http2-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - http2-server - Jetty :: HTTP2 :: Server - - - ${project.groupId}.server - - - - - - - - - - org.eclipse.jetty.http2 - http2-common - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty - jetty-servlets - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - + + + + org.eclipse.jetty.http2 + http2-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + http2-server + Jetty :: HTTP2 :: Server + + + ${project.groupId}.server + + + + + + + + + + org.eclipse.jetty.http2 + http2-common + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty + jetty-servlets + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/jetty-http2/pom.xml b/jetty-http2/pom.xml index 6fa573ee2b0..8f1d62ea8e7 100644 --- a/jetty-http2/pom.xml +++ b/jetty-http2/pom.xml @@ -1,35 +1,35 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.http2 - http2-parent - pom - Jetty :: HTTP2 - - - http2-client - http2-common - http2-hpack - http2-http-client-transport - http2-server - - - - - jdk8 - - [1.8,1.9) - - - http2-alpn-tests - - - - - + + + + jetty-project + org.eclipse.jetty + 9.4.7-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.http2 + http2-parent + pom + Jetty :: HTTP2 + + + http2-client + http2-common + http2-hpack + http2-http-client-transport + http2-server + + + + + jdk8 + + [1.8,1.9) + + + http2-alpn-tests + + + + + diff --git a/jetty-infinispan/pom.xml b/jetty-infinispan/pom.xml index 659ea257282..166a2793b11 100644 --- a/jetty-infinispan/pom.xml +++ b/jetty-infinispan/pom.xml @@ -1,49 +1,49 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-infinispan - Jetty :: Infinispan Session Managers - http://www.eclipse.org/jetty - - ${project.groupId}.infinispan - 7.1.1.Final - - - install - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - - - - org.infinispan - infinispan-core - ${infinispan.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-infinispan + Jetty :: Infinispan Session Managers + http://www.eclipse.org/jetty + + ${project.groupId}.infinispan + 7.1.1.Final + + + install + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + + + org.infinispan + infinispan-core + ${infinispan.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml index d3dc774481b..3c5b5d322a6 100644 --- a/jetty-io/pom.xml +++ b/jetty-io/pom.xml @@ -1,37 +1,37 @@ - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-io - Jetty :: IO Utility - http://www.eclipse.org/jetty - - ${project.groupId}.io - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.io.* - - - - - + + + jetty-project + org.eclipse.jetty + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-io + Jetty :: IO Utility + http://www.eclipse.org/jetty + + ${project.groupId}.io + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.io.* + + + + + diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index 641a05935df..d1657d50682 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -1,38 +1,38 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jaas - Jetty :: JAAS - Jetty JAAS support - - ${project.groupId}.jaas - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jaas.* - - - - - - - org.eclipse.jetty - jetty-security - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-jaas + Jetty :: JAAS + Jetty JAAS support + + ${project.groupId}.jaas + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jaas.* + + + + + + + org.eclipse.jetty + jetty-security + ${project.version} + + + diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml index 870a97c6a2a..1a84609fb7b 100644 --- a/jetty-jaspi/pom.xml +++ b/jetty-jaspi/pom.xml @@ -1,72 +1,72 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jaspi - Jetty :: JASPI Security - Jetty security infrastructure - http://www.eclipse.org/jetty - - ${project.groupId}.security.jaspi - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jaspi.* - - - - - - - jdk9 - - [1.9,) - - - - - maven-surefire-plugin - - @{argLine} --add-modules java.se.ee - - - - - - - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty.orbit - javax.security.auth.message - - - org.apache.geronimo.components - geronimo-jaspi - 2.0.0 - - - org.apache.geronimo.specs - geronimo-jaspic_1.0_spec - - - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-jaspi + Jetty :: JASPI Security + Jetty security infrastructure + http://www.eclipse.org/jetty + + ${project.groupId}.security.jaspi + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jaspi.* + + + + + + + jdk9 + + [1.9,) + + + + + maven-surefire-plugin + + @{argLine} --add-modules java.se.ee + + + + + + + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty.orbit + javax.security.auth.message + + + org.apache.geronimo.components + geronimo-jaspi + 2.0.0 + + + org.apache.geronimo.specs + geronimo-jaspic_1.0_spec + + + test + + + diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index 18109574118..f1d2563433a 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -1,46 +1,46 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jmx - Jetty :: JMX Management - JMX management artifact for jetty. - http://www.eclipse.org/jetty - - ${project.groupId}.jmx - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jmx.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-util - ${project.version} - - - - com.openpojo - openpojo - 0.8.1 - test - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-jmx + Jetty :: JMX Management + JMX management artifact for jetty. + http://www.eclipse.org/jetty + + ${project.groupId}.jmx + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jmx.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-util + ${project.version} + + + + com.openpojo + openpojo + 0.8.1 + test + + + + diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index 0e31caa7446..2cfa6eb2475 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -1,56 +1,56 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jndi - Jetty :: JNDI Naming - JNDI spi impl for java namespace. - http://www.eclipse.org/jetty - - ${project.groupId}.jndi - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jndi.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-webapp - ${project.version} - provided - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - provided - - - org.eclipse.jetty.orbit - javax.activation - - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-jndi + Jetty :: JNDI Naming + JNDI spi impl for java namespace. + http://www.eclipse.org/jetty + + ${project.groupId}.jndi + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jndi.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-webapp + ${project.version} + provided + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + provided + + + org.eclipse.jetty.orbit + javax.activation + + + + + diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml index c10ff62f89d..6461ad3554c 100644 --- a/jetty-jspc-maven-plugin/pom.xml +++ b/jetty-jspc-maven-plugin/pom.xml @@ -1,123 +1,123 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jspc-maven-plugin - maven-plugin - Jetty :: Jetty JSPC Maven Plugin - - ${project.groupId}.jspc.plugin - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - org.apache.maven.plugins - maven-plugin-plugin - - - exec-plugin-doc - generate-sources - - descriptor - helpmojo - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.apache.maven - maven-project - 2.0.3 - - - junit - junit - - - - - org.apache.maven - maven-plugin-api - 2.0.3 - - - org.apache.maven - maven-artifact - 2.0.3 - - - org.apache.maven.plugin-tools - maven-plugin-tools-api - 3.1 - - - junit - junit - - - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.apache.ant - ant - 1.8.4 - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - - false - - - - - project-team - mailing-list - cim - issue-tracking - license - scm - - - - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-jspc-maven-plugin + maven-plugin + Jetty :: Jetty JSPC Maven Plugin + + ${project.groupId}.jspc.plugin + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + org.apache.maven.plugins + maven-plugin-plugin + + + exec-plugin-doc + generate-sources + + descriptor + helpmojo + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.apache.maven + maven-project + 2.0.3 + + + junit + junit + + + + + org.apache.maven + maven-plugin-api + 2.0.3 + + + org.apache.maven + maven-artifact + 2.0.3 + + + org.apache.maven.plugin-tools + maven-plugin-tools-api + 3.1 + + + junit + junit + + + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.apache.ant + ant + 1.8.4 + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + false + + + + + project-team + mailing-list + cim + issue-tracking + license + scm + + + + + + + diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index cee4d037f11..d49daff5c89 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -1,174 +1,174 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-maven-plugin - maven-plugin - Jetty :: Jetty Maven Plugin - Jetty maven plugins - - 3.0.3 - 3.4 - ${project.groupId}.maven.plugin - - - - - maven-surefire-plugin - - true - - - - org.apache.maven.plugins - maven-plugin-plugin - - - exec-plugin-doc - generate-sources - - helpmojo - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.apache.maven - maven-plugin-api - ${mavenVersion} - - - org.apache.maven - maven-artifact - ${mavenVersion} - - - org.apache.maven - maven-core - ${mavenVersion} - - - org.apache.maven.plugin-tools - maven-plugin-tools-api - ${pluginToolsVersion} - - - junit - junit - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - javax.servlet - servlet-api - - - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - - - org.eclipse.jetty - jetty-jaas - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - javax.transaction - javax.transaction-api - compile - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - - false - - - - - project-team - mailing-list - cim - issue-tracking - license - scm - - - - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-maven-plugin + maven-plugin + Jetty :: Jetty Maven Plugin + Jetty maven plugins + + 3.0.3 + 3.4 + ${project.groupId}.maven.plugin + + + + + maven-surefire-plugin + + true + + + + org.apache.maven.plugins + maven-plugin-plugin + + + exec-plugin-doc + generate-sources + + helpmojo + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.apache.maven + maven-plugin-api + ${mavenVersion} + + + org.apache.maven + maven-artifact + ${mavenVersion} + + + org.apache.maven + maven-core + ${mavenVersion} + + + org.apache.maven.plugin-tools + maven-plugin-tools-api + ${pluginToolsVersion} + + + junit + junit + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + javax.servlet + servlet-api + + + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + + + org.eclipse.jetty + jetty-jaas + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + javax.transaction + javax.transaction-api + compile + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + false + + + + + project-team + mailing-list + cim + issue-tracking + license + scm + + + + + + + diff --git a/jetty-monitor/pom.xml b/jetty-monitor/pom.xml index 3374ec2e9e0..5bb82d3d388 100644 --- a/jetty-monitor/pom.xml +++ b/jetty-monitor/pom.xml @@ -1,84 +1,84 @@ - - - - org.eclipse.jetty - jetty-project - 9.4.0-SNAPSHOT - - 4.0.0 - jetty-monitor - Jetty :: Monitoring - http://www.eclipse.org/jetty - Performance monitoring artifact for jetty. - - ${project.groupId}.monitor - - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.monitor.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + org.eclipse.jetty + jetty-project + 9.4.0-SNAPSHOT + + 4.0.0 + jetty-monitor + Jetty :: Monitoring + http://www.eclipse.org/jetty + Performance monitoring artifact for jetty. + + ${project.groupId}.monitor + + + + + org.apache.maven.plugins + maven-surefire-plugin + + always + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.monitor.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml index 1adc155c95a..02b7569c34c 100644 --- a/jetty-nosql/pom.xml +++ b/jetty-nosql/pom.xml @@ -1,50 +1,50 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-nosql - Jetty :: NoSQL Session Managers - http://www.eclipse.org/jetty - - ${project.groupId}.nosql - - - install - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.mongodb - mongo-java-driver - 2.13.2 - jar - compile - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-nosql + Jetty :: NoSQL Session Managers + http://www.eclipse.org/jetty + + ${project.groupId}.nosql + + + install + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.mongodb + mongo-java-driver + 2.13.2 + jar + compile + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + test + + + diff --git a/jetty-osgi/jetty-osgi-alpn/pom.xml b/jetty-osgi/jetty-osgi-alpn/pom.xml index 0287a75982b..dd670d22b80 100644 --- a/jetty-osgi/jetty-osgi-alpn/pom.xml +++ b/jetty-osgi/jetty-osgi-alpn/pom.xml @@ -1,55 +1,55 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-osgi-alpn - Jetty :: OSGi ALPN Fragment - jar - - org.eclipse.jetty.osgi.alpn.fragment - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - parse-version - - parse-version - - - ${alpn.api.version} - alpn - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle-symbolic-name};singleton:=true - Jetty OSGi ALPN Fragment - !javax.*;!org.eclipse.jetty.* - org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}" - system.bundle;extension:=framework - - - - - - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-osgi-alpn + Jetty :: OSGi ALPN Fragment + jar + + org.eclipse.jetty.osgi.alpn.fragment + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + parse-version + + parse-version + + + ${alpn.api.version} + alpn + + + + + + org.apache.felix + maven-bundle-plugin + + + ${bundle-symbolic-name};singleton:=true + Jetty OSGi ALPN Fragment + !javax.*;!org.eclipse.jetty.* + org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}" + system.bundle;extension:=framework + + + + + + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml index aaddee1b547..cf6854c04c8 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml @@ -1,136 +1,136 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-osgi-boot-jsp - Jetty :: OSGi :: Boot JSP - Jetty OSGi Boot JSP bundle - http://www.eclipse.org/jetty - - ${project.groupId}.boot.jsp - - - - org.eclipse.jetty - jetty-deploy - - - org.eclipse.jetty.osgi - jetty-osgi-boot - ${project.version} - provided - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - javax.servlet - javax.servlet-api - - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - Jetty-OSGi-Jasper Integration - - org.eclipse.jetty.osgi.boot - !org.eclipse.jetty.osgi.boot.* - org.eclipse.jdt.*;resolution:=optional, - org.eclipse.jdt.core.compiler.*;resolution:=optional, - com.sun.el;resolution:=optional, - com.sun.el.lang;resolution:=optional, - com.sun.el.parser;resolution:=optional, - com.sun.el.util;resolution:=optional, - javax.el;version="[3.0,3.1)", - javax.servlet;version="[3.1,3.2)", - javax.servlet.resources;version="[3.1,3.2)", - javax.servlet.jsp.resources;version="[2.3,4)", - javax.servlet.jsp;version="[2.3,2.4)", - javax.servlet.jsp.el;version="[2.3,2.4)", - javax.servlet.jsp.tagext;version="[2.3,2.4)", - javax.servlet.jsp.jstl.core;version="1.2";resolution:=optional, - javax.servlet.jsp.jstl.fmt;version="1.2";resolution:=optional, - javax.servlet.jsp.jstl.sql;version="1.2";resolution:=optional, - javax.servlet.jsp.jstl.tlv;version="1.2";resolution:=optional, - org.apache.el;version="[8.0.23,9)";resolution:=optional, - org.apache.el.lang;version="[8.0.23,9)";resolution:=optional, - org.apache.el.stream;version="[8.0.23,9)";resolution:=optional, - org.apache.el.util;version="[8.0.23,9)";resolution:=optional, - org.apache.el.parser;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.compiler;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.compiler.tagplugin;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.runtime;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.security;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.servlet;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.tagplugins.jstl;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.util;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.xmlparser;version="[8.0.23,9)";resolution:=optional, - org.apache.taglibs.standard;version="1.2";resolution:=optional, - org.apache.taglibs.standard.extra.spath;version="1.2";resolution:=optional, - org.apache.taglibs.standard.functions;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl.parser;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl.test;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl.test.beans;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.support;version="1.2";resolution:=optional, - org.apache.taglibs.standard.resources;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.core;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.fmt;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.sql;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.xml;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.core;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.fmt;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.sql;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.xml;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.core;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.fmt;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.sql;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.xml;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tei;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tlv;version="1.2";resolution:=optional, - org.apache.tomcat;version="[8.0.23,9)";resolution:=optional, - org.eclipse.jetty.jsp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:=optional, - org.osgi.*, - org.xml.*;resolution:=optional, - org.xml.sax.*;resolution:=optional, - javax.xml.*;resolution:=optional, - org.w3c.dom;resolution:=optional, - org.w3c.dom.ls;resolution:=optional, - javax.xml.parser;resolution:=optional - - org.eclipse.jetty.jsp.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",org.apache.jasper.*;version="8.0.23",org.apache.el.*;version="8.0.23" - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.boot.jasper.*,org.eclipse.jetty.osgi.boot.jsp.* - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-osgi-boot-jsp + Jetty :: OSGi :: Boot JSP + Jetty OSGi Boot JSP bundle + http://www.eclipse.org/jetty + + ${project.groupId}.boot.jsp + + + + org.eclipse.jetty + jetty-deploy + + + org.eclipse.jetty.osgi + jetty-osgi-boot + ${project.version} + provided + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + javax.servlet + javax.servlet-api + + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + Jetty-OSGi-Jasper Integration + + org.eclipse.jetty.osgi.boot + !org.eclipse.jetty.osgi.boot.* + org.eclipse.jdt.*;resolution:=optional, + org.eclipse.jdt.core.compiler.*;resolution:=optional, + com.sun.el;resolution:=optional, + com.sun.el.lang;resolution:=optional, + com.sun.el.parser;resolution:=optional, + com.sun.el.util;resolution:=optional, + javax.el;version="[3.0,3.1)", + javax.servlet;version="[3.1,3.2)", + javax.servlet.resources;version="[3.1,3.2)", + javax.servlet.jsp.resources;version="[2.3,4)", + javax.servlet.jsp;version="[2.3,2.4)", + javax.servlet.jsp.el;version="[2.3,2.4)", + javax.servlet.jsp.tagext;version="[2.3,2.4)", + javax.servlet.jsp.jstl.core;version="1.2";resolution:=optional, + javax.servlet.jsp.jstl.fmt;version="1.2";resolution:=optional, + javax.servlet.jsp.jstl.sql;version="1.2";resolution:=optional, + javax.servlet.jsp.jstl.tlv;version="1.2";resolution:=optional, + org.apache.el;version="[8.0.23,9)";resolution:=optional, + org.apache.el.lang;version="[8.0.23,9)";resolution:=optional, + org.apache.el.stream;version="[8.0.23,9)";resolution:=optional, + org.apache.el.util;version="[8.0.23,9)";resolution:=optional, + org.apache.el.parser;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.compiler;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.compiler.tagplugin;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.runtime;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.security;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.servlet;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.tagplugins.jstl;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.util;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.xmlparser;version="[8.0.23,9)";resolution:=optional, + org.apache.taglibs.standard;version="1.2";resolution:=optional, + org.apache.taglibs.standard.extra.spath;version="1.2";resolution:=optional, + org.apache.taglibs.standard.functions;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl.parser;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl.test;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl.test.beans;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.support;version="1.2";resolution:=optional, + org.apache.taglibs.standard.resources;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.core;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.fmt;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.sql;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.xml;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.core;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.fmt;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.sql;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.xml;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.core;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.fmt;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.sql;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.xml;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tei;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tlv;version="1.2";resolution:=optional, + org.apache.tomcat;version="[8.0.23,9)";resolution:=optional, + org.eclipse.jetty.jsp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:=optional, + org.osgi.*, + org.xml.*;resolution:=optional, + org.xml.sax.*;resolution:=optional, + javax.xml.*;resolution:=optional, + org.w3c.dom;resolution:=optional, + org.w3c.dom.ls;resolution:=optional, + javax.xml.parser;resolution:=optional + + org.eclipse.jetty.jsp.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",org.apache.jasper.*;version="8.0.23",org.apache.el.*;version="8.0.23" + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.boot.jasper.*,org.eclipse.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 1acf13b628f..1f52f6cae5c 100644 --- a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml @@ -1,49 +1,49 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - jetty-osgi-boot-warurl - Jetty :: OSGi :: Boot :: Warurl - Jetty OSGi Boot-Warurl bundle - http://www.eclipse.org/jetty - - ${project.groupId}.boot.warurl - - - - org.eclipse.jetty - jetty-util - - - org.eclipse.osgi - org.eclipse.osgi - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - RFC66 War URL - org.eclipse.jetty.osgi.boot.warurl.WarUrlActivator - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.boot.warurl.* - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + jetty-osgi-boot-warurl + Jetty :: OSGi :: Boot :: Warurl + Jetty OSGi Boot-Warurl bundle + http://www.eclipse.org/jetty + + ${project.groupId}.boot.warurl + + + + org.eclipse.jetty + jetty-util + + + org.eclipse.osgi + org.eclipse.osgi + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + RFC66 War URL + org.eclipse.jetty.osgi.boot.warurl.WarUrlActivator + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.boot.warurl.* + + + + + diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index d5e0c154496..957c14444d9 100644 --- a/jetty-osgi/jetty-osgi-boot/pom.xml +++ b/jetty-osgi/jetty-osgi-boot/pom.xml @@ -1,112 +1,112 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-osgi-boot - Jetty :: OSGi :: Boot - Jetty OSGi Boot bundle - http://www.eclipse.org/jetty - - ${project.groupId}.boot - - - - org.eclipse.jetty - jetty-annotations - - - org.eclipse.jetty - jetty-webapp - - - org.eclipse.jetty - jetty-deploy - - - org.eclipse.jetty - jetty-jmx - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - - - - maven-antrun-plugin - - - process-resources - - - - - - - - - - - - run - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.boot;singleton:=true - org.eclipse.jetty.osgi.boot.JettyBootstrapActivator - org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" - javax.mail;version="1.4.0";resolution:=optional, - javax.mail.event;version="1.4.0";resolution:=optional, - javax.mail.internet;version="1.4.0";resolution:=optional, - javax.mail.search;version="1.4.0";resolution:=optional, - javax.mail.util;version="1.4.0";resolution:=optional, - javax.servlet;version="[3.1,3.2)", - javax.servlet.http;version="[3.1,3.2)", - javax.transaction;version="1.1.0";resolution:=optional, - javax.transaction.xa;version="1.1.0";resolution:=optional, - org.objectweb.asm;version=4;resolution:=optional, - org.osgi.framework, - org.osgi.service.cm;version="1.2.0", - org.osgi.service.packageadmin, - org.osgi.service.startlevel;version="1.0.0", - org.osgi.service.url;version="1.0.0", - org.osgi.util.tracker;version="1.3.0", - org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, - org.slf4j.helpers;resolution:=optional, - org.xml.sax, - org.xml.sax.helpers, - org.eclipse.jetty.annotations;resolution:=optional, - * - - <_nouses>true - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.boot.* - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-osgi-boot + Jetty :: OSGi :: Boot + Jetty OSGi Boot bundle + http://www.eclipse.org/jetty + + ${project.groupId}.boot + + + + org.eclipse.jetty + jetty-annotations + + + org.eclipse.jetty + jetty-webapp + + + org.eclipse.jetty + jetty-deploy + + + org.eclipse.jetty + jetty-jmx + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + + + + maven-antrun-plugin + + + process-resources + + + + + + + + + + + + run + + + + + + org.apache.felix + maven-bundle-plugin + true + + + org.eclipse.jetty.osgi.boot;singleton:=true + org.eclipse.jetty.osgi.boot.JettyBootstrapActivator + org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" + javax.mail;version="1.4.0";resolution:=optional, + javax.mail.event;version="1.4.0";resolution:=optional, + javax.mail.internet;version="1.4.0";resolution:=optional, + javax.mail.search;version="1.4.0";resolution:=optional, + javax.mail.util;version="1.4.0";resolution:=optional, + javax.servlet;version="[3.1,3.2)", + javax.servlet.http;version="[3.1,3.2)", + javax.transaction;version="1.1.0";resolution:=optional, + javax.transaction.xa;version="1.1.0";resolution:=optional, + org.objectweb.asm;version=4;resolution:=optional, + org.osgi.framework, + org.osgi.service.cm;version="1.2.0", + org.osgi.service.packageadmin, + org.osgi.service.startlevel;version="1.0.0", + org.osgi.service.url;version="1.0.0", + org.osgi.util.tracker;version="1.3.0", + org.slf4j;resolution:=optional, + org.slf4j.spi;resolution:=optional, + org.slf4j.helpers;resolution:=optional, + org.xml.sax, + org.xml.sax.helpers, + org.eclipse.jetty.annotations;resolution:=optional, + * + + <_nouses>true + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.boot.* + + + + + + diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml index 27f78a15073..354ca49ff63 100644 --- a/jetty-osgi/jetty-osgi-httpservice/pom.xml +++ b/jetty-osgi/jetty-osgi-httpservice/pom.xml @@ -1,88 +1,88 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-httpservice - Jetty :: OSGi :: HttpService - Jetty OSGi HttpService bundle - http://www.eclipse.org/jetty - - ${project.groupId}.httpservice - - - - org.eclipse.jetty - jetty-util - - - org.eclipse.jetty - jetty-servlet - - - org.eclipse.equinox.http - servlet - - - org.eclipse.osgi - org.eclipse.osgi - provided - - - javax.servlet - javax.servlet-api - - - - - - - maven-antrun-plugin - - - process-resources - - - - - - - - - run - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.httpservice - OSGi HttpService - contexts/httpservice.xml - org.eclipse.jetty.server.handler;version="[9.1,10.0)", -org.eclipse.jetty.util.component;version="[9.1,10.0)", -org.eclipse.jetty.server.session;version="[9.1,10.0)", -org.eclipse.jetty.servlet;version="[9.1,10.0)", -org.eclipse.equinox.http.servlet, -* - - <_nouses>true - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.httpservice.* - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-httpservice + Jetty :: OSGi :: HttpService + Jetty OSGi HttpService bundle + http://www.eclipse.org/jetty + + ${project.groupId}.httpservice + + + + org.eclipse.jetty + jetty-util + + + org.eclipse.jetty + jetty-servlet + + + org.eclipse.equinox.http + servlet + + + org.eclipse.osgi + org.eclipse.osgi + provided + + + javax.servlet + javax.servlet-api + + + + + + + maven-antrun-plugin + + + process-resources + + + + + + + + + run + + + + + + org.apache.felix + maven-bundle-plugin + true + + + org.eclipse.jetty.osgi.httpservice + OSGi HttpService + contexts/httpservice.xml + org.eclipse.jetty.server.handler;version="[9.1,10.0)", +org.eclipse.jetty.util.component;version="[9.1,10.0)", +org.eclipse.jetty.server.session;version="[9.1,10.0)", +org.eclipse.jetty.servlet;version="[9.1,10.0)", +org.eclipse.equinox.http.servlet, +* + + <_nouses>true + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.httpservice.* + + + + + diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 29a46dd3466..95a351de2d4 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -1,202 +1,202 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.osgi - jetty-osgi-project - Jetty :: OSGi - http://www.eclipse.org/jetty - pom - - - 3.6.0.v20100517 - 3.2.100.v20100503 - 1.0.0-v20070606 - - 0.9.29 - 1.6.1 - - - - jetty-osgi-boot - jetty-osgi-boot-jsp - jetty-osgi-boot-warurl - jetty-osgi-httpservice - test-jetty-osgi-webapp - test-jetty-osgi-context - test-jetty-osgi-fragment - test-jetty-osgi-server - jetty-osgi-alpn - - - - - jdk8 - - [1.8,1.9) - - - test-jetty-osgi - - - - - - - - META-INF/.. - true - - **/.* - **/*.jar - .settings/**/* - pom.xml - - jettyhome/**/* - src/**/* - target/**/* - build.properties - - - META-INF/**/* - - - - src/main/java - - **/*.java - - - - - - org.apache.maven.plugins - maven-eclipse-plugin - - prevent/overwriting/by/pointing/to/nonexisting/MANIFEST.MF - true - true - - **/.svn/** - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty - jetty-websocket - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-nested - ${project.version} - - - org.eclipse.jetty - jetty-servlet - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.osgi - org.eclipse.osgi.services - ${osgi-services-version} - - - - javax.servlet - servlet-api - - - - - org.eclipse.osgi - org.eclipse.osgi - ${osgi-version} - - - org.eclipse.equinox.http - servlet - ${equinox-http-servlet-version} - - - org.slf4j - slf4j-api - ${slf4j-version} - - - org.slf4j - jcl-over-slf4j - ${slf4j-version} - - - org.slf4j - log4j-over-slf4j - ${slf4j-version} - - - ch.qos.logback - logback-core - ${logback-version} - - - ch.qos.logback - logback-classic - ${logback-version} - - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.osgi + jetty-osgi-project + Jetty :: OSGi + http://www.eclipse.org/jetty + pom + + + 3.6.0.v20100517 + 3.2.100.v20100503 + 1.0.0-v20070606 + + 0.9.29 + 1.6.1 + + + + jetty-osgi-boot + jetty-osgi-boot-jsp + jetty-osgi-boot-warurl + jetty-osgi-httpservice + test-jetty-osgi-webapp + test-jetty-osgi-context + test-jetty-osgi-fragment + test-jetty-osgi-server + jetty-osgi-alpn + + + + + jdk8 + + [1.8,1.9) + + + test-jetty-osgi + + + + + + + + META-INF/.. + true + + **/.* + **/*.jar + .settings/**/* + pom.xml + + jettyhome/**/* + src/**/* + target/**/* + build.properties + + + META-INF/**/* + + + + src/main/java + + **/*.java + + + + + + org.apache.maven.plugins + maven-eclipse-plugin + + prevent/overwriting/by/pointing/to/nonexisting/MANIFEST.MF + true + true + + **/.svn/** + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty + jetty-websocket + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + jetty-nested + ${project.version} + + + org.eclipse.jetty + jetty-servlet + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.osgi + org.eclipse.osgi.services + ${osgi-services-version} + + + + javax.servlet + servlet-api + + + + + org.eclipse.osgi + org.eclipse.osgi + ${osgi-version} + + + org.eclipse.equinox.http + servlet + ${equinox-http-servlet-version} + + + org.slf4j + slf4j-api + ${slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${slf4j-version} + + + org.slf4j + log4j-over-slf4j + ${slf4j-version} + + + ch.qos.logback + logback-core + ${logback-version} + + + ch.qos.logback + logback-classic + ${logback-version} + + + + + diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml index f26d0d126eb..25303053def 100644 --- a/jetty-osgi/test-jetty-osgi-context/pom.xml +++ b/jetty-osgi/test-jetty-osgi-context/pom.xml @@ -1,93 +1,93 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - test-jetty-osgi-context - Jetty :: OSGi :: Test Context - Test Jetty OSGi bundle with a ContextHandler - http://www.eclipse.org/jetty - - ${project.groupId}.testcontext - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.osgi - org.eclipse.osgi - provided - - - org.eclipse.osgi - org.eclipse.osgi.services - provided - - - org.eclipse.jetty.toolchain - jetty-schemas - - - - - - - src/main/resources - - - src/main/context - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.testcontext;singleton:=true - Jetty OSGi Test Context - com.acme.osgi.Activator - J2SE-1.5 - - <_nouses>true - - javax.servlet;version="[3.1,3.2)", - javax.servlet.resources;version="[3.1,3.2)", - org.osgi.framework, - org.osgi.service.cm;version="1.2.0", - org.osgi.service.packageadmin, - org.osgi.service.startlevel;version="1.0.o", - org.osgi.service.url;version="1.0.0", - org.osgi.util.tracker;version="1.3.0", - org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, - org.slf4j.helpers;resolution:=optional, - org.xml.sax, - org.xml.sax.helpers, - * - - org.eclipse.jetty.*;version="[9.1,10.0)" - - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + + 4.0.0 + test-jetty-osgi-context + Jetty :: OSGi :: Test Context + Test Jetty OSGi bundle with a ContextHandler + http://www.eclipse.org/jetty + + ${project.groupId}.testcontext + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.osgi + org.eclipse.osgi + provided + + + org.eclipse.osgi + org.eclipse.osgi.services + provided + + + org.eclipse.jetty.toolchain + jetty-schemas + + + + + + + src/main/resources + + + src/main/context + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.felix + maven-bundle-plugin + true + + + org.eclipse.jetty.osgi.testcontext;singleton:=true + Jetty OSGi Test Context + com.acme.osgi.Activator + J2SE-1.5 + + <_nouses>true + + javax.servlet;version="[3.1,3.2)", + javax.servlet.resources;version="[3.1,3.2)", + org.osgi.framework, + org.osgi.service.cm;version="1.2.0", + org.osgi.service.packageadmin, + org.osgi.service.startlevel;version="1.0.o", + org.osgi.service.url;version="1.0.0", + org.osgi.util.tracker;version="1.3.0", + org.slf4j;resolution:=optional, + org.slf4j.spi;resolution:=optional, + org.slf4j.helpers;resolution:=optional, + org.xml.sax, + org.xml.sax.helpers, + * + + org.eclipse.jetty.*;version="[9.1,10.0)" + + + + + + + diff --git a/jetty-osgi/test-jetty-osgi-fragment/pom.xml b/jetty-osgi/test-jetty-osgi-fragment/pom.xml index 028552a3883..523147a2e35 100644 --- a/jetty-osgi/test-jetty-osgi-fragment/pom.xml +++ b/jetty-osgi/test-jetty-osgi-fragment/pom.xml @@ -1,49 +1,49 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - test-jetty-osgi-fragment - Jetty :: OSGi :: WebApp Fragment - Test Jetty OSGi Webapp Fragment bundle - http://www.eclipse.org/jetty - - ${project.groupId}.webapp.fragment - - - - - src/main/resources - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.felix - maven-bundle-plugin - true - - - ${bundle-symbolic-name} - Jetty OSGi Test WebApp Fragment - J2SE-1.5 -org.eclipse.jetty.tests.test-spec-webapp -/ - - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + test-jetty-osgi-fragment + Jetty :: OSGi :: WebApp Fragment + Test Jetty OSGi Webapp Fragment bundle + http://www.eclipse.org/jetty + + ${project.groupId}.webapp.fragment + + + + + src/main/resources + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.felix + maven-bundle-plugin + true + + + ${bundle-symbolic-name} + Jetty OSGi Test WebApp Fragment + J2SE-1.5 +org.eclipse.jetty.tests.test-spec-webapp +/ + + + + + + + diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml index e990fb5edb2..9641eae6546 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml +++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml @@ -1,83 +1,83 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - test-jetty-osgi-webapp - Jetty :: OSGi :: Test WebApp - Test Jetty OSGi Webapp bundle - http://www.eclipse.org/jetty - - ${project.groupId}.webapp - - - - org.eclipse.jetty - jetty-webapp - - - org.eclipse.osgi - org.eclipse.osgi - provided - - - org.eclipse.osgi - org.eclipse.osgi.services - provided - - - - - - - src/main/resources - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.testapp;singleton:=true - Jetty OSGi Test WebApp - com.acme.osgi.Activator - J2SE-1.5 - - - org.osgi.framework, - org.osgi.service.cm;version="1.2.0", - org.osgi.service.packageadmin, - org.osgi.service.startlevel;version="1.0.o", - org.osgi.service.url;version="1.0.0", - org.osgi.util.tracker;version="1.3.0", - org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, - org.slf4j.helpers;resolution:=optional, - org.xml.sax, - org.xml.sax.helpers, - * - - com.acme.osgi - org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + test-jetty-osgi-webapp + Jetty :: OSGi :: Test WebApp + Test Jetty OSGi Webapp bundle + http://www.eclipse.org/jetty + + ${project.groupId}.webapp + + + + org.eclipse.jetty + jetty-webapp + + + org.eclipse.osgi + org.eclipse.osgi + provided + + + org.eclipse.osgi + org.eclipse.osgi.services + provided + + + + + + + src/main/resources + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.felix + maven-bundle-plugin + true + + + org.eclipse.jetty.osgi.testapp;singleton:=true + Jetty OSGi Test WebApp + com.acme.osgi.Activator + J2SE-1.5 + + + org.osgi.framework, + org.osgi.service.cm;version="1.2.0", + org.osgi.service.packageadmin, + org.osgi.service.startlevel;version="1.0.o", + org.osgi.service.url;version="1.0.0", + org.osgi.util.tracker;version="1.3.0", + org.slf4j;resolution:=optional, + org.slf4j.spi;resolution:=optional, + org.slf4j.helpers;resolution:=optional, + org.xml.sax, + org.xml.sax.helpers, + * + + com.acme.osgi + org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" + + + + + + diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index ea65b0740af..26c72991e2d 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -1,441 +1,441 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - test-jetty-osgi - Jetty :: OSGi :: Test - Jetty OSGi Integration test - http://www.eclipse.org/jetty - - ${project.groupId}.boot.test.osgi - http://download.eclipse.org/jetty/orbit/ - target/distribution - 4.10.0 - 2.5.2 - 1.0 - - - - - org.ops4j.pax.exam - pax-exam - ${exam.version} - test - - - org.ops4j.pax.exam - pax-exam-inject - ${exam.version} - test - - - - org.ops4j.pax.exam - pax-exam-container-forked - ${exam.version} - test - - - org.ops4j.pax.exam - pax-exam-junit4 - ${exam.version} - test - - - junit - junit - - - - - org.ops4j.pax.exam - pax-exam-link-mvn - ${exam.version} - test - - - org.ops4j.pax.url - pax-url-aether - ${url.version} - test - - - - org.eclipse.platform - org.eclipse.osgi - 3.11.2 - test - - - org.eclipse.platform - org.eclipse.osgi.services - 3.5.100 - test - - - - - org.eclipse.jetty.osgi - jetty-osgi-boot - ${project.version} - test - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - - org.eclipse.jetty.osgi - jetty-osgi-boot-jsp - ${project.version} - test - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - - org.eclipse.jetty.osgi - jetty-httpservice - ${project.version} - test - - - - org.eclipse.jetty.toolchain - jetty-osgi-servlet-api - 3.1.0.M3 - - - org.apache.geronimo.specs - geronimo-jta_1.1_spec - 1.1.1 - test - - - org.apache.geronimo.specs - geronimo-atinject_1.0_spec - ${injection.bundle.version} - test - - - org.apache.aries.spifly - org.apache.aries.spifly.dynamic.bundle - 1.0.1 - test - - - org.glassfish.web - javax.servlet.jsp.jstl - 1.2.2 - - - javax.servlet.jsp.jstl - jstl-api - - - javax.servlet - servlet-api - - - javax.servlet.jsp - jsp-api - - - javax.el - el-api - - - - - org.eclipse.jetty.orbit - javax.servlet.jsp.jstl - 1.2.0.v201105211821 - - - org.eclipse.jetty.orbit - javax.servlet - - - org.eclipse.jetty.orbit - javax.servlet.jsp - - - - - - - org.eclipse.jetty - jetty-annotations - runtime - - - org.eclipse.jetty - jetty-webapp - runtime - - - org.eclipse.jetty - jetty-deploy - runtime - - - org.eclipse.jetty - jetty-server - ${project.version} - runtime - - - org.eclipse.jetty - jetty-servlet - runtime - - - org.eclipse.jetty - jetty-servlets - runtime - - - org.eclipse.jetty - jetty-security - ${project.version} - runtime - - - org.eclipse.jetty - jetty-xml - ${project.version} - runtime - - - org.eclipse.jetty - jetty-jmx - runtime - - - org.eclipse.jetty - jetty-util - ${project.version} - runtime - - - org.eclipse.jetty - jetty-client - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-api - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - runtime - - - javax.websocket - javax.websocket-api - runtime - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - runtime - - - org.eclipse.jetty.websocket - javax-websocket-client-impl - ${project.version} - runtime - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - - - org.eclipse.jetty.http2 - http2-hpack - ${project.version} - - - org.eclipse.jetty.osgi - jetty-osgi-alpn - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-schemas - runtime - - - org.eclipse.jetty - jetty-plus - ${project.version} - runtime - - - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - webbundle - test - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - test - - - org.eclipse.jetty.tests - test-container-initializer - ${project.version} - test - - - org.eclipse.jetty.osgi - test-jetty-osgi-fragment - ${project.version} - test - - - org.eclipse.jetty.osgi - test-jetty-osgi-server - ${project.version} - test - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - org.eclipse.jetty.osgi - test-jetty-osgi-context - ${project.version} - test - - - org.eclipse.jetty.osgi - test-jetty-osgi-webapp - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.slf4j - slf4j-log4j12 - ${slf4j-version} - test - - - - - - maven-surefire-plugin - - 2.18.1 - - - - -Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar - - - - org.apache.servicemix.tooling - depends-maven-plugin - - - generate-depends-file - - generate-depends-file - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.servicemix.tooling - depends-maven-plugin - [1.2,) - - generate-depends-file - - - - - - - - - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + test-jetty-osgi + Jetty :: OSGi :: Test + Jetty OSGi Integration test + http://www.eclipse.org/jetty + + ${project.groupId}.boot.test.osgi + http://download.eclipse.org/jetty/orbit/ + target/distribution + 4.10.0 + 2.5.2 + 1.0 + + + + + org.ops4j.pax.exam + pax-exam + ${exam.version} + test + + + org.ops4j.pax.exam + pax-exam-inject + ${exam.version} + test + + + + org.ops4j.pax.exam + pax-exam-container-forked + ${exam.version} + test + + + org.ops4j.pax.exam + pax-exam-junit4 + ${exam.version} + test + + + junit + junit + + + + + org.ops4j.pax.exam + pax-exam-link-mvn + ${exam.version} + test + + + org.ops4j.pax.url + pax-url-aether + ${url.version} + test + + + + org.eclipse.platform + org.eclipse.osgi + 3.11.2 + test + + + org.eclipse.platform + org.eclipse.osgi.services + 3.5.100 + test + + + + + org.eclipse.jetty.osgi + jetty-osgi-boot + ${project.version} + test + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + + org.eclipse.jetty.osgi + jetty-osgi-boot-jsp + ${project.version} + test + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + + org.eclipse.jetty.osgi + jetty-httpservice + ${project.version} + test + + + + org.eclipse.jetty.toolchain + jetty-osgi-servlet-api + 3.1.0.M3 + + + org.apache.geronimo.specs + geronimo-jta_1.1_spec + 1.1.1 + test + + + org.apache.geronimo.specs + geronimo-atinject_1.0_spec + ${injection.bundle.version} + test + + + org.apache.aries.spifly + org.apache.aries.spifly.dynamic.bundle + 1.0.1 + test + + + org.glassfish.web + javax.servlet.jsp.jstl + 1.2.2 + + + javax.servlet.jsp.jstl + jstl-api + + + javax.servlet + servlet-api + + + javax.servlet.jsp + jsp-api + + + javax.el + el-api + + + + + org.eclipse.jetty.orbit + javax.servlet.jsp.jstl + 1.2.0.v201105211821 + + + org.eclipse.jetty.orbit + javax.servlet + + + org.eclipse.jetty.orbit + javax.servlet.jsp + + + + + + + org.eclipse.jetty + jetty-annotations + runtime + + + org.eclipse.jetty + jetty-webapp + runtime + + + org.eclipse.jetty + jetty-deploy + runtime + + + org.eclipse.jetty + jetty-server + ${project.version} + runtime + + + org.eclipse.jetty + jetty-servlet + runtime + + + org.eclipse.jetty + jetty-servlets + runtime + + + org.eclipse.jetty + jetty-security + ${project.version} + runtime + + + org.eclipse.jetty + jetty-xml + ${project.version} + runtime + + + org.eclipse.jetty + jetty-jmx + runtime + + + org.eclipse.jetty + jetty-util + ${project.version} + runtime + + + org.eclipse.jetty + jetty-client + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-api + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + runtime + + + javax.websocket + javax.websocket-api + runtime + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + runtime + + + org.eclipse.jetty.websocket + javax-websocket-client-impl + ${project.version} + runtime + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + + + org.eclipse.jetty.http2 + http2-hpack + ${project.version} + + + org.eclipse.jetty.osgi + jetty-osgi-alpn + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-schemas + runtime + + + org.eclipse.jetty + jetty-plus + ${project.version} + runtime + + + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + webbundle + test + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + test + + + org.eclipse.jetty.tests + test-container-initializer + ${project.version} + test + + + org.eclipse.jetty.osgi + test-jetty-osgi-fragment + ${project.version} + test + + + org.eclipse.jetty.osgi + test-jetty-osgi-server + ${project.version} + test + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + org.eclipse.jetty.osgi + test-jetty-osgi-context + ${project.version} + test + + + org.eclipse.jetty.osgi + test-jetty-osgi-webapp + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + test + + + + + + maven-surefire-plugin + + 2.18.1 + + + + -Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar + + + + org.apache.servicemix.tooling + depends-maven-plugin + + + generate-depends-file + + generate-depends-file + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.servicemix.tooling + depends-maven-plugin + [1.2,) + + generate-depends-file + + + + + + + + + + + + + + diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index 8ea6eb8a453..bec7ca9e581 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -1,59 +1,59 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-plus - Jetty :: Plus - Jetty JavaEE style services - http://www.eclipse.org/jetty - - ${project.groupId}.plus - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.plus.* - - - - - - - org.apache.derby - derby - 10.1.2.1 - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - javax.transaction - javax.transaction-api - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-plus + Jetty :: Plus + Jetty JavaEE style services + http://www.eclipse.org/jetty + + ${project.groupId}.plus + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.plus.* + + + + + + + org.apache.derby + derby + 10.1.2.1 + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + javax.transaction + javax.transaction-api + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + diff --git a/jetty-proxy/pom.xml b/jetty-proxy/pom.xml index e8da166ed0d..389efa771d9 100644 --- a/jetty-proxy/pom.xml +++ b/jetty-proxy/pom.xml @@ -1,67 +1,67 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-proxy - Jetty :: Proxy - Jetty Proxy - http://www.eclipse.org/jetty - - ${project.groupId}.proxy - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.proxy.* - - - - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-servlet - ${project.version} - provided - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-util-ajax - ${project.version} - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-proxy + Jetty :: Proxy + Jetty Proxy + http://www.eclipse.org/jetty + + ${project.groupId}.proxy + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.proxy.* + + + + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-servlet + ${project.version} + provided + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-util-ajax + ${project.version} + test + + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index a5db7eaa094..7a41219e381 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -1,95 +1,95 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty - jetty-quickstart - Jetty :: Quick Start - Jetty Quick Start - http://www.eclipse.org/jetty - - ${project.groupId}.quickstart - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - javax.transaction - javax.transaction-api - 1.2 - compile - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - test - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - test - - - org.eclipse.jetty - jetty-servlets - ${project.version} - test - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - test - - - org.eclipse.jetty - apache-jsp - ${project.version} - test - - - org.eclipse.jetty - apache-jstl - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + org.eclipse.jetty + jetty-quickstart + Jetty :: Quick Start + Jetty Quick Start + http://www.eclipse.org/jetty + + ${project.groupId}.quickstart + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + javax.transaction + javax.transaction-api + 1.2 + compile + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + test + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + test + + + org.eclipse.jetty + jetty-servlets + ${project.version} + test + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty + apache-jsp + ${project.version} + test + + + org.eclipse.jetty + apache-jstl + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml index 0d1964f4d40..a90c5792251 100644 --- a/jetty-rewrite/pom.xml +++ b/jetty-rewrite/pom.xml @@ -1,47 +1,47 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-rewrite - Jetty :: Rewrite Handler - Jetty Rewrite Handler - http://www.eclipse.org/jetty - - ${project.groupId}.rewrite - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.rewrite.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - javax.servlet - javax.servlet-api - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-rewrite + Jetty :: Rewrite Handler + Jetty Rewrite Handler + http://www.eclipse.org/jetty + + ${project.groupId}.rewrite + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.rewrite.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + javax.servlet + javax.servlet-api + + + diff --git a/jetty-runner/pom.xml b/jetty-runner/pom.xml index 29be2959a66..ec3e202a4ff 100644 --- a/jetty-runner/pom.xml +++ b/jetty-runner/pom.xml @@ -1,118 +1,118 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-runner - Jetty :: Runner - - - target/distribution - ${project.groupId}.runner - - http://www.eclipse.org/jetty - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-dependencies - prepare-package - - unpack-dependencies - - - ** - **/MANIFEST.MF,META-INF/*.RSA,META-INF/*.DSA,META-INF/*.SF - ${project.build.directory}/classes - false - true - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - - - org.eclipse.jetty.runner.Runner - !* - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - - - org.neo4j.build.plugins - clirr-maven-plugin - - - true - - - - - - - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-jaas - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-runner + Jetty :: Runner + + + target/distribution + ${project.groupId}.runner + + http://www.eclipse.org/jetty + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-dependencies + prepare-package + + unpack-dependencies + + + ** + **/MANIFEST.MF,META-INF/*.RSA,META-INF/*.DSA,META-INF/*.SF + ${project.build.directory}/classes + false + true + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + + + org.eclipse.jetty.runner.Runner + !* + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + org.neo4j.build.plugins + clirr-maven-plugin + + + true + + + + + + + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-jaas + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index 6d710c82a4a..4da91da22c1 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -1,56 +1,56 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-security - Jetty :: Security - Jetty security infrastructure - http://www.eclipse.org/jetty - - ${project.groupId}.security - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* - - - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.security.* - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-security + Jetty :: Security + Jetty security infrastructure + http://www.eclipse.org/jetty + + ${project.groupId}.security + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* + + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.security.* + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml index ccbf03688a3..0a1e5866fe5 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -1,78 +1,78 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-server - Jetty :: Server Core - The core jetty server artifact. - http://www.eclipse.org/jetty - - ${project.groupId}.server - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.server.* - - - - - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-server + Jetty :: Server Core + The core jetty server artifact. + http://www.eclipse.org/jetty + + ${project.groupId}.server + + + + + org.apache.maven.plugins + maven-jar-plugin + + + test-jar + + test-jar + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.server.* + + + + + + + javax.servlet + javax.servlet-api + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + + + diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index 2ff8909c825..f4a9dcec809 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -1,64 +1,64 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-servlet - Jetty :: Servlet Handling - Jetty Servlet Container - http://www.eclipse.org/jetty - - ${project.groupId}.servlet - - - - - org.apache.maven.plugins - maven-jar-plugin - - - tests - - test-jar - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.servlet.* - - - - - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - + + + + jetty-project + org.eclipse.jetty + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-servlet + Jetty :: Servlet Handling + Jetty Servlet Container + http://www.eclipse.org/jetty + + ${project.groupId}.servlet + + + + + org.apache.maven.plugins + maven-jar-plugin + + + tests + + test-jar + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.servlet.* + + + + + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + + + diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index 254631b857f..dbffcf88883 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -1,85 +1,85 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-servlets - Jetty :: Utility Servlets and Filters - Utility Servlets from Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.servlets - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.servlets.* - - - - - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - provided - - - org.eclipse.jetty - jetty-util - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + jetty-project + org.eclipse.jetty + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-servlets + Jetty :: Utility Servlets and Filters + Utility Servlets from Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.servlets + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.servlets.* + + + + + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + provided + + + org.eclipse.jetty + jetty-util + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-spring/pom.xml b/jetty-spring/pom.xml index 274d6e67152..c0c2fe42835 100644 --- a/jetty-spring/pom.xml +++ b/jetty-spring/pom.xml @@ -1,57 +1,57 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-spring - Example :: Jetty Spring - - - 3.2.8.RELEASE - target/dependencies - ${project.groupId}.spring - - - - install - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.springframework - spring-beans - ${spring-version} - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-spring + Example :: Jetty Spring + + + 3.2.8.RELEASE + target/dependencies + ${project.groupId}.spring + + + + install + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.springframework + spring-beans + ${spring-version} + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml index 3500bbbe750..5f1e7599c90 100644 --- a/jetty-start/pom.xml +++ b/jetty-start/pom.xml @@ -1,44 +1,44 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-start - Jetty :: Start - The start utility - http://www.eclipse.org/jetty - - ${project.groupId}.start - start.jar - - - - - maven-jar-plugin - - - - org.eclipse.jetty.start.Main - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.start.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-start + Jetty :: Start + The start utility + http://www.eclipse.org/jetty + + ${project.groupId}.start + start.jar + + + + + maven-jar-plugin + + + + org.eclipse.jetty.start.Main + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.start.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-util-ajax/pom.xml b/jetty-util-ajax/pom.xml index 8b0b7c19fdd..4e9fdbebd5c 100644 --- a/jetty-util-ajax/pom.xml +++ b/jetty-util-ajax/pom.xml @@ -1,43 +1,43 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-util-ajax - Jetty :: Utilities :: Ajax(JSON) - JSON/Ajax Utility classes for Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.util.ajax - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.util.ajax.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-util-ajax + Jetty :: Utilities :: Ajax(JSON) + JSON/Ajax Utility classes for Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.util.ajax + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.util.ajax.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 97ea516309c..f03ba368d76 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -1,60 +1,60 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-util - Jetty :: Utilities - Utility classes for Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.util - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.util.* - - - - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.toolchain - jetty-perf-helper - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.slf4j - slf4j-api - provided - true - - - - org.slf4j - slf4j-jdk14 - ${slf4j-version} - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-util + Jetty :: Utilities + Utility classes for Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.util + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.util.* + + + + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.toolchain + jetty-perf-helper + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.slf4j + slf4j-api + provided + true + + + + org.slf4j + slf4j-jdk14 + ${slf4j-version} + test + + + diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index e5777924d80..3b97065de1f 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -1,73 +1,73 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-webapp - Jetty :: Webapp Application Support - Jetty web application support - http://www.eclipse.org/jetty - - ${project.groupId}.webapp - - - - - src/main/resources - - - src/main/config/etc - org/eclipse/jetty/webapp - false - - webdefault.xml - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.webapp.* - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org.eclipse.jetty.webapp.WebAppClassLoaderUrlStreamTest - - 1 - false - - - - - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-webapp + Jetty :: Webapp Application Support + Jetty web application support + http://www.eclipse.org/jetty + + ${project.groupId}.webapp + + + + + src/main/resources + + + src/main/config/etc + org/eclipse/jetty/webapp + false + + webdefault.xml + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.webapp.* + + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.eclipse.jetty.webapp.WebAppClassLoaderUrlStreamTest + + 1 + false + + + + + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + diff --git a/jetty-websocket/javax-websocket-client-impl/pom.xml b/jetty-websocket/javax-websocket-client-impl/pom.xml index 26683ee8690..3172c6638d3 100644 --- a/jetty-websocket/javax-websocket-client-impl/pom.xml +++ b/jetty-websocket/javax-websocket-client-impl/pom.xml @@ -1,100 +1,100 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - javax-websocket-client-impl - Jetty :: Websocket :: javax.websocket :: Client Implementation - - - ${project.groupId}.javax.websocket - - - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - - - javax.websocket - javax.websocket-api - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.websocket.client Implementation - org.eclipse.jetty.websocket.jsr356.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + javax-websocket-client-impl + Jetty :: Websocket :: javax.websocket :: Client Implementation + + + ${project.groupId}.javax.websocket + + + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + + + javax.websocket + javax.websocket-api + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.websocket.client Implementation + org.eclipse.jetty.websocket.jsr356.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + + + + + + + + + diff --git a/jetty-websocket/javax-websocket-server-impl/pom.xml b/jetty-websocket/javax-websocket-server-impl/pom.xml index 10c6ed2f849..7a8df967c06 100644 --- a/jetty-websocket/javax-websocket-server-impl/pom.xml +++ b/jetty-websocket/javax-websocket-server-impl/pom.xml @@ -1,75 +1,75 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - javax-websocket-server-impl - Jetty :: Websocket :: javax.websocket.server :: Server Implementation - - - ${project.groupId}.javax.websocket.server - - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-client-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - javax.websocket - javax.websocket-api - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.websocket.server Implementation - org.eclipse.jetty.websocket.jsr356.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer, osgi.serviceloader; osgi.serviceloader=javax.websocket.server.ServerEndpointConfig$Configurator - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + javax-websocket-server-impl + Jetty :: Websocket :: javax.websocket.server :: Server Implementation + + + ${project.groupId}.javax.websocket.server + + + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-client-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + javax.websocket + javax.websocket-api + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.websocket.server Implementation + org.eclipse.jetty.websocket.jsr356.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional + osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer, osgi.serviceloader; osgi.serviceloader=javax.websocket.server.ServerEndpointConfig$Configurator + + + + + + + + diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index 885c6685fb7..660df847c1e 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -1,48 +1,48 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.websocket - websocket-parent - Jetty :: Websocket :: Parent - pom - http://www.eclipse.org/jetty - - - websocket-common - websocket-api - websocket-client - websocket-server - websocket-servlet - javax-websocket-client-impl - javax-websocket-server-impl - - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.websocket.* - - - - org.codehaus.mojo - clirr-maven-plugin - - info - 9.1.0.v20131115 - - - - - - - + + + + jetty-project + org.eclipse.jetty + 9.4.7-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.websocket + websocket-parent + Jetty :: Websocket :: Parent + pom + http://www.eclipse.org/jetty + + + websocket-common + websocket-api + websocket-client + websocket-server + websocket-servlet + javax-websocket-client-impl + javax-websocket-server-impl + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.websocket.* + + + + org.codehaus.mojo + clirr-maven-plugin + + info + 9.1.0.v20131115 + + + + + + + diff --git a/jetty-websocket/websocket-api/pom.xml b/jetty-websocket/websocket-api/pom.xml index c208b331a6d..ce4313f4f47 100644 --- a/jetty-websocket/websocket-api/pom.xml +++ b/jetty-websocket/websocket-api/pom.xml @@ -1,58 +1,58 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-api - Jetty :: Websocket :: API - - - ${project.groupId}.api - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + websocket-api + Jetty :: Websocket :: API + + + ${project.groupId}.api + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + + + + + + + + + diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index 4c6112bc087..4326bf3d72c 100644 --- a/jetty-websocket/websocket-client/pom.xml +++ b/jetty-websocket/websocket-client/pom.xml @@ -1,128 +1,128 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-client - Jetty :: Websocket :: Client - - - ${project.groupId}.client - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - true - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - true - The servlet-api dependency is banned in websocket-client as it causes problems in apps that use client only. - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - tests-jar - - test-jar - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - hybrid - - - org.eclipse.jetty.websocket:websocket-common - - - - - org.eclipse.jetty.websocket.common - org.eclipse.jetty.websocket.client.common - - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + websocket-client + Jetty :: Websocket :: Client + + + ${project.groupId}.client + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + true + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + true + The servlet-api dependency is banned in websocket-client as it causes problems in apps that use client only. + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + tests-jar + + test-jar + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + true + hybrid + + + org.eclipse.jetty.websocket:websocket-common + + + + + org.eclipse.jetty.websocket.common + org.eclipse.jetty.websocket.client.common + + + + + + + + + diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index f1a4ab31d92..8ca709104c4 100644 --- a/jetty-websocket/websocket-common/pom.xml +++ b/jetty-websocket/websocket-common/pom.xml @@ -1,81 +1,81 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-common - Jetty :: Websocket :: Common - - - ${project.groupId}.common - - - - - org.eclipse.jetty.websocket - websocket-api - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jars - - test-jar - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + websocket-common + Jetty :: Websocket :: Common + + + ${project.groupId}.common + + + + + org.eclipse.jetty.websocket + websocket-api + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jars + + test-jar + + + + + + + diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index 3c17fb01125..9a595a8ce97 100644 --- a/jetty-websocket/websocket-server/pom.xml +++ b/jetty-websocket/websocket-server/pom.xml @@ -1,96 +1,96 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-server - Jetty :: Websocket :: Server - - - ${project.groupId}.server - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - - - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - - - org.eclipse.jetty - jetty-servlet - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + websocket-server + Jetty :: Websocket :: Server + + + ${project.groupId}.server + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + test-jar + + test-jar + + + + + + + + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + + + org.eclipse.jetty + jetty-servlet + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index c8e1afe63d1..889f6b426e0 100644 --- a/jetty-websocket/websocket-servlet/pom.xml +++ b/jetty-websocket/websocket-servlet/pom.xml @@ -1,50 +1,50 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-servlet - Jetty :: Websocket :: Servlet Interface - - - ${project.groupId}.servlet - - - - - org.apache.felix - maven-bundle-plugin - true - - - Websocket Servlet Interface - - org.eclipse.jetty.websocket.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}",org.eclipse.jetty.websocket.server.pathmap.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}" - - - - - - - - - org.eclipse.jetty.websocket - websocket-api - ${project.version} - - - javax.servlet - javax.servlet-api - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + websocket-servlet + Jetty :: Websocket :: Servlet Interface + + + ${project.groupId}.servlet + + + + + org.apache.felix + maven-bundle-plugin + true + + + Websocket Servlet Interface + + org.eclipse.jetty.websocket.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}",org.eclipse.jetty.websocket.server.pathmap.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}" + + + + + + + + + org.eclipse.jetty.websocket + websocket-api + ${project.version} + + + javax.servlet + javax.servlet-api + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml index 35eaeb44849..d4ffe67f438 100644 --- a/jetty-xml/pom.xml +++ b/jetty-xml/pom.xml @@ -1,38 +1,38 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-xml - Jetty :: XML utilities - The jetty xml utilities. - http://www.eclipse.org/jetty - - ${project.groupId}.xml - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.xml.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + + 4.0.0 + jetty-xml + Jetty :: XML utilities + The jetty xml utilities. + http://www.eclipse.org/jetty + + ${project.groupId}.xml + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.xml.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/tests/pom.xml b/tests/pom.xml index 70223d2a779..9d3309a60c5 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -1,63 +1,63 @@ - - - 4.0.0 - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - ../pom.xml - - org.eclipse.jetty.tests - tests-parent - Jetty Tests :: Parent - http://www.eclipse.org/jetty - pom - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - true - - - - org.codehaus.mojo - findbugs-maven-plugin - - - true - - - - org.neo4j.build.plugins - clirr-maven-plugin - - - true - - - - - - - test-webapps - test-sessions - test-continuation - test-loginservice - test-integration - test-quickstart - test-jmx - test-http-client-transport - - + + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.4.7-SNAPSHOT + ../pom.xml + + org.eclipse.jetty.tests + tests-parent + Jetty Tests :: Parent + http://www.eclipse.org/jetty + pom + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + true + + + + org.codehaus.mojo + findbugs-maven-plugin + + + true + + + + org.neo4j.build.plugins + clirr-maven-plugin + + + true + + + + + + + test-webapps + test-sessions + test-continuation + test-loginservice + test-integration + test-quickstart + test-jmx + test-http-client-transport + + diff --git a/tests/test-continuation/pom.xml b/tests/test-continuation/pom.xml index 0cc371b0dc2..b294ad136aa 100644 --- a/tests/test-continuation/pom.xml +++ b/tests/test-continuation/pom.xml @@ -1,48 +1,48 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - test-continuation - jar - Test :: Continuation - Asynchronous API - - ${project.groupId}.continuation - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - - org.eclipse.jetty - jetty-servlet - ${project.version} - provided - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - compile - - - - + + + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + test-continuation + jar + Test :: Continuation + Asynchronous API + + ${project.groupId}.continuation + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + + org.eclipse.jetty + jetty-servlet + ${project.version} + provided + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + compile + + + + diff --git a/tests/test-http-client-transport/pom.xml b/tests/test-http-client-transport/pom.xml index 36208657e5f..9a31a405422 100644 --- a/tests/test-http-client-transport/pom.xml +++ b/tests/test-http-client-transport/pom.xml @@ -1,143 +1,143 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - test-http-client-transport - jar - Test :: HTTP Client Transports - - - ${project.groupId}.client.http - - - - - jdk8 - - [1.8,1.9) - - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - - - - - org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} - jar - false - ${project.build.directory}/alpn - - - - - - - - maven-surefire-plugin - - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - - - - jdk9 - - [1.9,) - - - - org.eclipse.jetty - jetty-alpn-java-client - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-java-server - ${project.version} - test - - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty - jetty-client - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-http-client-transport - ${project.version} - test - - - org.eclipse.jetty.fcgi - fcgi-server - ${project.version} - test - - - junit - junit - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - + + + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + + + 4.0.0 + test-http-client-transport + jar + Test :: HTTP Client Transports + + + ${project.groupId}.client.http + + + + + jdk8 + + [1.8,1.9) + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + jar + false + ${project.build.directory}/alpn + + + + + + + + maven-surefire-plugin + + -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + + + + + + + jdk9 + + [1.9,) + + + + org.eclipse.jetty + jetty-alpn-java-client + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-java-server + ${project.version} + test + + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty + jetty-client + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-http-client-transport + ${project.version} + test + + + org.eclipse.jetty.fcgi + fcgi-server + ${project.version} + test + + + junit + junit + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index 8910c3f7934..7635e5cab5e 100644 --- a/tests/test-integration/pom.xml +++ b/tests/test-integration/pom.xml @@ -1,141 +1,141 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - 4.0.0 - test-integration - jar - Jetty Tests :: Integrations - http://www.eclipse.org/jetty - - ${project.build.directory}/test-wars - ${project.build.directory}/test-libs - ${project.build.directory}/test-dist - ${project.groupId}.integrations - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-wars-for-testing - process-test-resources - - copy-dependencies - - - org.eclipse.jetty.tests - test - war - true - true - true - ${project.build.directory}/webapps - - - - unpack-jetty-distro - process-test-resources - - unpack - - - - - org.eclipse.jetty - jetty-distribution - ${project.version} - zip - true - - - true - ${test-dist-dir} - true - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - true - false - - - - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-distribution - ${project.version} - pom - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty.tests - test-webapp-rfc2616 - ${project.version} - war - test - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - + + + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + + 4.0.0 + test-integration + jar + Jetty Tests :: Integrations + http://www.eclipse.org/jetty + + ${project.build.directory}/test-wars + ${project.build.directory}/test-libs + ${project.build.directory}/test-dist + ${project.groupId}.integrations + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-wars-for-testing + process-test-resources + + copy-dependencies + + + org.eclipse.jetty.tests + test + war + true + true + true + ${project.build.directory}/webapps + + + + unpack-jetty-distro + process-test-resources + + unpack + + + + + org.eclipse.jetty + jetty-distribution + ${project.version} + zip + true + + + true + ${test-dist-dir} + true + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + always + true + false + + + + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + jetty-rewrite + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-distribution + ${project.version} + pom + + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty.tests + test-webapp-rfc2616 + ${project.version} + war + test + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + diff --git a/tests/test-jmx/jmx-webapp-it/pom.xml b/tests/test-jmx/jmx-webapp-it/pom.xml index 92d843ba518..91e5ab08ca4 100644 --- a/tests/test-jmx/jmx-webapp-it/pom.xml +++ b/tests/test-jmx/jmx-webapp-it/pom.xml @@ -1,69 +1,69 @@ - - - - org.eclipse.jetty.tests - test-jmx-parent - 9.4.7-SNAPSHOT - - 4.0.0 - jmx-webapp-it - jar - Jetty Tests :: JMX :: WebApp Integration Tests - http://www.eclipse.org/jetty - - UTF-8 - UTF-8 - ${project.groupId}.jmx.webapp.it - ${project.build.directory}/test-base - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty.tests - jmx-webapp - ${project.version} - war - runtime - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-apps-for-testing - process-test-resources - - copy-dependencies - - - jmx-webapp - runtime - war - true - true - true - ${test-base-dir}/webapps - - - - - - - + + + + org.eclipse.jetty.tests + test-jmx-parent + 9.4.7-SNAPSHOT + + 4.0.0 + jmx-webapp-it + jar + Jetty Tests :: JMX :: WebApp Integration Tests + http://www.eclipse.org/jetty + + UTF-8 + UTF-8 + ${project.groupId}.jmx.webapp.it + ${project.build.directory}/test-base + + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty.tests + jmx-webapp + ${project.version} + war + runtime + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-apps-for-testing + process-test-resources + + copy-dependencies + + + jmx-webapp + runtime + war + true + true + true + ${test-base-dir}/webapps + + + + + + + diff --git a/tests/test-jmx/jmx-webapp/pom.xml b/tests/test-jmx/jmx-webapp/pom.xml index d742b4c7c93..787e6bbd188 100644 --- a/tests/test-jmx/jmx-webapp/pom.xml +++ b/tests/test-jmx/jmx-webapp/pom.xml @@ -1,42 +1,42 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-jmx-parent - 9.4.7-SNAPSHOT - - jmx-webapp - war - Jetty Tests :: JMX :: WebApp - http://www.eclipse.org/jetty - - UTF-8 - ${project.groupId}.jmx.webapp - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - - jmx-webapp - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-jmx-parent + 9.4.7-SNAPSHOT + + jmx-webapp + war + Jetty Tests :: JMX :: WebApp + http://www.eclipse.org/jetty + + UTF-8 + ${project.groupId}.jmx.webapp + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + + jmx-webapp + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + diff --git a/tests/test-jmx/pom.xml b/tests/test-jmx/pom.xml index 4698c64f29d..bb79f51c47d 100644 --- a/tests/test-jmx/pom.xml +++ b/tests/test-jmx/pom.xml @@ -1,17 +1,17 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - 4.0.0 - test-jmx-parent - pom - Jetty Tests :: JMX Parent - http://www.eclipse.org/jetty - - jmx-webapp - jmx-webapp-it - - + + + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + + 4.0.0 + test-jmx-parent + pom + Jetty Tests :: JMX Parent + http://www.eclipse.org/jetty + + jmx-webapp + jmx-webapp-it + + diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml index 48701d05068..93b5a14f9ab 100644 --- a/tests/test-loginservice/pom.xml +++ b/tests/test-loginservice/pom.xml @@ -1,64 +1,64 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - test-loginservice - Jetty Tests :: Login Service - http://www.eclipse.org/jetty - - ${project.groupId}.loginservice - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.apache.derby - derby - 10.4.1.3 - test - - - org.apache.derby - derbytools - 10.4.1.3 - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + 4.0.0 + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + + test-loginservice + Jetty Tests :: Login Service + http://www.eclipse.org/jetty + + ${project.groupId}.loginservice + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + org.apache.derby + derby + 10.4.1.3 + test + + + org.apache.derby + derbytools + 10.4.1.3 + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/tests/test-quickstart/pom.xml b/tests/test-quickstart/pom.xml index 1e9b2b46451..3e57624d55c 100644 --- a/tests/test-quickstart/pom.xml +++ b/tests/test-quickstart/pom.xml @@ -1,185 +1,185 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - test-quickstart - Test :: Jetty Quick Start - Jetty Quick Start Test - http://www.eclipse.org/jetty - - ${project.groupId}.tests.quickstart - - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - javax.transaction - javax.transaction-api - 1.2 - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - war - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - war - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - - - - - - - org.codehaus.mojo - appassembler-maven-plugin - - - unix - - - - preconfigure - org.eclipse.jetty.quickstart.PreconfigureQuickStartWar - - - org.eclipse.jetty.quickstart.QuickStartWar - quickstart - - - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - - - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - war - true - ** - ${basedir}/target - test-jndi.war - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - true - ** - ${basedir}/target - test-spec.war - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - war - true - ** - ${basedir}/target - test-standard.war - - - - - - - - - + + + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + test-quickstart + Test :: Jetty Quick Start + Jetty Quick Start Test + http://www.eclipse.org/jetty + + ${project.groupId}.tests.quickstart + + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + javax.transaction + javax.transaction-api + 1.2 + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + war + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + war + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + + + + + + + org.codehaus.mojo + appassembler-maven-plugin + + + unix + + + + preconfigure + org.eclipse.jetty.quickstart.PreconfigureQuickStartWar + + + org.eclipse.jetty.quickstart.QuickStartWar + quickstart + + + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + war + true + ** + ${basedir}/target + test-jndi.war + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + true + ** + ${basedir}/target + test-spec.war + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + war + true + ** + ${basedir}/target + test-standard.war + + + + + + + + + diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml index 281f705d55d..66ffbff6d8b 100644 --- a/tests/test-sessions/pom.xml +++ b/tests/test-sessions/pom.xml @@ -1,25 +1,25 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - test-sessions-parent - Jetty Tests :: Sessions :: Parent - http://www.eclipse.org/jetty - pom - - - - test-sessions-common - test-hash-sessions - test-file-sessions - test-jdbc-sessions - test-mongodb-sessions - test-infinispan-sessions - test-gcloud-sessions - test-memcached-sessions - - + + + 4.0.0 + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + + test-sessions-parent + Jetty Tests :: Sessions :: Parent + http://www.eclipse.org/jetty + pom + + + + test-sessions-common + test-hash-sessions + test-file-sessions + test-jdbc-sessions + test-mongodb-sessions + test-infinispan-sessions + test-gcloud-sessions + test-memcached-sessions + + diff --git a/tests/test-sessions/test-gcloud-sessions/pom.xml b/tests/test-sessions/test-gcloud-sessions/pom.xml index bb938722e2d..7a3d7ab1616 100644 --- a/tests/test-sessions/test-gcloud-sessions/pom.xml +++ b/tests/test-sessions/test-gcloud-sessions/pom.xml @@ -1,94 +1,94 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-gcloud-sessions - Jetty Tests :: Sessions :: GCloud - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.gcloud - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - GCloudTestSuite - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.eclipse.jetty.gcloud - jetty-gcloud-session-manager - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - gcloud - - - gcloud.enabled - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - jetty9-work - http://localhost:8088 - - - - - - - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.4.7-SNAPSHOT + + test-gcloud-sessions + Jetty Tests :: Sessions :: GCloud + http://www.eclipse.org/jetty + + ${project.groupId}.sessions.gcloud + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + GCloudTestSuite + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.eclipse.jetty.gcloud + jetty-gcloud-session-manager + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + gcloud + + + gcloud.enabled + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + jetty9-work + http://localhost:8088 + + + + + + + + + diff --git a/tests/test-sessions/test-hash-sessions/pom.xml b/tests/test-sessions/test-hash-sessions/pom.xml index b30d3270bb8..aef9c3cb280 100644 --- a/tests/test-sessions/test-hash-sessions/pom.xml +++ b/tests/test-sessions/test-hash-sessions/pom.xml @@ -1,55 +1,55 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-hash-sessions - Jetty Tests :: Sessions :: Hash - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.hash - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - - compile - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.4.7-SNAPSHOT + + test-hash-sessions + Jetty Tests :: Sessions :: Hash + http://www.eclipse.org/jetty + + ${project.groupId}.sessions.hash + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + + compile + + + diff --git a/tests/test-sessions/test-infinispan-sessions/pom.xml b/tests/test-sessions/test-infinispan-sessions/pom.xml index 7e198156324..ee8da0d8192 100644 --- a/tests/test-sessions/test-infinispan-sessions/pom.xml +++ b/tests/test-sessions/test-infinispan-sessions/pom.xml @@ -1,131 +1,131 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-infinispan-sessions - Jetty Tests :: Sessions :: Infinispan - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.infinispan - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org/eclipse/jetty/server/session/*.java - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - generate-test-resources - - unpack - - - - - org.eclipse.jetty.toolchain - jetty-test-policy - ${jetty-test-policy-version} - jar - true - **/*.keystore,**/*.pem - ${jetty.test.policy.loc} - - - - - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.eclipse.jetty - jetty-infinispan - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.infinispan - infinispan-client-hotrod - 7.1.1.Final - test - - - - - - remote - - - hotrod.enabled - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - **/*.java - - - - - - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.4.7-SNAPSHOT + + test-infinispan-sessions + Jetty Tests :: Sessions :: Infinispan + http://www.eclipse.org/jetty + + ${project.groupId}.sessions.infinispan + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-surefire-plugin + + + org/eclipse/jetty/server/session/*.java + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + generate-test-resources + + unpack + + + + + org.eclipse.jetty.toolchain + jetty-test-policy + ${jetty-test-policy-version} + jar + true + **/*.keystore,**/*.pem + ${jetty.test.policy.loc} + + + + + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.eclipse.jetty + jetty-infinispan + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.infinispan + infinispan-client-hotrod + 7.1.1.Final + test + + + + + + remote + + + hotrod.enabled + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*.java + + + + + + + + diff --git a/tests/test-sessions/test-jdbc-sessions/pom.xml b/tests/test-sessions/test-jdbc-sessions/pom.xml index 3d7814d0140..3cf5894760a 100644 --- a/tests/test-sessions/test-jdbc-sessions/pom.xml +++ b/tests/test-sessions/test-jdbc-sessions/pom.xml @@ -1,66 +1,66 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-jdbc-sessions - Jetty Tests :: Sessions :: JDBC - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.jdbc - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.apache.derby - derby - 10.12.1.1 - test - - - org.apache.derby - derbytools - 10.12.1.1 - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.4.7-SNAPSHOT + + test-jdbc-sessions + Jetty Tests :: Sessions :: JDBC + http://www.eclipse.org/jetty + + ${project.groupId}.sessions.jdbc + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.apache.derby + derby + 10.12.1.1 + test + + + org.apache.derby + derbytools + 10.12.1.1 + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/tests/test-sessions/test-memcached-sessions/pom.xml b/tests/test-sessions/test-memcached-sessions/pom.xml index 17e83e86346..173d165a6ae 100644 --- a/tests/test-sessions/test-memcached-sessions/pom.xml +++ b/tests/test-sessions/test-memcached-sessions/pom.xml @@ -1,89 +1,89 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-memcached-sessions - Jetty Tests :: Sessions :: Memcached - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.memcached - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.eclipse.jetty.memcached - jetty-memcached-sessions - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - memcached - - - memcached.enabled - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - - - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.4.7-SNAPSHOT + + test-memcached-sessions + Jetty Tests :: Sessions :: Memcached + http://www.eclipse.org/jetty + + ${project.groupId}.sessions.memcached + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.eclipse.jetty.memcached + jetty-memcached-sessions + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + memcached + + + memcached.enabled + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + + + + + diff --git a/tests/test-sessions/test-mongodb-sessions/pom.xml b/tests/test-sessions/test-mongodb-sessions/pom.xml index ef3f46f605e..12506ecbf52 100644 --- a/tests/test-sessions/test-mongodb-sessions/pom.xml +++ b/tests/test-sessions/test-mongodb-sessions/pom.xml @@ -1,120 +1,120 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-mongodb-sessions - Jetty Tests :: Sessions :: Mongo - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.mongo - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - generate-test-resources - - unpack - - - - - org.eclipse.jetty.toolchain - jetty-test-policy - ${jetty-test-policy-version} - jar - true - **/*.keystore,**/*.pem - ${jetty.test.policy.loc} - - - - - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.eclipse.jetty - jetty-nosql - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - mongodb - - - mongodb.enabled - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.4.7-SNAPSHOT + + test-mongodb-sessions + Jetty Tests :: Sessions :: Mongo + http://www.eclipse.org/jetty + + ${project.groupId}.sessions.mongo + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + generate-test-resources + + unpack + + + + + org.eclipse.jetty.toolchain + jetty-test-policy + ${jetty-test-policy-version} + jar + true + **/*.keystore,**/*.pem + ${jetty.test.policy.loc} + + + + + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.eclipse.jetty + jetty-nosql + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + mongodb + + + mongodb.enabled + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + + + + diff --git a/tests/test-sessions/test-sessions-common/pom.xml b/tests/test-sessions/test-sessions-common/pom.xml index c4f625724fe..2e3ad9ce3f9 100644 --- a/tests/test-sessions/test-sessions-common/pom.xml +++ b/tests/test-sessions/test-sessions-common/pom.xml @@ -1,39 +1,39 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-sessions-common - Jetty Tests :: Sessions :: Common - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.common - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - compile - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.4.7-SNAPSHOT + + test-sessions-common + Jetty Tests :: Sessions :: Common + http://www.eclipse.org/jetty + + ${project.groupId}.sessions.common + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + compile + + + diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index ab77e4db250..787a7f75cf8 100644 --- a/tests/test-webapps/pom.xml +++ b/tests/test-webapps/pom.xml @@ -1,42 +1,42 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - ../pom.xml - - test-webapps-parent - Jetty Tests :: WebApps :: Parent - http://www.eclipse.org/jetty - pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - test-jetty-webapp - test-proxy-webapp - test-webapp-rfc2616 - test-mock-resources - test-servlet-spec - test-jaas-webapp - test-jndi-webapp - - + + + 4.0.0 + + org.eclipse.jetty.tests + tests-parent + 9.4.7-SNAPSHOT + ../pom.xml + + test-webapps-parent + Jetty Tests :: WebApps :: Parent + http://www.eclipse.org/jetty + pom + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + test-jetty-webapp + test-proxy-webapp + test-webapp-rfc2616 + test-mock-resources + test-servlet-spec + test-jaas-webapp + test-jndi-webapp + + diff --git a/tests/test-webapps/test-jaas-webapp/pom.xml b/tests/test-webapps/test-jaas-webapp/pom.xml index 02541c39cd3..e126e3d3e17 100644 --- a/tests/test-webapps/test-jaas-webapp/pom.xml +++ b/tests/test-webapps/test-jaas-webapp/pom.xml @@ -1,80 +1,80 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-jaas-webapp - Jetty Tests :: WebApp :: JAAS - war - - ${project.groupId}.jaas - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - 10 - - - - jetty.base - ${basedir}/src/main/config/demo-base - - - - java.security.auth.login.config - ${basedir}/src/main/config/demo-base/etc/login.conf - - - - /test-jaas - - - Test JAAS Realm - xyz - - - - - - - mysql - mysql-connector-java - 5.1.19 - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - ${basedir}/src/main/assembly/config.xml - - - - - - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.4.7-SNAPSHOT + + test-jaas-webapp + Jetty Tests :: WebApp :: JAAS + war + + ${project.groupId}.jaas + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 10 + + + + jetty.base + ${basedir}/src/main/config/demo-base + + + + java.security.auth.login.config + ${basedir}/src/main/config/demo-base/etc/login.conf + + + + /test-jaas + + + Test JAAS Realm + xyz + + + + + + + mysql + mysql-connector-java + 5.1.19 + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + ${basedir}/src/main/assembly/config.xml + + + + + + + + diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml index d9309abff25..eda0a183a45 100644 --- a/tests/test-webapps/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -1,252 +1,252 @@ - - - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - test-jetty-webapp - Test :: Jetty Test Webapp - http://www.eclipse.org/jetty - war - - ${project.groupId}.tests.webapp - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - test - test - - - - - **/WebAppTest.java - **/Test*.java - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - src/main/assembly/web-bundle.xml - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - war - - - javax.servlet.jsp.*;version="[2.2.0,3.0)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* - !com.acme* - - / - - .,WEB-INF/classes - - - - - - maven-war-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - - 8087 - foo - 1 - - - fooprop - 222 - - - - /test - ${project.build.directory}/work - - - - Test Realm - src/main/config/demo-base/etc/realm.properties - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - false - - - - - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - test - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - provided - - - javax.websocket - javax.websocket-api - 1.0 - provided - - - - - precompile-jsp - - - - org.eclipse.jetty - jetty-jspc-maven-plugin - ${project.version} - - - jspc - - jspc - - - - - - - org.apache.maven.plugins - maven-war-plugin - - ${basedir}/target/web.xml - - - - - - - + + + + org.eclipse.jetty.tests + test-webapps-parent + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + test-jetty-webapp + Test :: Jetty Test Webapp + http://www.eclipse.org/jetty + war + + ${project.groupId}.tests.webapp + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + test + test + + + + + **/WebAppTest.java + **/Test*.java + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + src/main/assembly/web-bundle.xml + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + war + + + javax.servlet.jsp.*;version="[2.2.0,3.0)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* + !com.acme* + + / + + .,WEB-INF/classes + + + + + + maven-war-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + + 8087 + foo + 1 + + + fooprop + 222 + + + + /test + ${project.build.directory}/work + + + + Test Realm + src/main/config/demo-base/etc/realm.properties + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + false + + + + + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + provided + + + javax.websocket + javax.websocket-api + 1.0 + provided + + + + + precompile-jsp + + + + org.eclipse.jetty + jetty-jspc-maven-plugin + ${project.version} + + + jspc + + jspc + + + + + + + org.apache.maven.plugins + maven-war-plugin + + ${basedir}/target/web.xml + + + + + + + diff --git a/tests/test-webapps/test-jndi-webapp/pom.xml b/tests/test-webapps/test-jndi-webapp/pom.xml index 045f0241022..6b8d4171402 100644 --- a/tests/test-webapps/test-jndi-webapp/pom.xml +++ b/tests/test-webapps/test-jndi-webapp/pom.xml @@ -1,144 +1,144 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-jndi-webapp - Jetty Tests :: WebApp :: JNDI - war - - ${project.groupId}.jndi - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - maven-antrun-plugin - - - generate-xml-files - process-resources - - - - - - - - - - - - run - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - package - - copy - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - jar - ** - true - ${project.build.directory}/lib/jndi - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - jar - ** - true - ${project.build.directory}/lib/jndi - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - src/main/assembly/config.xml - - - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - ${project.build.directory}/plugin-context.xml - - src/main/webapp - src/main/webapp/WEB-INF/web.xml - /test-jndi - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - - - - - - - - javax.transaction - javax.transaction-api - provided - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - provided - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.4.7-SNAPSHOT + + test-jndi-webapp + Jetty Tests :: WebApp :: JNDI + war + + ${project.groupId}.jndi + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + maven-antrun-plugin + + + generate-xml-files + process-resources + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + package + + copy + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + jar + ** + true + ${project.build.directory}/lib/jndi + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + jar + ** + true + ${project.build.directory}/lib/jndi + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + src/main/assembly/config.xml + + + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + ${project.build.directory}/plugin-context.xml + + src/main/webapp + src/main/webapp/WEB-INF/web.xml + /test-jndi + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + + + + + + + + javax.transaction + javax.transaction-api + provided + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + provided + + + diff --git a/tests/test-webapps/test-mock-resources/pom.xml b/tests/test-webapps/test-mock-resources/pom.xml index 9aa5f62922e..ebd7ce2dfb6 100644 --- a/tests/test-webapps/test-mock-resources/pom.xml +++ b/tests/test-webapps/test-mock-resources/pom.xml @@ -1,69 +1,69 @@ - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - Jetty Tests :: WebApp :: Mock Resources - test-mock-resources - jar - - ${project.groupId}.mocks - - - - - maven-compiler-plugin - - false - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.tests.test-mock-resources - Mock resources used for testing - - com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - - - javax.sql, - javax.transaction;version="1.1", - javax.mail;version="1.4.1" - - <_nouses>true - - - - - - - - - - javax.transaction - javax.transaction-api - provided - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - provided - - - - + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.4.7-SNAPSHOT + + Jetty Tests :: WebApp :: Mock Resources + test-mock-resources + jar + + ${project.groupId}.mocks + + + + + maven-compiler-plugin + + false + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.tests.test-mock-resources + Mock resources used for testing + + com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + + javax.sql, + javax.transaction;version="1.1", + javax.mail;version="1.4.1" + + <_nouses>true + + + + + + + + + + javax.transaction + javax.transaction-api + provided + + + javax.servlet + javax.servlet-api + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + provided + + + + diff --git a/tests/test-webapps/test-proxy-webapp/pom.xml b/tests/test-webapps/test-proxy-webapp/pom.xml index 86fffafd9bf..7248f9407cf 100644 --- a/tests/test-webapps/test-proxy-webapp/pom.xml +++ b/tests/test-webapps/test-proxy-webapp/pom.xml @@ -1,110 +1,110 @@ - - - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - test-proxy-webapp - Test :: Jetty Proxy Webapp - war - - ${project.groupId}.proxy - - - - - maven-war-plugin - - - src/main/webapp/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - false - - - - - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - provided - - - + + + + org.eclipse.jetty.tests + test-webapps-parent + 9.4.7-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + test-proxy-webapp + Test :: Jetty Proxy Webapp + war + + ${project.groupId}.proxy + + + + + maven-war-plugin + + + src/main/webapp/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + false + + + + + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + provided + + + diff --git a/tests/test-webapps/test-servlet-spec/pom.xml b/tests/test-webapps/test-servlet-spec/pom.xml index 7e412ae69ed..db1cce4bf5d 100644 --- a/tests/test-webapps/test-servlet-spec/pom.xml +++ b/tests/test-webapps/test-servlet-spec/pom.xml @@ -1,30 +1,30 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-servlet-spec-parent - Jetty Tests :: Spec Test WebApp :: Parent - pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - test-web-fragment - test-container-initializer - test-spec-webapp - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.4.7-SNAPSHOT + + test-servlet-spec-parent + Jetty Tests :: Spec Test WebApp :: Parent + pom + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + test-web-fragment + test-container-initializer + test-spec-webapp + + + 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 6b1fa7d3eb7..e35eb0cfd98 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 @@ -1,40 +1,40 @@ - - 4.0.0 - - org.eclipse.jetty.tests - test-servlet-spec-parent - 9.4.7-SNAPSHOT - - test-container-initializer - jar - Jetty Tests :: WebApp :: Servlet Spec :: ServletContainerInitializer Test Jar - - ${project.groupId}.sci - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.tests.test-servlet-container-initializer;singleton:=true - A bundle containing a ServletContainerInitializer for testing - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer - com.acme.initializer;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - <_nouses>true - - - - - - - - javax.servlet - javax.servlet-api - provided - - - + + 4.0.0 + + org.eclipse.jetty.tests + test-servlet-spec-parent + 9.4.7-SNAPSHOT + + test-container-initializer + jar + Jetty Tests :: WebApp :: Servlet Spec :: ServletContainerInitializer Test Jar + + ${project.groupId}.sci + + + + + org.apache.felix + maven-bundle-plugin + true + + + org.eclipse.jetty.tests.test-servlet-container-initializer;singleton:=true + A bundle containing a ServletContainerInitializer for testing + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer + com.acme.initializer;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + <_nouses>true + + + + + + + + javax.servlet + javax.servlet-api + provided + + + 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 8c9f469daae..381cdc100d0 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 @@ -1,219 +1,219 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-servlet-spec-parent - 9.4.7-SNAPSHOT - - Jetty Tests :: Webapps :: Spec Webapp - test-spec-webapp - war - - ${project.groupId}.spec - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - src/main/assembly/config.xml - src/main/assembly/web-bundle.xml - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - - - maven-war-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - target - - plugin-context.xml - - META-INF - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - war - - - org.eclipse.jetty.tests.test-spec-webapp - Test Webapp for Servlet 3.1 Features - - javax.servlet.jsp.*;version="[2.2.0, 3.0)", - javax.transaction*;version="[1.1,1.3)", - javax.servlet*;version="[2.6,3.2)", - org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))", - org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", - org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", - com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", - * - - <_nouses /> - com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true - / - .,WEB-INF/classes,WEB-INF/lib - /META-INF/plugin-context.xml - - - - - - maven-antrun-plugin - - - generate-xml-files - process-resources - - - - - - - - - - - - run - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - package - - copy - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - jar - ** - true - ${project.build.directory}/lib/jndi - - - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - 10 - true - ${project.build.directory}/plugin-context.xml - - src/main/webapp - src/main/webapp/WEB-INF/web.xml - /test-spec - .*/javax.servlet-[^/]*\.jar$ - true - ${basedir}/src/main/webapp/WEB-INF/jetty-env.xml - - - - Test Realm - src/etc/realm.properties - - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - - - - - - - javax.transaction - javax.transaction-api - provided - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - org.eclipse.jetty.orbit - javax.mail.glassfish - provided - - - javax.servlet - javax.servlet-api - provided - - - javax.annotation - javax.annotation-api - provided - - - org.eclipse.jetty.tests - test-web-fragment - ${project.version} - - - org.eclipse.jetty.tests - test-container-initializer - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-servlet-spec-parent + 9.4.7-SNAPSHOT + + Jetty Tests :: Webapps :: Spec Webapp + test-spec-webapp + war + + ${project.groupId}.spec + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + src/main/assembly/config.xml + src/main/assembly/web-bundle.xml + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + maven-war-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + target + + plugin-context.xml + + META-INF + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + war + + + org.eclipse.jetty.tests.test-spec-webapp + Test Webapp for Servlet 3.1 Features + + javax.servlet.jsp.*;version="[2.2.0, 3.0)", + javax.transaction*;version="[1.1,1.3)", + javax.servlet*;version="[2.6,3.2)", + org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))", + org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", + org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", + com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", + * + + <_nouses /> + com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true + / + .,WEB-INF/classes,WEB-INF/lib + /META-INF/plugin-context.xml + + + + + + maven-antrun-plugin + + + generate-xml-files + process-resources + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + package + + copy + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + jar + ** + true + ${project.build.directory}/lib/jndi + + + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 10 + true + ${project.build.directory}/plugin-context.xml + + src/main/webapp + src/main/webapp/WEB-INF/web.xml + /test-spec + .*/javax.servlet-[^/]*\.jar$ + true + ${basedir}/src/main/webapp/WEB-INF/jetty-env.xml + + + + Test Realm + src/etc/realm.properties + + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + + + + + + + javax.transaction + javax.transaction-api + provided + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + org.eclipse.jetty.orbit + javax.mail.glassfish + provided + + + javax.servlet + javax.servlet-api + provided + + + javax.annotation + javax.annotation-api + provided + + + org.eclipse.jetty.tests + test-web-fragment + ${project.version} + + + org.eclipse.jetty.tests + test-container-initializer + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + 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 21722e8cdbb..7ad0ddc580e 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 @@ -1,38 +1,38 @@ - - 4.0.0 - - org.eclipse.jetty.tests - test-servlet-spec-parent - 9.4.7-SNAPSHOT - - Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar - org.eclipse.jetty.tests - test-web-fragment - jar - - ${project.groupId}.fragment - - - - - maven-compiler-plugin - - false - - - - - - - javax.servlet - javax.servlet-api - - - - - + + 4.0.0 + + org.eclipse.jetty.tests + test-servlet-spec-parent + 9.4.7-SNAPSHOT + + Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar + org.eclipse.jetty.tests + test-web-fragment + jar + + ${project.groupId}.fragment + + + + + maven-compiler-plugin + + false + + + + + + + javax.servlet + javax.servlet-api + + + + + diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml index 7f6f901ee26..6a734020702 100644 --- a/tests/test-webapps/test-webapp-rfc2616/pom.xml +++ b/tests/test-webapps/test-webapp-rfc2616/pom.xml @@ -1,56 +1,56 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-webapp-rfc2616 - Jetty Tests :: WebApp :: RFC2616 - http://www.eclipse.org/jetty - war - - ${project.groupId}.rfc2616 - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - 8087 - foo - 1 - - - fooprop - 222 - - - - - - - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.4.7-SNAPSHOT + + test-webapp-rfc2616 + Jetty Tests :: WebApp :: RFC2616 + http://www.eclipse.org/jetty + war + + ${project.groupId}.rfc2616 + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 8087 + foo + 1 + + + fooprop + 222 + + + + + + + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + From f8236e0270e0388f3f94a06919cb49a20bac5568 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 31 May 2017 16:10:04 -0700 Subject: [PATCH 009/147] Updating to version 9.3.21-SNAPSHOT From 61dbd9c48e6ae175f2e41bba7e30ea484bae7623 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Thu, 1 Jun 2017 14:19:01 +1000 Subject: [PATCH 010/147] fix typo in session-configuration-infinispan documentation #1583 Signed-off-by: olivier lamy --- .../sessions/session-configuration-infinispan.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-infinispan.adoc b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-infinispan.adoc index c4cad1f7669..f0d92edf3a9 100644 --- a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-infinispan.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-infinispan.adoc @@ -16,7 +16,7 @@ [[configuring-sessions-infinispan]] -=== Clustered Session Management: Inifinspan +=== Clustered Session Management: Infinispan ==== Enabling Infinispan Sessions @@ -65,9 +65,9 @@ ____ If you have updated versions of the jar files automatically downloaded by Jetty, you can place them in the associated `${jetty.base}/lib/` directory and use the `--skip-file-validation=` command line option to prevent errors when starting your server. ____ -==== Configuring Inifinspan Remote Properties +==== Configuring Infinispan Remote Properties -Opening the `start.d/session-store-infinispan-remote.ini` will show a list of all the configurable options for the JDBC module: +Opening the `start.d/session-store-infinispan-remote.ini` will show a list of all the configurable options for the Infinispan module: [source, screen, subs="{sub-order}"] ---- @@ -101,7 +101,7 @@ This allows the possibility that a node may prematurely expire the session, even Thorough consideration of the `maxIdleTime` of the session when setting the `savePeriod` is imperative - there is no point in setting a `savePeriod` that is larger than the `maxIdleTime`. ____ -==== Configuring Embedded Inifinspan Clustering +==== Configuring Embedded Infinispan Clustering During testing, it can be helpful to run an in-process instance of Infinispan. To enable this you will first need to enable the `session-store-infinispan-embedded` link:#startup-modules[module] for your link:#startup-base-and-home[Jetty base] using the `--add-to-start` argument on the command line. @@ -140,7 +140,7 @@ In addition to adding these modules to the classpath of the server it also added ==== Configuring Inifinspan Embedded Properties -Opening the `start.d/session-store-infinispan-remote.ini` will show a list of all the configurable options for the JDBC module: +Opening the `start.d/session-store-infinispan-embedded.ini` will show a list of all the configurable options for the Infinispan module: [source, screen, subs="{sub-order}"] ---- From 189cc4e369a0238828bfe71c11a87ee15e3e7280 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 1 Jun 2017 13:57:20 +0200 Subject: [PATCH 011/147] Issue #1468 Configure PKIX Revocation Checker for SslContextFactory --- .../src/main/config/etc/jetty-ssl-context.xml | 22 +++++ .../jetty/util/ssl/SslContextFactory.java | 82 ++++++++++++------- .../jetty/util/ssl/SslContextFactoryTest.java | 9 ++ 3 files changed, 83 insertions(+), 30 deletions(-) diff --git a/jetty-server/src/main/config/etc/jetty-ssl-context.xml b/jetty-server/src/main/config/etc/jetty-ssl-context.xml index 3e84a9e0e0c..87414a3c58c 100644 --- a/jetty-server/src/main/config/etc/jetty-ssl-context.xml +++ b/jetty-server/src/main/config/etc/jetty-ssl-context.xml @@ -28,4 +28,26 @@ + + + diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java index 99d552c6ad7..e976164fad0 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ssl/SslContextFactory.java @@ -31,6 +31,7 @@ import java.security.cert.CertStore; import java.security.cert.Certificate; import java.security.cert.CollectionCertStoreParameters; import java.security.cert.PKIXBuilderParameters; +import java.security.cert.PKIXCertPathChecker; import java.security.cert.X509CertSelector; import java.security.cert.X509Certificate; import java.util.ArrayList; @@ -167,6 +168,7 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable private boolean _renegotiationAllowed = true; private int _renegotiationLimit = 5; private Factory _factory; + private PKIXCertPathChecker _pkixCertPathChecker; /** * Construct an instance of SslContextFactory @@ -1005,6 +1007,16 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable _endpointIdentificationAlgorithm = endpointIdentificationAlgorithm; } + public PKIXCertPathChecker getPkixCertPathChecker() + { + return _pkixCertPathChecker; + } + + public void setPkixCertPathChecker(PKIXCertPathChecker pkixCertPatchChecker) + { + _pkixCertPathChecker = pkixCertPatchChecker; + } + /** * Override this method to provide alternate way to load a keystore. * @@ -1105,36 +1117,7 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable // Revocation checking is only supported for PKIX algorithm if (isValidatePeerCerts() && "PKIX".equalsIgnoreCase(getTrustManagerFactoryAlgorithm())) { - PKIXBuilderParameters pbParams = new PKIXBuilderParameters(trustStore, new X509CertSelector()); - - // Set maximum certification path length - pbParams.setMaxPathLength(_maxCertPathLength); - - // Make sure revocation checking is enabled - pbParams.setRevocationEnabled(true); - - if (crls != null && !crls.isEmpty()) - { - pbParams.addCertStore(CertStore.getInstance("Collection", new CollectionCertStoreParameters(crls))); - } - - if (_enableCRLDP) - { - // Enable Certificate Revocation List Distribution Points (CRLDP) support - System.setProperty("com.sun.security.enableCRLDP", "true"); - } - - if (_enableOCSP) - { - // Enable On-Line Certificate Status Protocol (OCSP) support - Security.setProperty("ocsp.enable", "true"); - - if (_ocspResponderURL != null) - { - // Override location of OCSP Responder - Security.setProperty("ocsp.responderURL", _ocspResponderURL); - } - } + PKIXBuilderParameters pbParams = newPKIXBuilderParameters(trustStore, crls); TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(_trustManagerFactoryAlgorithm); trustManagerFactory.init(new CertPathTrustManagerParameters(pbParams)); @@ -1153,6 +1136,45 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable return managers; } + protected PKIXBuilderParameters newPKIXBuilderParameters(KeyStore trustStore, Collection crls) throws Exception + { + PKIXBuilderParameters pbParams = new PKIXBuilderParameters(trustStore, new X509CertSelector()); + + // Set maximum certification path length + pbParams.setMaxPathLength(_maxCertPathLength); + + // Make sure revocation checking is enabled + pbParams.setRevocationEnabled(true); + + if (_pkixCertPathChecker!=null) + pbParams.addCertPathChecker(_pkixCertPathChecker); + + if (crls != null && !crls.isEmpty()) + { + pbParams.addCertStore(CertStore.getInstance("Collection", new CollectionCertStoreParameters(crls))); + } + + if (_enableCRLDP) + { + // Enable Certificate Revocation List Distribution Points (CRLDP) support + System.setProperty("com.sun.security.enableCRLDP", "true"); + } + + if (_enableOCSP) + { + // Enable On-Line Certificate Status Protocol (OCSP) support + Security.setProperty("ocsp.enable", "true"); + + if (_ocspResponderURL != null) + { + // Override location of OCSP Responder + Security.setProperty("ocsp.responderURL", _ocspResponderURL); + } + } + + return pbParams; + } + /** * Select protocols to be used by the connector * based on configured inclusion and exclusion lists diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java index 2a9021f626b..599f46a62c8 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java @@ -52,6 +52,15 @@ public class SslContextFactoryTest public void setUp() throws Exception { cf = new SslContextFactory(); + + java.security.cert.CertPathBuilder certPathBuilder = java.security.cert.CertPathBuilder.getInstance("PKIX"); + java.security.cert.PKIXRevocationChecker revocationChecker = (java.security.cert.PKIXRevocationChecker) certPathBuilder.getRevocationChecker(); + revocationChecker.setOptions(java.util.EnumSet.of( + java.security.cert.PKIXRevocationChecker.Option.valueOf("PREFER_CRLS"), + java.security.cert.PKIXRevocationChecker.Option.valueOf("SOFT_FAIL"), + java.security.cert.PKIXRevocationChecker.Option.valueOf("NO_FALLBACK"))); + cf.setPkixCertPathChecker(revocationChecker); + } @Test From b0bead2bc0de39c57eb8e531d72bd3f201ce7018 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 27 Feb 2017 11:25:39 -0700 Subject: [PATCH 012/147] Fixes #1357 - Refactored date/time handling and added tests for RolloverFileOutputStream --- .../jetty/util/RolloverFileOutputStream.java | 52 +++-- .../util/RolloverFileOutputStreamTest.java | 204 +----------------- 2 files changed, 43 insertions(+), 213 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 98b3ef261ac..a5373ca7b07 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -24,6 +24,7 @@ import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.SimpleDateFormat; +import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit; import java.util.Date; @@ -183,36 +184,47 @@ public class RolloverFileOutputStream extends FilterOutputStream { if (__rollover==null) __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); - - // Calculate Today's Midnight, based on Configured TimeZone (will be in past, even if by a few milliseconds) - setFile(now); - // This will schedule the rollover event to the next midnight - scheduleNextRollover(now); + + _rollTask=new RollTask(); + + midnight = toMidnight(ZonedDateTime.now(), zone.toZoneId()); + + scheduleNextRollover(); } } - - /* ------------------------------------------------------------ */ + /** * Get the "start of day" for the provided DateTime at the zone specified. * - * @param now the date time to calculate from + * @param dateTime the date time to calculate from + * @param zone the zone to return the date in * @return start of the day of the date provided */ - public static ZonedDateTime toMidnight(ZonedDateTime now) + public static ZonedDateTime toMidnight(ZonedDateTime dateTime, ZoneId zone) { - return now.toLocalDate().atStartOfDay(now.getZone()).plus(1, ChronoUnit.DAYS); + return dateTime.toLocalDate().atStartOfDay(zone); } - - /* ------------------------------------------------------------ */ - private void scheduleNextRollover(ZonedDateTime now) + + /** + * Get the next "start of day" for the provided date. + * + * @param dateTime the date to calculate from + * @return the start of the next day + */ + public static ZonedDateTime nextMidnight(ZonedDateTime dateTime) { - _rollTask = new RollTask(); - // Get tomorrow's midnight based on Configured TimeZone - ZonedDateTime midnight = toMidnight(now); - - // Schedule next rollover event to occur, based on local machine's Unix Epoch milliseconds - long delay = midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli(); - __rollover.schedule(_rollTask,delay); + // Increment to next day. + // Using Calendar.add(DAY, 1) takes in account Daylights Savings + // differences, and still maintains the "midnight" settings for + // Hour, Minute, Second, Milliseconds + return dateTime.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(dateTime.getZone()); + } + + private void scheduleNextRollover() + { + long lastMs = midnight.toInstant().toEpochMilli(); + midnight = nextMidnight(midnight); + __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - lastMs); } /* ------------------------------------------------------------ */ diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java index 9fa00057c4c..829f255b527 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java @@ -21,24 +21,12 @@ package org.eclipse.jetty.util; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; -import java.io.File; -import java.io.FileReader; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.attribute.FileTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; -import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalAccessor; -import java.util.Arrays; import java.util.TimeZone; -import java.util.concurrent.TimeUnit; -import org.eclipse.jetty.toolchain.test.FS; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.eclipse.jetty.util.resource.ResourceTest; -import org.hamcrest.Matchers; import org.junit.Test; public class RolloverFileOutputStreamTest @@ -69,45 +57,21 @@ public class RolloverFileOutputStreamTest for (int i = 0; i < expected.length; i++) { - long currentMillis = nextEvent.toInstant().toEpochMilli(); - nextEvent = nextEvent.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(nextEvent.getZone()); + long lastMs = nextEvent.toInstant().toEpochMilli(); + nextEvent = RolloverFileOutputStream.nextMidnight(nextEvent); assertThat("Next Event", toString(nextEvent), is(expected[i][0])); - long duration = (nextEvent.toInstant().toEpochMilli() - currentMillis); + long duration = (nextEvent.toInstant().toEpochMilli() - lastMs); assertThat("Duration to next event", duration, is((long) expected[i][1])); } } - /** - * https://github.com/eclipse/jetty.project/issues/1507 - */ - @Test - public void testMidnightRolloverCalc_PDT_Issue1507() - { - ZoneId zone = toZoneId("PST"); - ZonedDateTime initialDate = toDateTime("2017.04.26-08:00:00.0 PM PDT", zone); - - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); - assertThat("Midnight", toString(midnight), is("2017.04.27-12:00:00.0 AM PDT")); - - Object expected[][] = { - {"2017.04.27-12:00:00.0 AM PDT", 14_400_000L}, - {"2017.04.28-12:00:00.0 AM PDT", 86_400_000L}, - {"2017.04.29-12:00:00.0 AM PDT", 86_400_000L}, - {"2017.04.30-12:00:00.0 AM PDT", 86_400_000L}, - {"2017.05.01-12:00:00.0 AM PDT", 86_400_000L}, - {"2017.05.02-12:00:00.0 AM PDT", 86_400_000L}, - }; - - assertSequence(initialDate, expected); - } - @Test public void testMidnightRolloverCalc_PST_DST_Start() { ZoneId zone = toZoneId("PST"); - ZonedDateTime initialDate = toDateTime("2016.03.10-01:23:45.0 PM PST", zone); + ZonedDateTime initialDate = toDateTime("2016.03.11-01:23:45.0 PM PST", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); assertThat("Midnight", toString(midnight), is("2016.03.11-12:00:00.0 AM PST")); Object expected[][] = { @@ -125,9 +89,9 @@ public class RolloverFileOutputStreamTest public void testMidnightRolloverCalc_PST_DST_End() { ZoneId zone = toZoneId("PST"); - ZonedDateTime initialDate = toDateTime("2016.11.03-11:22:33.0 AM PDT", zone); + ZonedDateTime initialDate = toDateTime("2016.11.04-11:22:33.0 AM PDT", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); assertThat("Midnight", toString(midnight), is("2016.11.04-12:00:00.0 AM PDT")); Object expected[][] = { @@ -145,9 +109,9 @@ public class RolloverFileOutputStreamTest public void testMidnightRolloverCalc_Sydney_DST_Start() { ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime initialDate = toDateTime("2016.09.31-01:23:45.0 PM AEST", zone); + ZonedDateTime initialDate = toDateTime("2016.10.01-01:23:45.0 PM AEST", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); assertThat("Midnight", toString(midnight), is("2016.10.01-12:00:00.0 AM AEST")); Object expected[][] = { @@ -165,9 +129,9 @@ public class RolloverFileOutputStreamTest public void testMidnightRolloverCalc_Sydney_DST_End() { ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime initialDate = toDateTime("2016.04.01-11:22:33.0 AM AEDT", zone); + ZonedDateTime initialDate = toDateTime("2016.04.02-11:22:33.0 AM AEDT", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); assertThat("Midnight", toString(midnight), is("2016.04.02-12:00:00.0 AM AEDT")); Object expected[][] = { @@ -180,150 +144,4 @@ public class RolloverFileOutputStreamTest assertSequence(midnight, expected); } - - @Test - public void testFilehandling() throws Exception - { - File testDir = MavenTestingUtils.getTargetTestingDir(ResourceTest.class.getName()); - Path testPath = testDir.toPath(); - FS.ensureEmpty(testDir); - - ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime now = toDateTime("2016.04.10-08:30:12.3 AM AEDT", zone); - - File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); - - try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) - { - rofos.write("TICK".getBytes()); - rofos.flush(); - } - - now = now.plus(5,ChronoUnit.MINUTES); - - try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) - { - rofos.write("TOCK".getBytes()); - rofos.flush(); - String[] ls = testDir.list(); - assertThat(ls.length,is(2)); - String backup = null; - for (String n: ls) - { - if (!"test-rofos-2016_04_10.log".equals(n)) - backup = n; - } - - assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder(backup,"test-rofos-2016_04_10.log")); - - Files.setLastModifiedTime(testPath.resolve(backup),FileTime.from(now.toInstant())); - Files.setLastModifiedTime(testPath.resolve("test-rofos-2016_04_10.log"),FileTime.from(now.toInstant())); - - ZonedDateTime time = now.minus(1,ChronoUnit.DAYS); - for (int i=10;i-->5;) - { - String file = "test-rofos-2016_04_0"+i+".log"; - Path path = testPath.resolve(file); - FS.touch(path); - Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); - - if (i%2==0) - { - file = "test-rofos-2016_04_0"+i+".log.083512300"; - path = testPath.resolve(file); - FS.touch(path); - Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); - time = time.minus(1,ChronoUnit.DAYS); - } - - file = "unrelated-"+i; - path = testPath.resolve(file); - FS.touch(path); - Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); - - time = time.minus(1,ChronoUnit.DAYS); - } - - ls = testDir.list(); - assertThat(ls.length,is(14)); - assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder( - "test-rofos-2016_04_05.log", - "test-rofos-2016_04_06.log", - "test-rofos-2016_04_07.log", - "test-rofos-2016_04_08.log", - "test-rofos-2016_04_09.log", - "test-rofos-2016_04_10.log", - "test-rofos-2016_04_06.log.083512300", - "test-rofos-2016_04_08.log.083512300", - "test-rofos-2016_04_10.log.083512300", - "unrelated-9", - "unrelated-8", - "unrelated-7", - "unrelated-6", - "unrelated-5" - )); - - rofos.removeOldFiles(now); - ls = testDir.list(); - assertThat(ls.length,is(10)); - assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder( - "test-rofos-2016_04_08.log", - "test-rofos-2016_04_09.log", - "test-rofos-2016_04_10.log", - "test-rofos-2016_04_08.log.083512300", - "test-rofos-2016_04_10.log.083512300", - "unrelated-9", - "unrelated-8", - "unrelated-7", - "unrelated-6", - "unrelated-5")); - - - assertThat(IO.toString(new FileReader(new File(testDir,backup))),is("TICK")); - assertThat(IO.toString(new FileReader(new File(testDir,"test-rofos-2016_04_10.log"))),is("TOCK")); - - } - } - - @Test - public void testRollover() throws Exception - { - File testDir = MavenTestingUtils.getTargetTestingDir(ResourceTest.class.getName()); - FS.ensureEmpty(testDir); - - ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime now = toDateTime("2016.04.10-11:59:55.0 PM AEDT", zone); - - File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); - - try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,0,TimeZone.getTimeZone(zone),null,null,now)) - { - rofos.write("BEFORE".getBytes()); - rofos.flush(); - String[] ls = testDir.list(); - assertThat(ls.length,is(1)); - assertThat(ls[0],is("test-rofos-2016_04_10.log")); - - TimeUnit.SECONDS.sleep(10); - rofos.write("AFTER".getBytes()); - ls = testDir.list(); - assertThat(ls.length,is(2)); - - for (String n : ls) - { - String content = IO.toString(new FileReader(new File(testDir,n))); - if ("test-rofos-2016_04_10.log".equals(n)) - { - assertThat(content,is("BEFORE")); - } - else - { - assertThat(content,is("AFTER")); - } - } - } - } } From 7b8e3bf47cc641d32c802ca6b83484bd0ccb0f83 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 27 Feb 2017 14:20:06 -0700 Subject: [PATCH 013/147] Eliminate time creep in RFOS --- .../java/org/eclipse/jetty/util/RolloverFileOutputStream.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index a5373ca7b07..1f0a9e9181b 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -222,9 +222,8 @@ public class RolloverFileOutputStream extends FilterOutputStream private void scheduleNextRollover() { - long lastMs = midnight.toInstant().toEpochMilli(); midnight = nextMidnight(midnight); - __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - lastMs); + __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - System.currentTimeMillis()); } /* ------------------------------------------------------------ */ From 2d24922383a7443bebe5043a3bfce8148aeb9498 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 13 Apr 2017 09:07:26 -0700 Subject: [PATCH 014/147] Issue #1469 - conforming to java.util.Timer quirks --- .../org/eclipse/jetty/util/RolloverFileOutputStream.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 1f0a9e9181b..35eec26c58b 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -185,8 +185,6 @@ public class RolloverFileOutputStream extends FilterOutputStream if (__rollover==null) __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); - _rollTask=new RollTask(); - midnight = toMidnight(ZonedDateTime.now(), zone.toZoneId()); scheduleNextRollover(); @@ -214,14 +212,12 @@ public class RolloverFileOutputStream extends FilterOutputStream public static ZonedDateTime nextMidnight(ZonedDateTime dateTime) { // Increment to next day. - // Using Calendar.add(DAY, 1) takes in account Daylights Savings - // differences, and still maintains the "midnight" settings for - // Hour, Minute, Second, Milliseconds return dateTime.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(dateTime.getZone()); } private void scheduleNextRollover() { + _rollTask = new RollTask(); midnight = nextMidnight(midnight); __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - System.currentTimeMillis()); } From 15cad7379d81fbc78cf2eefa661c4a9a1ee6edf0 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 27 Apr 2017 10:57:37 +0200 Subject: [PATCH 015/147] Issue #1507 --- .../jetty/util/RolloverFileOutputStream.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 35eec26c58b..698cf2ea686 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -55,6 +55,7 @@ public class RolloverFileOutputStream extends FilterOutputStream final static int ROLLOVER_FILE_RETAIN_DAYS = 31; private RollTask _rollTask; + private ZonedDateTime midnight; private SimpleDateFormat _fileBackupFormat; private SimpleDateFormat _fileDateFormat; @@ -185,9 +186,12 @@ public class RolloverFileOutputStream extends FilterOutputStream if (__rollover==null) __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); - midnight = toMidnight(ZonedDateTime.now(), zone.toZoneId()); + ZonedDateTime now = ZonedDateTime.now(zone.toZoneId()); + midnight = toMidnight(now, zone.toZoneId()); + while (midnight.isBefore(now)) + midnight = nextMidnight(midnight); - scheduleNextRollover(); + scheduleNextRollover(now); } } @@ -215,11 +219,11 @@ public class RolloverFileOutputStream extends FilterOutputStream return dateTime.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(dateTime.getZone()); } - private void scheduleNextRollover() + private void scheduleNextRollover(ZonedDateTime now) { _rollTask = new RollTask(); midnight = nextMidnight(midnight); - __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - System.currentTimeMillis()); + __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli()); } /* ------------------------------------------------------------ */ @@ -284,12 +288,12 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - void removeOldFiles(ZonedDateTime now) + private void removeOldFiles(ZonedDateTime now) { if (_retainDays>0) { - // Establish expiration time, based on configured TimeZone - long expired = now.minus(_retainDays, ChronoUnit.DAYS).toInstant().toEpochMilli(); + now.minus(_retainDays, ChronoUnit.DAYS); + long expired = now.toInstant().toEpochMilli(); File file= new File(_filename); File dir = new File(file.getParent()); @@ -361,13 +365,10 @@ public class RolloverFileOutputStream extends FilterOutputStream { try { - synchronized(RolloverFileOutputStream.class) - { - ZonedDateTime now = ZonedDateTime.now(_fileDateFormat.getTimeZone().toZoneId()); - RolloverFileOutputStream.this.setFile(now); - RolloverFileOutputStream.this.scheduleNextRollover(now); - RolloverFileOutputStream.this.removeOldFiles(now); - } + ZonedDateTime now = ZonedDateTime.now(midnight.getZone()); + RolloverFileOutputStream.this.setFile(); + RolloverFileOutputStream.this.scheduleNextRollover(now); + RolloverFileOutputStream.this.removeOldFiles(now); } catch(Throwable t) { From 6f0cb033e73bb013a5f811623ddd1d0d6b17c717 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 28 Apr 2017 10:25:29 +0200 Subject: [PATCH 016/147] Fixed #1513 sync shared timer --- .../org/eclipse/jetty/util/RolloverFileOutputStream.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 698cf2ea686..030e241fbbd 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -223,7 +223,10 @@ public class RolloverFileOutputStream extends FilterOutputStream { _rollTask = new RollTask(); midnight = nextMidnight(midnight); - __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli()); + synchronized(RolloverFileOutputStream.class) + { + __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli()); + } } /* ------------------------------------------------------------ */ From 01be8566636bc2851350c9b0b1af5612bd53c66a Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 28 Apr 2017 11:01:42 +0200 Subject: [PATCH 017/147] Fixed #1513 back ported some 9.4 changes --- .../jetty/util/RolloverFileOutputStream.java | 51 +++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 030e241fbbd..2e8a5300f6b 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -55,7 +55,7 @@ public class RolloverFileOutputStream extends FilterOutputStream final static int ROLLOVER_FILE_RETAIN_DAYS = 31; private RollTask _rollTask; - private ZonedDateTime midnight; + private ZonedDateTime _midnight; private SimpleDateFormat _fileBackupFormat; private SimpleDateFormat _fileDateFormat; @@ -185,16 +185,16 @@ public class RolloverFileOutputStream extends FilterOutputStream { if (__rollover==null) __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); - - ZonedDateTime now = ZonedDateTime.now(zone.toZoneId()); - midnight = toMidnight(now, zone.toZoneId()); - while (midnight.isBefore(now)) - midnight = nextMidnight(midnight); - + + // Calculate Today's Midnight, based on Configured TimeZone (will be in past, even if by a few milliseconds) + ZonedDateTime now = ZonedDateTime.now(zone.toZoneId()); + _midnight = toMidnight(now, zone.toZoneId()); + // This will schedule the rollover event to the next midnight scheduleNextRollover(now); } } - + + /* ------------------------------------------------------------ */ /** * Get the "start of day" for the provided DateTime at the zone specified. * @@ -206,7 +206,8 @@ public class RolloverFileOutputStream extends FilterOutputStream { return dateTime.toLocalDate().atStartOfDay(zone); } - + + /* ------------------------------------------------------------ */ /** * Get the next "start of day" for the provided date. * @@ -215,18 +216,23 @@ public class RolloverFileOutputStream extends FilterOutputStream */ public static ZonedDateTime nextMidnight(ZonedDateTime dateTime) { - // Increment to next day. + // Increment to next day, based on Configured TimeZone, then find start of that day. + // Will always be in the future, even if the Daylights Savings Time kicks in during + // the calculation. return dateTime.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(dateTime.getZone()); } - + + /* ------------------------------------------------------------ */ private void scheduleNextRollover(ZonedDateTime now) { _rollTask = new RollTask(); - midnight = nextMidnight(midnight); - synchronized(RolloverFileOutputStream.class) - { - __rollover.schedule(_rollTask,midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli()); - } + // Get tomorrow's midnight based on Configured TimeZone + while (_midnight.isBefore(now)) + _midnight = nextMidnight(_midnight); + + long delay = _midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli(); + // Schedule next rollover event to occur, based on local machine's Unix Epoch milliseconds + __rollover.schedule(_rollTask,delay); } /* ------------------------------------------------------------ */ @@ -295,7 +301,7 @@ public class RolloverFileOutputStream extends FilterOutputStream { if (_retainDays>0) { - now.minus(_retainDays, ChronoUnit.DAYS); + // Establish expiration time, based on configured TimeZone long expired = now.toInstant().toEpochMilli(); File file= new File(_filename); @@ -368,10 +374,13 @@ public class RolloverFileOutputStream extends FilterOutputStream { try { - ZonedDateTime now = ZonedDateTime.now(midnight.getZone()); - RolloverFileOutputStream.this.setFile(); - RolloverFileOutputStream.this.scheduleNextRollover(now); - RolloverFileOutputStream.this.removeOldFiles(now); + synchronized(RolloverFileOutputStream.class) + { + ZonedDateTime now = ZonedDateTime.now(_midnight.getZone()); + RolloverFileOutputStream.this.setFile(); + RolloverFileOutputStream.this.scheduleNextRollover(now); + RolloverFileOutputStream.this.removeOldFiles(now); + } } catch(Throwable t) { From 4d8987459dee4def067f358c74d9e857d1195c08 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 28 Apr 2017 11:38:48 +0200 Subject: [PATCH 018/147] Fixed #1513 paranoid cleanup --- .../jetty/util/RolloverFileOutputStream.java | 42 +++++-------------- .../util/RolloverFileOutputStreamTest.java | 11 ++--- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 2e8a5300f6b..0bd56d4cb51 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -24,9 +24,7 @@ import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.SimpleDateFormat; -import java.time.ZoneId; import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; import java.util.Date; import java.util.Locale; import java.util.TimeZone; @@ -55,7 +53,6 @@ public class RolloverFileOutputStream extends FilterOutputStream final static int ROLLOVER_FILE_RETAIN_DAYS = 31; private RollTask _rollTask; - private ZonedDateTime _midnight; private SimpleDateFormat _fileBackupFormat; private SimpleDateFormat _fileDateFormat; @@ -120,7 +117,7 @@ public class RolloverFileOutputStream extends FilterOutputStream TimeZone zone) throws IOException { - this(filename,append,retainDays,zone,null,null,ZonedDateTime.now(zone.toZoneId())); + this(filename,append,retainDays,zone,null,null); } /* ------------------------------------------------------------ */ @@ -187,8 +184,8 @@ public class RolloverFileOutputStream extends FilterOutputStream __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); // Calculate Today's Midnight, based on Configured TimeZone (will be in past, even if by a few milliseconds) - ZonedDateTime now = ZonedDateTime.now(zone.toZoneId()); - _midnight = toMidnight(now, zone.toZoneId()); + ZonedDateTime now = ZonedDateTime.now(zone.toZoneId()); + setFile(now); // This will schedule the rollover event to the next midnight scheduleNextRollover(now); } @@ -198,28 +195,12 @@ public class RolloverFileOutputStream extends FilterOutputStream /** * Get the "start of day" for the provided DateTime at the zone specified. * - * @param dateTime the date time to calculate from - * @param zone the zone to return the date in + * @param now the date time to calculate from * @return start of the day of the date provided */ - public static ZonedDateTime toMidnight(ZonedDateTime dateTime, ZoneId zone) + public static ZonedDateTime toMidnight(ZonedDateTime now) { - return dateTime.toLocalDate().atStartOfDay(zone); - } - - /* ------------------------------------------------------------ */ - /** - * Get the next "start of day" for the provided date. - * - * @param dateTime the date to calculate from - * @return the start of the next day - */ - public static ZonedDateTime nextMidnight(ZonedDateTime dateTime) - { - // Increment to next day, based on Configured TimeZone, then find start of that day. - // Will always be in the future, even if the Daylights Savings Time kicks in during - // the calculation. - return dateTime.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(dateTime.getZone()); + return now.toLocalDate().atStartOfDay(now.getZone()); } /* ------------------------------------------------------------ */ @@ -227,11 +208,10 @@ public class RolloverFileOutputStream extends FilterOutputStream { _rollTask = new RollTask(); // Get tomorrow's midnight based on Configured TimeZone - while (_midnight.isBefore(now)) - _midnight = nextMidnight(_midnight); + ZonedDateTime midnight = toMidnight(now); - long delay = _midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli(); // Schedule next rollover event to occur, based on local machine's Unix Epoch milliseconds + long delay = midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli(); __rollover.schedule(_rollTask,delay); } @@ -256,7 +236,7 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - synchronized void setFile(ZonedDateTime now) + private synchronized void setFile(ZonedDateTime now) throws IOException { // Check directory @@ -376,8 +356,8 @@ public class RolloverFileOutputStream extends FilterOutputStream { synchronized(RolloverFileOutputStream.class) { - ZonedDateTime now = ZonedDateTime.now(_midnight.getZone()); - RolloverFileOutputStream.this.setFile(); + ZonedDateTime now = ZonedDateTime.now(_fileDateFormat.getTimeZone().toZoneId()); + RolloverFileOutputStream.this.setFile(now); RolloverFileOutputStream.this.scheduleNextRollover(now); RolloverFileOutputStream.this.removeOldFiles(now); } diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java index 829f255b527..b68851a43c1 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertThat; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalAccessor; import java.util.TimeZone; @@ -58,7 +59,7 @@ public class RolloverFileOutputStreamTest for (int i = 0; i < expected.length; i++) { long lastMs = nextEvent.toInstant().toEpochMilli(); - nextEvent = RolloverFileOutputStream.nextMidnight(nextEvent); + nextEvent = nextEvent.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(nextEvent.getZone()); assertThat("Next Event", toString(nextEvent), is(expected[i][0])); long duration = (nextEvent.toInstant().toEpochMilli() - lastMs); assertThat("Duration to next event", duration, is((long) expected[i][1])); @@ -71,7 +72,7 @@ public class RolloverFileOutputStreamTest ZoneId zone = toZoneId("PST"); ZonedDateTime initialDate = toDateTime("2016.03.11-01:23:45.0 PM PST", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.03.11-12:00:00.0 AM PST")); Object expected[][] = { @@ -91,7 +92,7 @@ public class RolloverFileOutputStreamTest ZoneId zone = toZoneId("PST"); ZonedDateTime initialDate = toDateTime("2016.11.04-11:22:33.0 AM PDT", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.11.04-12:00:00.0 AM PDT")); Object expected[][] = { @@ -111,7 +112,7 @@ public class RolloverFileOutputStreamTest ZoneId zone = toZoneId("Australia/Sydney"); ZonedDateTime initialDate = toDateTime("2016.10.01-01:23:45.0 PM AEST", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.10.01-12:00:00.0 AM AEST")); Object expected[][] = { @@ -131,7 +132,7 @@ public class RolloverFileOutputStreamTest ZoneId zone = toZoneId("Australia/Sydney"); ZonedDateTime initialDate = toDateTime("2016.04.02-11:22:33.0 AM AEDT", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate, zone); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.04.02-12:00:00.0 AM AEDT")); Object expected[][] = { From 675889a99339cc01e4f96da76cb27495fca06d19 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 2 May 2017 11:47:32 +0200 Subject: [PATCH 019/147] Issues #1513 #1515 Fixed removed of old files. Added test to check file handling --- .../jetty/util/RolloverFileOutputStream.java | 12 +-- .../util/RolloverFileOutputStreamTest.java | 87 ++++++++++++++++++- 2 files changed, 89 insertions(+), 10 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 0bd56d4cb51..98b3ef261ac 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.io.OutputStream; import java.text.SimpleDateFormat; import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; import java.util.Date; import java.util.Locale; import java.util.TimeZone; @@ -117,7 +118,7 @@ public class RolloverFileOutputStream extends FilterOutputStream TimeZone zone) throws IOException { - this(filename,append,retainDays,zone,null,null); + this(filename,append,retainDays,zone,null,null,ZonedDateTime.now(zone.toZoneId())); } /* ------------------------------------------------------------ */ @@ -184,7 +185,6 @@ public class RolloverFileOutputStream extends FilterOutputStream __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); // Calculate Today's Midnight, based on Configured TimeZone (will be in past, even if by a few milliseconds) - ZonedDateTime now = ZonedDateTime.now(zone.toZoneId()); setFile(now); // This will schedule the rollover event to the next midnight scheduleNextRollover(now); @@ -200,7 +200,7 @@ public class RolloverFileOutputStream extends FilterOutputStream */ public static ZonedDateTime toMidnight(ZonedDateTime now) { - return now.toLocalDate().atStartOfDay(now.getZone()); + return now.toLocalDate().atStartOfDay(now.getZone()).plus(1, ChronoUnit.DAYS); } /* ------------------------------------------------------------ */ @@ -236,7 +236,7 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - private synchronized void setFile(ZonedDateTime now) + synchronized void setFile(ZonedDateTime now) throws IOException { // Check directory @@ -277,12 +277,12 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - private void removeOldFiles(ZonedDateTime now) + void removeOldFiles(ZonedDateTime now) { if (_retainDays>0) { // Establish expiration time, based on configured TimeZone - long expired = now.toInstant().toEpochMilli(); + long expired = now.minus(_retainDays, ChronoUnit.DAYS).toInstant().toEpochMilli(); File file= new File(_filename); File dir = new File(file.getParent()); diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java index b68851a43c1..864c9b44876 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java @@ -21,13 +21,23 @@ package org.eclipse.jetty.util; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.FileTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalAccessor; +import java.util.Arrays; import java.util.TimeZone; +import org.eclipse.jetty.toolchain.test.FS; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.eclipse.jetty.util.resource.ResourceTest; +import org.hamcrest.Matchers; import org.junit.Test; public class RolloverFileOutputStreamTest @@ -70,7 +80,7 @@ public class RolloverFileOutputStreamTest public void testMidnightRolloverCalc_PST_DST_Start() { ZoneId zone = toZoneId("PST"); - ZonedDateTime initialDate = toDateTime("2016.03.11-01:23:45.0 PM PST", zone); + ZonedDateTime initialDate = toDateTime("2016.03.10-01:23:45.0 PM PST", zone); ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.03.11-12:00:00.0 AM PST")); @@ -90,7 +100,7 @@ public class RolloverFileOutputStreamTest public void testMidnightRolloverCalc_PST_DST_End() { ZoneId zone = toZoneId("PST"); - ZonedDateTime initialDate = toDateTime("2016.11.04-11:22:33.0 AM PDT", zone); + ZonedDateTime initialDate = toDateTime("2016.11.03-11:22:33.0 AM PDT", zone); ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.11.04-12:00:00.0 AM PDT")); @@ -110,7 +120,7 @@ public class RolloverFileOutputStreamTest public void testMidnightRolloverCalc_Sydney_DST_Start() { ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime initialDate = toDateTime("2016.10.01-01:23:45.0 PM AEST", zone); + ZonedDateTime initialDate = toDateTime("2016.09.31-01:23:45.0 PM AEST", zone); ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.10.01-12:00:00.0 AM AEST")); @@ -130,7 +140,7 @@ public class RolloverFileOutputStreamTest public void testMidnightRolloverCalc_Sydney_DST_End() { ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime initialDate = toDateTime("2016.04.02-11:22:33.0 AM AEDT", zone); + ZonedDateTime initialDate = toDateTime("2016.04.01-11:22:33.0 AM AEDT", zone); ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.04.02-12:00:00.0 AM AEDT")); @@ -145,4 +155,73 @@ public class RolloverFileOutputStreamTest assertSequence(midnight, expected); } + + @Test + public void testFilehandling() throws Exception + { + File testDir = MavenTestingUtils.getTargetTestingDir(ResourceTest.class.getName()); + Path testPath = testDir.toPath(); + FS.ensureEmpty(testDir); + + ZoneId zone = toZoneId("Australia/Sydney"); + ZonedDateTime now = toDateTime("2016.04.10-08:30:12.3 AM AEDT", zone); + + File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); + + try (RolloverFileOutputStream rofos = + new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) + { + String[] ls = testDir.list(); + assertThat(ls.length,is(1)); + assertThat(ls[0],is("test-rofos-2016_04_10.log")); + Files.setLastModifiedTime(testPath.resolve("test-rofos-2016_04_10.log"),FileTime.from(now.toInstant())); + + ZonedDateTime time = now.minus(1,ChronoUnit.DAYS); + for (int i=10;i-->5;) + { + String file = "test-rofos-2016_04_0"+i+".log"; + Path path = testPath.resolve(file); + FS.touch(path); + Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); + time = time.minus(1,ChronoUnit.DAYS); + } + for (int i=10;i-->5;) + { + String file = "unrelated-"+i; + Path path = testPath.resolve(file); + FS.touch(path); + Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); + time = time.minus(1,ChronoUnit.DAYS); + } + + ls = testDir.list(); + assertThat(ls.length,is(11)); + assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder( + "test-rofos-2016_04_05.log", + "test-rofos-2016_04_06.log", + "test-rofos-2016_04_07.log", + "test-rofos-2016_04_08.log", + "test-rofos-2016_04_09.log", + "test-rofos-2016_04_10.log", + "unrelated-9", + "unrelated-8", + "unrelated-7", + "unrelated-6", + "unrelated-5" + )); + + rofos.removeOldFiles(now); + ls = testDir.list(); + assertThat(ls.length,is(8)); + assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder( + "test-rofos-2016_04_08.log", + "test-rofos-2016_04_09.log", + "test-rofos-2016_04_10.log", + "unrelated-9", + "unrelated-8", + "unrelated-7", + "unrelated-6", + "unrelated-5")); + } + } } From c8cd6629d98951271217437ab0d0177301e0613c Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 2 May 2017 12:40:00 +0200 Subject: [PATCH 020/147] Issues #1513 #1515 Fixed and tested backup file --- .../util/RolloverFileOutputStreamTest.java | 100 ++++++++++++++++-- 1 file changed, 89 insertions(+), 11 deletions(-) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java index 864c9b44876..cf3df174efa 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java @@ -22,9 +22,9 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import java.io.File; +import java.io.FileReader; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.nio.file.attribute.FileTime; import java.time.ZoneId; import java.time.ZonedDateTime; @@ -33,6 +33,7 @@ import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalAccessor; import java.util.Arrays; import java.util.TimeZone; +import java.util.concurrent.TimeUnit; import org.eclipse.jetty.toolchain.test.FS; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; @@ -167,13 +168,33 @@ public class RolloverFileOutputStreamTest ZonedDateTime now = toDateTime("2016.04.10-08:30:12.3 AM AEDT", zone); File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); + + try (RolloverFileOutputStream rofos = + new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) + { + rofos.write("TICK".getBytes()); + rofos.flush(); + } + + now = now.plus(5,ChronoUnit.MINUTES); try (RolloverFileOutputStream rofos = new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) { + rofos.write("TOCK".getBytes()); + rofos.flush(); String[] ls = testDir.list(); - assertThat(ls.length,is(1)); - assertThat(ls[0],is("test-rofos-2016_04_10.log")); + assertThat(ls.length,is(2)); + String backup = null; + for (String n: ls) + { + if (!"test-rofos-2016_04_10.log".equals(n)) + backup = n; + } + + assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder(backup,"test-rofos-2016_04_10.log")); + + Files.setLastModifiedTime(testPath.resolve(backup),FileTime.from(now.toInstant())); Files.setLastModifiedTime(testPath.resolve("test-rofos-2016_04_10.log"),FileTime.from(now.toInstant())); ZonedDateTime time = now.minus(1,ChronoUnit.DAYS); @@ -183,19 +204,26 @@ public class RolloverFileOutputStreamTest Path path = testPath.resolve(file); FS.touch(path); Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); - time = time.minus(1,ChronoUnit.DAYS); - } - for (int i=10;i-->5;) - { - String file = "unrelated-"+i; - Path path = testPath.resolve(file); + + if (i%2==0) + { + file = "test-rofos-2016_04_0"+i+".log.083512300"; + path = testPath.resolve(file); + FS.touch(path); + Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); + time = time.minus(1,ChronoUnit.DAYS); + } + + file = "unrelated-"+i; + path = testPath.resolve(file); FS.touch(path); Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); + time = time.minus(1,ChronoUnit.DAYS); } ls = testDir.list(); - assertThat(ls.length,is(11)); + assertThat(ls.length,is(14)); assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder( "test-rofos-2016_04_05.log", "test-rofos-2016_04_06.log", @@ -203,6 +231,9 @@ public class RolloverFileOutputStreamTest "test-rofos-2016_04_08.log", "test-rofos-2016_04_09.log", "test-rofos-2016_04_10.log", + "test-rofos-2016_04_06.log.083512300", + "test-rofos-2016_04_08.log.083512300", + "test-rofos-2016_04_10.log.083512300", "unrelated-9", "unrelated-8", "unrelated-7", @@ -212,16 +243,63 @@ public class RolloverFileOutputStreamTest rofos.removeOldFiles(now); ls = testDir.list(); - assertThat(ls.length,is(8)); + assertThat(ls.length,is(10)); assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder( "test-rofos-2016_04_08.log", "test-rofos-2016_04_09.log", "test-rofos-2016_04_10.log", + "test-rofos-2016_04_08.log.083512300", + "test-rofos-2016_04_10.log.083512300", "unrelated-9", "unrelated-8", "unrelated-7", "unrelated-6", "unrelated-5")); + + + assertThat(IO.toString(new FileReader(new File(testDir,backup))),is("TICK")); + assertThat(IO.toString(new FileReader(new File(testDir,"test-rofos-2016_04_10.log"))),is("TOCK")); + + } + } + + @Test + public void testRollover() throws Exception + { + File testDir = MavenTestingUtils.getTargetTestingDir(ResourceTest.class.getName()); + FS.ensureEmpty(testDir); + + ZoneId zone = toZoneId("Australia/Sydney"); + ZonedDateTime now = toDateTime("2016.04.10-11:59:55.0 PM AEDT", zone); + + File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); + + try (RolloverFileOutputStream rofos = + new RolloverFileOutputStream(template.getAbsolutePath(),false,0,TimeZone.getTimeZone(zone),null,null,now)) + { + rofos.write("BEFORE".getBytes()); + rofos.flush(); + String[] ls = testDir.list(); + assertThat(ls.length,is(1)); + assertThat(ls[0],is("test-rofos-2016_04_10.log")); + + TimeUnit.SECONDS.sleep(10); + rofos.write("AFTER".getBytes()); + ls = testDir.list(); + assertThat(ls.length,is(2)); + + for (String n : ls) + { + String content = IO.toString(new FileReader(new File(testDir,n))); + if ("test-rofos-2016_04_10.log".equals(n)) + { + assertThat(content,is("BEFORE")); + } + else + { + assertThat(content,is("AFTER")); + } + } } } } From 806dff64f39ea24151a650ecacf9652162b869ba Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 2 Jun 2017 11:33:42 -0700 Subject: [PATCH 021/147] Issue #1590 - Revert Java 8 class usage back to Java 7 limits --- .../jetty/util/RolloverFileOutputStream.java | 67 +++++---- .../util/RolloverFileOutputStreamTest.java | 141 ++++++++++-------- 2 files changed, 114 insertions(+), 94 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index 98b3ef261ac..f90be361b39 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -24,9 +24,7 @@ import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.SimpleDateFormat; -import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; -import java.util.Date; +import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; import java.util.Timer; @@ -52,12 +50,13 @@ public class RolloverFileOutputStream extends FilterOutputStream final static String ROLLOVER_FILE_DATE_FORMAT = "yyyy_MM_dd"; final static String ROLLOVER_FILE_BACKUP_FORMAT = "HHmmssSSS"; final static int ROLLOVER_FILE_RETAIN_DAYS = 31; - + private RollTask _rollTask; private SimpleDateFormat _fileBackupFormat; private SimpleDateFormat _fileDateFormat; - - private String _filename; + + private final TimeZone _timeZone; + private final String _filename; private File _file; private boolean _append; private int _retainDays; @@ -118,7 +117,7 @@ public class RolloverFileOutputStream extends FilterOutputStream TimeZone zone) throws IOException { - this(filename,append,retainDays,zone,null,null,ZonedDateTime.now(zone.toZoneId())); + this(filename,append,retainDays,zone,null,null); } /* ------------------------------------------------------------ */ @@ -140,20 +139,21 @@ public class RolloverFileOutputStream extends FilterOutputStream String backupFormat) throws IOException { - this(filename,append,retainDays,zone,dateFormat,backupFormat,ZonedDateTime.now(zone.toZoneId())); + this(filename,append,retainDays,zone,dateFormat,backupFormat,Calendar.getInstance(zone)); } - RolloverFileOutputStream(String filename, boolean append, int retainDays, TimeZone zone, String dateFormat, String backupFormat, - ZonedDateTime now) + Calendar now) throws IOException { super(null); + + _timeZone = zone; if (dateFormat==null) dateFormat=ROLLOVER_FILE_DATE_FORMAT; @@ -174,8 +174,9 @@ public class RolloverFileOutputStream extends FilterOutputStream } if (filename==null) throw new IllegalArgumentException("Invalid filename"); - - _filename=filename; + + File testfile = new File(filename); + _filename=testfile.getCanonicalPath(); _append=append; _retainDays=retainDays; @@ -185,7 +186,7 @@ public class RolloverFileOutputStream extends FilterOutputStream __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); // Calculate Today's Midnight, based on Configured TimeZone (will be in past, even if by a few milliseconds) - setFile(now); + setFile(now); // This will schedule the rollover event to the next midnight scheduleNextRollover(now); } @@ -195,23 +196,32 @@ public class RolloverFileOutputStream extends FilterOutputStream /** * Get the "start of day" for the provided DateTime at the zone specified. * - * @param now the date time to calculate from + * @param cal the date time to calculate from * @return start of the day of the date provided */ - public static ZonedDateTime toMidnight(ZonedDateTime now) + public static Calendar toMidnight(Calendar cal) { - return now.toLocalDate().atStartOfDay(now.getZone()).plus(1, ChronoUnit.DAYS); + Calendar ret = Calendar.getInstance(); + ret.setTimeZone(cal.getTimeZone()); + ret.setTime(cal.getTime()); + ret.set(Calendar.HOUR_OF_DAY, 0); + ret.set(Calendar.MINUTE, 0); + ret.set(Calendar.SECOND, 0); + ret.set(Calendar.MILLISECOND, 0); + // next days midnight + ret.add(Calendar.DAY_OF_MONTH, 1); + return ret; } /* ------------------------------------------------------------ */ - private void scheduleNextRollover(ZonedDateTime now) + private void scheduleNextRollover(Calendar now) { _rollTask = new RollTask(); - // Get tomorrow's midnight based on Configured TimeZone - ZonedDateTime midnight = toMidnight(now); + // Establish next day's midnight of provided calendar + Calendar midnight = toMidnight(now); // Schedule next rollover event to occur, based on local machine's Unix Epoch milliseconds - long delay = midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli(); + long delay = midnight.getTimeInMillis() - now.getTimeInMillis(); __rollover.schedule(_rollTask,delay); } @@ -236,13 +246,11 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - synchronized void setFile(ZonedDateTime now) + synchronized void setFile(Calendar now) throws IOException { // Check directory - File file = new File(_filename); - _filename=file.getCanonicalPath(); - file=new File(_filename); + File file=new File(_filename); File dir= new File(file.getParent()); if (!dir.isDirectory() || !dir.canWrite()) throw new IOException("Cannot write log directory "+dir); @@ -254,7 +262,7 @@ public class RolloverFileOutputStream extends FilterOutputStream { file=new File(dir, filename.substring(0,i)+ - _fileDateFormat.format(new Date(now.toInstant().toEpochMilli()))+ + _fileDateFormat.format(now.getTime()) + filename.substring(i+YYYY_MM_DD.length())); } @@ -267,7 +275,7 @@ public class RolloverFileOutputStream extends FilterOutputStream // Yep _file=file; if (!_append && file.exists()) - file.renameTo(new File(file.toString()+"."+_fileBackupFormat.format(new Date(now.toInstant().toEpochMilli())))); + file.renameTo(new File(file.toString()+"."+_fileBackupFormat.format(now.getTime()))); OutputStream oldOut=out; out=new FileOutputStream(file.toString(),_append); if (oldOut!=null) @@ -277,12 +285,13 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - void removeOldFiles(ZonedDateTime now) + void removeOldFiles(Calendar now) { if (_retainDays>0) { // Establish expiration time, based on configured TimeZone - long expired = now.minus(_retainDays, ChronoUnit.DAYS).toInstant().toEpochMilli(); + now.add(Calendar.DAY_OF_MONTH, (-1)*_retainDays); + long expired = now.getTimeInMillis(); File file= new File(_filename); File dir = new File(file.getParent()); @@ -356,7 +365,7 @@ public class RolloverFileOutputStream extends FilterOutputStream { synchronized(RolloverFileOutputStream.class) { - ZonedDateTime now = ZonedDateTime.now(_fileDateFormat.getTimeZone().toZoneId()); + Calendar now = Calendar.getInstance(_timeZone); RolloverFileOutputStream.this.setFile(now); RolloverFileOutputStream.this.scheduleNextRollover(now); RolloverFileOutputStream.this.removeOldFiles(now); diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java index cf3df174efa..9ee1410fc8d 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java @@ -26,64 +26,70 @@ import java.io.FileReader; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.attribute.FileTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.time.temporal.ChronoUnit; -import java.time.temporal.TemporalAccessor; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; import java.util.TimeZone; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.toolchain.test.FS; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.eclipse.jetty.util.resource.ResourceTest; +import org.eclipse.jetty.toolchain.test.TestingDir; import org.hamcrest.Matchers; +import org.junit.Rule; import org.junit.Test; public class RolloverFileOutputStreamTest { - private static ZoneId toZoneId(String timezoneId) + @Rule + public TestingDir testingDir = new TestingDir(); + + private static TimeZone toZoneId(String timezoneId) { - ZoneId zone = TimeZone.getTimeZone(timezoneId).toZoneId(); - // System.out.printf(".toZoneId(\"%s\") = [id=%s,normalized=%s]%n", timezoneId, zone.getId(), zone.normalized()); + TimeZone zone = TimeZone.getTimeZone(timezoneId); + // System.err.printf("toZoneId('%s'): displayName=%s, id=%s%n", timezoneId, zone.getDisplayName(), zone.getID()); return zone; } - private static ZonedDateTime toDateTime(String timendate, ZoneId zone) + private static Calendar toDateTime(String timendate, TimeZone zone) throws ParseException { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd-hh:mm:ss.S a z") - .withZone(zone); - return ZonedDateTime.parse(timendate, formatter); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd-hh:mm:ss.S a z"); + formatter.setTimeZone(zone); + Date parsed = formatter.parse(timendate); + Calendar cal = Calendar.getInstance(zone); + cal.setTime(parsed); + return cal; } - private static String toString(TemporalAccessor date) + private static String toString(Calendar date) { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd-hh:mm:ss.S a z"); - return formatter.format(date); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd-hh:mm:ss.S a z"); + formatter.setTimeZone(date.getTimeZone()); + return formatter.format(date.getTime()); } - private void assertSequence(ZonedDateTime midnight, Object[][] expected) + private void assertSequence(Calendar midnight, Object[][] expected) { - ZonedDateTime nextEvent = midnight; + Calendar nextEvent = midnight; for (int i = 0; i < expected.length; i++) { - long lastMs = nextEvent.toInstant().toEpochMilli(); - nextEvent = nextEvent.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(nextEvent.getZone()); + long lastMs = nextEvent.getTimeInMillis(); + nextEvent = RolloverFileOutputStream.toMidnight(nextEvent); assertThat("Next Event", toString(nextEvent), is(expected[i][0])); - long duration = (nextEvent.toInstant().toEpochMilli() - lastMs); + long duration = (nextEvent.getTimeInMillis() - lastMs); assertThat("Duration to next event", duration, is((long) expected[i][1])); } } @Test - public void testMidnightRolloverCalc_PST_DST_Start() + public void testMidnightRolloverCalc_PST_DST_Start() throws ParseException { - ZoneId zone = toZoneId("PST"); - ZonedDateTime initialDate = toDateTime("2016.03.10-01:23:45.0 PM PST", zone); + TimeZone zone = toZoneId("PST"); + Calendar initialDate = toDateTime("2016.03.10-01:23:45.0 PM PST", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.03.11-12:00:00.0 AM PST")); Object expected[][] = { @@ -98,12 +104,12 @@ public class RolloverFileOutputStreamTest } @Test - public void testMidnightRolloverCalc_PST_DST_End() + public void testMidnightRolloverCalc_PST_DST_End() throws ParseException { - ZoneId zone = toZoneId("PST"); - ZonedDateTime initialDate = toDateTime("2016.11.03-11:22:33.0 AM PDT", zone); + TimeZone zone = toZoneId("PST"); + Calendar initialDate = toDateTime("2016.11.03-11:22:33.0 AM PDT", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.11.04-12:00:00.0 AM PDT")); Object expected[][] = { @@ -118,12 +124,12 @@ public class RolloverFileOutputStreamTest } @Test - public void testMidnightRolloverCalc_Sydney_DST_Start() + public void testMidnightRolloverCalc_Sydney_DST_Start() throws ParseException { - ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime initialDate = toDateTime("2016.09.31-01:23:45.0 PM AEST", zone); + TimeZone zone = toZoneId("Australia/Sydney"); + Calendar initialDate = toDateTime("2016.09.30-01:23:45.0 PM AEST", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.10.01-12:00:00.0 AM AEST")); Object expected[][] = { @@ -138,12 +144,12 @@ public class RolloverFileOutputStreamTest } @Test - public void testMidnightRolloverCalc_Sydney_DST_End() + public void testMidnightRolloverCalc_Sydney_DST_End() throws ParseException { - ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime initialDate = toDateTime("2016.04.01-11:22:33.0 AM AEDT", zone); + TimeZone zone = toZoneId("Australia/Sydney"); + Calendar initialDate = toDateTime("2016.04.01-11:22:33.0 AM AEDT", zone); - ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.04.02-12:00:00.0 AM AEDT")); Object expected[][] = { @@ -158,28 +164,28 @@ public class RolloverFileOutputStreamTest } @Test - public void testFilehandling() throws Exception + public void testFileHandling() throws Exception { - File testDir = MavenTestingUtils.getTargetTestingDir(ResourceTest.class.getName()); + File testDir = testingDir.getEmptyPathDir().toFile(); Path testPath = testDir.toPath(); FS.ensureEmpty(testDir); - - ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime now = toDateTime("2016.04.10-08:30:12.3 AM AEDT", zone); + + TimeZone zone = toZoneId("Australia/Sydney"); + Calendar now = toDateTime("2016.04.10-08:30:12.3 AM AEST", zone); File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) + new RolloverFileOutputStream(template.getAbsolutePath(),false,3,zone,null,null,now)) { rofos.write("TICK".getBytes()); rofos.flush(); } - now = now.plus(5,ChronoUnit.MINUTES); + now.add(Calendar.MINUTE, 5); try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) + new RolloverFileOutputStream(template.getAbsolutePath(),false,3,zone,null,null,now)) { rofos.write("TOCK".getBytes()); rofos.flush(); @@ -194,32 +200,37 @@ public class RolloverFileOutputStreamTest assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder(backup,"test-rofos-2016_04_10.log")); - Files.setLastModifiedTime(testPath.resolve(backup),FileTime.from(now.toInstant())); - Files.setLastModifiedTime(testPath.resolve("test-rofos-2016_04_10.log"),FileTime.from(now.toInstant())); + Files.setLastModifiedTime(testPath.resolve(backup),FileTime.fromMillis(now.getTimeInMillis())); + Files.setLastModifiedTime(testPath.resolve("test-rofos-2016_04_10.log"),FileTime.fromMillis(now.getTimeInMillis())); - ZonedDateTime time = now.minus(1,ChronoUnit.DAYS); + // Copy calendar (don't want to change "now") + Calendar time = Calendar.getInstance(); + time.setTimeZone(now.getTimeZone()); + time.setTime(now.getTime()); + time.add(Calendar.DAY_OF_MONTH, -1); + for (int i=10;i-->5;) { String file = "test-rofos-2016_04_0"+i+".log"; Path path = testPath.resolve(file); FS.touch(path); - Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); + Files.setLastModifiedTime(path,FileTime.fromMillis(time.getTimeInMillis())); if (i%2==0) { file = "test-rofos-2016_04_0"+i+".log.083512300"; path = testPath.resolve(file); FS.touch(path); - Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); - time = time.minus(1,ChronoUnit.DAYS); + Files.setLastModifiedTime(path,FileTime.fromMillis(time.getTimeInMillis())); + time.add(Calendar.DAY_OF_MONTH, -1); } file = "unrelated-"+i; path = testPath.resolve(file); FS.touch(path); - Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); - - time = time.minus(1,ChronoUnit.DAYS); + Files.setLastModifiedTime(path,FileTime.fromMillis(time.getTimeInMillis())); + + time.add(Calendar.DAY_OF_MONTH, -1); } ls = testDir.list(); @@ -231,9 +242,9 @@ public class RolloverFileOutputStreamTest "test-rofos-2016_04_08.log", "test-rofos-2016_04_09.log", "test-rofos-2016_04_10.log", - "test-rofos-2016_04_06.log.083512300", - "test-rofos-2016_04_08.log.083512300", - "test-rofos-2016_04_10.log.083512300", + "test-rofos-2016_04_06.log.083512300", + "test-rofos-2016_04_08.log.083512300", + "test-rofos-2016_04_10.log.083512003", "unrelated-9", "unrelated-8", "unrelated-7", @@ -249,7 +260,7 @@ public class RolloverFileOutputStreamTest "test-rofos-2016_04_09.log", "test-rofos-2016_04_10.log", "test-rofos-2016_04_08.log.083512300", - "test-rofos-2016_04_10.log.083512300", + "test-rofos-2016_04_10.log.083512003", "unrelated-9", "unrelated-8", "unrelated-7", @@ -266,16 +277,16 @@ public class RolloverFileOutputStreamTest @Test public void testRollover() throws Exception { - File testDir = MavenTestingUtils.getTargetTestingDir(ResourceTest.class.getName()); + File testDir = testingDir.getEmptyPathDir().toFile(); FS.ensureEmpty(testDir); - - ZoneId zone = toZoneId("Australia/Sydney"); - ZonedDateTime now = toDateTime("2016.04.10-11:59:55.0 PM AEDT", zone); + + TimeZone zone = toZoneId("Australia/Sydney"); + Calendar now = toDateTime("2016.04.10-11:59:58.0 PM AEST", zone); File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,0,TimeZone.getTimeZone(zone),null,null,now)) + new RolloverFileOutputStream(template.getAbsolutePath(),false,0,zone,null,null,now)) { rofos.write("BEFORE".getBytes()); rofos.flush(); @@ -283,7 +294,7 @@ public class RolloverFileOutputStreamTest assertThat(ls.length,is(1)); assertThat(ls[0],is("test-rofos-2016_04_10.log")); - TimeUnit.SECONDS.sleep(10); + TimeUnit.SECONDS.sleep(5); rofos.write("AFTER".getBytes()); ls = testDir.list(); assertThat(ls.length,is(2)); From 4ce42c19ec1f4853ab7c85171dae68c89cda4aa9 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Mon, 5 Jun 2017 21:29:59 +1000 Subject: [PATCH 022/147] unit test must not force a maven repository path #1574 Signed-off-by: olivier lamy --- jetty-util/pom.xml | 133 ++++++++++-------- .../org/eclipse/jetty/util/TypeUtilTest.java | 7 +- 2 files changed, 79 insertions(+), 61 deletions(-) diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index f03ba368d76..a06d6881886 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -1,60 +1,73 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-util - Jetty :: Utilities - Utility classes for Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.util - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.util.* - - - - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.toolchain - jetty-perf-helper - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.slf4j - slf4j-api - provided - true - - - - org.slf4j - slf4j-jdk14 - ${slf4j-version} - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.6-SNAPSHOT + + 4.0.0 + jetty-util + Jetty :: Utilities + Utility classes for Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.util + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.util.* + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${settings.localRepository} + + + + + + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.toolchain + jetty-perf-helper + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.slf4j + slf4j-api + provided + true + + + + org.slf4j + slf4j-jdk14 + ${slf4j-version} + test + + + diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java index 6c630e9e3dd..032cae7c313 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java @@ -24,6 +24,9 @@ import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test; +import java.nio.file.Path; +import java.nio.file.Paths; + public class TypeUtilTest { @Test @@ -125,8 +128,10 @@ public class TypeUtilTest @Test public void testGetLocationOfClass() throws Exception { + Path mavenRepoPath = Paths.get( System.getProperty( "mavenRepoPath" ) ); + String mavenRepo = mavenRepoPath.toFile().getPath(); // Classes from maven dependencies - Assert.assertThat(TypeUtil.getLocationOfClass(Assert.class).toASCIIString(),Matchers.containsString("/repository/")); + Assert.assertThat(TypeUtil.getLocationOfClass(Assert.class).toASCIIString(),Matchers.containsString(mavenRepo)); // Class from project dependencies Assert.assertThat(TypeUtil.getLocationOfClass(TypeUtil.class).toASCIIString(),Matchers.containsString("/classes/")); From 88617b9233d4201885eec837c8fc213a7bcfd171 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 5 Jun 2017 18:07:29 +0200 Subject: [PATCH 023/147] Fixes #1595 - Avoid sending unnecessary stream WINDOW_UPDATE frames. Now the flow control strategy checks whether the stream is already remotely closed, and if so it does not send the window update. --- .../http2/client/FlowControlStrategyTest.java | 77 ++++++++++++++- .../http2/BufferingFlowControlStrategy.java | 4 +- .../org/eclipse/jetty/http2/HTTP2Session.java | 98 ++++++++++--------- .../org/eclipse/jetty/http2/HTTP2Stream.java | 1 + .../java/org/eclipse/jetty/http2/IStream.java | 6 ++ .../http2/SimpleFlowControlStrategy.java | 4 +- 6 files changed, 136 insertions(+), 54 deletions(-) diff --git a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlStrategyTest.java b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlStrategyTest.java index 247e9ff4a45..4522965c33e 100644 --- a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlStrategyTest.java +++ b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/FlowControlStrategyTest.java @@ -37,13 +37,16 @@ import org.eclipse.jetty.http.HostPortHttpField; import org.eclipse.jetty.http.HttpFields; import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpScheme; +import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpVersion; import org.eclipse.jetty.http.MetaData; +import org.eclipse.jetty.http2.BufferingFlowControlStrategy; import org.eclipse.jetty.http2.ErrorCode; import org.eclipse.jetty.http2.FlowControlStrategy; import org.eclipse.jetty.http2.HTTP2Session; import org.eclipse.jetty.http2.HTTP2Stream; import org.eclipse.jetty.http2.ISession; +import org.eclipse.jetty.http2.IStream; import org.eclipse.jetty.http2.api.Session; import org.eclipse.jetty.http2.api.Stream; import org.eclipse.jetty.http2.api.server.ServerSessionListener; @@ -52,6 +55,7 @@ import org.eclipse.jetty.http2.frames.GoAwayFrame; import org.eclipse.jetty.http2.frames.HeadersFrame; import org.eclipse.jetty.http2.frames.ResetFrame; import org.eclipse.jetty.http2.frames.SettingsFrame; +import org.eclipse.jetty.http2.frames.WindowUpdateFrame; import org.eclipse.jetty.http2.server.RawHTTP2ServerConnectionFactory; import org.eclipse.jetty.io.ByteBufferPool; import org.eclipse.jetty.server.HttpConfiguration; @@ -845,7 +849,7 @@ public abstract class FlowControlStrategyTest { return InvocationType.NON_BLOCKING; } - + @Override public void succeeded() { @@ -916,7 +920,7 @@ public abstract class FlowControlStrategyTest { return InvocationType.NON_BLOCKING; } - + @Override public void succeeded() { @@ -997,7 +1001,7 @@ public abstract class FlowControlStrategyTest { return InvocationType.NON_BLOCKING; } - + @Override public void failed(Throwable x) { @@ -1008,4 +1012,71 @@ public abstract class FlowControlStrategyTest Assert.assertTrue(resetLatch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(dataLatch.await(5, TimeUnit.SECONDS)); } + + @Test + public void testNoWindowUpdateForRemotelyClosedStream() throws Exception + { + List callbacks = new ArrayList<>(); + start(new ServerSessionListener.Adapter() + { + @Override + public Stream.Listener onNewStream(Stream stream, HeadersFrame frame) + { + return new Stream.Listener.Adapter() + { + @Override + public void onData(Stream stream, DataFrame frame, Callback callback) + { + callbacks.add(callback); + if (frame.isEndStream()) + { + // Succeed the callbacks when the stream is already remotely closed. + callbacks.forEach(Callback::succeeded); + MetaData.Response response = new MetaData.Response(HttpVersion.HTTP_2, HttpStatus.OK_200, new HttpFields()); + stream.headers(new HeadersFrame(stream.getId(), response, null, true), Callback.NOOP); + } + } + }; + } + }); + + List sessionWindowUpdates = new ArrayList<>(); + List streamWindowUpdates = new ArrayList<>(); + client.setFlowControlStrategyFactory(() -> new BufferingFlowControlStrategy(0.5F) + { + @Override + public void onWindowUpdate(ISession session, IStream stream, WindowUpdateFrame frame) + { + if (frame.getStreamId() == 0) + sessionWindowUpdates.add(frame); + else + streamWindowUpdates.add(frame); + super.onWindowUpdate(session, stream, frame); + } + }); + + Session session = newClient(new Session.Listener.Adapter()); + MetaData.Request metaData = newRequest("POST", new HttpFields()); + HeadersFrame frame = new HeadersFrame(metaData, null, false); + FuturePromise streamPromise = new FuturePromise<>(); + CountDownLatch latch = new CountDownLatch(1); + session.newStream(frame, streamPromise, new Stream.Listener.Adapter() + { + @Override + public void onHeaders(Stream stream, HeadersFrame frame) + { + if (frame.isEndStream()) + latch.countDown(); + } + }); + Stream stream = streamPromise.get(5, TimeUnit.SECONDS); + + ByteBuffer data = ByteBuffer.allocate(FlowControlStrategy.DEFAULT_WINDOW_SIZE - 1); + stream.data(new DataFrame(stream.getId(), data, true), Callback.NOOP); + + Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); + + Assert.assertTrue(sessionWindowUpdates.size() > 0); + Assert.assertEquals(0, streamWindowUpdates.size()); + } } diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/BufferingFlowControlStrategy.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/BufferingFlowControlStrategy.java index 85db949aa09..92bbc878a44 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/BufferingFlowControlStrategy.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/BufferingFlowControlStrategy.java @@ -130,10 +130,10 @@ public class BufferingFlowControlStrategy extends AbstractFlowControlStrategy Frame[] windowFrames = Frame.EMPTY_ARRAY; if (stream != null) { - if (stream.isClosed()) + if (stream.isRemotelyClosed()) { if (LOG.isDebugEnabled()) - LOG.debug("Data consumed, {} bytes, ignoring update stream recv window for closed {}", length, stream); + LOG.debug("Data consumed, {} bytes, ignoring update stream recv window for remotely closed {}", length, stream); } else { diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java index dcff424d72e..7859c238946 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Session.java @@ -243,6 +243,12 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio complete(); } + @Override + public InvocationType getInvocationType() + { + return InvocationType.NON_BLOCKING; + } + private void complete() { notIdle(); @@ -398,14 +404,14 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio /** * This method is called when receiving a GO_AWAY from the other peer. * We check the close state to act appropriately: - * - * * NOT_CLOSED: we move to REMOTELY_CLOSED and queue a disconnect, so - * that the content of the queue is written, and then the connection - * closed. We notify the application after being terminated. - * See HTTP2Session.ControlEntry#succeeded() - * - * * In all other cases, we do nothing since other methods are already - * performing their actions. + *
    + *
  • NOT_CLOSED: we move to REMOTELY_CLOSED and queue a disconnect, so + * that the content of the queue is written, and then the connection + * closed. We notify the application after being terminated. + * See HTTP2Session.ControlEntry#succeeded()
  • + *
  • In all other cases, we do nothing since other methods are already + * performing their actions.
  • + *
* * @param frame the GO_AWAY frame that has been received. * @see #close(int, String, Callback) @@ -567,21 +573,21 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio /** * Invoked internally and by applications to send a GO_AWAY frame to the * other peer. We check the close state to act appropriately: + *
    + *
  • NOT_CLOSED: we move to LOCALLY_CLOSED and queue a GO_AWAY. When the + * GO_AWAY has been written, it will only cause the output to be shut + * down (not the connection closed), so that the application can still + * read frames arriving from the other peer. + * Ideally the other peer will notice the GO_AWAY and close the connection. + * When that happen, we close the connection from {@link #onShutdown()}. + * Otherwise, the idle timeout mechanism will close the connection, see + * {@link #onIdleTimeout()}.
  • + *
  • In all other cases, we do nothing since other methods are already + * performing their actions.
  • + *
* - * * NOT_CLOSED: we move to LOCALLY_CLOSED and queue a GO_AWAY. When the - * GO_AWAY has been written, it will only cause the output to be shut - * down (not the connection closed), so that the application can still - * read frames arriving from the other peer. - * Ideally the other peer will notice the GO_AWAY and close the connection. - * When that happen, we close the connection from {@link #onShutdown()}. - * Otherwise, the idle timeout mechanism will close the connection, see - * {@link #onIdleTimeout()}. - * - * * In all other cases, we do nothing since other methods are already - * performing their actions. - * - * @param error the error code - * @param reason the reason + * @param error the error code + * @param reason the reason * @param callback the callback to invoke when the operation is complete * @see #onGoAway(GoAwayFrame) * @see #onShutdown() @@ -841,19 +847,18 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio * A typical close by a remote peer involves a GO_AWAY frame followed by TCP FIN. * This method is invoked when the TCP FIN is received, or when an exception is * thrown while reading, and we check the close state to act appropriately: - * - * * NOT_CLOSED: means that the remote peer did not send a GO_AWAY (abrupt close) - * or there was an exception while reading, and therefore we terminate. - * - * * LOCALLY_CLOSED: we have sent the GO_AWAY to the remote peer, which received - * it and closed the connection; we queue a disconnect to close the connection - * on the local side. - * The GO_AWAY just shutdown the output, so we need this step to make sure the - * connection is closed. See {@link #close(int, String, Callback)}. - * - * * REMOTELY_CLOSED: we received the GO_AWAY, and the TCP FIN afterwards, so we - * do nothing since the handling of the GO_AWAY will take care of closing the - * connection. See {@link #onGoAway(GoAwayFrame)}. + *
    + *
  • NOT_CLOSED: means that the remote peer did not send a GO_AWAY (abrupt close) + * or there was an exception while reading, and therefore we terminate.
  • + *
  • LOCALLY_CLOSED: we have sent the GO_AWAY to the remote peer, which received + * it and closed the connection; we queue a disconnect to close the connection + * on the local side. + * The GO_AWAY just shutdown the output, so we need this step to make sure the + * connection is closed. See {@link #close(int, String, Callback)}.
  • + *
  • REMOTELY_CLOSED: we received the GO_AWAY, and the TCP FIN afterwards, so we + * do nothing since the handling of the GO_AWAY will take care of closing the + * connection. See {@link #onGoAway(GoAwayFrame)}.
  • + *
* * @see #onGoAway(GoAwayFrame) * @see #close(int, String, Callback) @@ -898,18 +903,17 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio /** * This method is invoked when the idle timeout triggers. We check the close state * to act appropriately: - * - * * NOT_CLOSED: it's a real idle timeout, we just initiate a close, see - * {@link #close(int, String, Callback)}. - * - * * LOCALLY_CLOSED: we have sent a GO_AWAY and only shutdown the output, but the - * other peer did not close the connection so we never received the TCP FIN, and - * therefore we terminate. - * - * * REMOTELY_CLOSED: the other peer sent us a GO_AWAY, we should have queued a - * disconnect, but for some reason it was not processed (for example, queue was - * stuck because of TCP congestion), therefore we terminate. - * See {@link #onGoAway(GoAwayFrame)}. + *
    + *
  • NOT_CLOSED: it's a real idle timeout, we just initiate a close, see + * {@link #close(int, String, Callback)}.
  • + *
  • LOCALLY_CLOSED: we have sent a GO_AWAY and only shutdown the output, but the + * other peer did not close the connection so we never received the TCP FIN, and + * therefore we terminate.
  • + *
  • REMOTELY_CLOSED: the other peer sent us a GO_AWAY, we should have queued a + * disconnect, but for some reason it was not processed (for example, queue was + * stuck because of TCP congestion), therefore we terminate. + * See {@link #onGoAway(GoAwayFrame)}.
  • + *
* * @return true if the session should be closed, false otherwise * @see #onGoAway(GoAwayFrame) diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Stream.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Stream.java index 6572f312195..7ffdc476d39 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Stream.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Stream.java @@ -152,6 +152,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback return closeState.get() == CloseState.CLOSED; } + @Override public boolean isRemotelyClosed() { return closeState.get() == CloseState.REMOTELY_CLOSED; diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/IStream.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/IStream.java index 6137dfe8625..e69195082a8 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/IStream.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/IStream.java @@ -105,4 +105,10 @@ public interface IStream extends Stream, Closeable * {@link #getIdleTimeout() idle timeout} is postponed.

*/ public void notIdle(); + + /** + * @return whether the stream is closed remotely. + * @see #isClosed() + */ + boolean isRemotelyClosed(); } diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/SimpleFlowControlStrategy.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/SimpleFlowControlStrategy.java index 92c0defde38..04774d660a5 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/SimpleFlowControlStrategy.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/SimpleFlowControlStrategy.java @@ -52,10 +52,10 @@ public class SimpleFlowControlStrategy extends AbstractFlowControlStrategy Frame[] streamFrame = Frame.EMPTY_ARRAY; if (stream != null) { - if (stream.isClosed()) + if (stream.isRemotelyClosed()) { if (LOG.isDebugEnabled()) - LOG.debug("Data consumed, ignoring update stream recv window by {} for closed {}", length, stream); + LOG.debug("Data consumed, ignoring update stream recv window by {} for remotely closed {}", length, stream); } else { From 58a4d9e115f8bc84ca9e2f548c01344ce347c444 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 6 Jun 2017 10:06:48 +0200 Subject: [PATCH 024/147] Fixes #1592 bad compressed etag comparison --- .../java/org/eclipse/jetty/http/CompressedContentFormat.java | 4 ++-- .../java/org/eclipse/jetty/servlet/DefaultServletTest.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java b/jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java index 65cdd9b8089..4420e2056e0 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java @@ -61,8 +61,8 @@ public class CompressedContentFormat return true; int dashdash = tag.indexOf("--"); - if (dashdash>0) - return etag.regionMatches(0,tag,0,dashdash-2); + if (dashdash>0 && dashdash==etag.length()-1) + return etag.regionMatches(0,tag,0,dashdash); return false; } } 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 9aa5bbf123d..65cd960402d 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 @@ -895,6 +895,10 @@ public class DefaultServletTest assertResponseNotContains("Content-Encoding: gzip",response); assertResponseNotContains("ETag: "+etag_gzip,response); assertResponseContains("ETag: ",response); + + String bad_etag_gzip = etag.substring(0,etag.length()-2)+"X--gzip\""; + response = connector.getResponse("GET /context/data0.txt HTTP/1.0\r\nHost:localhost:8080\r\nAccept-Encoding:gzip\r\nIf-None-Match: "+bad_etag_gzip+"\r\n\r\n"); + assertResponseNotContains("304 Not Modified", response); response = connector.getResponse("GET /context/data0.txt HTTP/1.0\r\nHost:localhost:8080\r\nAccept-Encoding:gzip\r\nIf-None-Match: "+etag_gzip+"\r\n\r\n"); assertResponseContains("304 Not Modified", response); From e7ef74dd4f2e3bf56fc230caf7b0fd66ba275124 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 6 Jun 2017 12:27:21 +0200 Subject: [PATCH 025/147] removed deprecated test method usage --- .../jetty/security/jaspi/JaspiTest.java | 12 ++-- .../jetty/security/AliasedConstraintTest.java | 2 +- .../jetty/security/DataConstraintsTest.java | 70 +++++++++---------- .../security/SpecExampleConstraintTest.java | 18 ++--- .../server/CheckReverseProxyHeadersTest.java | 4 +- .../eclipse/jetty/server/HttpOutputTest.java | 2 +- .../jetty/server/LocalConnectorTest.java | 21 ++++-- .../jetty/server/ProxyConnectionTest.java | 33 +++++---- .../handler/ContextHandlerCollectionTest.java | 26 +++---- .../server/handler/ContextHandlerTest.java | 48 ++++++------- .../AsyncContextDispatchWithQueryStrings.java | 2 +- .../jetty/servlet/AsyncContextTest.java | 24 +++---- .../servlet/ComplianceViolations2616Test.java | 6 +- .../servlet/DefaultServletRangesTest.java | 14 ++-- .../jetty/servlet/DefaultServletTest.java | 10 +-- .../jetty/servlet/DispatcherForwardTest.java | 18 ++--- .../eclipse/jetty/servlet/DispatcherTest.java | 36 +++++----- .../jetty/servlet/GzipHandlerTest.java | 14 ++-- .../eclipse/jetty/servlet/InvokerTest.java | 2 +- .../jetty/servlet/PostServletTest.java | 2 +- .../servlet/ServletContextHandlerTest.java | 28 ++++---- .../servlet/ServletContextResourcesTest.java | 4 +- .../jetty/servlets/ConcatServletTest.java | 10 +-- 23 files changed, 205 insertions(+), 201 deletions(-) diff --git a/jetty-jaspi/src/test/java/org/eclipse/jetty/security/jaspi/JaspiTest.java b/jetty-jaspi/src/test/java/org/eclipse/jetty/security/jaspi/JaspiTest.java index 2f2d3cdd69e..33a7542e122 100644 --- a/jetty-jaspi/src/test/java/org/eclipse/jetty/security/jaspi/JaspiTest.java +++ b/jetty-jaspi/src/test/java/org/eclipse/jetty/security/jaspi/JaspiTest.java @@ -147,14 +147,14 @@ public class JaspiTest @Test public void testNoConstraint() throws Exception { - String response = _connector.getResponses("GET /ctx/test HTTP/1.0\n\n"); + String response = _connector.getResponse("GET /ctx/test HTTP/1.0\n\n"); assertThat(response,startsWith("HTTP/1.1 200 OK")); } @Test public void testConstraintNoAuth() throws Exception { - String response = _connector.getResponses("GET /ctx/jaspi/test HTTP/1.0\n\n"); + String response = _connector.getResponse("GET /ctx/jaspi/test HTTP/1.0\n\n"); assertThat(response,startsWith("HTTP/1.1 401 Unauthorized")); assertThat(response,Matchers.containsString("WWW-Authenticate: basic realm=\"TestRealm\"")); } @@ -162,7 +162,7 @@ public class JaspiTest @Test public void testConstraintWrongAuth() throws Exception { - String response = _connector.getResponses("GET /ctx/jaspi/test HTTP/1.0\n"+ + String response = _connector.getResponse("GET /ctx/jaspi/test HTTP/1.0\n"+ "Authorization: Basic " + B64Code.encode("user:wrong") + "\n\n"); assertThat(response,startsWith("HTTP/1.1 401 Unauthorized")); assertThat(response,Matchers.containsString("WWW-Authenticate: basic realm=\"TestRealm\"")); @@ -171,7 +171,7 @@ public class JaspiTest @Test public void testConstraintAuth() throws Exception { - String response = _connector.getResponses("GET /ctx/jaspi/test HTTP/1.0\n"+ + String response = _connector.getResponse("GET /ctx/jaspi/test HTTP/1.0\n"+ "Authorization: Basic " + B64Code.encode("user:password") + "\n\n"); assertThat(response,startsWith("HTTP/1.1 200 OK")); } @@ -179,14 +179,14 @@ public class JaspiTest @Test public void testOtherNoAuth() throws Exception { - String response = _connector.getResponses("GET /other/test HTTP/1.0\n\n"); + String response = _connector.getResponse("GET /other/test HTTP/1.0\n\n"); assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); } @Test public void testOtherAuth() throws Exception { - String response = _connector.getResponses("GET /other/test HTTP/1.0\n"+ + String response = _connector.getResponse("GET /other/test HTTP/1.0\n"+ "X-Forwarded-User: user\n\n"); assertThat(response,startsWith("HTTP/1.1 200 OK")); } 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 f7961daa915..b14d0232172 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 @@ -158,7 +158,7 @@ public class AliasedConstraintTest request.append("Connection: close\r\n"); request.append("\r\n"); - String response = connector.getResponses(request.toString()); + String response = connector.getResponse(request.toString()); switch (expectedStatusCode) { diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java index 3af94205338..000f18010ff 100644 --- a/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java +++ b/jetty-security/src/test/java/org/eclipse/jetty/security/DataConstraintsTest.java @@ -130,15 +130,15 @@ public class DataConstraintsTest _server.start(); String response; - response = _connector.getResponses("GET /ctx/some/thing HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/some/thing HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connector.getResponses("GET /ctx/integral/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/integral/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found")); Assert.assertThat(response, Matchers.containsString("Location: BWTP://")); Assert.assertThat(response, Matchers.containsString(":9999")); - response = _connectorS.getResponses("GET /ctx/integral/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/integral/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); } @@ -162,15 +162,15 @@ public class DataConstraintsTest _server.start(); String response; - response = _connector.getResponses("GET /ctx/some/thing HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/some/thing HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found")); Assert.assertThat(response, Matchers.containsString("Location: BWTP://")); Assert.assertThat(response, Matchers.containsString(":9999")); - response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); } @@ -194,10 +194,10 @@ public class DataConstraintsTest String response; - response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found")); - response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); } @@ -222,16 +222,16 @@ public class DataConstraintsTest String response; - response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found")); - response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); } @@ -256,16 +256,16 @@ public class DataConstraintsTest String response; - response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found")); - response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); } @@ -295,25 +295,25 @@ public class DataConstraintsTest String response; - response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connectorS.getResponses("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found")); - response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 401 Unauthorized")); - response = _connector.getResponses("GET /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); + response = _connector.getResponse("GET /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connector.getResponses("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); + response = _connector.getResponse("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 302 Found")); - response = _connectorS.getResponses("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); + response = _connectorS.getResponse("POST /ctx/confid/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); } @@ -337,16 +337,16 @@ public class DataConstraintsTest String response; - response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); - response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); - response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); + response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); - response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); } @@ -371,16 +371,16 @@ public class DataConstraintsTest String response; - response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); - response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); - response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); + response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); - response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 403 Forbidden")); } @@ -409,16 +409,16 @@ public class DataConstraintsTest String response; - response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 401 Unauthorized")); - response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); + response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 401 Unauthorized")); - response = _connector.getResponses("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n"); + response = _connector.getResponse("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); - response = _connectorS.getResponses("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n"); + response = _connectorS.getResponse("GET /ctx/restricted/info HTTP/1.0\nAuthorization: Basic YWRtaW46cGFzc3dvcmQ=\n\n"); Assert.assertThat(response, Matchers.containsString("HTTP/1.1 404 Not Found")); } diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/SpecExampleConstraintTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/SpecExampleConstraintTest.java index 364203d0c98..5d754586075 100644 --- a/jetty-security/src/test/java/org/eclipse/jetty/security/SpecExampleConstraintTest.java +++ b/jetty-security/src/test/java/org/eclipse/jetty/security/SpecExampleConstraintTest.java @@ -257,14 +257,14 @@ public class SpecExampleConstraintTest //There are uncovered methods for GET/POST at url /* //without deny-uncovered-http-methods they should be accessible String response; - response = _connector.getResponses("GET /ctx/index.html HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/index.html HTTP/1.0\r\n\r\n"); assertThat(response,startsWith("HTTP/1.1 200 OK")); //set deny-uncovered-http-methods true _security.setDenyUncoveredHttpMethods(true); //check they cannot be accessed - response = _connector.getResponses("GET /ctx/index.html HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("GET /ctx/index.html HTTP/1.0\r\n\r\n"); assertTrue(response.startsWith("HTTP/1.1 403 Forbidden")); } finally @@ -294,39 +294,39 @@ public class SpecExampleConstraintTest */ //a user in role HOMEOWNER is forbidden HEAD request - response = _connector.getResponses("HEAD /ctx/index.html HTTP/1.0\r\n\r\n"); + response = _connector.getResponse("HEAD /ctx/index.html HTTP/1.0\r\n\r\n"); assertTrue(response.startsWith("HTTP/1.1 403 Forbidden")); - response = _connector.getResponses("HEAD /ctx/index.html HTTP/1.0\r\n" + + response = _connector.getResponse("HEAD /ctx/index.html HTTP/1.0\r\n" + "Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" + "\r\n"); assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); - response = _connector.getResponses("HEAD /ctx/acme/wholesale/index.html HTTP/1.0\r\n" + + response = _connector.getResponse("HEAD /ctx/acme/wholesale/index.html HTTP/1.0\r\n" + "Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" + "\r\n"); assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); - response = _connector.getResponses("HEAD /ctx/acme/retail/index.html HTTP/1.0\r\n" + + response = _connector.getResponse("HEAD /ctx/acme/retail/index.html HTTP/1.0\r\n" + "Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" + "\r\n"); assertThat(response,startsWith("HTTP/1.1 403 Forbidden")); //a user in role CONTRACTOR can do a GET - response = _connector.getResponses("GET /ctx/acme/wholesale/index.html HTTP/1.0\r\n" + + response = _connector.getResponse("GET /ctx/acme/wholesale/index.html HTTP/1.0\r\n" + "Authorization: Basic " + B64Code.encode("chris:password") + "\r\n" + "\r\n"); assertThat(response,startsWith("HTTP/1.1 200 OK")); //a user in role CONTRACTOR can only do a post if confidential - response = _connector.getResponses("POST /ctx/acme/wholesale/index.html HTTP/1.0\r\n" + + response = _connector.getResponse("POST /ctx/acme/wholesale/index.html HTTP/1.0\r\n" + "Authorization: Basic " + B64Code.encode("chris:password") + "\r\n" + "\r\n"); assertThat(response,startsWith("HTTP/1.1 403 !")); //a user in role HOMEOWNER can do a GET - response = _connector.getResponses("GET /ctx/acme/retail/index.html HTTP/1.0\r\n" + + response = _connector.getResponse("GET /ctx/acme/retail/index.html HTTP/1.0\r\n" + "Authorization: Basic " + B64Code.encode("harry:password") + "\r\n" + "\r\n"); assertThat(response,startsWith("HTTP/1.1 200 OK")); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java index d32fd0c4c78..a50f9fb64f2 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java @@ -151,9 +151,7 @@ public class CheckReverseProxyHeadersTest try { server.start(); - connector.getResponses("GET / HTTP/1.1\r\n" +"Connection: close\r\n" + headers + "\r\n\r\n", - 1000,TimeUnit.SECONDS); - + connector.getResponse("GET / HTTP/1.1\r\n" +"Connection: close\r\n" + headers + "\r\n\r\n"); Error error = validationHandler.getError(); if (error != null) diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpOutputTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpOutputTest.java index 0604c58072c..b4ec9937e79 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpOutputTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpOutputTest.java @@ -579,7 +579,7 @@ public class HttpOutputTest _handler._byteBuffer = BufferUtil.allocateDirect(8192); _handler._async = true; - String response = _connector.getResponses("GET / HTTP/1.0\nHost: localhost:80\n\n"); + String response = _connector.getResponse("GET / HTTP/1.0\nHost: localhost:80\n\n"); assertThat(response, containsString("HTTP/1.1 200 OK")); assertThat(response, Matchers.not(containsString("Content-Length"))); assertThat(response, endsWith(toUTF8String(big))); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/LocalConnectorTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/LocalConnectorTest.java index 06e508e29db..dd209cb8e68 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/LocalConnectorTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/LocalConnectorTest.java @@ -79,7 +79,7 @@ public class LocalConnectorTest } }); - _connector.getResponses("" + + _connector.getResponse("" + "GET / HTTP/1.1\r\n" + "Host: localhost\r\n" + "Connection: close\r\n" + @@ -92,7 +92,7 @@ public class LocalConnectorTest @Test public void testOneGET() throws Exception { - String response=_connector.getResponses("GET /R1 HTTP/1.0\r\n\r\n"); + String response=_connector.getResponse("GET /R1 HTTP/1.0\r\n\r\n"); assertThat(response,containsString("HTTP/1.1 200 OK")); assertThat(response,containsString("pathInfo=/R1")); } @@ -301,14 +301,14 @@ public class LocalConnectorTest @Test public void testStopStart() throws Exception { - String response=_connector.getResponses("GET /R1 HTTP/1.0\r\n\r\n"); + String response=_connector.getResponse("GET /R1 HTTP/1.0\r\n\r\n"); assertThat(response,containsString("HTTP/1.1 200 OK")); assertThat(response,containsString("pathInfo=/R1")); _server.stop(); _server.start(); - response=_connector.getResponses("GET /R2 HTTP/1.0\r\n\r\n"); + response=_connector.getResponse("GET /R2 HTTP/1.0\r\n\r\n"); assertThat(response,containsString("HTTP/1.1 200 OK")); assertThat(response,containsString("pathInfo=/R2")); } @@ -316,12 +316,15 @@ public class LocalConnectorTest @Test public void testTwoGETs() throws Exception { - String response=_connector.getResponses( + LocalEndPoint endp = _connector.connect(); + endp.addInput( "GET /R1 HTTP/1.1\r\n"+ "Host: localhost\r\n"+ "\r\n"+ "GET /R2 HTTP/1.0\r\n\r\n"); + String response = endp.getResponse() + endp.getResponse(); + assertThat(response,containsString("HTTP/1.1 200 OK")); assertThat(response,containsString("pathInfo=/R1")); @@ -355,7 +358,8 @@ public class LocalConnectorTest @Test public void testManyGETs() throws Exception { - String response=_connector.getResponses( + LocalEndPoint endp = _connector.connect(); + endp.addInput( "GET /R1 HTTP/1.1\r\n"+ "Host: localhost\r\n"+ "\r\n"+ @@ -376,7 +380,10 @@ public class LocalConnectorTest "Connection: close\r\n"+ "\r\n"); - String r=response; + String r=""; + + for (String response=endp.getResponse();response!=null;response=endp.getResponse()) + r+=response; for (int i=1;i<=6;i++) { diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyConnectionTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyConnectionTest.java index 01df8adbd08..06e854d460e 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyConnectionTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ProxyConnectionTest.java @@ -18,7 +18,6 @@ package org.eclipse.jetty.server; -import org.eclipse.jetty.http.HttpParser; import org.eclipse.jetty.server.handler.ErrorHandler; import org.eclipse.jetty.util.log.StacklessLogging; import org.hamcrest.Matchers; @@ -67,7 +66,7 @@ public class ProxyConnectionTest @Test public void testSimple() throws Exception { - String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r\n"+ + String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r\n"+ "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ @@ -82,7 +81,7 @@ public class ProxyConnectionTest @Test public void testIPv6() throws Exception { - String response=_connector.getResponses("PROXY UNKNOWN eeee:eeee:eeee:eeee:eeee:eeee:eeee:eeee ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\n"+ + String response=_connector.getResponse("PROXY UNKNOWN eeee:eeee:eeee:eeee:eeee:eeee:eeee:eeee ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\n"+ "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ @@ -97,43 +96,43 @@ public class ProxyConnectionTest @Test public void testTooLong() throws Exception { - String response=_connector.getResponses("PROXY TOOLONG!!! eeee:eeee:eeee:eeee:0000:0000:0000:0000 ffff:ffff:ffff:ffff:0000:0000:0000:0000 65535 65535\r\n"+ + String response=_connector.getResponse("PROXY TOOLONG!!! eeee:eeee:eeee:eeee:0000:0000:0000:0000 ffff:ffff:ffff:ffff:0000:0000:0000:0000 65535 65535\r\n"+ "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ "\n"); - Assert.assertThat(response,Matchers.equalTo("")); + Assert.assertNull(response); } @Test public void testNotComplete() throws Exception { _connector.setIdleTimeout(100); - String response=_connector.getResponses("PROXY TIMEOUT"); - Assert.assertThat(response,Matchers.equalTo("")); + String response=_connector.getResponse("PROXY TIMEOUT"); + Assert.assertNull(response); } @Test public void testBadChar() throws Exception { - String response=_connector.getResponses("PROXY\tTCP 1.2.3.4 5.6.7.8 111 222\r\n"+ + String response=_connector.getResponse("PROXY\tTCP 1.2.3.4 5.6.7.8 111 222\r\n"+ "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ "\n"); - Assert.assertThat(response,Matchers.equalTo("")); + Assert.assertNull(response); } @Test public void testBadCRLF() throws Exception { - String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r \n"+ + String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 111 222\r \n"+ "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ "\n"); - Assert.assertThat(response,Matchers.equalTo("")); + Assert.assertNull(response); } @Test @@ -141,35 +140,35 @@ public class ProxyConnectionTest { try(StacklessLogging stackless = new StacklessLogging(ProxyConnectionFactory.class)) { - String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 9999999999999 222\r\n"+ + String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 9999999999999 222\r\n"+ "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ "\n"); - Assert.assertThat(response,Matchers.equalTo("")); + Assert.assertNull(response); } } @Test public void testMissingField() throws Exception { - String response=_connector.getResponses("PROXY TCP 1.2.3.4 5.6.7.8 222\r\n"+ + String response=_connector.getResponse("PROXY TCP 1.2.3.4 5.6.7.8 222\r\n"+ "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ "\n"); - Assert.assertThat(response,Matchers.equalTo("")); + Assert.assertNull(response); } @Test public void testHTTP() throws Exception { - String response=_connector.getResponses( + String response=_connector.getResponse( "GET /path HTTP/1.1\n"+ "Host: server:80\n"+ "Connection: close\n"+ "\n"); - Assert.assertThat(response,Matchers.equalTo("")); + Assert.assertNull(response); } } diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java index 65d467c560a..44e3c43b87e 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerCollectionTest.java @@ -140,7 +140,7 @@ public class ContextHandlerCollectionTest handlerF.reset(); String t = String.format("test %d %s@%s --> %s | %s%n",i,uri,host,connector.getName(),handler); - String response = connector.getResponses("GET "+uri+" HTTP/1.0\nHost: "+host+"\n\n"); + String response = connector.getResponse("GET "+uri+" HTTP/1.0\nHost: "+host+"\n\n"); if (handler==null) { @@ -301,32 +301,32 @@ public class ContextHandlerCollectionTest server.setHandler(contexts); server.start(); - String response=connector.getResponses("GET / HTTP/1.0\r\n\r\n"); + String response=connector.getResponse("GET / HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("root")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /foobar/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /foobar/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("root")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /left/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /left/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("left")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /leftcentre/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /leftcentre/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("left of centre")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /rightcentre/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /rightcentre/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("right of centre")); assertThat(response, containsString("Wrapped: TRUE")); - response=connector.getResponses("GET /right/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /right/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("right")); assertThat(response, containsString("Wrapped: TRUE")); @@ -362,32 +362,32 @@ public class ContextHandlerCollectionTest server.setHandler(contexts); server.start(); - String response=connector.getResponses("GET / HTTP/1.0\r\n\r\n"); + String response=connector.getResponse("GET / HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("root")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /foobar/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /foobar/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("root")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /left/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /left/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("left")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /leftcentre/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /leftcentre/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("left of centre")); assertThat(response, not(containsString("Wrapped: TRUE"))); - response=connector.getResponses("GET /rightcentre/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /rightcentre/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("right of centre")); assertThat(response, containsString("Wrapped: ASYNC")); - response=connector.getResponses("GET /right/info HTTP/1.0\r\n\r\n"); + response=connector.getResponse("GET /right/info HTTP/1.0\r\n\r\n"); assertThat(response, startsWith("HTTP/1.1 200 OK")); assertThat(response, endsWith("right")); assertThat(response, containsString("Wrapped: ASYNC")); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java index 626adec2e5e..55b97e934aa 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java @@ -90,7 +90,7 @@ public class ContextHandlerTest try { server.start(); - connector.getResponses("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n"); + connector.getResponse("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n"); Assert.assertTrue(handlerA.isHandled()); Assert.assertFalse(handlerB.isHandled()); @@ -100,7 +100,7 @@ public class ContextHandlerTest handlerB.reset(); handlerC.reset(); - connector.getResponses("GET / HTTP/1.0\n" + "Host: www.example2.com\n\n"); + connector.getResponse("GET / HTTP/1.0\n" + "Host: www.example2.com\n\n"); Assert.assertFalse(handlerA.isHandled()); Assert.assertTrue(handlerB.isHandled()); @@ -147,7 +147,7 @@ public class ContextHandlerTest server.start(); try { - connector.getResponses("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n"); + connector.getResponse("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n"); Assert.assertTrue(handlerA.isHandled()); Assert.assertFalse(handlerB.isHandled()); Assert.assertFalse(handlerC.isHandled()); @@ -155,7 +155,7 @@ public class ContextHandlerTest handlerB.reset(); handlerC.reset(); - connector.getResponses("GET / HTTP/1.0\n" + "Host: localhost\n\n"); + connector.getResponse("GET / HTTP/1.0\n" + "Host: localhost\n\n"); Assert.assertFalse(handlerA.isHandled()); Assert.assertFalse(handlerB.isHandled()); Assert.assertTrue(handlerC.isHandled()); @@ -163,7 +163,7 @@ public class ContextHandlerTest handlerB.reset(); handlerC.reset(); - connectorN.getResponses("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n"); + connectorN.getResponse("GET / HTTP/1.0\n" + "Host: www.example.com.\n\n"); Assert.assertTrue(handlerA.isHandled()); Assert.assertFalse(handlerB.isHandled()); Assert.assertFalse(handlerC.isHandled()); @@ -171,7 +171,7 @@ public class ContextHandlerTest handlerB.reset(); handlerC.reset(); - connectorN.getResponses("GET / HTTP/1.0\n" + "Host: localhost\n\n"); + connectorN.getResponse("GET / HTTP/1.0\n" + "Host: localhost\n\n"); Assert.assertFalse(handlerA.isHandled()); Assert.assertTrue(handlerB.isHandled()); Assert.assertFalse(handlerC.isHandled()); @@ -237,39 +237,39 @@ public class ContextHandlerTest // check that all contexts start normally server.start(); - Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); - Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); - Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'")); + Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); + Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'")); // If we stop foobar, then requests will be handled by foo foobar.stop(); - Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); - Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); - Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); + Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); + Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); // If we shutdown foo then requests will be 503'd foo.shutdown().get(); - Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); - Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("503")); - Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("503")); + Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("503")); + Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("503")); // If we stop foo then requests will be handled by root foo.stop(); - Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); - Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); - Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); // If we start foo then foobar requests will be handled by foo foo.start(); - Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); - Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); - Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); + Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); + Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); // If we start foobar then foobar requests will be handled by foobar foobar.start(); - Assert.assertThat(connector.getResponses("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); - Assert.assertThat(connector.getResponses("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); - Assert.assertThat(connector.getResponses("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'")); + Assert.assertThat(connector.getResponse("GET / HTTP/1.0\n\n"), Matchers.containsString("ctx=''")); + Assert.assertThat(connector.getResponse("GET /foo/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo'")); + Assert.assertThat(connector.getResponse("GET /foo/bar/xxx HTTP/1.0\n\n"), Matchers.containsString("ctx='/foo/bar'")); } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java index ea2f541b7c4..dc4dd0a40cc 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextDispatchWithQueryStrings.java @@ -76,7 +76,7 @@ public class AsyncContextDispatchWithQueryStrings "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); assertThat(responseString,startsWith("HTTP/1.1 200")); } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java index e5ed62937e9..dac4f0a0bb3 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java @@ -115,7 +115,7 @@ public class AsyncContextTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); assertThat(responseString, startsWith("HTTP/1.1 200 ")); assertThat(responseString, containsString("doGet:getServletPath:/servletPath")); @@ -131,7 +131,7 @@ public class AsyncContextTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request,10,TimeUnit.MINUTES); + String responseString = _connector.getResponse(request,10,TimeUnit.MINUTES); assertThat(responseString, startsWith("HTTP/1.1 500 ")); assertThat(responseString, containsString("ERROR: /error")); @@ -147,7 +147,7 @@ public class AsyncContextTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); assertThat(responseString, startsWith("HTTP/1.1 500 ")); assertThat(responseString, containsString("ERROR: /error")); @@ -163,7 +163,7 @@ public class AsyncContextTest "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = new BufferedReader(new StringReader(responseString)); @@ -184,7 +184,7 @@ public class AsyncContextTest "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = new BufferedReader(new StringReader(responseString)); @@ -200,7 +200,7 @@ public class AsyncContextTest { String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = parseHeader(responseString); @@ -218,7 +218,7 @@ public class AsyncContextTest { String request = "GET /ctx/path%20with%20spaces/servletPath?dispatch=true&queryStringWithEncoding=space%20space HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = parseHeader(responseString); @@ -237,7 +237,7 @@ public class AsyncContextTest String request = "GET /ctx/servletPath HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = parseHeader(responseString); @@ -252,7 +252,7 @@ public class AsyncContextTest String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = parseHeader(responseString); @@ -290,7 +290,7 @@ public class AsyncContextTest "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = parseHeader(responseString); @@ -369,7 +369,7 @@ public class AsyncContextTest "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = new BufferedReader(new StringReader(responseString)); @@ -386,7 +386,7 @@ public class AsyncContextTest "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponses(request); + String responseString = _connector.getResponse(request); BufferedReader br = new BufferedReader(new StringReader(responseString)); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ComplianceViolations2616Test.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ComplianceViolations2616Test.java index 5e94397efed..68e72bf3084 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ComplianceViolations2616Test.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ComplianceViolations2616Test.java @@ -145,7 +145,7 @@ public class ComplianceViolations2616Test req1.append("Connection: close\r\n"); req1.append("\r\n"); - String response = connector.getResponses(req1.toString()); + String response = connector.getResponse(req1.toString()); assertThat("Response status", response, containsString("HTTP/1.1 200 OK")); assertThat("Response headers", response, containsString("X-Http-Violation-0: RFC2616Hello Index"); - response = connector.getResponses("GET /context/dir/ HTTP/1.0\r\n\r\n"); + response = connector.getResponse("GET /context/dir/ HTTP/1.0\r\n\r\n"); assertResponseContains("Location: http://0.0.0.0/context/dir/index.html", response); createFile(inde, "

Hello Inde

"); - response = connector.getResponses("GET /context/dir/ HTTP/1.0\r\n\r\n"); + response = connector.getResponse("GET /context/dir/ HTTP/1.0\r\n\r\n"); assertResponseContains("Location: http://0.0.0.0/context/dir/index.html", response); assertTrue(index.delete()); - response = connector.getResponses("GET /context/dir/ HTTP/1.0\r\n\r\n"); + response = connector.getResponse("GET /context/dir/ HTTP/1.0\r\n\r\n"); assertResponseContains("Location: http://0.0.0.0/context/dir/index.htm", response); assertTrue(inde.delete()); - response = connector.getResponses("GET /context/dir/ HTTP/1.0\r\n\r\n"); + response = connector.getResponse("GET /context/dir/ HTTP/1.0\r\n\r\n"); assertResponseContains("403", response); } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherForwardTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherForwardTest.java index 5dfb2c4681e..d4dfd535cad 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherForwardTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherForwardTest.java @@ -123,7 +123,7 @@ public class DispatcherForwardTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -173,7 +173,7 @@ public class DispatcherForwardTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -222,7 +222,7 @@ public class DispatcherForwardTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -278,7 +278,7 @@ public class DispatcherForwardTest "Connection: close\r\n" + "\r\n" + form; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -335,7 +335,7 @@ public class DispatcherForwardTest "Connection: close\r\n" + "\r\n" + form; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -391,7 +391,7 @@ public class DispatcherForwardTest "Connection: close\r\n" + "\r\n" + form; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -450,7 +450,7 @@ public class DispatcherForwardTest "Connection: close\r\n" + "\r\n" + form; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -497,7 +497,7 @@ public class DispatcherForwardTest "Connection: close\r\n" + "\r\n" + form; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } @@ -547,7 +547,7 @@ public class DispatcherForwardTest "Connection: close\r\n" + "\r\n" + form; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(latch.await(5, TimeUnit.SECONDS)); Assert.assertTrue(response, response.startsWith("HTTP/1.1 200")); } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java index 708b318f30e..5bc5c2d420c 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/DispatcherTest.java @@ -115,7 +115,7 @@ public class DispatcherTest "Content-Length: 0\r\n"+ "\r\n"; - String responses = _connector.getResponses("GET /context/ForwardServlet?do=assertforward&do=more&test=1 HTTP/1.0\n\n"); + String responses = _connector.getResponse("GET /context/ForwardServlet?do=assertforward&do=more&test=1 HTTP/1.0\n\n"); assertEquals(expected, responses); } @@ -131,7 +131,7 @@ public class DispatcherTest "Content-Type: text/html\r\n"+ "Content-Length: 0\r\n"+ "\r\n"; - String responses = _connector.getResponses("GET /context/ForwardServlet?do=assertforward&foreign=%d2%e5%ec%ef%e5%f0%e0%f2%f3%f0%e0&test=1 HTTP/1.0\n\n"); + String responses = _connector.getResponse("GET /context/ForwardServlet?do=assertforward&foreign=%d2%e5%ec%ef%e5%f0%e0%f2%f3%f0%e0&test=1 HTTP/1.0\n\n"); assertEquals(expected, responses); } @@ -152,7 +152,7 @@ public class DispatcherTest "/x x\r\n"+ "/context/EchoURI/x%20x;a=1\r\n"; - String responses = _connector.getResponses("GET /context/ForwardServlet;ignore=true?do=req.echo&uri=EchoURI%2Fx%2520x%3Ba=1%3Fb=2 HTTP/1.0\n\n"); + String responses = _connector.getResponse("GET /context/ForwardServlet;ignore=true?do=req.echo&uri=EchoURI%2Fx%2520x%3Ba=1%3Fb=2 HTTP/1.0\n\n"); assertEquals(expected, responses); } @@ -167,7 +167,7 @@ public class DispatcherTest "HTTP/1.1 200 OK\r\n"+ "\r\n"; - String responses = _connector.getResponses("GET /context/IncludeServlet?do=assertinclude&do=more&test=1 HTTP/1.0\n\n"); + String responses = _connector.getResponse("GET /context/IncludeServlet?do=assertinclude&do=more&test=1 HTTP/1.0\n\n"); assertEquals(expected, responses); } @@ -183,7 +183,7 @@ public class DispatcherTest "HTTP/1.1 200 OK\r\n"+ "\r\n"; - String responses = _connector.getResponses("GET /context/ForwardServlet/forwardpath?do=include HTTP/1.0\n\n"); + String responses = _connector.getResponse("GET /context/ForwardServlet/forwardpath?do=include HTTP/1.0\n\n"); assertEquals(expected, responses); } @@ -199,7 +199,7 @@ public class DispatcherTest "HTTP/1.1 200 OK\r\n"+ "\r\n"; - String responses = _connector.getResponses("GET /context/IncludeServlet/includepath?do=forward HTTP/1.0\n\n"); + String responses = _connector.getResponse("GET /context/IncludeServlet/includepath?do=forward HTTP/1.0\n\n"); assertEquals(expected, responses); } @@ -216,7 +216,7 @@ public class DispatcherTest "\r\n"+ "Roger That!"; - String responses = _connector.getResponses("GET /context/dispatch/test?forward=/roger/that HTTP/1.0\n" + "Host: localhost\n\n"); + String responses = _connector.getResponse("GET /context/dispatch/test?forward=/roger/that HTTP/1.0\n" + "Host: localhost\n\n"); assertEquals(expected, responses); } @@ -229,7 +229,7 @@ public class DispatcherTest String requests="GET /context/dispatch/test?forward=/%2e%2e/roger/that HTTP/1.0\n" + "Host: localhost\n\n"; - String responses = _connector.getResponses(requests); + String responses = _connector.getResponse(requests); assertThat(responses,startsWith("HTTP/1.1 404 ")); } @@ -242,7 +242,7 @@ public class DispatcherTest String requests="GET /context/dispatch/test?forward=/%252e%252e/roger/that HTTP/1.0\n" + "Host: localhost\n\n"; - String responses = _connector.getResponses(requests); + String responses = _connector.getResponse(requests); assertThat(responses,startsWith("HTTP/1.1 404 ")); } @@ -259,7 +259,7 @@ public class DispatcherTest "\r\n"+ "Roger That!"; - String responses = _connector.getResponses("GET /context/dispatch/test?include=/roger/that HTTP/1.0\n" + "Host: localhost\n\n"); + String responses = _connector.getResponse("GET /context/dispatch/test?include=/roger/that HTTP/1.0\n" + "Host: localhost\n\n"); assertEquals(expected, responses); } @@ -267,7 +267,7 @@ public class DispatcherTest @Test public void testWorkingResourceHandler() throws Exception { - String responses = _connector.getResponses("GET /resource/content.txt HTTP/1.0\n" + "Host: localhost\n\n"); + String responses = _connector.getResponse("GET /resource/content.txt HTTP/1.0\n" + "Host: localhost\n\n"); assertTrue(responses.contains("content goes here")); // from inside the context.txt file } @@ -277,7 +277,7 @@ public class DispatcherTest { _contextHandler.addServlet(DispatchToResourceServlet.class, "/resourceServlet/*"); - String responses = _connector.getResponses("GET /context/resourceServlet/content.txt?do=include HTTP/1.0\n" + "Host: localhost\n\n"); + String responses = _connector.getResponse("GET /context/resourceServlet/content.txt?do=include HTTP/1.0\n" + "Host: localhost\n\n"); // from inside the context.txt file Assert.assertNotNull(responses); @@ -290,7 +290,7 @@ public class DispatcherTest { _contextHandler.addServlet(DispatchToResourceServlet.class, "/resourceServlet/*"); - String responses = _connector.getResponses("GET /context/resourceServlet/content.txt?do=forward HTTP/1.0\n" + "Host: localhost\n\n"); + String responses = _connector.getResponse("GET /context/resourceServlet/content.txt?do=forward HTTP/1.0\n" + "Host: localhost\n\n"); // from inside the context.txt file assertTrue(responses.contains("content goes here")); @@ -301,7 +301,7 @@ public class DispatcherTest { _contextHandler.addServlet(DispatchToResourceServlet.class, "/resourceServlet/*"); - String responses = _connector.getResponses("GET /context/resourceServlet/content.txt?do=include&wrapped=true HTTP/1.0\n" + "Host: localhost\n\n"); + String responses = _connector.getResponse("GET /context/resourceServlet/content.txt?do=include&wrapped=true HTTP/1.0\n" + "Host: localhost\n\n"); // from inside the context.txt file assertTrue(responses.contains("content goes here")); @@ -312,7 +312,7 @@ public class DispatcherTest { _contextHandler.addServlet(DispatchToResourceServlet.class, "/resourceServlet/*"); - String responses = _connector.getResponses("GET /context/resourceServlet/content.txt?do=forward&wrapped=true HTTP/1.0\n" + "Host: localhost\n\n"); + String responses = _connector.getResponse("GET /context/resourceServlet/content.txt?do=forward&wrapped=true HTTP/1.0\n" + "Host: localhost\n\n"); // from inside the context.txt file assertTrue(responses.contains("content goes here")); @@ -326,11 +326,11 @@ public class DispatcherTest _contextHandler.addServlet(EchoServlet.class, "/echo/*"); _contextHandler.addFilter(ForwardFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST)); - String rogerResponse = _connector.getResponses("GET /context/ HTTP/1.0\n" + "Host: localhost\n\n"); + String rogerResponse = _connector.getResponse("GET /context/ HTTP/1.0\n" + "Host: localhost\n\n"); - String echoResponse = _connector.getResponses("GET /context/foo?echo=echoText HTTP/1.0\n" + "Host: localhost\n\n"); + String echoResponse = _connector.getResponse("GET /context/foo?echo=echoText HTTP/1.0\n" + "Host: localhost\n\n"); - String rechoResponse = _connector.getResponses("GET /context/?echo=echoText HTTP/1.0\n" + "Host: localhost\n\n"); + String rechoResponse = _connector.getResponse("GET /context/?echo=echoText HTTP/1.0\n" + "Host: localhost\n\n"); assertTrue(rogerResponse.contains("Roger That!")); assertTrue(echoResponse.contains("echoText")); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/GzipHandlerTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/GzipHandlerTest.java index 91b4f961c23..f668c33f822 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/GzipHandlerTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/GzipHandlerTest.java @@ -207,7 +207,7 @@ public class GzipHandlerTest request.setVersion("HTTP/1.0"); request.setHeader("Host","tester"); - response = HttpTester.parseResponse(_connector.getResponses(request.generate())); + response = HttpTester.parseResponse(_connector.getResponse(request.generate())); assertThat(response.getStatus(),is(200)); assertThat(response.get("Content-Encoding"),not(equalToIgnoringCase("gzip"))); @@ -235,7 +235,7 @@ public class GzipHandlerTest request.setHeader("Host","tester"); request.setHeader("accept-encoding","gzip"); - response = HttpTester.parseResponse(_connector.getResponses(request.generate())); + response = HttpTester.parseResponse(_connector.getResponse(request.generate())); assertThat(response.getStatus(),is(200)); assertThat(response.get("Content-Encoding"),Matchers.equalToIgnoringCase("gzip")); @@ -262,7 +262,7 @@ public class GzipHandlerTest request.setHeader("Host","tester"); request.setHeader("Accept-Encoding","gzip"); - response = HttpTester.parseResponse(_connector.getResponses(request.generate())); + response = HttpTester.parseResponse(_connector.getResponse(request.generate())); assertThat(response.getStatus(),is(200)); assertThat(response.get("Content-Encoding"),not(containsString("gzip"))); @@ -319,7 +319,7 @@ public class GzipHandlerTest request.setHeader("If-None-Match",__contentETag); request.setHeader("accept-encoding","gzip"); - response = HttpTester.parseResponse(_connector.getResponses(request.generate())); + response = HttpTester.parseResponse(_connector.getResponse(request.generate())); assertThat(response.getStatus(),is(304)); assertThat(response.get("Content-Encoding"),not(Matchers.equalToIgnoringCase("gzip"))); @@ -340,7 +340,7 @@ public class GzipHandlerTest request.setHeader("If-None-Match",__contentETagGzip); request.setHeader("accept-encoding","gzip"); - response = HttpTester.parseResponse(_connector.getResponses(request.generate())); + response = HttpTester.parseResponse(_connector.getResponse(request.generate())); assertThat(response.getStatus(),is(304)); assertThat(response.get("Content-Encoding"),not(Matchers.equalToIgnoringCase("gzip"))); @@ -360,7 +360,7 @@ public class GzipHandlerTest request.setHeader("accept-encoding","gzip"); request.setURI("/ctx/forward"); - response = HttpTester.parseResponse(_connector.getResponses(request.generate())); + response = HttpTester.parseResponse(_connector.getResponse(request.generate())); assertThat(response.getStatus(),is(200)); assertThat(response.get("Content-Encoding"),Matchers.equalToIgnoringCase("gzip")); @@ -387,7 +387,7 @@ public class GzipHandlerTest request.setHeader("accept-encoding","gzip"); request.setURI("/ctx/include"); - response = HttpTester.parseResponse(_connector.getResponses(request.generate())); + response = HttpTester.parseResponse(_connector.getResponse(request.generate())); assertThat(response.getStatus(),is(200)); assertThat(response.get("Content-Encoding"),Matchers.equalToIgnoringCase("gzip")); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java index a849a33571d..87eed8573f4 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/InvokerTest.java @@ -82,7 +82,7 @@ public class InvokerTest "\r\n" + "Invoked TestServlet!"; - String response = _connector.getResponses(request); + String response = _connector.getResponse(request); assertEquals(expectedResponse, response); } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java index ef1f4675cb7..1b80ad0591f 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/PostServletTest.java @@ -136,7 +136,7 @@ public class PostServletTest req.append("0\r\n"); req.append("\r\n"); - String resp = connector.getResponses(req.toString(),1,TimeUnit.SECONDS); + String resp = connector.getResponse(req.toString()); assertThat("resp", resp, containsString("HTTP/1.1 200 OK")); assertThat("resp", resp, containsString("chunked")); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java index 0fa84209cc7..1cf59587989 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextHandlerTest.java @@ -122,18 +122,18 @@ public class ServletContextHandlerTest assertEquals(2,__testServlets.get()); - String response =_connector.getResponses("GET /test1 HTTP/1.0\r\n\r\n"); + String response =_connector.getResponse("GET /test1 HTTP/1.0\r\n\r\n"); Assert.assertThat(response,Matchers.containsString("200 OK")); assertEquals(2,__testServlets.get()); - response =_connector.getResponses("GET /test2 HTTP/1.0\r\n\r\n"); + response =_connector.getResponse("GET /test2 HTTP/1.0\r\n\r\n"); Assert.assertThat(response,containsString("200 OK")); assertEquals(2,__testServlets.get()); assertThat(holder0.getServletInstance(),nullValue()); - response =_connector.getResponses("GET /test0 HTTP/1.0\r\n\r\n"); + response =_connector.getResponse("GET /test0 HTTP/1.0\r\n\r\n"); assertThat(response,containsString("200 OK")); assertEquals(3,__testServlets.get()); assertThat(holder0.getServletInstance(),notNullValue(Servlet.class)); @@ -164,7 +164,7 @@ public class ServletContextHandlerTest request.append("Host: localhost\n"); request.append("\n"); - String response = _connector.getResponses(request.toString()); + String response = _connector.getResponse(request.toString()); assertResponseContains("Test", response); context.addServlet(HelloServlet.class, "/hello"); @@ -174,7 +174,7 @@ public class ServletContextHandlerTest request.append("Host: localhost\n"); request.append("\n"); - response = _connector.getResponses(request.toString()); + response = _connector.getResponse(request.toString()); assertResponseContains("Hello World", response); } @@ -197,7 +197,7 @@ public class ServletContextHandlerTest request.append("Host: localhost\n"); request.append("\n"); - String response = _connector.getResponses(request.toString()); + String response = _connector.getResponse(request.toString()); assertResponseContains("Test", response); assertEquals(extra,context.getSessionHandler().getHandler()); @@ -241,7 +241,7 @@ public class ServletContextHandlerTest request.append("Host: localhost\n"); request.append("\n"); - String response = _connector.getResponses(request.toString()); + String response = _connector.getResponse(request.toString()); assertResponseContains("Test", response); context.stop(); @@ -255,7 +255,7 @@ public class ServletContextHandlerTest request.append("Host: localhost\n"); request.append("\n"); - response = _connector.getResponses(request.toString()); + response = _connector.getResponse(request.toString()); assertResponseContains("Hello World", response); } @@ -273,7 +273,7 @@ public class ServletContextHandlerTest request.append("Host: localhost\n"); request.append("\n"); - String response = _connector.getResponses(request.toString()); + String response = _connector.getResponse(request.toString()); assertResponseContains("Test", response); context.stop(); @@ -288,7 +288,7 @@ public class ServletContextHandlerTest request.append("Host: localhost\n"); request.append("\n"); - response = _connector.getResponses(request.toString()); + response = _connector.getResponse(request.toString()); assertResponseContains("Hello World", response); } @@ -357,10 +357,10 @@ public class ServletContextHandlerTest _server.start(); - String response= _connector.getResponses("GET /hello HTTP/1.0\r\n\r\n"); + String response= _connector.getResponse("GET /hello HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("200 OK")); - response= _connector.getResponses("GET /other HTTP/1.0\r\n\r\n"); + response= _connector.getResponse("GET /other HTTP/1.0\r\n\r\n"); Assert.assertThat(response, Matchers.containsString("404 Fell Through")); } @@ -381,7 +381,7 @@ public class ServletContextHandlerTest context.addServlet(DecoratedObjectFactoryServlet.class, "/objfactory/*"); _server.start(); - String response= _connector.getResponses("GET /objfactory/ HTTP/1.0\r\n\r\n"); + String response= _connector.getResponse("GET /objfactory/ HTTP/1.0\r\n\r\n"); assertThat("Response status code", response, containsString("200 OK")); String expected = String.format("Attribute[%s] = %s", DecoratedObjectFactory.ATTR, DecoratedObjectFactory.class.getName()); @@ -408,7 +408,7 @@ public class ServletContextHandlerTest context.addServlet(DecoratedObjectFactoryServlet.class, "/objfactory/*"); _server.start(); - String response= _connector.getResponses("GET /objfactory/ HTTP/1.0\r\n\r\n"); + String response= _connector.getResponse("GET /objfactory/ HTTP/1.0\r\n\r\n"); assertThat("Response status code", response, containsString("200 OK")); String expected = String.format("Attribute[%s] = %s", DecoratedObjectFactory.ATTR, DecoratedObjectFactory.class.getName()); diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextResourcesTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextResourcesTest.java index 1a52db2924c..d676c4dca06 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextResourcesTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletContextResourcesTest.java @@ -113,7 +113,7 @@ public class ServletContextResourcesTest req1.append("Connection: close\r\n"); req1.append("\r\n"); - String response = connector.getResponses(req1.toString()); + String response = connector.getResponse(req1.toString()); assertThat("Response", response, containsString("Resource '/': ")); } @@ -128,7 +128,7 @@ public class ServletContextResourcesTest req1.append("Connection: close\r\n"); req1.append("\r\n"); - String response = connector.getResponses(req1.toString()); + String response = connector.getResponse(req1.toString()); assertThat("Response", response, containsString("Resource '/content.txt': content goes here")); } } diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ConcatServletTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ConcatServletTest.java index e69bcf724b3..ff2e3686f7e 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ConcatServletTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/ConcatServletTest.java @@ -92,7 +92,7 @@ public class ConcatServletTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String response = connector.getResponses(request); + String response = connector.getResponse(request); try (BufferedReader reader = new BufferedReader(new StringReader(response))) { while (true) @@ -140,7 +140,7 @@ public class ConcatServletTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String response = connector.getResponses(request); + String response = connector.getResponse(request); Assert.assertTrue(response.startsWith("HTTP/1.1 404 ")); // Make sure ConcatServlet behaves well if it's case insensitive. @@ -150,7 +150,7 @@ public class ConcatServletTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - response = connector.getResponses(request); + response = connector.getResponse(request); Assert.assertTrue(response.startsWith("HTTP/1.1 404 ")); // Make sure ConcatServlet behaves well if encoded. @@ -160,7 +160,7 @@ public class ConcatServletTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - response = connector.getResponses(request); + response = connector.getResponse(request); Assert.assertTrue(response.startsWith("HTTP/1.1 404 ")); // Make sure ConcatServlet cannot see file system files. @@ -170,7 +170,7 @@ public class ConcatServletTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - response = connector.getResponses(request); + response = connector.getResponse(request); Assert.assertTrue(response.startsWith("HTTP/1.1 404 ")); } } From 8a674adddc01b033e3f687b5d1b6ecb8fcb486f9 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 6 Jun 2017 07:03:05 -0700 Subject: [PATCH 026/147] Updating to version 9.2.22.v20170606 --- VERSION.txt | 10 +- jetty-jsp/pom.xml | 104 +++++++++++++ jetty-spdy/pom.xml | 88 +++++++++++ jetty-spdy/spdy-alpn-tests/pom.xml | 93 +++++++++++ jetty-spdy/spdy-client/pom.xml | 66 ++++++++ jetty-spdy/spdy-core/pom.xml | 35 +++++ jetty-spdy/spdy-example-webapp/pom.xml | 84 ++++++++++ jetty-spdy/spdy-http-client-transport/pom.xml | 71 +++++++++ jetty-spdy/spdy-http-common/pom.xml | 48 ++++++ jetty-spdy/spdy-http-server/pom.xml | 120 ++++++++++++++ jetty-spdy/spdy-server/pom.xml | 72 +++++++++ jetty-util/pom.xml | 146 +++++++++--------- 12 files changed, 859 insertions(+), 78 deletions(-) create mode 100644 jetty-jsp/pom.xml create mode 100644 jetty-spdy/pom.xml create mode 100644 jetty-spdy/spdy-alpn-tests/pom.xml create mode 100644 jetty-spdy/spdy-client/pom.xml create mode 100644 jetty-spdy/spdy-core/pom.xml create mode 100644 jetty-spdy/spdy-example-webapp/pom.xml create mode 100644 jetty-spdy/spdy-http-client-transport/pom.xml create mode 100644 jetty-spdy/spdy-http-common/pom.xml create mode 100644 jetty-spdy/spdy-http-server/pom.xml create mode 100644 jetty-spdy/spdy-server/pom.xml diff --git a/VERSION.txt b/VERSION.txt index 1a7fbc59866..6c38881894b 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -244,19 +244,19 @@ jetty-9.4.1.v20170120 - 20 January 2017 with WEB-INF/lib/jetty-http.jar present + 1234 onBadMessage called from with handled message + 1239 Charset=unknown produces Exception during testing - + 1242 + + 1242 org.eclipse.jetty.client.HttpRequestAbortTest.testAbortOnCommitWithContent[1]() results in EofException - + 1243 + + 1243 org.eclipse.jetty.proxy.ProxyServletFailureTest.testServerException[0]() results in ServletException - + 1244 + + 1244 ProxyServletFailureTest.testProxyRequestStallsContentServerIdlesTimeout() has TimeoutException visible - + 1248 + + 1248 org.eclipse.jetty.http2.client.StreamResetTest.testServerExceptionConsumesQueuedData results in visible Stacktrace - + 1252 + + 1252 HttpClientStreamTest.testInputStreamContentProviderThrowingWhileReading[transport: HTTPS]() results in Early EOF + 1254 9.4.x Server resource handler welcome files forwarding not working diff --git a/jetty-jsp/pom.xml b/jetty-jsp/pom.xml new file mode 100644 index 00000000000..2db6585b06b --- /dev/null +++ b/jetty-jsp/pom.xml @@ -0,0 +1,104 @@ + + + org.eclipse.jetty + jetty-project + 9.2.22.v20170606 + + 4.0.0 + jetty-jsp + Jetty :: Glassfish JSP Implementation + http://www.eclipse.org/jetty + jar + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + provided + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + + + org.eclipse.jetty.toolchain + jetty-schemas + + + + + javax.servlet + javax.servlet-api + + + + + javax.servlet.jsp + javax.servlet.jsp-api + + + + org.glassfish.web + javax.servlet.jsp + + + + + org.eclipse.jetty.orbit + javax.servlet.jsp.jstl + + + + org.glassfish.web + javax.servlet.jsp.jstl + + + + + + + + org.glassfish + javax.el + + + + + + org.eclipse.jetty.orbit + org.eclipse.jdt.core + + + diff --git a/jetty-spdy/pom.xml b/jetty-spdy/pom.xml new file mode 100644 index 00000000000..3d3e42e19c4 --- /dev/null +++ b/jetty-spdy/pom.xml @@ -0,0 +1,88 @@ + + + + org.eclipse.jetty + jetty-project + 9.2.22.v20170606 + + + 4.0.0 + org.eclipse.jetty.spdy + spdy-parent + pom + Jetty :: SPDY :: Parent + http://www.eclipse.org/jetty + + + spdy-core + spdy-client + spdy-server + spdy-http-common + spdy-http-server + spdy-http-client-transport + spdy-example-webapp + spdy-alpn-tests + + + + + npn + + 1.7 + + + + + + + + + + + maven-pmd-plugin + + true + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.spdy.*;version="9.1" + org.eclipse.jetty.*;version="[9.0,10.0)",* + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/jetty-spdy/spdy-alpn-tests/pom.xml b/jetty-spdy/spdy-alpn-tests/pom.xml new file mode 100644 index 00000000000..9dfc87e1163 --- /dev/null +++ b/jetty-spdy/spdy-alpn-tests/pom.xml @@ -0,0 +1,93 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + + 4.0.0 + spdy-alpn-tests + Jetty :: SPDY :: ALPN Tests + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + jar + false + ${project.build.directory}/alpn + + + + + + + + maven-surefire-plugin + + -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + + + + + + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + provided + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-server + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + tests + test + + + junit + junit + test + + + + diff --git a/jetty-spdy/spdy-client/pom.xml b/jetty-spdy/spdy-client/pom.xml new file mode 100644 index 00000000000..bddf9480e87 --- /dev/null +++ b/jetty-spdy/spdy-client/pom.xml @@ -0,0 +1,66 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + + 4.0.0 + spdy-client + Jetty :: SPDY :: Client Binding + + + ${project.groupId}.client + + + http://www.eclipse.org/jetty + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.spdy.client;version="9.1" + !org.eclipse.jetty.npn,!org.eclipse.jetty.alpn,org.eclipse.jetty.*;version="[9.0,10.0)",* + + + + + + + + + + + org.eclipse.jetty.spdy + spdy-core + ${project.version} + + + org.eclipse.jetty + jetty-alpn-client + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty.npn + npn-api + ${npn.api.version} + provided + + + + diff --git a/jetty-spdy/spdy-core/pom.xml b/jetty-spdy/spdy-core/pom.xml new file mode 100644 index 00000000000..1bc3051bbfa --- /dev/null +++ b/jetty-spdy/spdy-core/pom.xml @@ -0,0 +1,35 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + + 4.0.0 + spdy-core + Jetty :: SPDY :: Core + + + ${project.groupId}.core + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.mockito + mockito-core + test + + + + diff --git a/jetty-spdy/spdy-example-webapp/pom.xml b/jetty-spdy/spdy-example-webapp/pom.xml new file mode 100644 index 00000000000..a1b886773ca --- /dev/null +++ b/jetty-spdy/spdy-example-webapp/pom.xml @@ -0,0 +1,84 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + 4.0.0 + spdy-example-webapp + war + Jetty :: SPDY :: HTTP Web Application + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 8888 + quit + + -Xbootclasspath/p:${settings.localRepository}/org/mortbay/jetty/npn/npn-boot/${npn.version}/npn-boot-${npn.version}.jar + + ${basedir}/src/main/config/example-jetty-spdy.xml + / + + run + run-war + deploy + start + stop + + + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + + + + + + + + + proxy + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 8888 + quit + + -Xbootclasspath/p:${settings.localRepository}/org/mortbay/jetty/npn/npn-boot/${npn.version}/npn-boot-${npn.version}.jar + + ${basedir}/src/main/config/example-jetty-spdy-proxy.xml + / + + run + run-war + deploy + start + stop + + + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + + + + + + + + + diff --git a/jetty-spdy/spdy-http-client-transport/pom.xml b/jetty-spdy/spdy-http-client-transport/pom.xml new file mode 100644 index 00000000000..c5be7203da6 --- /dev/null +++ b/jetty-spdy/spdy-http-client-transport/pom.xml @@ -0,0 +1,71 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + + 4.0.0 + spdy-http-client-transport + Jetty :: SPDY :: HTTP Client Transport + + + ${project.groupId}.client.http + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.spdy.client.http;version="9.1" + !org.eclipse.jetty.npn,org.eclipse.jetty.*;version="[9.0,10.0)",* + + + + + + + + + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.spdy + spdy-client + ${project.version} + + + org.eclipse.jetty.spdy + spdy-http-common + ${project.version} + + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + test + + + + diff --git a/jetty-spdy/spdy-http-common/pom.xml b/jetty-spdy/spdy-http-common/pom.xml new file mode 100644 index 00000000000..d661baa93db --- /dev/null +++ b/jetty-spdy/spdy-http-common/pom.xml @@ -0,0 +1,48 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + + 4.0.0 + spdy-http-common + Jetty :: SPDY :: HTTP Common + + + ${project.groupId}.http.common + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.spdy.http;version="9.1" + !org.eclipse.jetty.npn,org.eclipse.jetty.*;version="[9.0,10.0)",* + + + + + + + + + + + org.eclipse.jetty.spdy + spdy-core + ${project.version} + + + + diff --git a/jetty-spdy/spdy-http-server/pom.xml b/jetty-spdy/spdy-http-server/pom.xml new file mode 100644 index 00000000000..40a23b1be4c --- /dev/null +++ b/jetty-spdy/spdy-http-server/pom.xml @@ -0,0 +1,120 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + 4.0.0 + spdy-http-server + Jetty :: SPDY :: HTTP Server + + + ${project.groupId}.http.server + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jars + + jar + test-jar + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.spdy.server.http;version="9.1", + org.eclipse.jetty.spdy.server.proxy;version="9.1" + + !org.eclipse.jetty.npn,org.eclipse.jetty.*;version="[9.0,10.0)",* + + <_nouses>true + + + + + + + + + + + org.eclipse.jetty.spdy + spdy-http-common + ${project.version} + + + org.eclipse.jetty.spdy + spdy-server + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty + jetty-servlets + ${project.version} + test + + + org.eclipse.jetty.npn + npn-api + ${npn.api.version} + test + + + org.eclipse.jetty + jetty-continuation + ${project.version} + test + + + org.mockito + mockito-core + test + + + + diff --git a/jetty-spdy/spdy-server/pom.xml b/jetty-spdy/spdy-server/pom.xml new file mode 100644 index 00000000000..f96782a5e5c --- /dev/null +++ b/jetty-spdy/spdy-server/pom.xml @@ -0,0 +1,72 @@ + + + + org.eclipse.jetty.spdy + spdy-parent + 9.2.22.v20170606 + + + 4.0.0 + spdy-server + Jetty :: SPDY :: Server Binding + + + ${project.groupId}.server + + + http://www.eclipse.org/jetty + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.spdy.server;version="9.1" + org.eclipse.jetty.alpn;resolution:=optional,org.eclipse.jetty.alpn.server;resolution:=optional, org.eclipse.jetty.npn;resolution:=optional,org.eclipse.jetty.*;version="[9.0,10.0)",* + <_nouses>true + + + + + + + + + + + org.eclipse.jetty.spdy + spdy-core + ${project.version} + + + org.eclipse.jetty.spdy + spdy-client + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.npn + npn-api + ${npn.api.version} + provided + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + + diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index a06d6881886..b6d0f475eb6 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -1,73 +1,73 @@ - - - org.eclipse.jetty - jetty-project - 9.4.6-SNAPSHOT - - 4.0.0 - jetty-util - Jetty :: Utilities - Utility classes for Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.util - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.util.* - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${settings.localRepository} - - - - - - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.toolchain - jetty-perf-helper - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.slf4j - slf4j-api - provided - true - - - - org.slf4j - slf4j-jdk14 - ${slf4j-version} - test - - - + + + org.eclipse.jetty + jetty-project + 9.4.6-SNAPSHOT + + 4.0.0 + jetty-util + Jetty :: Utilities + Utility classes for Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.util + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.util.* + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${settings.localRepository} + + + + + + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.toolchain + jetty-perf-helper + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.slf4j + slf4j-api + provided + true + + + + org.slf4j + slf4j-jdk14 + ${slf4j-version} + test + + + From 8e3f950892c8e9b9d7ed24f00a1cc010e235f44f Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 6 Jun 2017 16:53:49 +0200 Subject: [PATCH 027/147] Issue #1503 Optionally strip IPv6 --- .../src/main/java/org/eclipse/jetty/util/HostPort.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java b/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java index c1db3636460..5e4eba9481b 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java @@ -22,9 +22,13 @@ package org.eclipse.jetty.util; * Parse an authority string into Host and Port *

Parse a string in the form "host:port", handling IPv4 an IPv6 hosts

* + *

The System property "org.eclipse.jetty.util.HostPort.STRIP_IPV6" can be set to a boolean + * value to control of the square brackets are stripped off IPv6 addresses.

*/ public class HostPort { + private final static boolean STRIP_IPV6 = Boolean.parseBoolean(System.getProperty("org.eclipse.jetty.util.HostPort.STRIP_IPV6","true")); + private final String _host; private final int _port; @@ -45,7 +49,7 @@ public class HostPort int close=authority.lastIndexOf(']'); if (close<0) throw new IllegalArgumentException("Bad IPv6 host"); - _host=authority.substring(0,close+1); + _host=STRIP_IPV6?authority.substring(0,close+1):authority.substring(1,close); if (authority.length()>close+1) { From b2187b3b1c83e2086debdf8c28f11f75da15e8b9 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 6 Jun 2017 17:00:22 +0200 Subject: [PATCH 028/147] Issue #1591 --- .../server/session/JDBCSessionDataStore.java | 216 +++++----------- .../jetty/server/session/JdbcTestHelper.java | 81 ++++-- .../session/SessionTableSchemaTest.java | 243 ++++++++++++++++++ ...tractClusteredInvalidationSessionTest.java | 6 +- .../AbstractClusteredLastAccessTimeTest.java | 6 +- .../AbstractClusteredOrphanedSessionTest.java | 6 +- ...AbstractClusteredSessionMigrationTest.java | 6 +- ...bstractClusteredSessionScavengingTest.java | 4 +- ...ractNonClusteredSessionScavengingTest.java | 12 +- .../AbstractProxySerializationTest.java | 6 +- .../session/AbstractSessionExpiryTest.java | 20 +- ...ctSessionInvalidateCreateScavengeTest.java | 4 +- 12 files changed, 405 insertions(+), 205 deletions(-) create mode 100644 tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionTableSchemaTest.java diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionDataStore.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionDataStore.java index 944ed1857bf..16eb3609a37 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionDataStore.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionDataStore.java @@ -25,7 +25,6 @@ import java.io.InputStream; import java.io.ObjectOutputStream; import java.sql.Connection; import java.sql.DatabaseMetaData; -import java.sql.ParameterMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; @@ -33,11 +32,10 @@ import java.sql.Statement; import java.util.HashSet; import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import org.eclipse.jetty.util.ClassLoadingObjectInputStream; +import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.log.Log; @@ -53,6 +51,11 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore { final static Logger LOG = Log.getLogger("org.eclipse.jetty.server.session"); + /** + * Used for Oracle and other databases where "" is treated as NULL + */ + public static final String NULL_CONTEXT_PATH = "/"; + protected boolean _initialized = false; private DatabaseAdaptor _dbAdaptor; private SessionTableSchema _sessionTableSchema; @@ -275,27 +278,24 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore " values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; } - public PreparedStatement getUpdateSessionStatement(Connection connection, String canonicalContextPath) + public PreparedStatement getUpdateSessionStatement(Connection connection, String id, SessionContext context) throws SQLException { String s = "update "+getSchemaTableName()+ " set "+getLastNodeColumn()+" = ?, "+getAccessTimeColumn()+" = ?, "+ getLastAccessTimeColumn()+" = ?, "+getLastSavedTimeColumn()+" = ?, "+getExpiryTimeColumn()+" = ?, "+ - getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where "; + getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where "+getIdColumn()+" = ? and "+getContextPathColumn()+ + " = ? and "+getVirtualHostColumn()+" = ?"; - if (canonicalContextPath == null || "".equals(canonicalContextPath)) - { - if (_dbAdaptor.isEmptyStringNull()) - { - s = s+getIdColumn()+" = ? and "+ - getContextPathColumn()+" is null and "+ - getVirtualHostColumn()+" = ?"; - return connection.prepareStatement(s); - } - } - - return connection.prepareStatement(s+getIdColumn()+" = ? and "+getContextPathColumn()+ - " = ? and "+getVirtualHostColumn()+" = ?"); + String cp = context.getCanonicalContextPath(); + if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; + + PreparedStatement statement = connection.prepareStatement(s); + statement.setString(8, id); + statement.setString(9, cp); + statement.setString(10, context.getVhost()); + return statement; } @@ -305,27 +305,16 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore if (_dbAdaptor == null) throw new IllegalStateException("No DB adaptor"); - - if (canonicalContextPath == null || "".equals(canonicalContextPath)) - { - if (_dbAdaptor.isEmptyStringNull()) - { - PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+ - " from "+getSchemaTableName()+" where "+ - getContextPathColumn()+" is null and "+ - getVirtualHostColumn()+" = ? and "+getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?"); - statement.setString(1, vhost); - statement.setLong(2, expiry); - return statement; - } - } + String cp = canonicalContextPath; + if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+ " from "+getSchemaTableName()+" where "+getContextPathColumn()+" = ? and "+ getVirtualHostColumn()+" = ? and "+ getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?"); - statement.setString(1, canonicalContextPath); + statement.setString(1, cp); statement.setString(2, vhost); statement.setLong(3, expiry); return statement; @@ -338,21 +327,9 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore if (_dbAdaptor == null) throw new IllegalStateException("No DB adaptor"); - if (sessionContext.getCanonicalContextPath() == null || "".equals(sessionContext.getCanonicalContextPath())) - { - if (_dbAdaptor.isEmptyStringNull()) - { - PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+ - " from "+getSchemaTableName()+" where "+ - getLastNodeColumn() + " = ? and "+ - getContextPathColumn()+" is null and "+ - getVirtualHostColumn()+" = ? and "+getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?"); - statement.setString(1, sessionContext.getWorkerName()); - statement.setString(2, sessionContext.getVhost()); - statement.setLong(3, expiry); - return statement; - } - } + String cp = sessionContext.getCanonicalContextPath(); + if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+ " from "+getSchemaTableName()+" where "+ @@ -362,7 +339,7 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore getExpiryTimeColumn()+" >0 and "+getExpiryTimeColumn()+" <= ?"); statement.setString(1, sessionContext.getWorkerName()); - statement.setString(2, sessionContext.getCanonicalContextPath()); + statement.setString(2, cp); statement.setString(3, sessionContext.getVhost()); statement.setLong(4, expiry); return statement; @@ -382,52 +359,27 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore } - public PreparedStatement getCheckSessionExistsStatement (Connection connection, String canonicalContextPath) + public PreparedStatement getCheckSessionExistsStatement (Connection connection, SessionContext context) throws SQLException { if (_dbAdaptor == null) throw new IllegalStateException("No DB adaptor"); - - if (canonicalContextPath == null || "".equals(canonicalContextPath)) - { - if (_dbAdaptor.isEmptyStringNull()) - { - PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+ - " from "+getSchemaTableName()+ - " where "+getIdColumn()+" = ? and "+ - getContextPathColumn()+" is null and "+ - getVirtualHostColumn()+" = ?"); - return statement; - } - } + String cp = context.getCanonicalContextPath(); + if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; PreparedStatement statement = connection.prepareStatement("select "+getIdColumn()+", "+getExpiryTimeColumn()+ " from "+getSchemaTableName()+ " where "+getIdColumn()+" = ? and "+ getContextPathColumn()+" = ? and "+ getVirtualHostColumn()+" = ?"); + statement.setString(2, cp); + statement.setString(3, context.getVhost()); return statement; } - public void fillCheckSessionExistsStatement (PreparedStatement statement, String id, SessionContext contextId) - throws SQLException - { - statement.clearParameters(); - ParameterMetaData metaData = statement.getParameterMetaData(); - if (metaData.getParameterCount() < 3) - { - statement.setString(1, id); - statement.setString(2, contextId.getVhost()); - } - else - { - statement.setString(1, id); - statement.setString(2, contextId.getCanonicalContextPath()); - statement.setString(3, contextId.getVhost()); - } - } - + public PreparedStatement getLoadStatement (Connection connection, String id, SessionContext contextId) throws SQLException @@ -436,26 +388,15 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore throw new IllegalStateException("No DB adaptor"); - if (contextId.getCanonicalContextPath() == null || "".equals(contextId.getCanonicalContextPath())) - { - if (_dbAdaptor.isEmptyStringNull()) - { - PreparedStatement statement = connection.prepareStatement("select * from "+getSchemaTableName()+ - " where "+getIdColumn()+" = ? and "+ - getContextPathColumn()+" is null and "+ - getVirtualHostColumn()+" = ?"); - statement.setString(1, id); - statement.setString(2, contextId.getVhost()); - - return statement; - } - } + String cp = contextId.getCanonicalContextPath(); + if (_dbAdaptor.isEmptyStringNull()&& StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; PreparedStatement statement = connection.prepareStatement("select * from "+getSchemaTableName()+ " where "+getIdColumn()+" = ? and "+getContextPathColumn()+ " = ? and "+getVirtualHostColumn()+" = ?"); statement.setString(1, id); - statement.setString(2, contextId.getCanonicalContextPath()); + statement.setString(2, cp); statement.setString(3, contextId.getVhost()); return statement; @@ -469,28 +410,21 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore if (_dbAdaptor == null) throw new IllegalStateException("No DB adaptor"); + String cp = contextId.getCanonicalContextPath(); + if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; + String s = "update "+getSchemaTableName()+ " set "+getLastNodeColumn()+" = ?, "+getAccessTimeColumn()+" = ?, "+ getLastAccessTimeColumn()+" = ?, "+getLastSavedTimeColumn()+" = ?, "+getExpiryTimeColumn()+" = ?, "+ - getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where "; + getMaxIntervalColumn()+" = ?, "+getMapColumn()+" = ? where "+getIdColumn()+" = ? and "+getContextPathColumn()+ + " = ? and "+getVirtualHostColumn()+" = ?"; - if (contextId.getCanonicalContextPath() == null || "".equals(contextId.getCanonicalContextPath())) - { - if (_dbAdaptor.isEmptyStringNull()) - { - PreparedStatement statement = connection.prepareStatement(s+getIdColumn()+" = ? and "+ - getContextPathColumn()+" is null and "+ - getVirtualHostColumn()+" = ?"); - statement.setString(1, id); - statement.setString(2, contextId.getVhost()); - return statement; - } - } - PreparedStatement statement = connection.prepareStatement(s+getIdColumn()+" = ? and "+getContextPathColumn()+ - " = ? and "+getVirtualHostColumn()+" = ?"); - statement.setString(1, id); - statement.setString(2, contextId.getCanonicalContextPath()); - statement.setString(3, contextId.getVhost()); + + PreparedStatement statement = connection.prepareStatement(s); + statement.setString(8, id); + statement.setString(9, cp); + statement.setString(10, contextId.getVhost()); return statement; } @@ -505,25 +439,15 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore throw new IllegalStateException("No DB adaptor"); - - if (contextId.getCanonicalContextPath() == null || "".equals(contextId.getCanonicalContextPath())) - { - if (_dbAdaptor.isEmptyStringNull()) - { - PreparedStatement statement = connection.prepareStatement("delete from "+getSchemaTableName()+ - " where "+getIdColumn()+" = ? and "+getContextPathColumn()+ - " = ? and "+getVirtualHostColumn()+" = ?"); - statement.setString(1, id); - statement.setString(2, contextId.getVhost()); - return statement; - } - } + String cp = contextId.getCanonicalContextPath(); + if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; PreparedStatement statement = connection.prepareStatement("delete from "+getSchemaTableName()+ " where "+getIdColumn()+" = ? and "+getContextPathColumn()+ " = ? and "+getVirtualHostColumn()+" = ?"); statement.setString(1, id); - statement.setString(2, contextId.getCanonicalContextPath()); + statement.setString(2, cp); statement.setString(3, contextId.getVhost()); return statement; @@ -722,8 +646,8 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore data.setLastNode(result.getString(_sessionTableSchema.getLastNodeColumn())); data.setLastSaved(result.getLong(_sessionTableSchema.getLastSavedTimeColumn())); data.setExpiry(result.getLong(_sessionTableSchema.getExpiryTimeColumn())); - data.setContextPath(result.getString(_sessionTableSchema.getContextPathColumn())); //TODO needed? this is part of the key now - data.setVhost(result.getString(_sessionTableSchema.getVirtualHostColumn())); //TODO needed??? this is part of the key now + data.setContextPath(_context.getCanonicalContextPath()); + data.setVhost(_context.getVhost()); try (InputStream is = _dbAdaptor.getBlobInputStream(result, _sessionTableSchema.getMapColumn()); ClassLoadingObjectInputStream ois = new ClassLoadingObjectInputStream(is)) @@ -815,7 +739,13 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore try (PreparedStatement statement = connection.prepareStatement(s)) { statement.setString(1, id); //session id - statement.setString(2, _context.getCanonicalContextPath()); //context path + + String cp = _context.getCanonicalContextPath(); + if (_dbAdaptor.isEmptyStringNull() && StringUtil.isBlank(cp)) + cp = NULL_CONTEXT_PATH; + + statement.setString(2, cp); //context path + statement.setString(3, _context.getVhost()); //first vhost statement.setString(4, data.getLastNode());//my node id statement.setLong(5, data.getAccessed());//accessTime @@ -845,11 +775,10 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore private void doUpdate (String id, SessionData data) throws Exception { - //TODO check if it is actually dirty && try to optimize the writing of lastAccessTime and expiryTime try (Connection connection = _dbAdaptor.getConnection()) { connection.setAutoCommit(true); - try (PreparedStatement statement = _sessionTableSchema.getUpdateSessionStatement(connection, _context.getCanonicalContextPath())) + try (PreparedStatement statement = _sessionTableSchema.getUpdateSessionStatement(connection, data.getId(), _context)) { statement.setString(1, data.getLastNode());//should be my node id statement.setLong(2, data.getAccessed());//accessTime @@ -865,19 +794,6 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore byte[] bytes = baos.toByteArray(); ByteArrayInputStream bais = new ByteArrayInputStream(bytes); statement.setBinaryStream(7, bais, bytes.length);//attribute map as blob - - if ((_context.getCanonicalContextPath() == null || "".equals(_context.getCanonicalContextPath())) && _dbAdaptor.isEmptyStringNull()) - { - statement.setString(8, id); - statement.setString(9, _context.getVhost()); - } - else - { - statement.setString(8, id); - statement.setString(9, _context.getCanonicalContextPath()); - statement.setString(10, _context.getVhost()); - } - statement.executeUpdate(); if (LOG.isDebugEnabled()) @@ -968,11 +884,11 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore if (!notExpiredInDB.isEmpty()) { //we have some sessions to check - try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context.getCanonicalContextPath())) + try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context)) { for (String k: notExpiredInDB) { - _sessionTableSchema.fillCheckSessionExistsStatement (checkSessionExists, k, _context); + checkSessionExists.setString(1, k); try (ResultSet result = checkSessionExists.executeQuery()) { if (!result.next()) @@ -1044,9 +960,9 @@ public class JDBCSessionDataStore extends AbstractSessionDataStore connection.setAutoCommit(true); //non-expired session exists? - try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context.getCanonicalContextPath())) + try (PreparedStatement checkSessionExists = _sessionTableSchema.getCheckSessionExistsStatement(connection, _context)) { - _sessionTableSchema.fillCheckSessionExistsStatement (checkSessionExists, id, _context); + checkSessionExists.setString(1, id); try (ResultSet result = checkSessionExists.executeQuery()) { if (!result.next()) diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java index ec6c0066aa5..13e3010d7ff 100644 --- a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java +++ b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java @@ -18,11 +18,16 @@ package org.eclipse.jetty.server.session; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.util.HashSet; import java.util.Set; @@ -87,32 +92,38 @@ public class JdbcTestHelper */ public static SessionDataStoreFactory newSessionDataStoreFactory() { - JDBCSessionDataStoreFactory factory = new JDBCSessionDataStoreFactory(); - DatabaseAdaptor da = new DatabaseAdaptor(); da.setDriverInfo(DRIVER_CLASS, DEFAULT_CONNECTION_URL); - factory.setDatabaseAdaptor(da); - - JDBCSessionDataStore.SessionTableSchema sessionTableSchema = new JDBCSessionDataStore.SessionTableSchema(); - sessionTableSchema.setTableName(TABLE); - sessionTableSchema.setIdColumn(ID_COL); - sessionTableSchema.setAccessTimeColumn(ACCESS_COL); - sessionTableSchema.setContextPathColumn(CONTEXT_COL); - sessionTableSchema.setCookieTimeColumn(COOKIE_COL); - sessionTableSchema.setCreateTimeColumn(CREATE_COL); - sessionTableSchema.setExpiryTimeColumn(EXPIRY_COL); - sessionTableSchema.setLastAccessTimeColumn(LAST_ACCESS_COL); - sessionTableSchema.setLastNodeColumn(LAST_NODE_COL); - sessionTableSchema.setLastSavedTimeColumn(LAST_SAVE_COL); - sessionTableSchema.setMapColumn(MAP_COL); - sessionTableSchema.setMaxIntervalColumn(MAX_IDLE_COL); - factory.setSessionTableSchema(sessionTableSchema); - return factory; + return newSessionDataStoreFactory(da); } - + public static SessionDataStoreFactory newSessionDataStoreFactory(DatabaseAdaptor da) + { + JDBCSessionDataStoreFactory factory = new JDBCSessionDataStoreFactory(); + factory.setDatabaseAdaptor(da); + JDBCSessionDataStore.SessionTableSchema sessionTableSchema = newSessionTableSchema(); + factory.setSessionTableSchema(sessionTableSchema); + return factory; + } + public static JDBCSessionDataStore.SessionTableSchema newSessionTableSchema() + { + JDBCSessionDataStore.SessionTableSchema sessionTableSchema = new JDBCSessionDataStore.SessionTableSchema(); + sessionTableSchema.setTableName(TABLE); + sessionTableSchema.setIdColumn(ID_COL); + sessionTableSchema.setAccessTimeColumn(ACCESS_COL); + sessionTableSchema.setContextPathColumn(CONTEXT_COL); + sessionTableSchema.setCookieTimeColumn(COOKIE_COL); + sessionTableSchema.setCreateTimeColumn(CREATE_COL); + sessionTableSchema.setExpiryTimeColumn(EXPIRY_COL); + sessionTableSchema.setLastAccessTimeColumn(LAST_ACCESS_COL); + sessionTableSchema.setLastNodeColumn(LAST_NODE_COL); + sessionTableSchema.setLastSavedTimeColumn(LAST_SAVE_COL); + sessionTableSchema.setMapColumn(MAP_COL); + sessionTableSchema.setMaxIntervalColumn(MAX_IDLE_COL); + return sessionTableSchema; + } public static boolean existsInSessionTable(String id, boolean verbose) throws Exception @@ -147,6 +158,36 @@ public class JdbcTestHelper } + public static void insertSession (String id, String contextPath, String vhost) + throws Exception + { + Class.forName(DRIVER_CLASS); + try (Connection con=DriverManager.getConnection(DEFAULT_CONNECTION_URL);) + { + PreparedStatement statement = con.prepareStatement("insert into "+TABLE+ + " ("+ID_COL+", "+CONTEXT_COL+", virtualHost, "+LAST_NODE_COL+ + ", "+ACCESS_COL+", "+LAST_ACCESS_COL+", "+CREATE_COL+", "+COOKIE_COL+ + ", "+LAST_SAVE_COL+", "+EXPIRY_COL+" "+") "+ + " values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + + statement.setString(1, id); + statement.setString(2, contextPath); + statement.setString(3, vhost); + statement.setString(4, "0"); + + statement.setLong(5, System.currentTimeMillis()); + statement.setLong(6, System.currentTimeMillis()); + statement.setLong(7, System.currentTimeMillis()); + statement.setLong(8, System.currentTimeMillis()); + + statement.setLong(9, System.currentTimeMillis()); + statement.setLong(10, System.currentTimeMillis()); + + statement.execute(); + assertEquals(1,statement.getUpdateCount()); + } + } + public static Set getSessionIds () throws Exception diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionTableSchemaTest.java b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionTableSchemaTest.java new file mode 100644 index 00000000000..c5564a0e1f3 --- /dev/null +++ b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/SessionTableSchemaTest.java @@ -0,0 +1,243 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.server.session; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayInputStream; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; + +import org.eclipse.jetty.server.handler.ContextHandler; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +/** + * SessionTableSchemaTest + * + * Test the SessionTableSchema behaviour when the database treats "" as a NULL, + * like Oracle does. + * + */ +public class SessionTableSchemaTest +{ + DatabaseAdaptor _da; + JDBCSessionDataStore.SessionTableSchema _tableSchema; + + + @Before + public void setUp() throws Exception + { + //pretend to be an Oracle-like database that treats "" as NULL + _da = new DatabaseAdaptor() + { + + /** + * @see org.eclipse.jetty.server.session.DatabaseAdaptor#isEmptyStringNull() + */ + @Override + public boolean isEmptyStringNull() + { + return true; //test special handling for oracle + } + + }; + _da.setDriverInfo(JdbcTestHelper.DRIVER_CLASS, JdbcTestHelper.DEFAULT_CONNECTION_URL); + _tableSchema = JdbcTestHelper.newSessionTableSchema(); + _tableSchema.setDatabaseAdaptor(_da); + } + + + @After + public void tearDown() throws Exception + { + JdbcTestHelper.shutdown(null); + } + + + @Test + public void testLoad() + throws Exception + { + //set up the db + _da.initialize(); + _tableSchema.prepareTables(); + + //insert a fake session at the root context + JdbcTestHelper.insertSession("1234", "/", "0.0.0.0"); + + //test if it can be seen + try (Connection con = _da.getConnection()) + { + //make a root context + ContextHandler handler = new ContextHandler(); + handler.setContextPath("/"); + SessionContext sc = new SessionContext("0", handler.getServletContext()); + //test the load statement + PreparedStatement s = _tableSchema.getLoadStatement(con, "1234", sc); + ResultSet rs = s.executeQuery(); + assertTrue(rs.next()); + } + } + + @Test + public void testExists() + throws Exception + { + //set up the db + _da.initialize(); + _tableSchema.prepareTables(); + + //insert a fake session at the root context + JdbcTestHelper.insertSession("1234", "/", "0.0.0.0"); + + //test if it can be seen + try (Connection con = _da.getConnection()) + { + ContextHandler handler = new ContextHandler(); + handler.setContextPath("/"); + SessionContext sc = new SessionContext("0", handler.getServletContext()); + PreparedStatement s = _tableSchema.getCheckSessionExistsStatement(con, sc); + s.setString(1, "1234"); + ResultSet rs = s.executeQuery(); + assertTrue(rs.next()); + } + } + + @Test + public void testDelete() + throws Exception + { + //set up the db + _da.initialize(); + _tableSchema.prepareTables(); + + //insert a fake session at the root context + JdbcTestHelper.insertSession("1234", "/", "0.0.0.0"); + + //test if it can be deleted + try (Connection con = _da.getConnection()) + { + ContextHandler handler = new ContextHandler(); + handler.setContextPath("/"); + SessionContext sc = new SessionContext("0", handler.getServletContext()); + PreparedStatement s = _tableSchema.getDeleteStatement(con, "1234", sc); + assertEquals(1,s.executeUpdate()); + + assertFalse(JdbcTestHelper.existsInSessionTable("1234", false)); + } + } + + + @Test + public void testExpired() + throws Exception + { + //set up the db + _da.initialize(); + _tableSchema.prepareTables(); + + //insert a fake session at the root context + JdbcTestHelper.insertSession("1234", "/", "0.0.0.0"); + + + try (Connection con = _da.getConnection()) + { + ContextHandler handler = new ContextHandler(); + handler.setContextPath("/"); + SessionContext sc = new SessionContext("0", handler.getServletContext()); + PreparedStatement s = _tableSchema.getExpiredSessionsStatement(con, + sc.getCanonicalContextPath(), + sc.getVhost(), + (System.currentTimeMillis()+100L)); + ResultSet rs = s.executeQuery(); + assertTrue(rs.next()); + assertEquals("1234", rs.getString(1)); + } + } + + @Test + public void testMyExpiredSessions () + throws Exception + { + //set up the db + _da.initialize(); + _tableSchema.prepareTables(); + + //insert a fake session at the root context + JdbcTestHelper.insertSession("1234", "/", "0.0.0.0"); + + + try (Connection con = _da.getConnection()) + { + ContextHandler handler = new ContextHandler(); + handler.setContextPath("/"); + SessionContext sc = new SessionContext("0", handler.getServletContext()); + PreparedStatement s = _tableSchema.getMyExpiredSessionsStatement(con, + sc, + (System.currentTimeMillis()+100L)); + ResultSet rs = s.executeQuery(); + assertTrue(rs.next()); + assertEquals("1234", rs.getString(1)); + } + } + + + @Test + public void testUpdate() + throws Exception + { + //set up the db + _da.initialize(); + _tableSchema.prepareTables(); + + //insert a fake session at the root context + JdbcTestHelper.insertSession("1234", "/", "0.0.0.0"); + + + try (Connection con = _da.getConnection()) + { + ContextHandler handler = new ContextHandler(); + handler.setContextPath("/"); + SessionContext sc = new SessionContext("0", handler.getServletContext()); + PreparedStatement s = _tableSchema.getUpdateStatement(con, + "1234", + sc); + + s.setString(1, "0");//should be my node id + s.setLong(2, System.currentTimeMillis()); + s.setLong(3, System.currentTimeMillis()); + s.setLong(4, System.currentTimeMillis()); + s.setLong(5, System.currentTimeMillis()); + s.setLong(6, 2000L); + + + byte[] bytes = new byte[3]; + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); + s.setBinaryStream(7, bais, bytes.length);//attribute map as blob + + assertEquals(1, s.executeUpdate()); + } + + } +} diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java index 4f69df0aaa6..ccd39817ee0 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java @@ -52,7 +52,7 @@ public abstract class AbstractClusteredInvalidationSessionTest extends AbstractT @Test public void testInvalidation() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int maxInactiveInterval = 30; int scavengeInterval = 1; @@ -84,8 +84,8 @@ public abstract class AbstractClusteredInvalidationSessionTest extends AbstractT try { String[] urls = new String[2]; - urls[0] = "http://localhost:" + port1 + contextPath + servletMapping; - urls[1] = "http://localhost:" + port2 + contextPath + servletMapping; + urls[0] = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); + urls[1] = "http://localhost:" + port2 + contextPath + servletMapping.substring(1); // Create the session on node1 ContentResponse response1 = client.GET(urls[0] + "?action=init"); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredLastAccessTimeTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredLastAccessTimeTest.java index 19c69697565..b8d252c028e 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredLastAccessTimeTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredLastAccessTimeTest.java @@ -57,7 +57,7 @@ public abstract class AbstractClusteredLastAccessTimeTest extends AbstractTestBa @Test public void testLastAccessTime() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int maxInactivePeriod = 8; //session will timeout after 8 seconds int scavengePeriod = 2; //scavenging occurs every 2 seconds @@ -97,7 +97,7 @@ public abstract class AbstractClusteredLastAccessTimeTest extends AbstractTestBa try { // Perform one request to server1 to create a session - ContentResponse response1 = client.GET("http://localhost:" + port1 + contextPath + servletMapping + "?action=init"); + ContentResponse response1 = client.GET("http://localhost:" + port1 + contextPath + servletMapping.substring(1) + "?action=init"); assertEquals(HttpServletResponse.SC_OK, response1.getStatus()); assertEquals("test", response1.getContentAsString()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); @@ -116,7 +116,7 @@ public abstract class AbstractClusteredLastAccessTimeTest extends AbstractTestBa int requestInterval = 500; for (int i = 0; i < maxInactivePeriod * (1000 / requestInterval); ++i) { - Request request = client.newRequest("http://localhost:" + port2 + contextPath + servletMapping); + Request request = client.newRequest("http://localhost:" + port2 + contextPath + servletMapping.substring(1)); request.header("Cookie", sessionCookie); ContentResponse response2 = request.send(); assertEquals(HttpServletResponse.SC_OK , response2.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredOrphanedSessionTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredOrphanedSessionTest.java index df8deaa760f..9583cc6e5ef 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredOrphanedSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredOrphanedSessionTest.java @@ -52,7 +52,7 @@ public abstract class AbstractClusteredOrphanedSessionTest extends AbstractTestB public void testOrphanedSession() throws Exception { // Disable scavenging for the first server, so that we simulate its "crash". - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int inactivePeriod = 5; DefaultSessionCacheFactory cacheFactory = new DefaultSessionCacheFactory(); @@ -85,7 +85,7 @@ public abstract class AbstractClusteredOrphanedSessionTest extends AbstractTestB try { // Connect to server1 to create a session and get its session cookie - ContentResponse response1 = client.GET("http://localhost:" + port1 + contextPath + servletMapping + "?action=init"); + ContentResponse response1 = client.GET("http://localhost:" + port1 + contextPath + servletMapping.substring(1) + "?action=init"); assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); @@ -98,7 +98,7 @@ public abstract class AbstractClusteredOrphanedSessionTest extends AbstractTestB Thread.sleep(TimeUnit.SECONDS.toMillis(inactivePeriod + 2L * scavengePeriod)); // Perform one request to server2 to be sure that the session has been expired - Request request = client.newRequest("http://localhost:" + port2 + contextPath + servletMapping + "?action=check"); + Request request = client.newRequest("http://localhost:" + port2 + contextPath + servletMapping.substring(1) + "?action=check"); request.header("Cookie", sessionCookie); ContentResponse response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionMigrationTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionMigrationTest.java index 3277cad7928..181e2a38cd7 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionMigrationTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionMigrationTest.java @@ -47,7 +47,7 @@ public abstract class AbstractClusteredSessionMigrationTest extends AbstractTest @Test public void testSessionMigration() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; DefaultSessionCacheFactory cacheFactory = new DefaultSessionCacheFactory(); @@ -79,7 +79,7 @@ public abstract class AbstractClusteredSessionMigrationTest extends AbstractTest { // Perform one request to server1 to create a session int value = 1; - Request request1 = client.POST("http://localhost:" + port1 + contextPath + servletMapping + "?action=set&value=" + value); + Request request1 = client.POST("http://localhost:" + port1 + contextPath + servletMapping.substring(1) + "?action=set&value=" + value); ContentResponse response1 = request1.send(); assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); @@ -89,7 +89,7 @@ public abstract class AbstractClusteredSessionMigrationTest extends AbstractTest // Perform a request to server2 using the session cookie from the previous request // This should migrate the session from server1 to server2. - Request request2 = client.newRequest("http://localhost:" + port2 + contextPath + servletMapping + "?action=get"); + Request request2 = client.newRequest("http://localhost:" + port2 + contextPath + servletMapping.substring(1) + "?action=get"); request2.header("Cookie", sessionCookie); ContentResponse response2 = request2.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java index 4dd9903ea5f..1e624e5d5f3 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java @@ -82,7 +82,7 @@ public abstract class AbstractClusteredSessionScavengingTest extends AbstractTes @Test public void testNoScavenging() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int inactivePeriod = 3; int scavengePeriod = 0; @@ -109,7 +109,7 @@ public abstract class AbstractClusteredSessionScavengingTest extends AbstractTes client.start(); try { - String url = "http://localhost:" + port1 + contextPath + servletMapping; + String url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); // Create the session diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java index 3fd448ad9e5..c4695b8aec9 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java @@ -82,7 +82,7 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract _dataStore = context.getSessionHandler().getSessionCache().getSessionDataStore(); context.addServlet(TestServlet.class, servletMapping); - String contextPath = ""; + String contextPath = "/"; try { @@ -92,7 +92,7 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract client.start(); try { - ContentResponse response = client.GET("http://localhost:" + port + contextPath + servletMapping + "?action=create"); + ContentResponse response = client.GET("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=create"); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); @@ -106,7 +106,7 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract // The session should not be there anymore, but we present an old cookie // The server should create a new session. - Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=old-create"); + Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=old-create"); request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -139,7 +139,7 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract ServletContextHandler context = server.addContext("/"); _dataStore = context.getSessionHandler().getSessionCache().getSessionDataStore(); context.addServlet(TestServlet.class, servletMapping); - String contextPath = ""; + String contextPath = "/"; try { @@ -150,7 +150,7 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract try { //create an immortal session - ContentResponse response = client.GET("http://localhost:" + port + contextPath + servletMapping + "?action=create"); + ContentResponse response = client.GET("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=create"); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); @@ -163,7 +163,7 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract assertSession(TestServer.extractSessionId(sessionCookie), true); // Test that the session is still there - Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=old-test"); + Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=old-test"); request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java index de2541cd9d4..431b17b3805 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java @@ -68,7 +68,7 @@ public abstract class AbstractProxySerializationTest extends AbstractTestBase @Test public void testProxySerialization() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int scavengePeriod = 10; @@ -104,7 +104,7 @@ public abstract class AbstractProxySerializationTest extends AbstractTestBase client.start(); try { - ContentResponse response = client.GET("http://localhost:" + port + contextPath + servletMapping + "?action=create"); + ContentResponse response = client.GET("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=create"); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); @@ -118,7 +118,7 @@ public abstract class AbstractProxySerializationTest extends AbstractTestBase context.start(); // Make another request using the session id from before - Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=test"); + Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=test"); request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java index 2e34fe1a455..fa2c153b73f 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java @@ -107,7 +107,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase @Test public void testSessionExpiresWithListener() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int inactivePeriod = 3; int scavengePeriod = 1; @@ -134,7 +134,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase { HttpClient client = new HttpClient(); client.start(); - String url = "http://localhost:" + port1 + contextPath + servletMapping; + String url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); //make a request to set up a session on the server ContentResponse response1 = client.GET(url + "?action=init"); @@ -167,7 +167,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase @Test public void testSessionNotExpired() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int inactivePeriod = 20; int scavengePeriod = 10; @@ -190,7 +190,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase int port1 = server1.getPort(); client.start(); - String url = "http://localhost:" + port1 + contextPath + servletMapping; + String url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); //make a request to set up a session on the server ContentResponse response = client.GET(url + "?action=init"); @@ -207,7 +207,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase //start the server again, before the session times out server1.start(); port1 = server1.getPort(); - url = "http://localhost:" + port1 + contextPath + servletMapping; + url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); //make another request, the session should not have expired Request request = client.newRequest(url + "?action=notexpired"); @@ -234,7 +234,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int inactivePeriod = 4; int scavengePeriod = 1; @@ -261,7 +261,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase { HttpClient client = new HttpClient(); client.start(); - String url = "http://localhost:" + port1 + contextPath + servletMapping; + String url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); //make a request to set up a session on the server ContentResponse response1 = client.GET(url + "?action=init"); @@ -288,7 +288,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase pause(inactivePeriod+(scavengePeriod*2)); port1 = server1.getPort(); - url = "http://localhost:" + port1 + contextPath + servletMapping; + url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); //make another request, the session should have expired Request request = client.newRequest(url + "?action=test"); @@ -310,7 +310,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase @Test public void testRequestForSessionWithChangedTimeout () throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int inactivePeriod = 5; int scavengePeriod = 1; @@ -337,7 +337,7 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase { HttpClient client = new HttpClient(); client.start(); - String url = "http://localhost:" + port1 + contextPath + servletMapping; + String url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); //make a request to set up a session on the server with the session manager's inactive timeout ContentResponse response = client.GET(url + "?action=init"); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java index b700ec64fd3..88edd817e55 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java @@ -87,7 +87,7 @@ public abstract class AbstractSessionInvalidateCreateScavengeTest extends Abstra @Test public void testSessionScavenge() throws Exception { - String contextPath = ""; + String contextPath = "/"; String servletMapping = "/server"; int inactivePeriod = 6; int scavengePeriod = 3; @@ -115,7 +115,7 @@ public abstract class AbstractSessionInvalidateCreateScavengeTest extends Abstra client.start(); try { - String url = "http://localhost:" + port1 + contextPath + servletMapping; + String url = "http://localhost:" + port1 + contextPath + servletMapping.substring(1); // Create the session From d3e42cf064528ed79d81a3f8a80f20925d6e7122 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 6 Jun 2017 17:04:49 +0200 Subject: [PATCH 029/147] Issue #1503 Optionally strip IPv6. Fixed inverted boolean --- .../src/main/java/org/eclipse/jetty/util/HostPort.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java b/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java index 5e4eba9481b..250c296fae3 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/HostPort.java @@ -23,11 +23,11 @@ package org.eclipse.jetty.util; *

Parse a string in the form "host:port", handling IPv4 an IPv6 hosts

* *

The System property "org.eclipse.jetty.util.HostPort.STRIP_IPV6" can be set to a boolean - * value to control of the square brackets are stripped off IPv6 addresses.

+ * value to control of the square brackets are stripped off IPv6 addresses (default false).

*/ public class HostPort { - private final static boolean STRIP_IPV6 = Boolean.parseBoolean(System.getProperty("org.eclipse.jetty.util.HostPort.STRIP_IPV6","true")); + private final static boolean STRIP_IPV6 = Boolean.parseBoolean(System.getProperty("org.eclipse.jetty.util.HostPort.STRIP_IPV6","false")); private final String _host; private final int _port; @@ -49,7 +49,7 @@ public class HostPort int close=authority.lastIndexOf(']'); if (close<0) throw new IllegalArgumentException("Bad IPv6 host"); - _host=STRIP_IPV6?authority.substring(0,close+1):authority.substring(1,close); + _host=STRIP_IPV6?authority.substring(1,close):authority.substring(0,close+1); if (authority.length()>close+1) { From 3fdbcffbbdb421634b40d5df00f55ab2ec7dbc01 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 6 Jun 2017 08:55:12 -0700 Subject: [PATCH 030/147] Updating to version 9.2.23-SNAPSHOT --- VERSION.txt | 6 +- aggregates/jetty-all/pom.xml | 462 +++--- apache-jsp/pom.xml | 239 +-- apache-jstl/pom.xml | 133 +- examples/async-rest/async-rest-jar/pom.xml | 63 +- examples/async-rest/async-rest-webapp/pom.xml | 66 +- examples/async-rest/pom.xml | 34 +- examples/embedded/pom.xml | 250 ++-- examples/pom.xml | 85 +- jetty-alpn/jetty-alpn-client/pom.xml | 141 +- jetty-alpn/jetty-alpn-server/pom.xml | 168 ++- jetty-alpn/pom.xml | 46 +- jetty-annotations/pom.xml | 180 ++- jetty-ant/pom.xml | 161 +- jetty-cdi/pom.xml | 76 +- jetty-client/pom.xml | 249 ++-- jetty-continuation/pom.xml | 95 +- jetty-deploy/pom.xml | 145 +- jetty-distribution/pom.xml | 1305 +++++++++++------ jetty-fcgi/fcgi-client/pom.xml | 80 +- jetty-fcgi/fcgi-server/pom.xml | 140 +- jetty-fcgi/pom.xml | 56 +- jetty-http-spi/pom.xml | 144 +- jetty-http/pom.xml | 148 +- jetty-io/pom.xml | 108 +- jetty-jaas/pom.xml | 122 +- jetty-jaspi/pom.xml | 174 ++- jetty-jmx/pom.xml | 131 +- jetty-jndi/pom.xml | 158 +- jetty-jsp/pom.xml | 2 +- jetty-jspc-maven-plugin/pom.xml | 245 ++-- jetty-maven-plugin/pom.xml | 349 ++--- jetty-monitor/pom.xml | 230 +-- jetty-nosql/pom.xml | 151 +- jetty-osgi/jetty-osgi-alpn/pom.xml | 105 +- jetty-osgi/jetty-osgi-boot-jsp/pom.xml | 325 ++-- jetty-osgi/jetty-osgi-boot-warurl/pom.xml | 130 +- jetty-osgi/jetty-osgi-boot/pom.xml | 257 ++-- jetty-osgi/jetty-osgi-httpservice/pom.xml | 208 +-- jetty-osgi/pom.xml | 397 +++-- jetty-osgi/test-jetty-osgi-context/pom.xml | 218 +-- jetty-osgi/test-jetty-osgi-webapp/pom.xml | 199 +-- jetty-osgi/test-jetty-osgi/pom.xml | 890 +++++------ jetty-plus/pom.xml | 171 ++- jetty-proxy/pom.xml | 173 ++- jetty-quickstart/pom.xml | 199 +-- jetty-rewrite/pom.xml | 140 +- jetty-runner/pom.xml | 226 ++- jetty-security/pom.xml | 141 +- jetty-server/pom.xml | 205 ++- jetty-servlet/pom.xml | 164 ++- jetty-servlets/pom.xml | 202 +-- jetty-spdy/pom.xml | 2 +- jetty-spdy/spdy-alpn-tests/pom.xml | 2 +- jetty-spdy/spdy-client/pom.xml | 2 +- jetty-spdy/spdy-core/pom.xml | 2 +- jetty-spdy/spdy-example-webapp/pom.xml | 2 +- jetty-spdy/spdy-http-client-transport/pom.xml | 2 +- jetty-spdy/spdy-http-common/pom.xml | 2 +- jetty-spdy/spdy-http-server/pom.xml | 2 +- jetty-spdy/spdy-server/pom.xml | 2 +- jetty-spring/pom.xml | 130 +- jetty-start/pom.xml | 87 +- jetty-util-ajax/pom.xml | 134 +- jetty-util/pom.xml | 179 ++- jetty-webapp/pom.xml | 183 ++- .../javax-websocket-client-impl/pom.xml | 200 +-- .../javax-websocket-server-impl/pom.xml | 167 ++- jetty-websocket/pom.xml | 131 +- jetty-websocket/websocket-api/pom.xml | 116 +- jetty-websocket/websocket-client/pom.xml | 246 ++-- jetty-websocket/websocket-common/pom.xml | 163 +- jetty-websocket/websocket-server/pom.xml | 213 +-- jetty-websocket/websocket-servlet/pom.xml | 119 +- jetty-xml/pom.xml | 100 +- pom.xml | 2 +- tests/pom.xml | 116 +- tests/test-continuation/pom.xml | 110 +- tests/test-integration/pom.xml | 278 ++-- tests/test-jmx/jmx-webapp-it/pom.xml | 276 +++- tests/test-jmx/jmx-webapp/pom.xml | 107 +- tests/test-jmx/pom.xml | 51 +- tests/test-loginservice/pom.xml | 142 +- tests/test-quickstart/pom.xml | 367 +++-- tests/test-sessions/pom.xml | 64 +- .../test-sessions/test-hash-sessions/pom.xml | 124 +- .../test-sessions/test-jdbc-sessions/pom.xml | 146 +- .../test-mongodb-sessions/pom.xml | 254 ++-- .../test-sessions-common/pom.xml | 92 +- tests/test-webapps/pom.xml | 101 +- tests/test-webapps/test-jaas-webapp/pom.xml | 150 +- tests/test-webapps/test-jetty-webapp/pom.xml | 522 +++---- tests/test-webapps/test-jndi-webapp/pom.xml | 293 ++-- .../test-webapps/test-mock-resources/pom.xml | 159 +- tests/test-webapps/test-proxy-webapp/pom.xml | 214 ++- tests/test-webapps/test-servlet-spec/pom.xml | 60 +- .../test-container-initializer/pom.xml | 109 +- .../test-spec-webapp/pom.xml | 465 +++--- .../test-web-fragment/pom.xml | 106 +- .../test-webapps/test-webapp-rfc2616/pom.xml | 126 +- 100 files changed, 9580 insertions(+), 7532 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 6c38881894b..0c4e19d0b4f 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,7 +1,7 @@ -jetty-9.4.7-SNAPSHOT +jetty-9.2.23-SNAPSHOT -jetty-9.4.6.v20170531 - 31 May 2017 - + 523 TLS close behaviour breaking session resumption +jetty-9.2.22.v20170606 - 06 June 2017 + + 920 no main manifest attribute, in jetty-runner-9.2.19.v20160908.jar + 1108 Please improve logging in SslContextFactory when there are no approved cipher suites + 1505 Adding jetty.base.uri and jetty.home.uri diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml index 57e52dd9344..665303d7575 100644 --- a/aggregates/jetty-all/pom.xml +++ b/aggregates/jetty-all/pom.xml @@ -1,232 +1,230 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - ../../pom.xml - - 4.0.0 - org.eclipse.jetty.aggregate - jetty-all - Jetty :: Aggregate :: All core Jetty - UberJar for Core Jetty features - pom - http://www.eclipse.org/jetty - - ${project.build.directory}/${project.artifactId}-${project.version}-uber.jar - ${project.build.directory}/gen-resources - - - - - org.apache.maven.plugins - maven-resources-plugin - - - massage-manifest - generate-resources - - copy-resources - - - ${gen-resources-dir} - - - src/main/resources - true - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - org.eclipse.jetty.toolchain - jetty-build-support - 1.3 - - - - - uberjar - package - - shade - - - true - uber - ${uber-jar} - - - - ${gen-resources-dir} - - - - - *:* - - META-INF/LICENSE.txt - META-INF/*.MF - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - javax:* - org.eclipse.jetty.orbit:* - org.mortbay.jetty:* - org.mortbay.jetty.alpn:* - org.slf4j:* - org.ow2.asm:* - *:javax - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - package - - attach-artifact - - - - - ${uber-jar} - jar - uber - - - - - - - - - - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-jaspi - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - - - - org.eclipse.jetty - jetty-alpn-client - ${project.version} - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - - - org.eclipse.jetty.http2 - http2-client - ${project.version} - - - - javax.websocket - javax.websocket-api - - - javax.servlet - javax.servlet-api - - - javax.transaction - javax.transaction-api - - - org.eclipse.jetty.orbit - javax.mail.glassfish - - - org.slf4j - slf4j-api - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + ../../pom.xml + + 4.0.0 + org.eclipse.jetty.aggregate + jetty-all + Jetty :: Aggregate :: All core Jetty + http://www.eclipse.org/jetty + + ${project.build.directory}/sources + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-dependencies + + unpack-dependencies + + + **/MANIFEST.MF,javax/** + javax + javax,org.eclipse.jetty.orbit,org.mortbay.jetty.npn,org.slf4j,org.ow2.asm + ${project.build.directory}/classes + false + true + + + + unpack-source + generate-sources + + unpack-dependencies + + + sources + **/* + META-INF/**,**/Servlet3Continuation*,**/Jetty6Continuation* + org.eclipse.jetty,org.eclipse.jetty.websocket + javax + javax,org.eclipse.jetty.orbit,org.mortbay.jetty.npn,org.slf4j,org.ow2.asm + ${project.build.directory}/sources + true + true + + + + + + org.apache.maven.plugins + + maven-jar-plugin + + + package + package + + jar + + + + + + + development + http://eclipse.org/jetty + ${user.name} + org.eclipse.jetty + http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/NOTICE.txt + Jetty + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + javadoc-jar + compile + + jar + + + + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + true + + + + + + + + + org.eclipse.jetty + jetty-client + ${project.version} + provided + + + org.eclipse.jetty + jetty-deploy + ${project.version} + provided + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + provided + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + provided + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + provided + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + provided + + + org.eclipse.jetty + jetty-jmx + ${project.version} + provided + + + org.eclipse.jetty + jetty-plus + ${project.version} + provided + + + org.eclipse.jetty + jetty-annotations + ${project.version} + provided + + + org.eclipse.jetty + jetty-util + ${project.version} + provided + + + org.eclipse.jetty + jetty-jaspi + ${project.version} + provided + + + org.eclipse.jetty + jetty-jndi + ${project.version} + provided + + + org.eclipse.jetty + jetty-rewrite + ${project.version} + provided + + + org.eclipse.jetty + jetty-servlets + ${project.version} + provided + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + provided + + + + javax.websocket + javax.websocket-api + compile + + + javax.servlet + javax.servlet-api + compile + + + javax.transaction + javax.transaction-api + compile + true + + + org.eclipse.jetty.orbit + javax.mail.glassfish + compile + true + + + org.slf4j + slf4j-api + compile + true + + + diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index b658a53f904..2a4954a901c 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -1,112 +1,127 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - apache-jsp - Jetty :: Apache JSP Implementation - http://www.eclipse.org/jetty - jar - - ${project.groupId}.${project.artifactId} - - - - - org.apache.felix - maven-bundle-plugin - true - - - Jetty-specific ServletContainerInitializer for Jasper - org.eclipse.jetty.apache.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", - org.eclipse.jetty.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader;osgi.serviceloader=javax.servlet.ServletContainerInitializer,osgi.serviceloader;osgi.serviceloader=org.apache.juli.logging.Log - <_nouses>true - - - - - org.apache.maven.plugins - maven-jar-plugin - - - nolog-jar - - jar - - - nolog - - META-INF/services/org.apache.juli.logging.Log - - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - - - org.eclipse.jetty.toolchain - jetty-schemas - - - - - javax.servlet - javax.servlet-api - - - - - org.mortbay.jasper - apache-jsp - - - - - org.eclipse.jdt.core.compiler - ecj - - - - - org.eclipse.jetty - jetty-servlet - ${project.version} - tests - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + apache-jsp + Jetty :: Apache JSP Implementation + http://www.eclipse.org/jetty + jar + + ${project.groupId}.${project.artifactId} + + + + + org.apache.felix + maven-bundle-plugin + true + + + generate-manifest + + manifest + + + + Jetty-specific ServletContainerInitializer for Jasper + org.eclipse.jetty.apache.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", + org.eclipse.jetty.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + + + org.eclipse.jetty.toolchain + jetty-schemas + + + + + javax.servlet + javax.servlet-api + + + + + org.mortbay.jasper + apache-jsp + + + + + org.eclipse.jetty.orbit + org.eclipse.jdt.core + + + diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml index e45ff2f6606..7301e4b853a 100644 --- a/apache-jstl/pom.xml +++ b/apache-jstl/pom.xml @@ -1,77 +1,56 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - apache-jstl - Apache :: JSTL module - http://tomcat.apache.org/taglibs/standard/ - jar - - ${project.groupId}.apache.jstl - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - - - org.apache.taglibs - taglibs-standard-spec - - - - - org.apache.taglibs - taglibs-standard-impl - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - org.eclipse.jetty - apache-jsp - ${project.version} - test - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + apache-jstl + Apache :: JSTL module + http://tomcat.apache.org/taglibs/standard/ + jar + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + + + org.apache.taglibs + taglibs-standard-spec + + + + + org.apache.taglibs + taglibs-standard-impl + + + + diff --git a/examples/async-rest/async-rest-jar/pom.xml b/examples/async-rest/async-rest-jar/pom.xml index 368ae881bd6..987b7186c08 100644 --- a/examples/async-rest/async-rest-jar/pom.xml +++ b/examples/async-rest/async-rest-jar/pom.xml @@ -1,33 +1,30 @@ - - - org.eclipse.jetty - example-async-rest - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty.example-async-rest - example-async-rest-jar - jar - Example Async Rest :: Jar - http://www.eclipse.org/jetty - - ${project.groupId}.examples.asyc.rest - - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-util-ajax - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - + + + org.eclipse.jetty + example-async-rest + 9.2.23-SNAPSHOT + + 4.0.0 + org.eclipse.jetty.example-async-rest + example-async-rest-jar + jar + Example Async Rest :: Jar + http://www.eclipse.org/jetty + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-util-ajax + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + diff --git a/examples/async-rest/async-rest-webapp/pom.xml b/examples/async-rest/async-rest-webapp/pom.xml index b650dafae6a..e7dfc982480 100644 --- a/examples/async-rest/async-rest-webapp/pom.xml +++ b/examples/async-rest/async-rest-webapp/pom.xml @@ -1,33 +1,33 @@ - - - org.eclipse.jetty - example-async-rest - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty.example-async-rest - example-async-rest-webapp - war - Example Async Rest :: Webapp - - async-rest - - - - org.eclipse.jetty.example-async-rest - example-async-rest-jar - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - javax.servlet - javax.servlet-api - provided - - - + + + org.eclipse.jetty + example-async-rest + 9.2.23-SNAPSHOT + + 4.0.0 + org.eclipse.jetty.example-async-rest + example-async-rest-webapp + war + Example Async Rest :: Webapp + + async-rest + + + + org.eclipse.jetty.example-async-rest + example-async-rest-jar + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + javax.servlet + javax.servlet-api + provided + + + diff --git a/examples/async-rest/pom.xml b/examples/async-rest/pom.xml index 555b5ef8cac..8fb25470bee 100644 --- a/examples/async-rest/pom.xml +++ b/examples/async-rest/pom.xml @@ -1,17 +1,17 @@ - - - org.eclipse.jetty.examples - examples-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - example-async-rest - pom - Example Async Rest - - async-rest-jar - async-rest-webapp - - + + + org.eclipse.jetty.examples + examples-parent + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + example-async-rest + pom + Example Async Rest + + async-rest-jar + async-rest-webapp + + diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index 592f26b261a..a743a3ccafa 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -1,141 +1,109 @@ - - - org.eclipse.jetty.examples - examples-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - example-jetty-embedded - Example :: Jetty Embedded - Jetty Embedded Examples - http://www.eclipse.org/jetty - - ${project.groupId}.embedded - - - - - com.google.guava - guava - 18.0 - - - - org.eclipse.jetty - jetty-util-ajax - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - javax.transaction - javax.transaction-api - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - org.eclipse.jetty - jetty-jaas - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - org.eclipse.jetty.orbit - javax.mail.glassfish - - - org.eclipse.jetty.toolchain - jetty-test-helper - - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - + + + org.eclipse.jetty.examples + examples-parent + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + example-jetty-embedded + Example :: Jetty Embedded + Jetty Embedded Examples + http://www.eclipse.org/jetty + + + org.eclipse.jetty + jetty-util-ajax + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + javax.transaction + javax.transaction-api + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + org.eclipse.jetty + jetty-jaas + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + org.eclipse.jetty.orbit + javax.mail.glassfish + + + org.eclipse.jetty.toolchain + jetty-test-helper + + + + diff --git a/examples/pom.xml b/examples/pom.xml index 7186628cf5e..3045a9ed631 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -1,34 +1,51 @@ - - - 4.0.0 - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - ../pom.xml - - org.eclipse.jetty.examples - examples-parent - Jetty Examples :: Parent - pom - - - - org.codehaus.mojo - findbugs-maven-plugin - - - true - - - - - - - async-rest - embedded - - + + + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + ../pom.xml + + org.eclipse.jetty.examples + examples-parent + Jetty Examples :: Parent + pom + + + + org.codehaus.mojo + findbugs-maven-plugin + + + true + + + + + + + async-rest + embedded + + diff --git a/jetty-alpn/jetty-alpn-client/pom.xml b/jetty-alpn/jetty-alpn-client/pom.xml index fda2d0844dd..360fcc813e2 100644 --- a/jetty-alpn/jetty-alpn-client/pom.xml +++ b/jetty-alpn/jetty-alpn-client/pom.xml @@ -1,65 +1,76 @@ - - - org.eclipse.jetty - jetty-alpn-parent - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-alpn-client - Jetty :: ALPN :: Client - - ${project.groupId}.alpn.client - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.alpn;resolution:=optional - - - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.alpn.* - - - - - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-alpn-parent + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-alpn-client + Jetty :: ALPN Client + Jetty ALPN client services + http://www.eclipse.org/jetty + + ${project.groupId}.alpn.client + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.alpn;resolution:=optional + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.alpn.* + + + + + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-alpn/jetty-alpn-server/pom.xml b/jetty-alpn/jetty-alpn-server/pom.xml index 67e6dd0c0b5..e3942baa3c7 100644 --- a/jetty-alpn/jetty-alpn-server/pom.xml +++ b/jetty-alpn/jetty-alpn-server/pom.xml @@ -1,74 +1,94 @@ - - - org.eclipse.jetty - jetty-alpn-parent - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-alpn-server - Jetty :: ALPN :: Server - - ${project.groupId}.alpn.server - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.alpn.* - - - - org.codehaus.mojo - build-helper-maven-plugin - - - parse-version - - parse-version - - - alpn - ${alpn.api.version} - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle-symbolic-name};singleton:=true - org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}",* - - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-alpn-parent + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-alpn-server + Jetty :: ALPN Server + Jetty ALPN server services + http://www.eclipse.org/jetty + + ${project.groupId}.alpn.server + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.alpn,* + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.alpn.* + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index ff866582df4..64186420ef4 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -1,29 +1,17 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-alpn-parent - pom - Jetty :: ALPN :: Parent - - jetty-alpn-server - jetty-alpn-client - - - - jdk9 - - [1.9,) - - - jetty-alpn-java-client - jetty-alpn-java-server - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-alpn-parent + pom + Jetty :: ALPN :: Parent + Jetty ALPN services parent + http://www.eclipse.org/jetty + + jetty-alpn-server + jetty-alpn-client + + diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index d9d959bcfec..effd2fd02ad 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -1,71 +1,109 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-annotations - Jetty :: Servlet Annotations - Annotation support for deploying servlets in jetty. - http://www.eclipse.org/jetty - - ${project.groupId}.annotations - - - - - org.apache.felix - maven-bundle-plugin - true - - - osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.annotations.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-jndi - ${project.version} - test - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - javax.annotation - javax.annotation-api - - - org.ow2.asm - asm - - - org.ow2.asm - asm-commons - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-annotations + Jetty :: Servlet Annotations + Annotation support for deploying servlets in jetty. + http://www.eclipse.org/jetty + + ${project.groupId}.annotations + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + generate-manifest + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",org.objectweb.asm.*;version=5,* + osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.annotations.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-jndi + ${project.version} + test + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + javax.annotation + javax.annotation-api + + + org.ow2.asm + asm + + + org.ow2.asm + asm-commons + + + diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml index 5eb1da9e716..bec996c369b 100644 --- a/jetty-ant/pom.xml +++ b/jetty-ant/pom.xml @@ -1,82 +1,79 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-ant - jar - Jetty :: Ant Plugin - - - org.eclipse.jetty.ant - - - - - maven-dependency-plugin - - - copy-lib-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty - org.eclipse.jetty.orbit,org.eclipse.jetty.websocket,org.eclipse.jetty.drafts - jetty-all,jetty-start - jar - ${project.build.directory}/test-lib - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - ant - ant - 1.6.5 - - - ant - ant-launcher - 1.6.5 - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-ant + jar + Jetty :: Ant Plugin + + + + + maven-dependency-plugin + + + copy-lib-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty + org.eclipse.jetty.orbit,org.eclipse.jetty.spdy,org.eclipse.jetty.websocket,org.eclipse.jetty.drafts + jetty-all,jetty-start,jetty-monitor,jetty-jsp + jar + ${project.build.directory}/test-lib + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + ant + ant + 1.6.5 + + + ant + ant-launcher + 1.6.5 + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index bf85944dfc5..cdf18865148 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -1,27 +1,49 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty.cdi - jetty-cdi-parent - Jetty :: CDI :: Parent - http://www.eclipse.org/jetty - pom - - 2.4.3.Final - - - - cdi-core - cdi-servlet - cdi-full-servlet - cdi-websocket - test-cdi-webapp - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-cdi + Jetty :: CDI Configurations + http://www.eclipse.org/jetty + jar + + ${project.groupId}.${project.artifactId} + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index ecb82d78e21..968598327c6 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -1,121 +1,128 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - - 4.0.0 - jetty-client - Jetty :: Asynchronous HTTP Client - http://www.eclipse.org/jetty - - ${project.groupId}.client - target/test-policy - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.client.* - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - generate-test-resources - - unpack - - - - - org.eclipse.jetty.toolchain - jetty-test-policy - ${jetty-test-policy-version} - jar - true - **/*.keystore,**/*.pem - ${jetty.test.policy.loc} - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - hybrid - - - org.eclipse.jetty:jetty-http - org.eclipse.jetty:jetty-io - org.eclipse.jetty:jetty-util - - - - - org.eclipse.jetty.http - org.eclipse.jetty.client.shaded.http - - - org.eclipse.jetty.io - org.eclipse.jetty.client.shaded.io - - - org.eclipse.jetty.util - org.eclipse.jetty.client.shaded.util - - - - - - - - - - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty - jetty-security - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + + 4.0.0 + jetty-client + Jetty :: Asynchronous HTTP Client + http://www.eclipse.org/jetty + + ${project.groupId}.client + target/test-policy + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.net.*,* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.client.* + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + generate-test-resources + + unpack + + + + + org.eclipse.jetty.toolchain + jetty-test-policy + ${jetty-test-policy-version} + jar + true + **/*.keystore,**/*.pem + ${jetty.test.policy.loc} + + + + + + + + + + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty + jetty-security + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml index 6b526d8d6f2..b8feada6f57 100644 --- a/jetty-continuation/pom.xml +++ b/jetty-continuation/pom.xml @@ -1,33 +1,62 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-continuation - Jetty :: Continuation - Asynchronous API - http://www.eclipse.org/jetty - - ${project.groupId}.continuation - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.continuation.* - - - - - - - javax.servlet - javax.servlet-api - provided - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-continuation + Jetty :: Continuation + Asynchronous API + http://www.eclipse.org/jetty + + ${project.groupId}.continuation + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.continuation.* + + + + + + + javax.servlet + javax.servlet-api + provided + + + diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index 788dd3758f2..0b8e780c2c9 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -1,49 +1,96 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-deploy - Jetty :: Deployers - Jetty deployers - http://www.eclipse.org/jetty - - ${project.groupId}.deploy - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.deploy.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-deploy + Jetty :: Deployers + Jetty deployers + http://www.eclipse.org/jetty + + ${project.groupId}.deploy + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + org.eclipse.jetty.jmx.*;version="9.1";resolution:=optional,* + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.deploy.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index c791e5d1b23..7347ef67901 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -1,433 +1,872 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-distribution - Jetty :: Distribution Assemblies - pom - - - ${basedir}/target/distribution - ${basedir}/target/home - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - copy-base-assembly-tree - process-resources - - copy-resources - - - false - true - ${assembly-directory} - - - ${basedir}/src/main/resources - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - popluate distribution from home - process-resources - - run - - - - - - - - - - - set jetty.sh - process-resources - - run - - - - - - - - - removeKeystore - process-resources - - run - - - - - - - - - - - org.apache.maven.plugins - maven-remote-resources-plugin - - - generate-resources - - process - - - - org.eclipse.jetty.toolchain:jetty-distribution-remote-resources:1.2 - - ${assembly-directory} - - - - - - maven-dependency-plugin - - - - unpack-jetty-home - generate-resources - - unpack - - - - - org.eclipse.jetty - jetty-home - ${project.version} - zip - true - ${home-directory} - - - META-INF/** - - - - - copy - process-resources - - copy - - - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test.war - - - org.eclipse.jetty.tests - test-jaas-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test-jaas.war - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test-jndi.war - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - test-spec.war - - - org.eclipse.jetty - test-proxy-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - xref-proxy.war - - - org.eclipse.jetty.example-async-rest - example-async-rest-webapp - ${project.version} - war - true - ** - ${assembly-directory}/demo-base/webapps - async-rest.war - - - - - - - unpack-test-webapp-config - process-resources - - unpack - - - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - - unpack-test-jaas-config - process-resources - - unpack - - - - - org.eclipse.jetty.tests - test-jaas-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - - unpack-test-jndi-config - process-resources - - unpack - - - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - - unpack-test-spec-config - process-resources - - unpack - - - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - unpack-documentation - process-resources - - unpack - - - - - org.eclipse.jetty - jetty-documentation - ${project.version} - html - zip - true - ${assembly-directory}/demo-base/webapps/doc - - - - - - - - org.codehaus.mojo - exec-maven-plugin - - - - setup home - process-classes - - org.eclipse.jetty.start.Main - - jetty.home=${assembly-directory} - jetty.base=${assembly-directory} - --add-to-start=server,deploy,websocket,ext,resources,jsp,jstl,http - - - - java - - - - - setup demo-base-startd - process-classes - - org.eclipse.jetty.start.Main - - jetty.home=${assembly-directory} - jetty.base=${assembly-directory}/demo-base - --add-to-startd=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https - - - - java - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - src/main/assembly/jetty-assembly.xml - - gnu - false - - - - package - - single - - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - true - - - - - org.codehaus.mojo - findbugs-maven-plugin - - true - - - - - - - - org.eclipse.jetty - jetty-home - ${project.version} - pom - - - org.eclipse.jetty - test-jetty-webapp - war - ${project.version} - - - org.eclipse.jetty - test-proxy-webapp - war - ${project.version} - - - org.eclipse.jetty.example-async-rest - example-async-rest-webapp - ${project.version} - war - - - org.eclipse.jetty - jetty-documentation - ${project.version} - html - zip - - - + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + jetty-distribution + Jetty :: Distribution Assemblies + http://www.eclipse.org/jetty + pom + + ${basedir}/target/distribution + 1.0.1 + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-base-assembly-tree + generate-resources + + copy-resources + + + false + true + ${assembly-directory} + + + ${basedir}/src/main/resources + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + generate-resources + + run + + + + + + + + + + + org.apache.maven.plugins + maven-remote-resources-plugin + + + generate-resources + + process + + + + org.eclipse.jetty.toolchain:jetty-distribution-remote-resources:1.2 + + ${assembly-directory} + + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.eclipse.jetty + jetty-project + ${project.version} + version + txt + true + ${assembly-directory}/ + VERSION.txt + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test.war + + + org.eclipse.jetty.tests + test-jaas-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test-jaas.war + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test-jndi.war + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + test-spec.war + + + org.eclipse.jetty + test-proxy-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + xref-proxy.war + + + org.eclipse.jetty.example-async-rest + example-async-rest-webapp + ${project.version} + war + true + ** + ${assembly-directory}/demo-base/webapps + async-rest.war + + + org.eclipse.jetty + jetty-start + ${project.version} + jar + true + ** + ${assembly-directory} + start.jar + + + + + + copy-setuid-deps + generate-resources + + copy + + + + + org.eclipse.jetty.toolchain.setuid + jetty-setuid-java + ${jetty-setuid-version} + jar + true + ${assembly-directory}/lib/setuid + + + org.eclipse.jetty.toolchain.setuid + libsetuid-linux + ${jetty-setuid-version} + so + true + ${assembly-directory}/lib/setuid + libsetuid-linux.so + + + org.eclipse.jetty.toolchain.setuid + libsetuid-osx + ${jetty-setuid-version} + so + true + ${assembly-directory}/lib/setuid + libsetuid-osx.so + + + + + + + unpack-setuid-config + process-resources + + unpack + + + + + org.eclipse.jetty.toolchain.setuid + jetty-setuid-java + ${jetty-setuid-version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + unpack-test-webapp-config + process-resources + + unpack + + + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + unpack-test-jaas-config + process-resources + + unpack + + + + + org.eclipse.jetty.tests + test-jaas-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + unpack-test-jndi-config + process-resources + + unpack + + + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + unpack-test-spec-config + process-resources + + unpack + + + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + config + jar + true + ${assembly-directory} + + + META-INF/** + + + + + copy-lib-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty + org.eclipse.jetty.orbit,org.eclipse.jetty.spdy,org.eclipse.jetty.websocket,org.eclipse.jetty.fcgi,org.eclipse.jetty.toolchain,org.apache.taglibs + jetty-all,jetty-jsp,apache-jsp,apache-jstl,jetty-start,jetty-monitor,jetty-spring + jar + ${assembly-directory}/lib + + + + copy-lib-websocket-deps + generate-resources + + copy-dependencies + + + javax.websocket,org.eclipse.jetty.websocket + javax.websocket-client-api + jar + ${assembly-directory}/lib/websocket + + + + copy-lib-fcgi-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty.fcgi + jar + ${assembly-directory}/lib/fcgi + + + + copy-lib-spring-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty + jetty-spring + jar + ${assembly-directory}/lib/spring + + + + copy-lib-monitor-deps + generate-resources + + copy + + + + + org.eclipse.jetty + jetty-monitor + ${project.version} + jar + true + ${assembly-directory}/lib/monitor + + + + + + copy-servlet-api-deps + generate-resources + + copy + + + + + javax.servlet + javax.servlet-api + 3.1.0 + true + ${assembly-directory}/lib + servlet-api-3.1.jar + + + org.eclipse.jetty.toolchain + jetty-schemas + 3.1.M0 + true + ${assembly-directory}/lib + jetty-schemas-3.1.jar + + + + + + unpack-spdy + process-resources + + unpack-dependencies + + + org.eclipse.jetty.spdy + config + false + META-INF/** + ${assembly-directory} + + + + copy-lib-spdy-deps + process-resources + + copy-dependencies + + + org.eclipse.jetty.spdy + jar + ${assembly-directory}/lib/spdy + + + + copy-annotations-deps + generate-resources + + copy-dependencies + + + javax.annotation,org.eclipse.jetty.orbit,org.ow2.asm + javax.annotation-api,asm,asm-commons + jar + ${assembly-directory}/lib/annotations + + + + + copy-jta-deps + generate-resources + + copy-dependencies + + + javax.transaction + javax.transaction-api + jar + ${assembly-directory}/lib/jndi + + + + copy-jndi-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty.orbit + javax.mail.glassfish + jar + ${assembly-directory}/lib/jndi + + + + copy-glassfish-jsp-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty.orbit,org.glassfish.web, org.glassfish, javax.el, javax.servlet.jsp, org.eclipse.jetty.toolchain, org.eclipse.jetty + org.eclipse.jdt.core, javax.servlet.jsp-api, javax.servlet.jsp, jetty-jsp-jdt, javax.el-api, javax.el, jetty-jsp + jar + ${assembly-directory}/lib/jsp + + + + copy-apache-jsp-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty,org.eclipse.jetty.toolchain,org.mortbay.jasper,org.eclipse.jetty.orbit + apache-jsp,apache-el,org.eclipse.jdt.core + jar + true + ${assembly-directory}/lib/apache-jsp + + + + copy-jstl-api + generate-resources + + copy-dependencies + + + org.eclipse.jetty.orbit + javax.servlet.jsp.jstl + true + jar + ${assembly-directory}/lib/jsp + + + + copy-jstl-impl + generate-resources + + copy-dependencies + + + org.glassfish.web + javax.servlet.jsp.jstl + jar + ${assembly-directory}/lib/jsp + + + + copy-apache-jstl-deps + generate-resources + + copy-dependencies + + + org.glassfish.web + taglibs-standard-spec,taglibs-standard-impl + true + jar + ${assembly-directory}/lib/apache-jstl + + + + copy-jaspi-deps + generate-resources + + copy-dependencies + + + org.eclipse.jetty.orbit + javax.security.auth.message + jar + ${assembly-directory}/lib/jaspi + + + + unpack-config-deps + generate-resources + + unpack-dependencies + + + org.eclipse.jetty,org.eclipse.jetty.websocket + config + false + META-INF/** + ${assembly-directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + + + setup home + process-classes + + org.eclipse.jetty.start.Main + + jetty.home=${assembly-directory} + jetty.base=${assembly-directory} + --add-to-start=server,deploy,websocket,ext,resources,jsp,jstl,http + + + + java + + + + setup demo-base + process-classes + + org.eclipse.jetty.start.Main + + jetty.home=${assembly-directory} + jetty.base=${assembly-directory}/demo-base + --add-to-start=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets + --add-to-startd=jsp,jstl,http,https + + + + java + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + src/main/assembly/jetty-assembly.xml + + gnu + false + + + + package + + single + + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + true + + + + + org.codehaus.mojo + findbugs-maven-plugin + + true + + + + + + + + org.eclipse.jetty.orbit + javax.mail.glassfish + + + org.eclipse.jetty.orbit + javax.security.auth.message + + + + javax.annotation + javax.annotation-api + + + javax.transaction + javax.transaction-api + + + + org.glassfish.web + javax.servlet.jsp.jstl + + + + org.glassfish.web + javax.servlet.jsp + + + org.eclipse.jetty.toolchain + jetty-jsp-jdt + + + javax.servlet.jsp + javax.servlet.jsp-api + + + org.glassfish + javax.el + + + + org.ow2.asm + asm + + + org.ow2.asm + asm-commons + + + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + test-jetty-webapp + war + ${project.version} + + + org.eclipse.jetty + test-proxy-webapp + war + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-monitor + ${project.version} + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + + + org.eclipse.jetty + jetty-start + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty + jetty-jsp + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + org.eclipse.jetty.fcgi + fcgi-server + ${project.version} + + + org.eclipse.jetty + jetty-spring + ${project.version} + + + + org.eclipse.jetty + jetty-cdi + ${project.version} + + + org.eclipse.jetty + jetty-jaas + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-rewrite + ${project.version} + + + org.eclipse.jetty.spdy + spdy-core + ${project.version} + + + org.eclipse.jetty.spdy + spdy-server + ${project.version} + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + + + org.eclipse.jetty.spdy + spdy-example-webapp + ${project.version} + war + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + + + org.eclipse.jetty.example-async-rest + example-async-rest-webapp + ${project.version} + war + + + org.eclipse.jetty + jetty-jaspi + ${project.version} + + + diff --git a/jetty-fcgi/fcgi-client/pom.xml b/jetty-fcgi/fcgi-client/pom.xml index 8dc1b237537..979277db374 100644 --- a/jetty-fcgi/fcgi-client/pom.xml +++ b/jetty-fcgi/fcgi-client/pom.xml @@ -1,40 +1,40 @@ - - - - org.eclipse.jetty.fcgi - fcgi-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - fcgi-client - Jetty :: FastCGI :: Client - - - ${project.groupId}.client - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - - + + + + org.eclipse.jetty.fcgi + fcgi-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + fcgi-client + Jetty :: FastCGI :: Client + + + ${project.groupId}.client + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + + diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index 606cd2afe59..3f185cbae1c 100644 --- a/jetty-fcgi/fcgi-server/pom.xml +++ b/jetty-fcgi/fcgi-server/pom.xml @@ -1,67 +1,73 @@ - - - - org.eclipse.jetty.fcgi - fcgi-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - fcgi-server - Jetty :: FastCGI :: Server - - - ${project.groupId}.server - - - - - - - - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty.fcgi - fcgi-client - ${project.version} - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - + + + + org.eclipse.jetty.fcgi + fcgi-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + fcgi-server + Jetty :: FastCGI :: Server + + + ${project.groupId}.server + + + + + + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + + + + javax.servlet + javax.servlet-api + + + org.eclipse.jetty.fcgi + fcgi-client + ${project.version} + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + test + + + + diff --git a/jetty-fcgi/pom.xml b/jetty-fcgi/pom.xml index 0fb0371c34e..4823bb33b55 100644 --- a/jetty-fcgi/pom.xml +++ b/jetty-fcgi/pom.xml @@ -1,28 +1,28 @@ - - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.fcgi - fcgi-parent - pom - Jetty :: FastCGI :: Parent - - - fcgi-client - fcgi-server - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - + + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.fcgi + fcgi-parent + pom + Jetty :: FastCGI :: Parent + + + fcgi-client + fcgi-server + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index 8c3d61a7faa..e283cd587be 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -1,64 +1,80 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-http-spi - Jetty :: Http Service Provider Interface - http://www.eclipse.org/jetty - - ${project.groupId}.http.spi - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - com.sun.net.httpserver - http - 20070405 - provided - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.http.spi.* - - - - org.apache.felix - maven-bundle-plugin - true - - - Jetty Http SPI - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader; osgi.serviceloader=com.sun.net.httpserver.spi.HttpServerProvider - <_nouses>true - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-http-spi + Jetty :: Http Service Provider Interface + http://www.eclipse.org/jetty + + ${project.groupId}.http.spi + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + com.sun.net.httpserver + http + 20070405 + provided + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.http.spi.* + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index de1a9467b29..efb7fc9b4d8 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -1,70 +1,78 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-http - Jetty :: Http Utility - http://www.eclipse.org/jetty - - ${project.groupId}.http - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - org.apache.felix - maven-bundle-plugin - true - - - osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - - osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.http.* - - - - - - + + + + jetty-project + org.eclipse.jetty + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-http + Jetty :: Http Utility + http://www.eclipse.org/jetty + + ${project.groupId}.http + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",javax.net.*,* + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.http.* + + + + + diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml index 3c5b5d322a6..6a859cbf87e 100644 --- a/jetty-io/pom.xml +++ b/jetty-io/pom.xml @@ -1,37 +1,71 @@ - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-io - Jetty :: IO Utility - http://www.eclipse.org/jetty - - ${project.groupId}.io - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.io.* - - - - - + + + jetty-project + org.eclipse.jetty + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-io + Jetty :: IO Utility + http://www.eclipse.org/jetty + + ${project.groupId}.io + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.mockito + mockito-core + test + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.io.* + + + + + diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index d1657d50682..0b210336b89 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -1,38 +1,84 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jaas - Jetty :: JAAS - Jetty JAAS support - - ${project.groupId}.jaas - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jaas.* - - - - - - - org.eclipse.jetty - jetty-security - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-jaas + Jetty :: JAAS + Jetty JAAS support + + ${project.groupId}.jaas + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + <_versionpolicy> + javax.sql.*,javax.security.*,javax.naming.*, + javax.servlet.*;version="[2.6.0,3.2)", + * + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jaas.* + + + + + + + org.eclipse.jetty + jetty-security + ${project.version} + + + diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml index 1a84609fb7b..706d8759e2e 100644 --- a/jetty-jaspi/pom.xml +++ b/jetty-jaspi/pom.xml @@ -1,72 +1,102 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jaspi - Jetty :: JASPI Security - Jetty security infrastructure - http://www.eclipse.org/jetty - - ${project.groupId}.security.jaspi - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jaspi.* - - - - - - - jdk9 - - [1.9,) - - - - - maven-surefire-plugin - - @{argLine} --add-modules java.se.ee - - - - - - - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty.orbit - javax.security.auth.message - - - org.apache.geronimo.components - geronimo-jaspi - 2.0.0 - - - org.apache.geronimo.specs - geronimo-jaspic_1.0_spec - - - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-jaspi + Jetty :: JASPI Security + Jetty security infrastructure + http://www.eclipse.org/jetty + + ${project.groupId}.jaspi + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",* + org.eclipse.jetty.security.jaspi.*;version="${parsedVersion.osgiVersion}" + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jaspi.* + + + + + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty.orbit + javax.security.auth.message + + + + org.apache.geronimo.components + geronimo-jaspi + 2.0.0 + + + org.apache.geronimo.specs + geronimo-jaspic_1.0_spec + + + test + + + diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index f1d2563433a..7eb977a442d 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -1,46 +1,85 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jmx - Jetty :: JMX Management - JMX management artifact for jetty. - http://www.eclipse.org/jetty - - ${project.groupId}.jmx - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jmx.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-util - ${project.version} - - - - com.openpojo - openpojo - 0.8.1 - test - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-jmx + Jetty :: JMX Management + JMX management artifact for jetty. + http://www.eclipse.org/jetty + + ${project.groupId}.jmx + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.management.*,* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jmx.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-util + ${project.version} + + + + diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index 2cfa6eb2475..ced91e34eb6 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -1,56 +1,102 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jndi - Jetty :: JNDI Naming - JNDI spi impl for java namespace. - http://www.eclipse.org/jetty - - ${project.groupId}.jndi - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.jndi.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-webapp - ${project.version} - provided - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - provided - - - org.eclipse.jetty.orbit - javax.activation - - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-jndi + Jetty :: JNDI Naming + JNDI spi impl for java namespace. + http://www.eclipse.org/jetty + + ${project.groupId}.jndi + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.naming.*,* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.jndi.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-webapp + ${project.version} + provided + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + provided + + + org.eclipse.jetty.orbit + javax.activation + + + + + diff --git a/jetty-jsp/pom.xml b/jetty-jsp/pom.xml index 2db6585b06b..29b0a5accdf 100644 --- a/jetty-jsp/pom.xml +++ b/jetty-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 jetty-jsp diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml index 6461ad3554c..06347d05d98 100644 --- a/jetty-jspc-maven-plugin/pom.xml +++ b/jetty-jspc-maven-plugin/pom.xml @@ -1,123 +1,122 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-jspc-maven-plugin - maven-plugin - Jetty :: Jetty JSPC Maven Plugin - - ${project.groupId}.jspc.plugin - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - org.apache.maven.plugins - maven-plugin-plugin - - - exec-plugin-doc - generate-sources - - descriptor - helpmojo - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.apache.maven - maven-project - 2.0.3 - - - junit - junit - - - - - org.apache.maven - maven-plugin-api - 2.0.3 - - - org.apache.maven - maven-artifact - 2.0.3 - - - org.apache.maven.plugin-tools - maven-plugin-tools-api - 3.1 - - - junit - junit - - - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.apache.ant - ant - 1.8.4 - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - - false - - - - - project-team - mailing-list - cim - issue-tracking - license - scm - - - - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-jspc-maven-plugin + maven-plugin + Jetty :: Jetty JSPC Maven Plugin + + + + + + maven-surefire-plugin + + true + + + + maven-plugin-plugin + 2.9 + + + exec-plugin-doc + generate-sources + + xdoc + helpmojo + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.apache.maven + maven-project + 2.0.3 + + + junit + junit + + + + + org.apache.maven + maven-plugin-api + 2.0.3 + + + org.apache.maven + maven-artifact + 2.0.3 + + + org.apache.maven.plugin-tools + maven-plugin-tools-api + 3.1 + + + junit + junit + + + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.apache.ant + ant + 1.8.4 + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.1 + + false + + + + + project-team + mailing-list + cim + issue-tracking + license + scm + + + + + + + diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index d49daff5c89..f23db716925 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -1,174 +1,175 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-maven-plugin - maven-plugin - Jetty :: Jetty Maven Plugin - Jetty maven plugins - - 3.0.3 - 3.4 - ${project.groupId}.maven.plugin - - - - - maven-surefire-plugin - - true - - - - org.apache.maven.plugins - maven-plugin-plugin - - - exec-plugin-doc - generate-sources - - helpmojo - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.apache.maven - maven-plugin-api - ${mavenVersion} - - - org.apache.maven - maven-artifact - ${mavenVersion} - - - org.apache.maven - maven-core - ${mavenVersion} - - - org.apache.maven.plugin-tools - maven-plugin-tools-api - ${pluginToolsVersion} - - - junit - junit - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - javax.servlet - servlet-api - - - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - - - org.eclipse.jetty - jetty-jaas - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - javax.transaction - javax.transaction-api - compile - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - - false - - - - - project-team - mailing-list - cim - issue-tracking - license - scm - - - - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-maven-plugin + maven-plugin + Jetty :: Jetty Maven Plugin + + 3.0.3 + 3.1 + + + + + maven-surefire-plugin + + true + + + + org.apache.maven.plugins + maven-plugin-plugin + ${pluginToolsVersion} + + + exec-plugin-doc + generate-sources + + xdoc + helpmojo + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.apache.maven + maven-plugin-api + ${mavenVersion} + + + org.apache.maven + maven-artifact + ${mavenVersion} + + + org.apache.maven + maven-core + ${mavenVersion} + + + org.apache.maven.plugin-tools + maven-plugin-tools-api + ${pluginToolsVersion} + + + junit + junit + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + javax.servlet + servlet-api + + + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + + + org.eclipse.jetty + jetty-jaas + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + javax.transaction + javax.transaction-api + compile + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.1 + + false + + + + + project-team + mailing-list + cim + issue-tracking + license + scm + + + + + + + diff --git a/jetty-monitor/pom.xml b/jetty-monitor/pom.xml index 5bb82d3d388..baaa930e174 100644 --- a/jetty-monitor/pom.xml +++ b/jetty-monitor/pom.xml @@ -1,84 +1,146 @@ - - - - org.eclipse.jetty - jetty-project - 9.4.0-SNAPSHOT - - 4.0.0 - jetty-monitor - Jetty :: Monitoring - http://www.eclipse.org/jetty - Performance monitoring artifact for jetty. - - ${project.groupId}.monitor - - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.monitor.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-monitor + Jetty :: Monitoring + http://www.eclipse.org/jetty + Performance monitoring artifact for jetty. + + ${project.groupId}.monitor + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.management.*,* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + always + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.monitor.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml index 02b7569c34c..c45726f7dba 100644 --- a/jetty-nosql/pom.xml +++ b/jetty-nosql/pom.xml @@ -1,50 +1,101 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-nosql - Jetty :: NoSQL Session Managers - http://www.eclipse.org/jetty - - ${project.groupId}.nosql - - - install - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.mongodb - mongo-java-driver - 2.13.2 - jar - compile - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-nosql + Jetty :: NoSQL Session Managers + http://www.eclipse.org/jetty + + ${project.groupId}.nosql + + + install + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.felix + maven-bundle-plugin + + + javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.server.session.jmx;version="9.1";resolution:=optional,,org.eclipse.jetty.*;version="9.1",* + + + true + + + + manifest + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.mongodb + mongo-java-driver + 2.6.1 + jar + compile + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + test + + + diff --git a/jetty-osgi/jetty-osgi-alpn/pom.xml b/jetty-osgi/jetty-osgi-alpn/pom.xml index dd670d22b80..1b453522d67 100644 --- a/jetty-osgi/jetty-osgi-alpn/pom.xml +++ b/jetty-osgi/jetty-osgi-alpn/pom.xml @@ -1,55 +1,50 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-osgi-alpn - Jetty :: OSGi ALPN Fragment - jar - - org.eclipse.jetty.osgi.alpn.fragment - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - parse-version - - parse-version - - - ${alpn.api.version} - alpn - - - - - - org.apache.felix - maven-bundle-plugin - - - ${bundle-symbolic-name};singleton:=true - Jetty OSGi ALPN Fragment - !javax.*;!org.eclipse.jetty.* - org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}" - system.bundle;extension:=framework - - - - - - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-osgi-alpn + Jetty :: OSGi ALPN Fragment + jar + + org.eclipse.jetty.osgi.alpn.fragment + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.7 + + + parse-version + + parse-version + + + ${alpn.api.version} + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + 2 + ${bundle-symbolic-name};singleton:=true + Jetty OSGi ALPN Fragment + ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} + org.eclipse.jetty.alpn;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + system.bundle;extension:=framework + + + + + + + diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml index cf6854c04c8..a91841f36ad 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml @@ -1,136 +1,189 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-osgi-boot-jsp - Jetty :: OSGi :: Boot JSP - Jetty OSGi Boot JSP bundle - http://www.eclipse.org/jetty - - ${project.groupId}.boot.jsp - - - - org.eclipse.jetty - jetty-deploy - - - org.eclipse.jetty.osgi - jetty-osgi-boot - ${project.version} - provided - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - javax.servlet - javax.servlet-api - - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - Jetty-OSGi-Jasper Integration - - org.eclipse.jetty.osgi.boot - !org.eclipse.jetty.osgi.boot.* - org.eclipse.jdt.*;resolution:=optional, - org.eclipse.jdt.core.compiler.*;resolution:=optional, - com.sun.el;resolution:=optional, - com.sun.el.lang;resolution:=optional, - com.sun.el.parser;resolution:=optional, - com.sun.el.util;resolution:=optional, - javax.el;version="[3.0,3.1)", - javax.servlet;version="[3.1,3.2)", - javax.servlet.resources;version="[3.1,3.2)", - javax.servlet.jsp.resources;version="[2.3,4)", - javax.servlet.jsp;version="[2.3,2.4)", - javax.servlet.jsp.el;version="[2.3,2.4)", - javax.servlet.jsp.tagext;version="[2.3,2.4)", - javax.servlet.jsp.jstl.core;version="1.2";resolution:=optional, - javax.servlet.jsp.jstl.fmt;version="1.2";resolution:=optional, - javax.servlet.jsp.jstl.sql;version="1.2";resolution:=optional, - javax.servlet.jsp.jstl.tlv;version="1.2";resolution:=optional, - org.apache.el;version="[8.0.23,9)";resolution:=optional, - org.apache.el.lang;version="[8.0.23,9)";resolution:=optional, - org.apache.el.stream;version="[8.0.23,9)";resolution:=optional, - org.apache.el.util;version="[8.0.23,9)";resolution:=optional, - org.apache.el.parser;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.compiler;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.compiler.tagplugin;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.runtime;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.security;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.servlet;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.tagplugins.jstl;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.util;version="[8.0.23,9)";resolution:=optional, - org.apache.jasper.xmlparser;version="[8.0.23,9)";resolution:=optional, - org.apache.taglibs.standard;version="1.2";resolution:=optional, - org.apache.taglibs.standard.extra.spath;version="1.2";resolution:=optional, - org.apache.taglibs.standard.functions;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl.parser;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl.test;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.jstl.test.beans;version="1.2";resolution:=optional, - org.apache.taglibs.standard.lang.support;version="1.2";resolution:=optional, - org.apache.taglibs.standard.resources;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.core;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.fmt;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.sql;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.common.xml;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.core;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.fmt;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.sql;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.el.xml;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.core;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.fmt;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.sql;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tag.rt.xml;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tei;version="1.2";resolution:=optional, - org.apache.taglibs.standard.tlv;version="1.2";resolution:=optional, - org.apache.tomcat;version="[8.0.23,9)";resolution:=optional, - org.eclipse.jetty.jsp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:=optional, - org.osgi.*, - org.xml.*;resolution:=optional, - org.xml.sax.*;resolution:=optional, - javax.xml.*;resolution:=optional, - org.w3c.dom;resolution:=optional, - org.w3c.dom.ls;resolution:=optional, - javax.xml.parser;resolution:=optional - - org.eclipse.jetty.jsp.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",org.apache.jasper.*;version="8.0.23",org.apache.el.*;version="8.0.23" - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.boot.jasper.*,org.eclipse.jetty.osgi.boot.jsp.* - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-osgi-boot-jsp + Jetty :: OSGi :: Boot JSP + Jetty OSGi Boot JSP bundle + http://www.eclipse.org/jetty + + ${project.groupId}.boot.jsp + + + + org.eclipse.jetty + jetty-deploy + + + org.eclipse.jetty.osgi + jetty-osgi-boot + ${project.version} + provided + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + javax.servlet + javax.servlet-api + + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty.orbit + javax.servlet.jsp.jstl + + + org.glassfish.web + javax.servlet.jsp.jstl + + + org.mortbay.jasper + apache-el + 8.0.9.M3 + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + Jetty-OSGi-Jasper Integration + + org.eclipse.jetty.osgi.boot + !org.eclipse.jetty.osgi.boot.* + org.eclipse.jdt.*;resolution:=optional, + com.sun.el;resolution:=optional, + com.sun.el.lang;resolution:=optional, + com.sun.el.parser;resolution:=optional, + com.sun.el.util;resolution:=optional, + javax.el;version="[3.0,3.1)", + javax.servlet;version="[3.1,3.2)", + javax.servlet.resources;version="[3.1,3.2)", + javax.servlet.jsp.resources;version="[2.3,4)", + javax.servlet.jsp;version="[2.3,2.4)", + javax.servlet.jsp.el;version="[2.3,2.4)", + javax.servlet.jsp.tagext;version="[2.3,2.4)", + javax.servlet.jsp.jstl.core;version="1.2";resolution:=optional, + javax.servlet.jsp.jstl.fmt;version="1.2";resolution:=optional, + javax.servlet.jsp.jstl.sql;version="1.2";resolution:=optional, + javax.servlet.jsp.jstl.tlv;version="1.2";resolution:=optional, + org.apache.el;version="[8.0.9,9)";resolution:=optional, + org.apache.el.lang;version="[8.0.9,9)";resolution:=optional, + org.apache.el.stream;version="[8.0.9,9)";resolution:=optional, + org.apache.el.util;version="[8.0.9,9)";resolution:=optional, + org.apache.el.parser;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.compiler;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.compiler.tagplugin;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.runtime;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.security;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.servlet;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.tagplugins.jstl;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.util;version="[8.0.9,9)";resolution:=optional, + org.apache.jasper.xmlparser;version="[8.0.9,9)";resolution:=optional, + org.apache.taglibs.standard;version="1.2";resolution:=optional, + org.apache.taglibs.standard.extra.spath;version="1.2";resolution:=optional, + org.apache.taglibs.standard.functions;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl.parser;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl.test;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.jstl.test.beans;version="1.2";resolution:=optional, + org.apache.taglibs.standard.lang.support;version="1.2";resolution:=optional, + org.apache.taglibs.standard.resources;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.core;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.fmt;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.sql;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.common.xml;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.core;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.fmt;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.sql;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.el.xml;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.core;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.fmt;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.sql;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tag.rt.xml;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tei;version="1.2";resolution:=optional, + org.apache.taglibs.standard.tlv;version="1.2";resolution:=optional, + org.apache.tomcat;version="[8.0.9,9)";resolution:=optional, + org.eclipse.jetty.jsp;version="[9.2,10)";resolution:=optional, + org.osgi.*, + org.xml.*;resolution:=optional, + org.xml.sax.*;resolution:=optional, + javax.xml.*;resolution:=optional, + org.w3c.dom;resolution:=optional, + org.w3c.dom.ls;resolution:=optional, + javax.xml.parser;resolution:=optional + + <_nouses>true + org.eclipse.jetty.jsp.*;version="9.2.6",org.apache.jasper.*;version="8.0.9",org.apache.el.*;version="8.0.9" + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.boot.jasper.*,org.eclipse.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 1f52f6cae5c..f77a88299f0 100644 --- a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml @@ -1,49 +1,81 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - jetty-osgi-boot-warurl - Jetty :: OSGi :: Boot :: Warurl - Jetty OSGi Boot-Warurl bundle - http://www.eclipse.org/jetty - - ${project.groupId}.boot.warurl - - - - org.eclipse.jetty - jetty-util - - - org.eclipse.osgi - org.eclipse.osgi - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - RFC66 War URL - org.eclipse.jetty.osgi.boot.warurl.WarUrlActivator - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.boot.warurl.* - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + jetty-osgi-boot-warurl + Jetty :: OSGi :: Boot :: Warurl + Jetty OSGi Boot-Warurl bundle + http://www.eclipse.org/jetty + + ${project.groupId}.boot.warurl + + + + org.eclipse.jetty + jetty-util + + + org.eclipse.osgi + org.eclipse.osgi + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + RFC66 War URL + org.eclipse.jetty.osgi.boot.warurl.WarUrlActivator + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.boot.warurl.* + + + + + diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index 957c14444d9..e74110a8e3a 100644 --- a/jetty-osgi/jetty-osgi-boot/pom.xml +++ b/jetty-osgi/jetty-osgi-boot/pom.xml @@ -1,112 +1,145 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-osgi-boot - Jetty :: OSGi :: Boot - Jetty OSGi Boot bundle - http://www.eclipse.org/jetty - - ${project.groupId}.boot - - - - org.eclipse.jetty - jetty-annotations - - - org.eclipse.jetty - jetty-webapp - - - org.eclipse.jetty - jetty-deploy - - - org.eclipse.jetty - jetty-jmx - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - - - - maven-antrun-plugin - - - process-resources - - - - - - - - - - - - run - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.boot;singleton:=true - org.eclipse.jetty.osgi.boot.JettyBootstrapActivator - org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" - javax.mail;version="1.4.0";resolution:=optional, - javax.mail.event;version="1.4.0";resolution:=optional, - javax.mail.internet;version="1.4.0";resolution:=optional, - javax.mail.search;version="1.4.0";resolution:=optional, - javax.mail.util;version="1.4.0";resolution:=optional, - javax.servlet;version="[3.1,3.2)", - javax.servlet.http;version="[3.1,3.2)", - javax.transaction;version="1.1.0";resolution:=optional, - javax.transaction.xa;version="1.1.0";resolution:=optional, - org.objectweb.asm;version=4;resolution:=optional, - org.osgi.framework, - org.osgi.service.cm;version="1.2.0", - org.osgi.service.packageadmin, - org.osgi.service.startlevel;version="1.0.0", - org.osgi.service.url;version="1.0.0", - org.osgi.util.tracker;version="1.3.0", - org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, - org.slf4j.helpers;resolution:=optional, - org.xml.sax, - org.xml.sax.helpers, - org.eclipse.jetty.annotations;resolution:=optional, - * - - <_nouses>true - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.boot.* - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-osgi-boot + Jetty :: OSGi :: Boot + Jetty OSGi Boot bundle + http://www.eclipse.org/jetty + + ${project.groupId}.boot + + + + org.eclipse.jetty + jetty-annotations + + + org.eclipse.jetty + jetty-webapp + + + org.eclipse.jetty + jetty-deploy + + + org.eclipse.jetty + jetty-jmx + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + + + + maven-antrun-plugin + + + process-resources + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + org.eclipse.jetty.osgi.boot;singleton:=true + org.eclipse.jetty.osgi.boot.JettyBootstrapActivator + org.eclipse.jetty.*;version="[9.1,10.0)" + javax.mail;version="1.4.0";resolution:=optional, + javax.mail.event;version="1.4.0";resolution:=optional, + javax.mail.internet;version="1.4.0";resolution:=optional, + javax.mail.search;version="1.4.0";resolution:=optional, + javax.mail.util;version="1.4.0";resolution:=optional, + javax.servlet;version="[3.1,3.2)", + javax.servlet.http;version="[3.1,3.2)", + javax.transaction;version="1.1.0";resolution:=optional, + javax.transaction.xa;version="1.1.0";resolution:=optional, + org.eclipse.jetty.annotations;version="9.1";resolution:=optional, + org.eclipse.jetty.plus.webapp;version="9.1";resolution:=optional, + org.objectweb.asm;version=4;resolution:=optional, + org.osgi.framework, + org.osgi.service.cm;version="1.2.0", + org.osgi.service.packageadmin, + org.osgi.service.startlevel;version="1.0.0", + org.osgi.service.url;version="1.0.0", + org.osgi.util.tracker;version="1.3.0", + org.slf4j;resolution:=optional, + org.slf4j.spi;resolution:=optional, + org.slf4j.helpers;resolution:=optional, + org.xml.sax, + org.xml.sax.helpers, + * + + <_nouses>true + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.boot.* + + + + + + diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml index 354ca49ff63..5910a343edf 100644 --- a/jetty-osgi/jetty-osgi-httpservice/pom.xml +++ b/jetty-osgi/jetty-osgi-httpservice/pom.xml @@ -1,88 +1,120 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-httpservice - Jetty :: OSGi :: HttpService - Jetty OSGi HttpService bundle - http://www.eclipse.org/jetty - - ${project.groupId}.httpservice - - - - org.eclipse.jetty - jetty-util - - - org.eclipse.jetty - jetty-servlet - - - org.eclipse.equinox.http - servlet - - - org.eclipse.osgi - org.eclipse.osgi - provided - - - javax.servlet - javax.servlet-api - - - - - - - maven-antrun-plugin - - - process-resources - - - - - - - - - run - - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.httpservice - OSGi HttpService - contexts/httpservice.xml - org.eclipse.jetty.server.handler;version="[9.1,10.0)", -org.eclipse.jetty.util.component;version="[9.1,10.0)", -org.eclipse.jetty.server.session;version="[9.1,10.0)", -org.eclipse.jetty.servlet;version="[9.1,10.0)", -org.eclipse.equinox.http.servlet, -* - - <_nouses>true - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.osgi.httpservice.* - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-httpservice + Jetty :: OSGi :: HttpService + Jetty OSGi HttpService bundle + http://www.eclipse.org/jetty + + ${project.groupId}.httpservice + + + + org.eclipse.jetty + jetty-util + + + org.eclipse.jetty + jetty-servlet + + + org.eclipse.equinox.http + servlet + + + org.eclipse.osgi + org.eclipse.osgi + provided + + + javax.servlet + javax.servlet-api + + + + + + + maven-antrun-plugin + + + process-resources + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + org.eclipse.jetty.osgi.httpservice + OSGi HttpService + contexts/httpservice.xml + org.eclipse.jetty.server.handler;version="[9.1,10.0)", +org.eclipse.jetty.util.component;version="[9.1,10.0)", +org.eclipse.jetty.server.session;version="[9.1,10.0)", +org.eclipse.jetty.servlet;version="[9.1,10.0)", +org.eclipse.equinox.http.servlet, +* + + <_nouses>true + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.osgi.httpservice.* + + + + + diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 95a351de2d4..3db092a3ed9 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -1,202 +1,195 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.osgi - jetty-osgi-project - Jetty :: OSGi - http://www.eclipse.org/jetty - pom - - - 3.6.0.v20100517 - 3.2.100.v20100503 - 1.0.0-v20070606 - - 0.9.29 - 1.6.1 - - - - jetty-osgi-boot - jetty-osgi-boot-jsp - jetty-osgi-boot-warurl - jetty-osgi-httpservice - test-jetty-osgi-webapp - test-jetty-osgi-context - test-jetty-osgi-fragment - test-jetty-osgi-server - jetty-osgi-alpn - - - - - jdk8 - - [1.8,1.9) - - - test-jetty-osgi - - - - - - - - META-INF/.. - true - - **/.* - **/*.jar - .settings/**/* - pom.xml - - jettyhome/**/* - src/**/* - target/**/* - build.properties - - - META-INF/**/* - - - - src/main/java - - **/*.java - - - - - - org.apache.maven.plugins - maven-eclipse-plugin - - prevent/overwriting/by/pointing/to/nonexisting/MANIFEST.MF - true - true - - **/.svn/** - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty - jetty-websocket - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-nested - ${project.version} - - - org.eclipse.jetty - jetty-servlet - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.osgi - org.eclipse.osgi.services - ${osgi-services-version} - - - - javax.servlet - servlet-api - - - - - org.eclipse.osgi - org.eclipse.osgi - ${osgi-version} - - - org.eclipse.equinox.http - servlet - ${equinox-http-servlet-version} - - - org.slf4j - slf4j-api - ${slf4j-version} - - - org.slf4j - jcl-over-slf4j - ${slf4j-version} - - - org.slf4j - log4j-over-slf4j - ${slf4j-version} - - - ch.qos.logback - logback-core - ${logback-version} - - - ch.qos.logback - logback-classic - ${logback-version} - - - - - + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + org.eclipse.jetty.osgi + jetty-osgi-project + Jetty :: OSGi + http://www.eclipse.org/jetty + pom + + 3.6.0.v20100517 + 3.2.100.v20100503 + 1.0.0-v20070606 + + 0.9.29 + 1.6.1 + + + jetty-osgi-boot + jetty-osgi-boot-jsp + jetty-osgi-boot-warurl + jetty-osgi-httpservice + test-jetty-osgi-webapp + test-jetty-osgi-context + test-jetty-osgi + jetty-osgi-alpn + + + + npn + + 1.7 + + + + + + + + + + META-INF/.. + true + + **/.* + **/*.jar + .settings/**/* + pom.xml + + jettyhome/**/* + src/**/* + target/**/* + build.properties + + + META-INF/**/* + + + + src/main/java + + **/*.java + + + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.8 + + prevent/overwriting/by/pointing/to/nonexisting/MANIFEST.MF + true + true + + **/.svn/** + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty + jetty-websocket + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + jetty-nested + ${project.version} + + + org.eclipse.jetty + jetty-servlet + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.osgi + org.eclipse.osgi.services + ${osgi-services-version} + + + + javax.servlet + servlet-api + + + + + org.eclipse.osgi + org.eclipse.osgi + ${osgi-version} + + + org.eclipse.equinox.http + servlet + ${equinox-http-servlet-version} + + + org.slf4j + slf4j-api + ${slf4j-version} + + + org.slf4j + jcl-over-slf4j + ${slf4j-version} + + + org.slf4j + log4j-over-slf4j + ${slf4j-version} + + + ch.qos.logback + logback-core + ${logback-version} + + + ch.qos.logback + logback-classic + ${logback-version} + + + + diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml index 25303053def..926d7595201 100644 --- a/jetty-osgi/test-jetty-osgi-context/pom.xml +++ b/jetty-osgi/test-jetty-osgi-context/pom.xml @@ -1,93 +1,125 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - - 4.0.0 - test-jetty-osgi-context - Jetty :: OSGi :: Test Context - Test Jetty OSGi bundle with a ContextHandler - http://www.eclipse.org/jetty - - ${project.groupId}.testcontext - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.osgi - org.eclipse.osgi - provided - - - org.eclipse.osgi - org.eclipse.osgi.services - provided - - - org.eclipse.jetty.toolchain - jetty-schemas - - - - - - - src/main/resources - - - src/main/context - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.testcontext;singleton:=true - Jetty OSGi Test Context - com.acme.osgi.Activator - J2SE-1.5 - - <_nouses>true - - javax.servlet;version="[3.1,3.2)", - javax.servlet.resources;version="[3.1,3.2)", - org.osgi.framework, - org.osgi.service.cm;version="1.2.0", - org.osgi.service.packageadmin, - org.osgi.service.startlevel;version="1.0.o", - org.osgi.service.url;version="1.0.0", - org.osgi.util.tracker;version="1.3.0", - org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, - org.slf4j.helpers;resolution:=optional, - org.xml.sax, - org.xml.sax.helpers, - * - - org.eclipse.jetty.*;version="[9.1,10.0)" - - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + + 4.0.0 + test-jetty-osgi-context + Jetty :: OSGi :: Context + Test Jetty OSGi bundle with a ContextHandler + http://www.eclipse.org/jetty + + ${project.groupId}.testcontext + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.osgi + org.eclipse.osgi + provided + + + org.eclipse.osgi + org.eclipse.osgi.services + provided + + + org.eclipse.jetty.toolchain + jetty-schemas + + + + + + + src/main/resources + + + src/main/context + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + org.eclipse.jetty.osgi.testcontext;singleton:=true + Jetty OSGi Test Context + com.acme.osgi.Activator + J2SE-1.5 + + <_nouses>true + + javax.servlet;version="[3.1,3.2)", + javax.servlet.resources;version="[3.1,3.2)", + org.osgi.framework, + org.osgi.service.cm;version="1.2.0", + org.osgi.service.packageadmin, + org.osgi.service.startlevel;version="1.0.o", + org.osgi.service.url;version="1.0.0", + org.osgi.util.tracker;version="1.3.0", + org.slf4j;resolution:=optional, + org.slf4j.spi;resolution:=optional, + org.slf4j.helpers;resolution:=optional, + org.xml.sax, + org.xml.sax.helpers, + * + + org.eclipse.jetty.*;version="[9.1,10.0)" + + + + + + + diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml index 9641eae6546..4a5b18702c9 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml +++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml @@ -1,83 +1,116 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - test-jetty-osgi-webapp - Jetty :: OSGi :: Test WebApp - Test Jetty OSGi Webapp bundle - http://www.eclipse.org/jetty - - ${project.groupId}.webapp - - - - org.eclipse.jetty - jetty-webapp - - - org.eclipse.osgi - org.eclipse.osgi - provided - - - org.eclipse.osgi - org.eclipse.osgi.services - provided - - - - - - - src/main/resources - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.osgi.testapp;singleton:=true - Jetty OSGi Test WebApp - com.acme.osgi.Activator - J2SE-1.5 - - - org.osgi.framework, - org.osgi.service.cm;version="1.2.0", - org.osgi.service.packageadmin, - org.osgi.service.startlevel;version="1.0.o", - org.osgi.service.url;version="1.0.0", - org.osgi.util.tracker;version="1.3.0", - org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, - org.slf4j.helpers;resolution:=optional, - org.xml.sax, - org.xml.sax.helpers, - * - - com.acme.osgi - org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + test-jetty-osgi-webapp + Jetty :: OSGi :: WebApp + Test Jetty OSGi Webapp bundle + http://www.eclipse.org/jetty + + ${project.groupId}.webapp + + + + org.eclipse.jetty + jetty-webapp + + + org.eclipse.osgi + org.eclipse.osgi + provided + + + org.eclipse.osgi + org.eclipse.osgi.services + provided + + + + + + + src/main/resources + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + org.eclipse.jetty.osgi.testapp;singleton:=true + Jetty OSGi Test WebApp + com.acme.osgi.Activator + J2SE-1.5 + + <_nouses>true + + org.osgi.framework, + org.osgi.service.cm;version="1.2.0", + org.osgi.service.packageadmin, + org.osgi.service.startlevel;version="1.0.o", + org.osgi.service.url;version="1.0.0", + org.osgi.util.tracker;version="1.3.0", + org.slf4j;resolution:=optional, + org.slf4j.spi;resolution:=optional, + org.slf4j.helpers;resolution:=optional, + org.xml.sax, + org.xml.sax.helpers, + * + + org.eclipse.jetty.*;version="[9.1,10.0)" + + + + + + + diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 26c72991e2d..9517cb5d81b 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -1,441 +1,449 @@ - - - org.eclipse.jetty.osgi - jetty-osgi-project - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - test-jetty-osgi - Jetty :: OSGi :: Test - Jetty OSGi Integration test - http://www.eclipse.org/jetty - - ${project.groupId}.boot.test.osgi - http://download.eclipse.org/jetty/orbit/ - target/distribution - 4.10.0 - 2.5.2 - 1.0 - - - - - org.ops4j.pax.exam - pax-exam - ${exam.version} - test - - - org.ops4j.pax.exam - pax-exam-inject - ${exam.version} - test - - - - org.ops4j.pax.exam - pax-exam-container-forked - ${exam.version} - test - - - org.ops4j.pax.exam - pax-exam-junit4 - ${exam.version} - test - - - junit - junit - - - - - org.ops4j.pax.exam - pax-exam-link-mvn - ${exam.version} - test - - - org.ops4j.pax.url - pax-url-aether - ${url.version} - test - - - - org.eclipse.platform - org.eclipse.osgi - 3.11.2 - test - - - org.eclipse.platform - org.eclipse.osgi.services - 3.5.100 - test - - - - - org.eclipse.jetty.osgi - jetty-osgi-boot - ${project.version} - test - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - - org.eclipse.jetty.osgi - jetty-osgi-boot-jsp - ${project.version} - test - - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - - - - - org.eclipse.jetty.osgi - jetty-httpservice - ${project.version} - test - - - - org.eclipse.jetty.toolchain - jetty-osgi-servlet-api - 3.1.0.M3 - - - org.apache.geronimo.specs - geronimo-jta_1.1_spec - 1.1.1 - test - - - org.apache.geronimo.specs - geronimo-atinject_1.0_spec - ${injection.bundle.version} - test - - - org.apache.aries.spifly - org.apache.aries.spifly.dynamic.bundle - 1.0.1 - test - - - org.glassfish.web - javax.servlet.jsp.jstl - 1.2.2 - - - javax.servlet.jsp.jstl - jstl-api - - - javax.servlet - servlet-api - - - javax.servlet.jsp - jsp-api - - - javax.el - el-api - - - - - org.eclipse.jetty.orbit - javax.servlet.jsp.jstl - 1.2.0.v201105211821 - - - org.eclipse.jetty.orbit - javax.servlet - - - org.eclipse.jetty.orbit - javax.servlet.jsp - - - - - - - org.eclipse.jetty - jetty-annotations - runtime - - - org.eclipse.jetty - jetty-webapp - runtime - - - org.eclipse.jetty - jetty-deploy - runtime - - - org.eclipse.jetty - jetty-server - ${project.version} - runtime - - - org.eclipse.jetty - jetty-servlet - runtime - - - org.eclipse.jetty - jetty-servlets - runtime - - - org.eclipse.jetty - jetty-security - ${project.version} - runtime - - - org.eclipse.jetty - jetty-xml - ${project.version} - runtime - - - org.eclipse.jetty - jetty-jmx - runtime - - - org.eclipse.jetty - jetty-util - ${project.version} - runtime - - - org.eclipse.jetty - jetty-client - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-api - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - runtime - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - runtime - - - javax.websocket - javax.websocket-api - runtime - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - runtime - - - org.eclipse.jetty.websocket - javax-websocket-client-impl - ${project.version} - runtime - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - - - org.eclipse.jetty.http2 - http2-hpack - ${project.version} - - - org.eclipse.jetty.osgi - jetty-osgi-alpn - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-schemas - runtime - - - org.eclipse.jetty - jetty-plus - ${project.version} - runtime - - - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - webbundle - test - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - test - - - org.eclipse.jetty.tests - test-container-initializer - ${project.version} - test - - - org.eclipse.jetty.osgi - test-jetty-osgi-fragment - ${project.version} - test - - - org.eclipse.jetty.osgi - test-jetty-osgi-server - ${project.version} - test - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - org.eclipse.jetty.osgi - test-jetty-osgi-context - ${project.version} - test - - - org.eclipse.jetty.osgi - test-jetty-osgi-webapp - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.slf4j - slf4j-log4j12 - ${slf4j-version} - test - - - - - - maven-surefire-plugin - - 2.18.1 - - - - -Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar - - - - org.apache.servicemix.tooling - depends-maven-plugin - - - generate-depends-file - - generate-depends-file - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.servicemix.tooling - depends-maven-plugin - [1.2,) - - generate-depends-file - - - - - - - - - - - - - - + + + org.eclipse.jetty.osgi + jetty-osgi-project + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + test-jetty-osgi + Jetty :: OSGi :: Test + Jetty OSGi Integration test + http://www.eclipse.org/jetty + + ${project.groupId}.boot.test.spdy + http://download.eclipse.org/jetty/orbit/ + target/distribution + 3.5.0 + 1.5.2 + 1.0 + + + + + + org.ops4j.pax.exam + pax-exam + ${exam.version} + test + + + org.ops4j.pax.exam + pax-exam-inject + ${exam.version} + test + + + + + + org.ops4j.pax.exam + pax-exam-container-forked + ${exam.version} + test + + + + org.ops4j.pax.exam + pax-exam-junit4 + ${exam.version} + test + + + junit + junit + + + + + org.ops4j.pax.exam + pax-exam-link-mvn + ${exam.version} + test + + + org.ops4j.pax.url + pax-url-aether + ${url.version} + test + + + + + + org.eclipse + osgi + 3.10.0-v20140606-1445 + test + + + org.eclipse.osgi + org.eclipse.osgi.services + test + + + + + + org.eclipse.jetty.osgi + jetty-osgi-boot + ${project.version} + test + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + + org.eclipse.jetty.osgi + jetty-osgi-boot-jsp + ${project.version} + test + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + + + + org.eclipse.jetty.osgi + jetty-httpservice + ${project.version} + test + + + + org.eclipse.jetty.toolchain + jetty-osgi-servlet-api + 3.1.0.M3 + + + + org.apache.geronimo.specs + geronimo-jta_1.1_spec + 1.1.1 + test + + + + org.apache.geronimo.specs + geronimo-atinject_1.0_spec + ${injection.bundle.version} + test + + + org.apache.aries.spifly + org.apache.aries.spifly.dynamic.bundle + 1.0.1 + test + + + + org.mortbay.jasper + apache-el + 8.0.33 + test + + + + + + org.eclipse.jetty + jetty-annotations + runtime + + + org.eclipse.jetty + jetty-webapp + runtime + + + org.eclipse.jetty + jetty-deploy + runtime + + + org.eclipse.jetty + jetty-server + ${project.version} + runtime + + + org.eclipse.jetty + jetty-servlet + runtime + + + org.eclipse.jetty + jetty-servlets + runtime + + + org.eclipse.jetty + jetty-security + ${project.version} + runtime + + + org.eclipse.jetty + jetty-xml + ${project.version} + runtime + + + org.eclipse.jetty + jetty-jmx + runtime + + + org.eclipse.jetty + jetty-util + runtime + + + org.eclipse.jetty + jetty-client + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-api + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + runtime + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + runtime + + + javax.websocket + javax.websocket-api + runtime + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + runtime + + + org.eclipse.jetty.websocket + javax-websocket-client-impl + ${project.version} + runtime + + + org.eclipse.jetty.spdy + spdy-core + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-server + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + test + + + org.eclipse.jetty.spdy + spdy-client + ${project.version} + test + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + test + + + org.eclipse.jetty.osgi + jetty-osgi-alpn + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-schemas + runtime + + + + + org.eclipse.jetty + jetty-plus + ${project.version} + runtime + + + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + webbundle + test + + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + test + + + + org.eclipse.jetty.tests + test-container-initializer + ${project.version} + test + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + + org.eclipse.jetty.osgi + test-jetty-osgi-context + ${project.version} + test + + + org.eclipse.jetty.osgi + test-jetty-osgi-webapp + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + maven-surefire-plugin + + + + -Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.7 + 1.7 + + + + org.apache.servicemix.tooling + depends-maven-plugin + 1.2 + + + generate-depends-file + + generate-depends-file + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.servicemix.tooling + depends-maven-plugin + [1.2,) + + generate-depends-file + + + + + + + + + + + + + + diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index bec7ca9e581..441e26f9cc3 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -1,59 +1,112 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-plus - Jetty :: Plus - Jetty JavaEE style services - http://www.eclipse.org/jetty - - ${project.groupId}.plus - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.plus.* - - - - - - - org.apache.derby - derby - 10.1.2.1 - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - javax.transaction - javax.transaction-api - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-plus + Jetty :: Plus + Jetty JavaEE style services + http://www.eclipse.org/jetty + + ${project.groupId}.plus + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + <_nouses>true + + javax.sql.*,javax.security.*,javax.naming.*, + javax.servlet.*;version="[2.6.0,3.2)",javax.transaction.*;version="[1.1,1.3)", + * + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.plus.* + + + + + + + org.apache.derby + derby + 10.1.2.1 + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + javax.transaction + javax.transaction-api + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + diff --git a/jetty-proxy/pom.xml b/jetty-proxy/pom.xml index 389efa771d9..8649f2fdb0e 100644 --- a/jetty-proxy/pom.xml +++ b/jetty-proxy/pom.xml @@ -1,67 +1,106 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-proxy - Jetty :: Proxy - Jetty Proxy - http://www.eclipse.org/jetty - - ${project.groupId}.proxy - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.proxy.* - - - - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-servlet - ${project.version} - provided - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-util-ajax - ${project.version} - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-proxy + Jetty :: Proxy + Jetty Proxy + http://www.eclipse.org/jetty + + ${project.groupId}.proxy + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.proxy.* + + + + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-servlet + ${project.version} + provided + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-util-ajax + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index 7a41219e381..e073299b9a1 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -1,95 +1,104 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - org.eclipse.jetty - jetty-quickstart - Jetty :: Quick Start - Jetty Quick Start - http://www.eclipse.org/jetty - - ${project.groupId}.quickstart - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - javax.transaction - javax.transaction-api - 1.2 - compile - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - test - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - test - - - org.eclipse.jetty - jetty-servlets - ${project.version} - test - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - test - - - org.eclipse.jetty - apache-jsp - ${project.version} - test - - - org.eclipse.jetty - apache-jstl - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + org.eclipse.jetty + jetty-quickstart + Jetty :: Quick Start + Jetty Quick Start + http://www.eclipse.org/jetty + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + javax.transaction + javax.transaction-api + 1.2 + compile + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + test + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + test + + + org.eclipse.jetty + jetty-servlets + ${project.version} + test + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty + apache-jsp + ${project.version} + test + + + org.eclipse.jetty + apache-jstl + ${project.version} + test + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml index a90c5792251..2010c7eb23f 100644 --- a/jetty-rewrite/pom.xml +++ b/jetty-rewrite/pom.xml @@ -1,47 +1,93 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-rewrite - Jetty :: Rewrite Handler - Jetty Rewrite Handler - http://www.eclipse.org/jetty - - ${project.groupId}.rewrite - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.rewrite.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - javax.servlet - javax.servlet-api - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-rewrite + Jetty :: Rewrite Handler + Jetty Rewrite Handler + http://www.eclipse.org/jetty + + ${project.groupId}.rewrite + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.rewrite.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + javax.servlet + javax.servlet-api + + + diff --git a/jetty-runner/pom.xml b/jetty-runner/pom.xml index ec3e202a4ff..db123b2d10e 100644 --- a/jetty-runner/pom.xml +++ b/jetty-runner/pom.xml @@ -1,118 +1,108 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-runner - Jetty :: Runner - - - target/distribution - ${project.groupId}.runner - - http://www.eclipse.org/jetty - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-dependencies - prepare-package - - unpack-dependencies - - - ** - **/MANIFEST.MF,META-INF/*.RSA,META-INF/*.DSA,META-INF/*.SF - ${project.build.directory}/classes - false - true - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - - - org.eclipse.jetty.runner.Runner - !* - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - - - org.neo4j.build.plugins - clirr-maven-plugin - - - true - - - - - - - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-jaas - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-runner + Jetty :: Runner + + + target/distribution + + http://www.eclipse.org/jetty + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-dependencies + package + + unpack-dependencies + + + ** + **/MANIFEST.MF,META-INF/*.RSA,META-INF/*.DSA,META-INF/*.SF + ${project.build.directory}/classes + false + true + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + package + + jar + + + + + org.eclipse.jetty.runner.Runner + + + development + http://eclipse.org/jetty + ${user.name} + org.eclipse.jetty.runner + Jetty Runner + Mort Bay Consulting + + + + + + + + org.apache.felix + maven-bundle-plugin + true + + true + + + + + + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-jaas + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + org.eclipse.jetty + jetty-jsp + ${project.version} + + + diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index 4da91da22c1..46314705c18 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -1,56 +1,85 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-security - Jetty :: Security - Jetty security infrastructure - http://www.eclipse.org/jetty - - ${project.groupId}.security - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* - - - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.security.* - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-security + Jetty :: Security + Jetty security infrastructure + http://www.eclipse.org/jetty + + ${project.groupId}.security + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,* + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.security.* + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml index 0a1e5866fe5..233ca5c06de 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -1,78 +1,127 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-server - Jetty :: Server Core - The core jetty server artifact. - http://www.eclipse.org/jetty - - ${project.groupId}.server - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.server.* - - - - - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-server + Jetty :: Server Core + The core jetty server artifact. + http://www.eclipse.org/jetty + + ${project.groupId}.server + + + + + org.apache.felix + maven-bundle-plugin + true + + + generate-manifest + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;version="9.1";resolution:=optional,* + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + test-jar + + test-jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.server.* + + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + javax.servlet + javax.servlet-api + + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.mockito + mockito-core + test + + + diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index f4a9dcec809..7d4d1698d2f 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -1,64 +1,100 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-servlet - Jetty :: Servlet Handling - Jetty Servlet Container - http://www.eclipse.org/jetty - - ${project.groupId}.servlet - - - - - org.apache.maven.plugins - maven-jar-plugin - - - tests - - test-jar - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.servlet.* - - - - - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - + + + + jetty-project + org.eclipse.jetty + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-servlet + Jetty :: Servlet Handling + Jetty Servlet Container + http://www.eclipse.org/jetty + + ${project.groupId}.servlet + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;version="9.1";resolution:=optional,* + <_nouses>true + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + tests + + test-jar + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.servlet.* + + + + + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index dbffcf88883..6b9e284b022 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -1,85 +1,117 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-servlets - Jetty :: Utility Servlets and Filters - Utility Servlets from Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.servlets - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.servlets.* - - - - - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - provided - - - org.eclipse.jetty - jetty-util - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + jetty-project + org.eclipse.jetty + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-servlets + Jetty :: Utility Servlets and Filters + Utility Servlets from Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.servlets + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.servlets.* + + + + + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + provided + + + org.eclipse.jetty + jetty-util + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-spdy/pom.xml b/jetty-spdy/pom.xml index 3d3e42e19c4..9ec565c9d74 100644 --- a/jetty-spdy/pom.xml +++ b/jetty-spdy/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 diff --git a/jetty-spdy/spdy-alpn-tests/pom.xml b/jetty-spdy/spdy-alpn-tests/pom.xml index 9dfc87e1163..d0931a162c1 100644 --- a/jetty-spdy/spdy-alpn-tests/pom.xml +++ b/jetty-spdy/spdy-alpn-tests/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 diff --git a/jetty-spdy/spdy-client/pom.xml b/jetty-spdy/spdy-client/pom.xml index bddf9480e87..6f0bb90e92b 100644 --- a/jetty-spdy/spdy-client/pom.xml +++ b/jetty-spdy/spdy-client/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 diff --git a/jetty-spdy/spdy-core/pom.xml b/jetty-spdy/spdy-core/pom.xml index 1bc3051bbfa..b35715e3259 100644 --- a/jetty-spdy/spdy-core/pom.xml +++ b/jetty-spdy/spdy-core/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 diff --git a/jetty-spdy/spdy-example-webapp/pom.xml b/jetty-spdy/spdy-example-webapp/pom.xml index a1b886773ca..2f806788368 100644 --- a/jetty-spdy/spdy-example-webapp/pom.xml +++ b/jetty-spdy/spdy-example-webapp/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 spdy-example-webapp diff --git a/jetty-spdy/spdy-http-client-transport/pom.xml b/jetty-spdy/spdy-http-client-transport/pom.xml index c5be7203da6..0c6ad340246 100644 --- a/jetty-spdy/spdy-http-client-transport/pom.xml +++ b/jetty-spdy/spdy-http-client-transport/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 diff --git a/jetty-spdy/spdy-http-common/pom.xml b/jetty-spdy/spdy-http-common/pom.xml index d661baa93db..c0a97d9d21f 100644 --- a/jetty-spdy/spdy-http-common/pom.xml +++ b/jetty-spdy/spdy-http-common/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 diff --git a/jetty-spdy/spdy-http-server/pom.xml b/jetty-spdy/spdy-http-server/pom.xml index 40a23b1be4c..4757f3633c1 100644 --- a/jetty-spdy/spdy-http-server/pom.xml +++ b/jetty-spdy/spdy-http-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 spdy-http-server diff --git a/jetty-spdy/spdy-server/pom.xml b/jetty-spdy/spdy-server/pom.xml index f96782a5e5c..71440708754 100644 --- a/jetty-spdy/spdy-server/pom.xml +++ b/jetty-spdy/spdy-server/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty.spdy spdy-parent - 9.2.22.v20170606 + 9.2.23-SNAPSHOT 4.0.0 diff --git a/jetty-spring/pom.xml b/jetty-spring/pom.xml index c0c2fe42835..e01b95eba34 100644 --- a/jetty-spring/pom.xml +++ b/jetty-spring/pom.xml @@ -1,57 +1,73 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-spring - Example :: Jetty Spring - - - 3.2.8.RELEASE - target/dependencies - ${project.groupId}.spring - - - - install - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.springframework - spring-beans - ${spring-version} - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-spring + Example :: Jetty Spring + + + 3.2.8.RELEASE + target/dependencies + + + + install + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.springframework + spring-beans + ${spring-version} + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml index 5f1e7599c90..5c0b6f5cb89 100644 --- a/jetty-start/pom.xml +++ b/jetty-start/pom.xml @@ -1,44 +1,43 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-start - Jetty :: Start - The start utility - http://www.eclipse.org/jetty - - ${project.groupId}.start - start.jar - - - - - maven-jar-plugin - - - - org.eclipse.jetty.start.Main - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.start.* - - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-start + Jetty :: Start + The start utility + http://www.eclipse.org/jetty + + + + maven-jar-plugin + + + + org.eclipse.jetty.start.Main + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.start.* + + + + + + start.jar + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-util-ajax/pom.xml b/jetty-util-ajax/pom.xml index 4e9fdbebd5c..0f155a2773d 100644 --- a/jetty-util-ajax/pom.xml +++ b/jetty-util-ajax/pom.xml @@ -1,43 +1,91 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-util-ajax - Jetty :: Utilities :: Ajax(JSON) - JSON/Ajax Utility classes for Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.util.ajax - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.util.ajax.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-util-ajax + Jetty :: Utilities :: Ajax(JSON) + JSON/Ajax Utility classes for Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.util.ajax + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",org.slf4j;version="[1.5,2.0)";resolution:=optional,org.slf4j.impl;version="[1.5,2.0)";resolution:=optional,* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.util.ajax.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index b6d0f475eb6..174e2d33cc3 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -1,73 +1,106 @@ - - - org.eclipse.jetty - jetty-project - 9.4.6-SNAPSHOT - - 4.0.0 - jetty-util - Jetty :: Utilities - Utility classes for Jetty - http://www.eclipse.org/jetty - - ${project.groupId}.util - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.util.* - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${settings.localRepository} - - - - - - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.toolchain - jetty-perf-helper - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.slf4j - slf4j-api - provided - true - - - - org.slf4j - slf4j-jdk14 - ${slf4j-version} - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-util + Jetty :: Utilities + Utility classes for Jetty + http://www.eclipse.org/jetty + + ${project.groupId}.util + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2)",org.slf4j;version="[1.6,2.0)";resolution:=optional,org.slf4j.impl;version="[1.6,2.0)";resolution:=optional,* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.util.* + + + + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.toolchain + jetty-perf-helper + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.slf4j + slf4j-api + provided + true + + + + org.slf4j + slf4j-jdk14 + ${slf4j-version} + test + + + diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index 3b97065de1f..1c3dfe2e58c 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -1,73 +1,110 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-webapp - Jetty :: Webapp Application Support - Jetty web application support - http://www.eclipse.org/jetty - - ${project.groupId}.webapp - - - - - src/main/resources - - - src/main/config/etc - org/eclipse/jetty/webapp - false - - webdefault.xml - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.webapp.* - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org.eclipse.jetty.webapp.WebAppClassLoaderUrlStreamTest - - 1 - false - - - - - - - org.eclipse.jetty - jetty-xml - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-webapp + Jetty :: Webapp Application Support + Jetty web application support + http://www.eclipse.org/jetty + + ${project.groupId}.webapp + + + + + src/main/resources + + + src/main/config/etc + org/eclipse/jetty/webapp + false + + webdefault.xml + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.servlet.*;version="[2.6.0,3.2]",* + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.webapp.* + + + + + + + org.eclipse.jetty + jetty-xml + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + diff --git a/jetty-websocket/javax-websocket-client-impl/pom.xml b/jetty-websocket/javax-websocket-client-impl/pom.xml index 3172c6638d3..8c966e24fc1 100644 --- a/jetty-websocket/javax-websocket-client-impl/pom.xml +++ b/jetty-websocket/javax-websocket-client-impl/pom.xml @@ -1,100 +1,100 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - javax-websocket-client-impl - Jetty :: Websocket :: javax.websocket :: Client Implementation - - - ${project.groupId}.javax.websocket - - - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - - - javax.websocket - javax.websocket-api - - - org.eclipse.jetty - jetty-server - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.websocket.client Implementation - org.eclipse.jetty.websocket.jsr356.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + javax-websocket-client-impl + Jetty :: Websocket :: javax.websocket :: Client Implementation + + + ${project.groupId}.javax.websocket + + + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + + + javax.websocket + javax.websocket-api + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.websocket.client Implementation + org.eclipse.jetty.websocket.jsr356.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + + + + + + + + + diff --git a/jetty-websocket/javax-websocket-server-impl/pom.xml b/jetty-websocket/javax-websocket-server-impl/pom.xml index 7a8df967c06..d43af2cdf20 100644 --- a/jetty-websocket/javax-websocket-server-impl/pom.xml +++ b/jetty-websocket/javax-websocket-server-impl/pom.xml @@ -1,75 +1,92 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - javax-websocket-server-impl - Jetty :: Websocket :: javax.websocket.server :: Server Implementation - - - ${project.groupId}.javax.websocket.server - - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-client-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - javax.websocket - javax.websocket-api - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.websocket.server Implementation - org.eclipse.jetty.websocket.jsr356.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional - osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer, osgi.serviceloader; osgi.serviceloader=javax.websocket.server.ServerEndpointConfig$Configurator - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + javax-websocket-server-impl + Jetty :: Websocket :: javax.websocket.server :: Server Implementation + + + ${project.groupId}.javax.websocket.server + + + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-client-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + javax.websocket + javax.websocket-api + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + javax.websocket.server Implementation + org.eclipse.jetty.websocket.jsr356.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional + osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer, osgi.serviceloader; osgi.serviceloader=javax.websocket.server.ServerEndpointConfig$Configurator + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + + + + + + diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index 660df847c1e..a9c46d13bee 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -1,48 +1,83 @@ - - - - jetty-project - org.eclipse.jetty - 9.4.7-SNAPSHOT - - - 4.0.0 - org.eclipse.jetty.websocket - websocket-parent - Jetty :: Websocket :: Parent - pom - http://www.eclipse.org/jetty - - - websocket-common - websocket-api - websocket-client - websocket-server - websocket-servlet - javax-websocket-client-impl - javax-websocket-server-impl - - - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.websocket.* - - - - org.codehaus.mojo - clirr-maven-plugin - - info - 9.1.0.v20131115 - - - - - - - + + + + jetty-project + org.eclipse.jetty + 9.2.23-SNAPSHOT + + + 4.0.0 + org.eclipse.jetty.websocket + websocket-parent + Jetty :: Websocket :: Parent + pom + http://www.eclipse.org/jetty + + + websocket-common + websocket-api + websocket-client + websocket-server + websocket-servlet + javax-websocket-client-impl + javax-websocket-server-impl + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.websocket.* + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + ${bundle-symbolic-name}.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + javax.servlet.*;version="[3.1,4.0)",org.eclipse.jetty.*;version="[9.0,10.0)",* + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + clirr-maven-plugin + 2.5 + + + compare-api + package + + clirr + + + + + info + 9.1.0.v20131115 + + + + + diff --git a/jetty-websocket/websocket-api/pom.xml b/jetty-websocket/websocket-api/pom.xml index ce4313f4f47..d9ebbaddfe9 100644 --- a/jetty-websocket/websocket-api/pom.xml +++ b/jetty-websocket/websocket-api/pom.xml @@ -1,58 +1,58 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-api - Jetty :: Websocket :: API - - - ${project.groupId}.api - - - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + websocket-api + Jetty :: Websocket :: API + + + ${project.groupId}.api + + + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + + + + + + + + + diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index 4326bf3d72c..0467b4834b6 100644 --- a/jetty-websocket/websocket-client/pom.xml +++ b/jetty-websocket/websocket-client/pom.xml @@ -1,128 +1,118 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-client - Jetty :: Websocket :: Client - - - ${project.groupId}.client - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-xml - ${project.version} - true - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - true - The servlet-api dependency is banned in websocket-client as it causes problems in apps that use client only. - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - tests-jar - - test-jar - - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - true - hybrid - - - org.eclipse.jetty.websocket:websocket-common - - - - - org.eclipse.jetty.websocket.common - org.eclipse.jetty.websocket.client.common - - - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + websocket-client + Jetty :: Websocket :: Client + + + ${project.groupId}.client + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + true + The servlet-api dependency is banned in websocket-client as it causes problems in apps that use client only. + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + tests-jar + + test-jar + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.3 + + + package + + shade + + + true + hybrid + + + org.eclipse.jetty.websocket:websocket-common + + + + + org.eclipse.jetty.websocket.common + org.eclipse.jetty.websocket.client.common + + + + + + + + + diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index 8ca709104c4..a1340125c08 100644 --- a/jetty-websocket/websocket-common/pom.xml +++ b/jetty-websocket/websocket-common/pom.xml @@ -1,81 +1,82 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-common - Jetty :: Websocket :: Common - - - ${project.groupId}.common - - - - - org.eclipse.jetty.websocket - websocket-api - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty - jetty-io - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - ban-java-servlet-api - - enforce - - - - - - javax.servlet - servletapi - org.eclipse.jetty.orbit:javax.servlet - org.mortbay.jetty:servlet-api - jetty:servlet-api - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jars - - test-jar - - - - - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + websocket-common + Jetty :: Websocket :: Common + + + ${project.groupId}.common + + + + + org.eclipse.jetty.websocket + websocket-api + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + ban-java-servlet-api + + enforce + + + + + + javax.servlet + servletapi + org.eclipse.jetty.orbit:javax.servlet + org.mortbay.jetty:servlet-api + jetty:servlet-api + + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jars + + jar + test-jar + + + + + + + diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index 9a595a8ce97..d9f270511ed 100644 --- a/jetty-websocket/websocket-server/pom.xml +++ b/jetty-websocket/websocket-server/pom.xml @@ -1,96 +1,117 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-server - Jetty :: Websocket :: Server - - - ${project.groupId}.server - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - - - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - - - org.eclipse.jetty - jetty-servlet - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-http - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - org.eclipse.jetty.websocket - websocket-common - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + websocket-server + Jetty :: Websocket :: Server + + + ${project.groupId}.server + + + + + + org.apache.felix + maven-bundle-plugin + true + + + generate-manifest + + manifest + + + + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.websocket.servlet.WebSocketServletFactory + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jars + + jar + test-jar + + + + + + + + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + + + org.eclipse.jetty + jetty-servlet + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-http + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-common + ${project.version} + tests + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index 889f6b426e0..c99b953a5ae 100644 --- a/jetty-websocket/websocket-servlet/pom.xml +++ b/jetty-websocket/websocket-servlet/pom.xml @@ -1,50 +1,69 @@ - - - - org.eclipse.jetty.websocket - websocket-parent - 9.4.7-SNAPSHOT - - - 4.0.0 - websocket-servlet - Jetty :: Websocket :: Servlet Interface - - - ${project.groupId}.servlet - - - - - org.apache.felix - maven-bundle-plugin - true - - - Websocket Servlet Interface - - org.eclipse.jetty.websocket.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}",org.eclipse.jetty.websocket.server.pathmap.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}" - - - - - - - - - org.eclipse.jetty.websocket - websocket-api - ${project.version} - - - javax.servlet - javax.servlet-api - - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + org.eclipse.jetty.websocket + websocket-parent + 9.2.23-SNAPSHOT + + + 4.0.0 + websocket-servlet + Jetty :: Websocket :: Servlet Interface + + + ${project.groupId}.servlet + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + Websocket Servlet Interface + + <_nouses>true + org.eclipse.jetty.websocket.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}",org.eclipse.jetty.websocket.server.pathmap.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}" + osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.websocket.servlet.WebSocketServletFactory)";cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" + + + + + + + + + org.eclipse.jetty.websocket + websocket-api + ${project.version} + + + javax.servlet + javax.servlet-api + + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml index d4ffe67f438..7f722aec9a8 100644 --- a/jetty-xml/pom.xml +++ b/jetty-xml/pom.xml @@ -1,38 +1,62 @@ - - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - - 4.0.0 - jetty-xml - Jetty :: XML utilities - The jetty xml utilities. - http://www.eclipse.org/jetty - - ${project.groupId}.xml - - - - - org.codehaus.mojo - findbugs-maven-plugin - - org.eclipse.jetty.xml.* - - - - - - - org.eclipse.jetty - jetty-util - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + + 4.0.0 + jetty-xml + Jetty :: XML utilities + The jetty xml utilities. + http://www.eclipse.org/jetty + + ${project.groupId}.xml + + + + + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.codehaus.mojo + findbugs-maven-plugin + + org.eclipse.jetty.xml.* + + + + + + + org.eclipse.jetty + jetty-util + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/pom.xml b/pom.xml index 60e1000d768..29192a95441 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 org.eclipse.jetty jetty-project - 9.4.7-SNAPSHOT + 9.2.23-SNAPSHOT Jetty :: Project The Eclipse Jetty Project pom diff --git a/tests/pom.xml b/tests/pom.xml index 9d3309a60c5..27e448c5e96 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -1,63 +1,53 @@ - - - 4.0.0 - - org.eclipse.jetty - jetty-project - 9.4.7-SNAPSHOT - ../pom.xml - - org.eclipse.jetty.tests - tests-parent - Jetty Tests :: Parent - http://www.eclipse.org/jetty - pom - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - true - - - - org.codehaus.mojo - findbugs-maven-plugin - - - true - - - - org.neo4j.build.plugins - clirr-maven-plugin - - - true - - - - - - - test-webapps - test-sessions - test-continuation - test-loginservice - test-integration - test-quickstart - test-jmx - test-http-client-transport - - + + + + 4.0.0 + + org.eclipse.jetty + jetty-project + 9.2.23-SNAPSHOT + ../pom.xml + + org.eclipse.jetty.tests + tests-parent + Jetty Tests :: Parent + http://www.eclipse.org/jetty + pom + + + + org.codehaus.mojo + findbugs-maven-plugin + + + true + + + + + + test-webapps + test-sessions + test-continuation + test-loginservice + test-integration + test-quickstart + test-jmx + + diff --git a/tests/test-continuation/pom.xml b/tests/test-continuation/pom.xml index b294ad136aa..883694e88b0 100644 --- a/tests/test-continuation/pom.xml +++ b/tests/test-continuation/pom.xml @@ -1,48 +1,62 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - test-continuation - jar - Test :: Continuation - Asynchronous API - - ${project.groupId}.continuation - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - - org.eclipse.jetty - jetty-servlet - ${project.version} - provided - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - compile - - - - + + + + + org.eclipse.jetty.tests + tests-parent + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + test-continuation + jar + Test :: Continuation + Asynchronous API + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + + org.eclipse.jetty + jetty-servlet + ${project.version} + provided + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + compile + + + + diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index 7635e5cab5e..c6ba1f95946 100644 --- a/tests/test-integration/pom.xml +++ b/tests/test-integration/pom.xml @@ -1,141 +1,137 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - 4.0.0 - test-integration - jar - Jetty Tests :: Integrations - http://www.eclipse.org/jetty - - ${project.build.directory}/test-wars - ${project.build.directory}/test-libs - ${project.build.directory}/test-dist - ${project.groupId}.integrations - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-wars-for-testing - process-test-resources - - copy-dependencies - - - org.eclipse.jetty.tests - test - war - true - true - true - ${project.build.directory}/webapps - - - - unpack-jetty-distro - process-test-resources - - unpack - - - - - org.eclipse.jetty - jetty-distribution - ${project.version} - zip - true - - - true - ${test-dist-dir} - true - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - always - true - false - - - - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-distribution - ${project.version} - pom - - - org.eclipse.jetty - jetty-http - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty.tests - test-webapp-rfc2616 - ${project.version} - war - test - - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - + + + + + org.eclipse.jetty.tests + tests-parent + 9.2.23-SNAPSHOT + + 4.0.0 + test-integration + jar + Jetty Tests :: Integrations + http://www.eclipse.org/jetty + + ${project.build.directory}/test-wars + ${project.build.directory}/test-libs + ${project.build.directory}/test-dist + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-wars-for-testing + process-test-resources + + copy-dependencies + + + org.eclipse.jetty.tests + test + war + true + true + true + ${project.build.directory}/webapps + + + + unpack-jetty-distro + process-test-resources + + unpack + + + + + org.eclipse.jetty + jetty-distribution + ${project.version} + zip + true + + + true + ${test-dist-dir} + true + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + always + true + false + + + + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-deploy + ${project.version} + + + org.eclipse.jetty + jetty-rewrite + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-distribution + ${project.version} + pom + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-jsp + ${project.version} + + + org.eclipse.jetty.tests + test-webapp-rfc2616 + ${project.version} + war + test + + + diff --git a/tests/test-jmx/jmx-webapp-it/pom.xml b/tests/test-jmx/jmx-webapp-it/pom.xml index 91e5ab08ca4..5401ae8e540 100644 --- a/tests/test-jmx/jmx-webapp-it/pom.xml +++ b/tests/test-jmx/jmx-webapp-it/pom.xml @@ -1,69 +1,207 @@ - - - - org.eclipse.jetty.tests - test-jmx-parent - 9.4.7-SNAPSHOT - - 4.0.0 - jmx-webapp-it - jar - Jetty Tests :: JMX :: WebApp Integration Tests - http://www.eclipse.org/jetty - - UTF-8 - UTF-8 - ${project.groupId}.jmx.webapp.it - ${project.build.directory}/test-base - - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty.tests - jmx-webapp - ${project.version} - war - runtime - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-apps-for-testing - process-test-resources - - copy-dependencies - - - jmx-webapp - runtime - war - true - true - true - ${test-base-dir}/webapps - - - - - - - + + + + + org.eclipse.jetty.tests + test-jmx-parent + 9.2.23-SNAPSHOT + + 4.0.0 + jmx-webapp-it + jar + Jetty Tests :: JMX :: WebApp Integration Tests + http://www.eclipse.org/jetty + + UTF-8 + UTF-8 + ${project.groupId}.jmx.webapp.it + ${project.basedir}/src/test/scripts + ${project.build.directory}/test-base + ${project.build.directory}/test-home + + + + org.eclipse.jetty + jetty-distribution + ${project.version} + zip + runtime + + + org.eclipse.jetty.tests + jmx-webapp + ${project.version} + war + runtime + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-apps-for-testing + process-test-resources + + copy-dependencies + + + jmx-webapp + runtime + war + true + true + true + ${test-base-dir}/webapps + + + + unpack-jetty-distro + process-test-resources + + unpack-dependencies + + + jetty-distribution + runtime + zip + true + ${test-home-dir} + true + true + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.17 + + + + integration-test + verify + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + start-jetty + pre-integration-test + + run + + + + + + Integration Test : Setup Jetty + + + + + + + + + Integration Test : Starting Jetty ... + + + + + + + + + + + Integration Test : Jetty is now available + + + + + stop-jetty + post-integration-test + + run + + + + + + Integration Test : Stop Jetty + + + + + + + + + + + + + + + + + it-windows + + + Windows + + + + cmd + /c + start-jetty.bat + stop-jetty.bat + + + + it-unix + + + unix + + + + sh + -- + setup-jetty.sh + start-jetty.sh + stop-jetty.sh + + + + diff --git a/tests/test-jmx/jmx-webapp/pom.xml b/tests/test-jmx/jmx-webapp/pom.xml index 787e6bbd188..0e81a58516e 100644 --- a/tests/test-jmx/jmx-webapp/pom.xml +++ b/tests/test-jmx/jmx-webapp/pom.xml @@ -1,42 +1,65 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-jmx-parent - 9.4.7-SNAPSHOT - - jmx-webapp - war - Jetty Tests :: JMX :: WebApp - http://www.eclipse.org/jetty - - UTF-8 - ${project.groupId}.jmx.webapp - - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - - jmx-webapp - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - + + + + 4.0.0 + + org.eclipse.jetty.tests + test-jmx-parent + 9.2.23-SNAPSHOT + + jmx-webapp + war + Jetty Tests :: JMX :: WebApp + http://www.eclipse.org/jetty + + UTF-8 + ${project.groupId}.jmx.webapp + + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + + jmx-webapp + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-war-plugin + + + + + + diff --git a/tests/test-jmx/pom.xml b/tests/test-jmx/pom.xml index bb79f51c47d..895efd6c865 100644 --- a/tests/test-jmx/pom.xml +++ b/tests/test-jmx/pom.xml @@ -1,17 +1,34 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - 4.0.0 - test-jmx-parent - pom - Jetty Tests :: JMX Parent - http://www.eclipse.org/jetty - - jmx-webapp - jmx-webapp-it - - + + + + + org.eclipse.jetty.tests + tests-parent + 9.2.23-SNAPSHOT + + 4.0.0 + test-jmx-parent + pom + Jetty Tests :: JMX Parent + http://www.eclipse.org/jetty + + jmx-webapp + jmx-webapp-it + + diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml index 93b5a14f9ab..c81bfae9e94 100644 --- a/tests/test-loginservice/pom.xml +++ b/tests/test-loginservice/pom.xml @@ -1,64 +1,78 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - test-loginservice - Jetty Tests :: Login Service - http://www.eclipse.org/jetty - - ${project.groupId}.loginservice - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-security - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-jndi - ${project.version} - - - org.apache.derby - derby - 10.4.1.3 - test - - - org.apache.derby - derbytools - 10.4.1.3 - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + 4.0.0 + + org.eclipse.jetty.tests + tests-parent + 9.2.23-SNAPSHOT + + test-loginservice + Jetty Tests :: Login Service + http://www.eclipse.org/jetty + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-security + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-jndi + ${project.version} + + + org.apache.derby + derby + 10.4.1.3 + test + + + org.apache.derby + derbytools + 10.4.1.3 + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/tests/test-quickstart/pom.xml b/tests/test-quickstart/pom.xml index 3e57624d55c..2d746a1a3d8 100644 --- a/tests/test-quickstart/pom.xml +++ b/tests/test-quickstart/pom.xml @@ -1,185 +1,182 @@ - - - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - test-quickstart - Test :: Jetty Quick Start - Jetty Quick Start Test - http://www.eclipse.org/jetty - - ${project.groupId}.tests.quickstart - - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - javax.transaction - javax.transaction-api - 1.2 - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - war - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - war - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - - - - - - - org.codehaus.mojo - appassembler-maven-plugin - - - unix - - - - preconfigure - org.eclipse.jetty.quickstart.PreconfigureQuickStartWar - - - org.eclipse.jetty.quickstart.QuickStartWar - quickstart - - - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - - - - - org.eclipse.jetty.tests - test-jndi-webapp - ${project.version} - war - true - ** - ${basedir}/target - test-jndi.war - - - org.eclipse.jetty.tests - test-spec-webapp - ${project.version} - war - true - ** - ${basedir}/target - test-spec.war - - - org.eclipse.jetty - test-jetty-webapp - ${project.version} - war - true - ** - ${basedir}/target - test-standard.war - - - - - - - - - + + + org.eclipse.jetty.tests + tests-parent + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + test-quickstart + Test :: Jetty Quick Start + Jetty Quick Start Test + http://www.eclipse.org/jetty + + + org.eclipse.jetty + jetty-quickstart + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + + + org.eclipse.jetty + jetty-plus + ${project.version} + + + org.eclipse.jetty + jetty-annotations + ${project.version} + + + javax.transaction + javax.transaction-api + 1.2 + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + war + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + war + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + + + + + + + org.codehaus.mojo + appassembler-maven-plugin + 1.7 + + + unix + + + + preconfigure + org.eclipse.jetty.quickstart.PreconfigureQuickStartWar + + + org.eclipse.jetty.quickstart.QuickStartWar + quickstart + + + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.eclipse.jetty.tests + test-jndi-webapp + ${project.version} + war + true + ** + ${basedir}/target + test-jndi.war + + + org.eclipse.jetty.tests + test-spec-webapp + ${project.version} + war + true + ** + ${basedir}/target + test-spec.war + + + org.eclipse.jetty + test-jetty-webapp + ${project.version} + war + true + ** + ${basedir}/target + test-standard.war + + + + + + + + + diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml index 66ffbff6d8b..321f351eaf9 100644 --- a/tests/test-sessions/pom.xml +++ b/tests/test-sessions/pom.xml @@ -1,25 +1,39 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - - test-sessions-parent - Jetty Tests :: Sessions :: Parent - http://www.eclipse.org/jetty - pom - - - - test-sessions-common - test-hash-sessions - test-file-sessions - test-jdbc-sessions - test-mongodb-sessions - test-infinispan-sessions - test-gcloud-sessions - test-memcached-sessions - - + + + + 4.0.0 + + org.eclipse.jetty.tests + tests-parent + 9.2.23-SNAPSHOT + + test-sessions-parent + Jetty Tests :: Sessions :: Parent + http://www.eclipse.org/jetty + pom + + + + test-sessions-common + test-hash-sessions + test-jdbc-sessions + + test-mongodb-sessions + + diff --git a/tests/test-sessions/test-hash-sessions/pom.xml b/tests/test-sessions/test-hash-sessions/pom.xml index aef9c3cb280..428c9bee4b1 100644 --- a/tests/test-sessions/test-hash-sessions/pom.xml +++ b/tests/test-sessions/test-hash-sessions/pom.xml @@ -1,55 +1,69 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-hash-sessions - Jetty Tests :: Sessions :: Hash - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.hash - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - - compile - - - + + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.2.23-SNAPSHOT + + test-hash-sessions + Jetty Tests :: Sessions :: Hash + http://www.eclipse.org/jetty + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + + compile + + + diff --git a/tests/test-sessions/test-jdbc-sessions/pom.xml b/tests/test-sessions/test-jdbc-sessions/pom.xml index 3cf5894760a..1381813408f 100644 --- a/tests/test-sessions/test-jdbc-sessions/pom.xml +++ b/tests/test-sessions/test-jdbc-sessions/pom.xml @@ -1,66 +1,80 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-jdbc-sessions - Jetty Tests :: Sessions :: JDBC - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.jdbc - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.apache.derby - derby - 10.12.1.1 - test - - - org.apache.derby - derbytools - 10.12.1.1 - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - + + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.2.23-SNAPSHOT + + test-jdbc-sessions + Jetty Tests :: Sessions :: JDBC + http://www.eclipse.org/jetty + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.apache.derby + derby + 10.4.1.3 + test + + + org.apache.derby + derbytools + 10.4.1.3 + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + diff --git a/tests/test-sessions/test-mongodb-sessions/pom.xml b/tests/test-sessions/test-mongodb-sessions/pom.xml index 12506ecbf52..5ab37303be2 100644 --- a/tests/test-sessions/test-mongodb-sessions/pom.xml +++ b/tests/test-sessions/test-mongodb-sessions/pom.xml @@ -1,120 +1,134 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-mongodb-sessions - Jetty Tests :: Sessions :: Mongo - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.mongo - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - generate-test-resources - - unpack - - - - - org.eclipse.jetty.toolchain - jetty-test-policy - ${jetty-test-policy-version} - jar - true - **/*.keystore,**/*.pem - ${jetty.test.policy.loc} - - - - - - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.tests - test-sessions-common - ${project.version} - - - org.eclipse.jetty - jetty-nosql - ${project.version} - - - org.eclipse.jetty - jetty-jmx - ${project.version} - true - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - - - mongodb - - - mongodb.enabled - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - - - - + + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.2.23-SNAPSHOT + + test-mongodb-sessions + Jetty Tests :: Sessions :: Mongo + http://www.eclipse.org/jetty + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + generate-test-resources + + unpack + + + + + org.eclipse.jetty.toolchain + jetty-test-policy + ${jetty-test-policy-version} + jar + true + **/*.keystore,**/*.pem + ${jetty.test.policy.loc} + + + + + + + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.tests + test-sessions-common + ${project.version} + + + org.eclipse.jetty + jetty-nosql + ${project.version} + + + org.eclipse.jetty + jetty-jmx + ${project.version} + true + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + + mongodb + + + mongodb.enabled + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + + + + diff --git a/tests/test-sessions/test-sessions-common/pom.xml b/tests/test-sessions/test-sessions-common/pom.xml index 2e3ad9ce3f9..f490464eb28 100644 --- a/tests/test-sessions/test-sessions-common/pom.xml +++ b/tests/test-sessions/test-sessions-common/pom.xml @@ -1,39 +1,53 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-sessions-parent - 9.4.7-SNAPSHOT - - test-sessions-common - Jetty Tests :: Sessions :: Common - http://www.eclipse.org/jetty - - ${project.groupId}.sessions.common - - - - - - org.eclipse.jetty - jetty-server - ${project.version} - - - org.eclipse.jetty - jetty-webapp - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty.toolchain - jetty-test-helper - compile - - - + + + + 4.0.0 + + org.eclipse.jetty.tests + test-sessions-parent + 9.2.23-SNAPSHOT + + test-sessions-common + Jetty Tests :: Sessions :: Common + http://www.eclipse.org/jetty + + + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty.toolchain + jetty-test-helper + compile + + + diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index 787a7f75cf8..0d5ff864c45 100644 --- a/tests/test-webapps/pom.xml +++ b/tests/test-webapps/pom.xml @@ -1,42 +1,59 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - tests-parent - 9.4.7-SNAPSHOT - ../pom.xml - - test-webapps-parent - Jetty Tests :: WebApps :: Parent - http://www.eclipse.org/jetty - pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.jacoco - jacoco-maven-plugin - - true - - - - - - test-jetty-webapp - test-proxy-webapp - test-webapp-rfc2616 - test-mock-resources - test-servlet-spec - test-jaas-webapp - test-jndi-webapp - - + + + + 4.0.0 + + org.eclipse.jetty.tests + tests-parent + 9.2.23-SNAPSHOT + ../pom.xml + + test-webapps-parent + Jetty Tests :: WebApps :: Parent + http://www.eclipse.org/jetty + pom + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.jacoco + jacoco-maven-plugin + + true + + + + + + test-jetty-webapp + test-proxy-webapp + test-webapp-rfc2616 + test-mock-resources + test-servlet-spec + test-jaas-webapp + test-jndi-webapp + + diff --git a/tests/test-webapps/test-jaas-webapp/pom.xml b/tests/test-webapps/test-jaas-webapp/pom.xml index e126e3d3e17..9f054e9d6c7 100644 --- a/tests/test-webapps/test-jaas-webapp/pom.xml +++ b/tests/test-webapps/test-jaas-webapp/pom.xml @@ -1,80 +1,70 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-jaas-webapp - Jetty Tests :: WebApp :: JAAS - war - - ${project.groupId}.jaas - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - 10 - - - - jetty.base - ${basedir}/src/main/config/demo-base - - - - java.security.auth.login.config - ${basedir}/src/main/config/demo-base/etc/login.conf - - - - /test-jaas - - - Test JAAS Realm - xyz - - - - - - - mysql - mysql-connector-java - 5.1.19 - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - ${basedir}/src/main/assembly/config.xml - - - - - - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.2.23-SNAPSHOT + + test-jaas-webapp + Jetty Tests :: WebApp :: JAAS + war + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 10 + + + + jetty.home + ${basedir}/src/main/config + + + + java.security.auth.login.config + ${basedir}/src/main/config/demo-base/etc/login.conf + + + + /test-jaas + + + Test JAAS Realm + xyz + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + ${basedir}/src/main/assembly/config.xml + + + + + + + + diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml index eda0a183a45..5ea2acb91aa 100644 --- a/tests/test-webapps/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -1,252 +1,270 @@ - - - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - test-jetty-webapp - Test :: Jetty Test Webapp - http://www.eclipse.org/jetty - war - - ${project.groupId}.tests.webapp - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - test - test - - - - - **/WebAppTest.java - **/Test*.java - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - src/main/assembly/web-bundle.xml - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - war - - - javax.servlet.jsp.*;version="[2.2.0,3.0)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* - !com.acme* - - / - - .,WEB-INF/classes - - - - - - maven-war-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - - 8087 - foo - 1 - - - fooprop - 222 - - - - /test - ${project.build.directory}/work - - - - Test Realm - src/main/config/demo-base/etc/realm.properties - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - false - - - - - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - test - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - org.eclipse.jetty - jetty-servlet - ${project.version} - tests - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - provided - - - javax.websocket - javax.websocket-api - 1.0 - provided - - - - - precompile-jsp - - - - org.eclipse.jetty - jetty-jspc-maven-plugin - ${project.version} - - - jspc - - jspc - - - - - - - org.apache.maven.plugins - maven-war-plugin - - ${basedir}/target/web.xml - - - - - - - + + + + + org.eclipse.jetty.tests + test-webapps-parent + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + test-jetty-webapp + Test :: Jetty Test Webapp + http://www.eclipse.org/jetty + war + + + + org.apache.maven.plugins + maven-surefire-plugin + + + test + test + + + + + **/WebAppTest.java + **/Test*.java + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + config + + + src/main/assembly/web-bundle.xml + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + maven-war-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + war + + + + + bundle-manifest + process-classes + + manifest + + + + org.eclipse.jetty.test-jetty-webapp + javax.servlet.jsp.*;version="[2.2.0, 3.0)",javax.servlet.*;version="[2.6,3.2)",org.eclipse.jetty.*;version="9.1",* + !com.acme* + + / + + .,WEB-INF/classes + + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + + 8087 + foo + 1 + + + fooprop + 222 + + + + /test + ${project.build.directory}/work + + + ${basedir}/target/sessions + + + + + + Test Realm + src/main/config/demo-base/etc/realm.properties + + + + + + + + + org.eclipse.jetty + jetty-continuation + ${project.version} + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + test + + + javax.servlet + jstl + 1.2 + provided + + + javax.websocket + javax.websocket-api + 1.0 + provided + + + + + precompile-jsp + + + + org.eclipse.jetty + jetty-jspc-maven-plugin + ${project.version} + + + jspc + + jspc + + + **/*.foo + **/*.fff + + + + + + org.apache.maven.plugins + maven-war-plugin + + ${basedir}/target/web.xml + + + + + + + diff --git a/tests/test-webapps/test-jndi-webapp/pom.xml b/tests/test-webapps/test-jndi-webapp/pom.xml index 6b8d4171402..96997db7885 100644 --- a/tests/test-webapps/test-jndi-webapp/pom.xml +++ b/tests/test-webapps/test-jndi-webapp/pom.xml @@ -1,144 +1,149 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-jndi-webapp - Jetty Tests :: WebApp :: JNDI - war - - ${project.groupId}.jndi - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - maven-antrun-plugin - - - generate-xml-files - process-resources - - - - - - - - - - - - run - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - package - - copy - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - jar - ** - true - ${project.build.directory}/lib/jndi - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - jar - ** - true - ${project.build.directory}/lib/jndi - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - src/main/assembly/config.xml - - - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - ${project.build.directory}/plugin-context.xml - - src/main/webapp - src/main/webapp/WEB-INF/web.xml - /test-jndi - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - - - - - - - - javax.transaction - javax.transaction-api - provided - - - javax.servlet - javax.servlet-api - provided - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - provided - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.2.23-SNAPSHOT + + test-jndi-webapp + Jetty Tests :: WebApp :: JNDI + war + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + maven-antrun-plugin + + + generate-xml-files + process-resources + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + package + + copy + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + jar + ** + true + ${project.build.directory}/lib/jndi + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + jar + ** + true + ${project.build.directory}/lib/jndi + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2-beta-3 + + + package + + single + + + + src/main/assembly/config.xml + + + + + + + + org.apache.maven.plugins + maven-war-plugin + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + ${project.build.directory}/plugin-context.xml + + src/main/webapp + src/main/webapp/WEB-INF/web.xml + /test-jndi + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + + + + + + + + javax.transaction + javax.transaction-api + provided + + + javax.servlet + javax.servlet-api + provided + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + provided + + + diff --git a/tests/test-webapps/test-mock-resources/pom.xml b/tests/test-webapps/test-mock-resources/pom.xml index ebd7ce2dfb6..600b95e7afa 100644 --- a/tests/test-webapps/test-mock-resources/pom.xml +++ b/tests/test-webapps/test-mock-resources/pom.xml @@ -1,69 +1,90 @@ - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - Jetty Tests :: WebApp :: Mock Resources - test-mock-resources - jar - - ${project.groupId}.mocks - - - - - maven-compiler-plugin - - false - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.tests.test-mock-resources - Mock resources used for testing - - com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - - - javax.sql, - javax.transaction;version="1.1", - javax.mail;version="1.4.1" - - <_nouses>true - - - - - - - - - - javax.transaction - javax.transaction-api - provided - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - provided - - - - + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.2.23-SNAPSHOT + + Jetty Tests :: WebApp :: Mock Resources + test-mock-resources + jar + + + + maven-compiler-plugin + + false + + + + org.apache.felix + maven-bundle-plugin + true + + + generate-manifest + + manifest + + + + org.eclipse.jetty.tests.test-mock-resources + Mock resources used for testing + + com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + + + javax.sql, + javax.transaction;version="1.1", + javax.mail;version="1.4.1" + + <_nouses>true + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + javax.transaction + javax.transaction-api + provided + + + javax.servlet + javax.servlet-api + + + + org.eclipse.jetty.orbit + javax.mail.glassfish + 1.4.1.v201005082020 + provided + + + + diff --git a/tests/test-webapps/test-proxy-webapp/pom.xml b/tests/test-webapps/test-proxy-webapp/pom.xml index 7248f9407cf..eda969b6085 100644 --- a/tests/test-webapps/test-proxy-webapp/pom.xml +++ b/tests/test-webapps/test-proxy-webapp/pom.xml @@ -1,110 +1,104 @@ - - - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - ../pom.xml - - 4.0.0 - org.eclipse.jetty - test-proxy-webapp - Test :: Jetty Proxy Webapp - war - - ${project.groupId}.proxy - - - - - maven-war-plugin - - - src/main/webapp/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - false - - - - - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - - - org.eclipse.jetty - jetty-webapp - ${project.version} - test - - - org.eclipse.jetty - jetty-jmx - ${project.version} - test - - - org.eclipse.jetty.toolchain - jetty-test-helper - test - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - org.eclipse.jetty.http2 - http2-server - ${project.version} - test - - - org.eclipse.jetty - jetty-alpn-server - ${project.version} - test - - - org.eclipse.jetty - jetty-annotations - ${project.version} - test - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - provided - - - + + + + + org.eclipse.jetty.tests + test-webapps-parent + 9.2.23-SNAPSHOT + ../pom.xml + + 4.0.0 + org.eclipse.jetty + test-proxy-webapp + Test :: Jetty Proxy Webapp + war + + + + maven-war-plugin + + + src/main/webapp/META-INF/MANIFEST.MF + + + + + + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty + jetty-jmx + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + org.eclipse.jetty.spdy + spdy-http-server + ${project.version} + test + + + javax.servlet + jstl + 1.2 + provided + + + diff --git a/tests/test-webapps/test-servlet-spec/pom.xml b/tests/test-webapps/test-servlet-spec/pom.xml index db1cce4bf5d..03af8117aa7 100644 --- a/tests/test-webapps/test-servlet-spec/pom.xml +++ b/tests/test-webapps/test-servlet-spec/pom.xml @@ -1,30 +1,30 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-servlet-spec-parent - Jetty Tests :: Spec Test WebApp :: Parent - pom - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - - - test-web-fragment - test-container-initializer - test-spec-webapp - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.2.23-SNAPSHOT + + test-servlet-spec-parent + Jetty Tests :: Spec Test WebApp :: Parent + pom + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + + + test-web-fragment + test-container-initializer + test-spec-webapp + + + 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 e35eb0cfd98..8cb75bbd495 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 @@ -1,40 +1,69 @@ - - 4.0.0 - - org.eclipse.jetty.tests - test-servlet-spec-parent - 9.4.7-SNAPSHOT - - test-container-initializer - jar - Jetty Tests :: WebApp :: Servlet Spec :: ServletContainerInitializer Test Jar - - ${project.groupId}.sci - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.eclipse.jetty.tests.test-servlet-container-initializer;singleton:=true - A bundle containing a ServletContainerInitializer for testing - osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer - com.acme.initializer;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - <_nouses>true - - - - - - - - javax.servlet - javax.servlet-api - provided - - - + + 4.0.0 + + org.eclipse.jetty.tests + test-servlet-spec-parent + 9.2.23-SNAPSHOT + + test-container-initializer + jar + Jetty Tests :: WebApp :: Servlet Spec :: ServletContainerInitializer Test Jar + + + + maven-compiler-plugin + + false + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + org.eclipse.jetty.tests.test-servlet-container-initializer;singleton:=true + A bundle containing a ServletContainerInitializer for testing + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer + com.acme.initializer;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + <_nouses>true + + + + + + + + javax.servlet + javax.servlet-api + provided + + + 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 381cdc100d0..212abd36d48 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 @@ -1,219 +1,246 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-servlet-spec-parent - 9.4.7-SNAPSHOT - - Jetty Tests :: Webapps :: Spec Webapp - test-spec-webapp - war - - ${project.groupId}.spec - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - src/main/assembly/config.xml - src/main/assembly/web-bundle.xml - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - - - maven-war-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - target - - plugin-context.xml - - META-INF - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - war - - - org.eclipse.jetty.tests.test-spec-webapp - Test Webapp for Servlet 3.1 Features - - javax.servlet.jsp.*;version="[2.2.0, 3.0)", - javax.transaction*;version="[1.1,1.3)", - javax.servlet*;version="[2.6,3.2)", - org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))", - org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", - org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", - com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", - * - - <_nouses /> - com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true - / - .,WEB-INF/classes,WEB-INF/lib - /META-INF/plugin-context.xml - - - - - - maven-antrun-plugin - - - generate-xml-files - process-resources - - - - - - - - - - - - run - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - package - - copy - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - jar - ** - true - ${project.build.directory}/lib/jndi - - - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - 10 - true - ${project.build.directory}/plugin-context.xml - - src/main/webapp - src/main/webapp/WEB-INF/web.xml - /test-spec - .*/javax.servlet-[^/]*\.jar$ - true - ${basedir}/src/main/webapp/WEB-INF/jetty-env.xml - - - - Test Realm - src/etc/realm.properties - - - - - - org.eclipse.jetty.tests - test-mock-resources - ${project.version} - - - - - - - - - javax.transaction - javax.transaction-api - provided - - - org.eclipse.jetty - jetty-server - ${project.version} - provided - - - org.eclipse.jetty.orbit - javax.mail.glassfish - provided - - - javax.servlet - javax.servlet-api - provided - - - javax.annotation - javax.annotation-api - provided - - - org.eclipse.jetty.tests - test-web-fragment - ${project.version} - - - org.eclipse.jetty.tests - test-container-initializer - ${project.version} - - - org.eclipse.jetty - jetty-util - ${project.version} - - - + + + 4.0.0 + + org.eclipse.jetty.tests + test-servlet-spec-parent + 9.2.23-SNAPSHOT + + Jetty Tests :: Webapps :: Spec Webapp + test-spec-webapp + war + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + src/main/assembly/config.xml + src/main/assembly/web-bundle.xml + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + + + + maven-war-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + target + + plugin-context.xml + + META-INF + + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + war + + + + + bundle-manifest + process-classes + + manifest + + + + org.eclipse.jetty.tests.test-spec-webapp + Test Webapp for Servlet 3.1 Features + + javax.servlet.jsp.*;version="[2.2.0, 3.0)", + javax.transaction.*;version="[1.1, 2.0)", + javax.servlet.*;version="3.0", + javax.sql, + org.eclipse.jetty.webapp;version="9.2",org.eclipse.jetty.plus.jndi;version="9.2", + org.eclipse.jetty.security;version="9.2", + com.acme;version="9.2", + * + + com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + / + .,WEB-INF/classes,WEB-INF/lib + ./META-INF/plugin-context.xml + <_nouses>true + + + + + + + + + maven-antrun-plugin + + + generate-xml-files + process-resources + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + package + + copy + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + jar + ** + true + ${project.build.directory}/lib/jndi + + + + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 10 + true + ${project.build.directory}/plugin-context.xml + + src/main/webapp + src/main/webapp/WEB-INF/web.xml + /test-spec + .*/javax.servlet-[^/]*\.jar$ + true + ${basedir}/src/main/webapp/WEB-INF/jetty-env.xml + + + + Test Realm + src/etc/realm.properties + + + + + + org.eclipse.jetty.tests + test-mock-resources + ${project.version} + + + + + + + + javax.transaction + javax.transaction-api + provided + + + org.eclipse.jetty + jetty-server + ${project.version} + provided + + + org.eclipse.jetty.orbit + javax.mail.glassfish + provided + + + javax.servlet + javax.servlet-api + provided + + + javax.annotation + javax.annotation-api + provided + + + org.eclipse.jetty.tests + test-web-fragment + ${project.version} + + + org.eclipse.jetty.tests + test-container-initializer + ${project.version} + + + org.eclipse.jetty + jetty-util + ${project.version} + + + 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 7ad0ddc580e..39e96fc4152 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 @@ -1,38 +1,68 @@ - - 4.0.0 - - org.eclipse.jetty.tests - test-servlet-spec-parent - 9.4.7-SNAPSHOT - - Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar - org.eclipse.jetty.tests - test-web-fragment - jar - - ${project.groupId}.fragment - - - - - maven-compiler-plugin - - false - - - - - - - javax.servlet - javax.servlet-api - - - - - + + 4.0.0 + + org.eclipse.jetty.tests + test-servlet-spec-parent + 9.2.23-SNAPSHOT + + Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar + org.eclipse.jetty.tests + test-web-fragment + jar + + + + maven-compiler-plugin + + false + + + + org.apache.maven.plugins + maven-jar-plugin + + + artifact-jar + + jar + + + + + + target/classes/META-INF/MANIFEST.MF + + + + + org.apache.felix + maven-bundle-plugin + true + + + bundle-manifest + process-classes + + manifest + + + + + + org.eclipse.jetty.tests.test-web-fragment;singleton:=true + A bundle containing web fragment for testing + com.acme.fragment;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + <_nouses>true + + + + + + + + + javax.servlet + javax.servlet-api + + + diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml index 6a734020702..a3e0aecc037 100644 --- a/tests/test-webapps/test-webapp-rfc2616/pom.xml +++ b/tests/test-webapps/test-webapp-rfc2616/pom.xml @@ -1,56 +1,70 @@ - - - 4.0.0 - - org.eclipse.jetty.tests - test-webapps-parent - 9.4.7-SNAPSHOT - - test-webapp-rfc2616 - Jetty Tests :: WebApp :: RFC2616 - http://www.eclipse.org/jetty - war - - ${project.groupId}.rfc2616 - - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.eclipse.jetty - jetty-maven-plugin - ${project.version} - - 8087 - foo - 1 - - - fooprop - 222 - - - - - - - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - javax.servlet - javax.servlet-api - provided - - - + + + + 4.0.0 + + org.eclipse.jetty.tests + test-webapps-parent + 9.2.23-SNAPSHOT + + test-webapp-rfc2616 + Jetty Tests :: WebApp :: RFC2616 + http://www.eclipse.org/jetty + war + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.eclipse.jetty + jetty-maven-plugin + ${project.version} + + 8087 + foo + 1 + + + fooprop + 222 + + + + + + + + + org.eclipse.jetty + jetty-servlets + ${project.version} + + + javax.servlet + javax.servlet-api + provided + + + From b4ddcb7e4d7947887df325819a9c5e88aed1766e Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Tue, 6 Jun 2017 15:04:26 -0400 Subject: [PATCH 031/147] Updating 9.4.x for #1598 --- .../main/asciidoc/administration/extras/gzip-filter.adoc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc index 9d4dff73a76..44976b6cedf 100644 --- a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc @@ -40,19 +40,17 @@ It may also be added to individual contexts in a context xml file. [[gzip-filter-rules]] ==== Gzip Rules -`GzipHandler` will gzip or deflate the content of a response if: +`GzipHandler` will gzip the content of a response if: * It is mapped to a matching path * The request method is configured to support gzip * The request is not from an excluded User-Agent -* accept-encoding header is set to either gzip, deflate or a combination of those +* accept-encoding header is set to gzip * The response status code is >=200 and <300 * The content length is unknown or more than the minGzipSize initParameter or the minGzipSize is 0(default) * The content-type does not match an excluded mime-type * No content-encoding is specified by the resource -If both gzip and deflate are specified in the accept-encoding header, then gzip will be used. - Compressing the content can greatly improve the network bandwidth usage, but at the cost of memory and CPU cycles. The link:#default-servlet[DefaultServlet] is capable of serving pre-compressed static content, which saves memory and CPU. By default, the `GzipHandler` will check to see if pre-compressed content exists, and pass the request through to be handled by the `DefaultServlet`. @@ -65,8 +63,6 @@ Content will only be compressed if content length is either unknown or greater t checkGzExists:: True by default. If set to false, the handler will not check for pre-compressed content. -compressionLevel:: -The compression level used for deflate compression. (0-9). includedMethods:: List of HTTP methods to compress. If not set, only `GET` requests are compressed. From 2eaacf46ea1cf85905659ee0f0d53bb5c0cc38f8 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Tue, 6 Jun 2017 15:05:35 -0400 Subject: [PATCH 032/147] Updating documentation. Resolves #1598 --- .../main/asciidoc/administration/extras/gzip-filter.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc index 44976b6cedf..b9073b7d458 100644 --- a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc @@ -37,6 +37,12 @@ Some user-agents might be excluded from compression to avoid common browser bugs The `GzipHandler` is added to the entire server by the `etc/jetty-gzip.xml` file from the `gzip.mod` module. It may also be added to individual contexts in a context xml file. +____ +[NOTE] +Jetty 9 only compresses using GZip. +Using link:http://docs.oracle.com/javase/8/docs/api/java/util/zip/Deflater.html[Deflate] is not supported and will not work. +____ + [[gzip-filter-rules]] ==== Gzip Rules From 66d354c056ad503e8704c8d39103983506186dea Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Tue, 6 Jun 2017 15:10:53 -0400 Subject: [PATCH 033/147] Updating documentation for 9.4.x for #1598 From 48c7d5c7ebe0d34032518e5ecaf91f94341a73e0 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Tue, 6 Jun 2017 15:36:19 -0400 Subject: [PATCH 034/147] Updating 9.4.x for #1598 --- .../src/main/asciidoc/administration/extras/gzip-filter.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc index b9073b7d458..0504905caf5 100644 --- a/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/extras/gzip-filter.adoc @@ -40,7 +40,7 @@ It may also be added to individual contexts in a context xml file. ____ [NOTE] Jetty 9 only compresses using GZip. -Using link:http://docs.oracle.com/javase/8/docs/api/java/util/zip/Deflater.html[Deflate] is not supported and will not work. +Using deflate http compression is not supported and will not function. ____ [[gzip-filter-rules]] From 4bcd1a1602b51d9dbfeece836116d8eae7a97068 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Tue, 6 Jun 2017 15:37:00 -0400 Subject: [PATCH 035/147] Updating 9.3.x for #1598 From 77d96ff36d6d20f2746f5dc4780197b1c1da4b55 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 7 Jun 2017 11:55:18 +0200 Subject: [PATCH 036/147] Issue ##1597 Make osgi import of javax.mail optional --- jetty-jndi/pom.xml | 38 +------------------ .../osgi/test/TestJettyOSGiBootCore.java | 1 - .../TestJettyOSGiBootWithAnnotations.java | 10 +---- 3 files changed, 2 insertions(+), 47 deletions(-) diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index ced91e34eb6..bf9ed9ad8ea 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -14,51 +14,15 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.apache.felix maven-bundle-plugin true - - - - manifest - - javax.naming.*,* + javax.mail.*;resolution:=optional,* - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - org.codehaus.mojo diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java index 1ff35e2fd53..5cd69691107 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java +++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java @@ -100,7 +100,6 @@ public class TestJettyOSGiBootCore res.add(mavenBundle().groupId( "org.eclipse.jetty.toolchain" ).artifactId( "jetty-osgi-servlet-api" ).versionAsInProject().noStart()); res.add(mavenBundle().groupId( "javax.annotation" ).artifactId( "javax.annotation-api" ).versionAsInProject().noStart()); res.add(mavenBundle().groupId( "org.apache.geronimo.specs" ).artifactId( "geronimo-jta_1.1_spec" ).version("1.1.1").noStart()); - res.add(mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.mail.glassfish" ).version( "1.4.1.v201005082020" ).noStart()); res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-util" ).versionAsInProject().noStart()); res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-deploy" ).versionAsInProject().noStart()); diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java index f8df69d870e..be4ee84955b 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java +++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java @@ -111,6 +111,7 @@ public class TestJettyOSGiBootWithAnnotations public static List + + + + org.apache.maven.plugins + maven-jxr-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + 512m + true + true + true + + + + org.apache.maven.plugins + maven-pmd-plugin + + 1.7 + + jetty/pmd_ruleset.xml + + + + + org.codehaus.mojo + findbugs-maven-plugin + + + + + + jetty-ant + jetty-util + jetty-jmx + jetty-io + jetty-http + jetty-http2 + jetty-continuation + jetty-server + jetty-xml + jetty-security + jetty-servlet + jetty-webapp + jetty-fcgi + jetty-websocket + jetty-servlets + jetty-util-ajax + apache-jsp + apache-jstl + jetty-maven-plugin + jetty-jspc-maven-plugin + jetty-deploy + jetty-start + jetty-plus + jetty-annotations + jetty-jndi + jetty-jaas + jetty-cdi + jetty-spring + jetty-client + jetty-proxy + jetty-jaspi + jetty-rewrite + jetty-nosql + jetty-infinispan + jetty-hazelcast + jetty-gcloud + tests + examples + jetty-quickstart + jetty-distribution + jetty-runner + jetty-monitor + jetty-http-spi + jetty-osgi + jetty-alpn + jetty-bom + jetty-documentation + + + + + From 3296c01e8eb69468a9d73c9f56826d6fbd15c014 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 7 Jun 2017 17:19:26 +0200 Subject: [PATCH 050/147] Issue #1600 --- jetty-home/pom.xml | 27 ------------------- jetty-jndi/pom.xml | 17 ++++++++++++ jetty-jndi/src/main/assembly/config.xml | 27 +++++++++++++++++++ .../{config => jndi-config}/modules/jndi.mod | 1 + .../src/main/jndi-config/modules/mail.mod | 8 ++++++ jetty-plus/pom.xml | 17 ++++++++++++ jetty-plus/src/main/assembly/config.xml | 27 +++++++++++++++++++ .../etc/jetty-plus.xml | 0 .../{config => plus-config}/modules/plus.mod | 1 + .../main/plus-config/modules/transactions.mod | 8 ++++++ tests/test-webapps/test-jndi-webapp/pom.xml | 9 ------- 11 files changed, 106 insertions(+), 36 deletions(-) create mode 100644 jetty-jndi/src/main/assembly/config.xml rename jetty-jndi/src/main/{config => jndi-config}/modules/jndi.mod (96%) create mode 100644 jetty-jndi/src/main/jndi-config/modules/mail.mod create mode 100644 jetty-plus/src/main/assembly/config.xml rename jetty-plus/src/main/{config => plus-config}/etc/jetty-plus.xml (100%) rename jetty-plus/src/main/{config => plus-config}/modules/plus.mod (95%) create mode 100644 jetty-plus/src/main/plus-config/modules/transactions.mod diff --git a/jetty-home/pom.xml b/jetty-home/pom.xml index 177475eeeeb..e9a654f98f2 100644 --- a/jetty-home/pom.xml +++ b/jetty-home/pom.xml @@ -240,33 +240,6 @@ ${assembly-directory}/lib/annotations - - - copy-jta-deps - generate-resources - - copy-dependencies - - - javax.transaction - javax.transaction-api - jar - ${assembly-directory}/lib/jndi - - - - copy-jndi-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty.orbit - javax.mail.glassfish - jar - ${assembly-directory}/lib/jndi - - copy-apache-jsp-deps generate-resources diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index bf9ed9ad8ea..2b650f9af20 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -24,6 +24,23 @@ + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + src/main/assembly/config.xml + + + + + org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-jndi/src/main/assembly/config.xml b/jetty-jndi/src/main/assembly/config.xml new file mode 100644 index 00000000000..fd02dcee4a7 --- /dev/null +++ b/jetty-jndi/src/main/assembly/config.xml @@ -0,0 +1,27 @@ + + + config + false + + jar + + + + provided + lib/mail + + org.eclipse.jetty.orbit:javax.mail.glassfish + + + + + + src/main/jndi-config + + + ** + + + + + diff --git a/jetty-jndi/src/main/config/modules/jndi.mod b/jetty-jndi/src/main/jndi-config/modules/jndi.mod similarity index 96% rename from jetty-jndi/src/main/config/modules/jndi.mod rename to jetty-jndi/src/main/jndi-config/modules/jndi.mod index b0d3fc44492..023ff9845a4 100644 --- a/jetty-jndi/src/main/config/modules/jndi.mod +++ b/jetty-jndi/src/main/jndi-config/modules/jndi.mod @@ -3,6 +3,7 @@ Adds the Jetty JNDI implementation to the classpath. [depend] server +mail [lib] lib/jetty-jndi-${jetty.version}.jar diff --git a/jetty-jndi/src/main/jndi-config/modules/mail.mod b/jetty-jndi/src/main/jndi-config/modules/mail.mod new file mode 100644 index 00000000000..1dd711dfc7a --- /dev/null +++ b/jetty-jndi/src/main/jndi-config/modules/mail.mod @@ -0,0 +1,8 @@ +[description] +Adds the javax.mail implementation to the classpath. + +[name] +mail + +[lib] +lib/mail/*.jar diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index 441e26f9cc3..80badafa981 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -73,6 +73,23 @@ org.apache.maven.plugins maven-source-plugin + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + + src/main/assembly/config.xml + + + + + org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-plus/src/main/assembly/config.xml b/jetty-plus/src/main/assembly/config.xml new file mode 100644 index 00000000000..32d11e0dcd5 --- /dev/null +++ b/jetty-plus/src/main/assembly/config.xml @@ -0,0 +1,27 @@ + + + config + false + + jar + + + + provided + lib/transactions + + javax.transaction:javax.transaction-api + + + + + + src/main/plus-config + + + ** + + + + + diff --git a/jetty-plus/src/main/config/etc/jetty-plus.xml b/jetty-plus/src/main/plus-config/etc/jetty-plus.xml similarity index 100% rename from jetty-plus/src/main/config/etc/jetty-plus.xml rename to jetty-plus/src/main/plus-config/etc/jetty-plus.xml diff --git a/jetty-plus/src/main/config/modules/plus.mod b/jetty-plus/src/main/plus-config/modules/plus.mod similarity index 95% rename from jetty-plus/src/main/config/modules/plus.mod rename to jetty-plus/src/main/plus-config/modules/plus.mod index a424117b173..7058a5969ca 100644 --- a/jetty-plus/src/main/config/modules/plus.mod +++ b/jetty-plus/src/main/plus-config/modules/plus.mod @@ -8,6 +8,7 @@ server security jndi webapp +transactions [lib] lib/jetty-plus-${jetty.version}.jar diff --git a/jetty-plus/src/main/plus-config/modules/transactions.mod b/jetty-plus/src/main/plus-config/modules/transactions.mod new file mode 100644 index 00000000000..025f2cf2dec --- /dev/null +++ b/jetty-plus/src/main/plus-config/modules/transactions.mod @@ -0,0 +1,8 @@ +[description] +Puts javax.transaction api on the classpath + +[name] +transactions + +[lib] +lib/transactions/*.jar diff --git a/tests/test-webapps/test-jndi-webapp/pom.xml b/tests/test-webapps/test-jndi-webapp/pom.xml index 96997db7885..9b004407398 100644 --- a/tests/test-webapps/test-jndi-webapp/pom.xml +++ b/tests/test-webapps/test-jndi-webapp/pom.xml @@ -61,15 +61,6 @@ true ${project.build.directory}/lib/jndi - - org.eclipse.jetty.orbit - javax.mail.glassfish - 1.4.1.v201005082020 - jar - ** - true - ${project.build.directory}/lib/jndi - From 2fed68a700f352b8603c592f259cc653eeffdd3e Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Tue, 13 Jun 2017 18:34:55 +1000 Subject: [PATCH 051/147] add documentation page for hazelcast session manager module Signed-off-by: olivier lamy --- .../administration/sessions/chapter.adoc | 26 ++----- .../session-configuration-hazelcast.adoc | 74 +++---------------- 2 files changed, 18 insertions(+), 82 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc b/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc index 6f36fb4d379..ddd13a71721 100644 --- a/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc @@ -17,24 +17,10 @@ [[session-management]] == Session Management -Sessions are a concept within the Servlet api which allow requests to store and retrieve information across the time a user spends in an application. -Choosing the correct session manager implementation is an important consideration for every application as each can fit and perform optimally in different situations. -If you need a simple in-memory session manager that can persist to disk then session management using the local file system can be a good place to start. -If you need a session manager that can work in a clustered scenario with multiple instances of Jetty, then the JDBC session manager can be an excellent option. -Jetty also offers more niche session managers that leverage backends such as MongoDB, Inifinispan, or even Google's Cloud Data Store. - -include::session-hierarchy.adoc[] -include::sessions-details.adoc[] -include::session-configuration-memory.adoc[] -include::session-configuration-file-system.adoc[] -include::session-configuration-jdbc.adoc[] -include::session-configuration-mongodb.adoc[] -include::session-configuration-infinispan.adoc[] +include::setting-session-characteristics.adoc[] +include::using-persistent-sessions.adoc[] +include::session-clustering-jdbc.adoc[] +include::session-clustering-mongodb.adoc[] +include::session-clustering-infinispan.adoc[] include::session-configuration-hazelcast.adoc[] -include::session-configuration-gcloud.adoc[] -//include::setting-session-characteristics.adoc[] -//include::using-persistent-sessions.adoc[] -//include::session-clustering-jdbc.adoc[] -//include::session-clustering-mongodb.adoc[] -//include::session-clustering-infinispan.adoc[] -//include::session-clustering-gcloud-datastore.adoc[] +include::session-clustering-gcloud-datastore.adoc[] \ No newline at end of file diff --git a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc index a424404e149..1ca0b0749b1 100644 --- a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc @@ -41,15 +41,11 @@ The following 1 module(s): + http://www.apache.org/licenses/LICENSE-2.0.html Proceed (y/N)? y -INFO : server transitively enabled, ini template available with --add-to-start=server -INFO : sessions transitively enabled, ini template available with --add-to-start=sessions -INFO : session-store-hazelcast-remote initialized in ${jetty.base}/start.d/session-store-hazelcast-remote.ini -MKDIR : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2 -DOWNLD: http://central.maven.org/maven2/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar -MKDIR : ${jetty.base}/lib/hazelcast -COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-3.8.2.jar -COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast-client/3.8.2/hazelcast-client-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-client-3.8.2.jar -INFO : Base directory was modified +INFO: session-store-hazelcast-remote initialised in ${jetty.base}/start.ini +COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar +COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar +COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar +INFO: Base directory was modified ---- Doing this enables the remote Hazelcast Session module and any dependent modules or files needed for it to run on the server. @@ -68,42 +64,19 @@ ____ ==== Configuring Hazelcast Remote Properties -Opening the `start.d/session-store-hazelcast-remote.ini` will show a list of all the configurable options for the Hazelcast module: +Opening the `start.ini` will show a list of all the configurable options for the Hazelcast module: [source, screen, subs="{sub-order}"] ---- # --------------------------------------- # Module: session-store-hazelcast-remote -# Enables session data store in a remote Hazelcast Map -# --------------------------------------- --module=session-store-hazelcast-remote -#jetty.session.hazelcast.mapName=jetty_sessions -#jetty.session.hazelcast.onlyClient=true #jetty.session.hazelcast.configurationLocation= -#jetty.session.gracePeriod.seconds=3600 -#jetty.session.savePeriod.seconds=0 ---- -jetty.session.hazelcast.mapName:: -Name of the Map in Hazelcast where sessions will be stored. -jetty.session.hazelcast.onlyClient:: -Hazelcast instance will be configured in client mode jetty.session.hazelcast.configurationLocation:: Path to an an Hazelcast xml configuration file -jetty.session.gracePeriod.seconds:: -Amount of time, in seconds, to wait for other nodes to be checked to verify an expired session is in fact expired throughout the cluster before closing it. -jetty.session.savePeriod.seconds=0:: -By default whenever the last concurrent request leaves a session, that session is always persisted via the `SessionDataStore`, even if the only thing that changed on the session is its updated last access time. -A non-zero value means that the `SessionDataStore` will skip persisting the session if only the access time changed, and it has been less than `savePeriod` seconds since the last time the session was written. -+ -____ -[NOTE] -Configuring `savePeriod` is useful if your persistence technology is very slow/costly for writes. -In a clustered environment, there is a risk of the last access time of the session being out-of-date in the shared store for up to `savePeriod` seconds. -This allows the possibility that a node may prematurely expire the session, even though it is in use by another node. -Thorough consideration of the `maxIdleTime` of the session when setting the `savePeriod` is imperative - there is no point in setting a `savePeriod` that is larger than the `maxIdleTime`. -____ ==== Configuring Embedded Hazelcast Clustering @@ -129,14 +102,11 @@ The following 1 module(s): + http://www.apache.org/licenses/LICENSE-2.0.html Proceed (y/N)? y -INFO : server transitively enabled, ini template available with --add-to-start=server -INFO : sessions transitively enabled, ini template available with --add-to-start=sessions -INFO : session-store-hazelcast-embedded initialized in ${jetty.base}/start.d/session-store-hazelcast-embedded.ini -MKDIR : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2 -DOWNLD: http://central.maven.org/maven2/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar -MKDIR : ${jetty.base}/lib/hazelcast -COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-3.8.2.jar -COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast-client/3.8.2/hazelcast-client-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-client-3.8.2.jar +INFO: session-store-hazelcast-embedded initialised in ${jetty.base}/start.ini +COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar +COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar +COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar +INFO: Base directory was modified ---- Doing this enables the embedded Hazelcast Session module and any dependent modules or files needed for it to run on the server. @@ -150,35 +120,15 @@ In addition to adding these modules to the classpath of the server it also added ==== Configuring Hazelcast Embedded Properties -Opening the `start.d/start.d/session-store-hazelcast-embedded.ini` will show a list of all the configurable options for the Hazelcast module: +Opening the `start.ini` will show a list of all the configurable options for the Hazelcast module: [source, screen, subs="{sub-order}"] ---- # --------------------------------------- # Module: session-store-hazelcast-embedded -# Enables session data store in an embedded Hazelcast Map -# --------------------------------------- --module=session-store-hazelcast-embedded -#jetty.session.hazelcast.mapName=jetty_sessions #jetty.session.hazelcast.configurationLocation= -#jetty.session.gracePeriod.seconds=3600 -#jetty.session.savePeriod.seconds=0 ---- -jetty.session.hazelcast.mapName:: -Name of the Map in Hazelcast where sessions will be stored. -jetty.session.gracePeriod.seconds:: -Amount of time, in seconds, to wait for other nodes to be checked to verify an expired session is in fact expired throughout the cluster before closing it. jetty.session.hazelcast.configurationLocation:: Path to an an Hazelcast xml configuration file -jetty.session.savePeriod.seconds=0:: -By default whenever the last concurrent request leaves a session, that session is always persisted via the `SessionDataStore`, even if the only thing that changed on the session is its updated last access time. -A non-zero value means that the `SessionDataStore` will skip persisting the session if only the access time changed, and it has been less than `savePeriod` seconds since the last time the session was written. -+ -____ -[NOTE] -Configuring `savePeriod` is useful if your persistence technology is very slow/costly for writes. -In a clustered environment, there is a risk of the last access time of the session being out-of-date in the shared store for up to `savePeriod` seconds. -This allows the possibility that a node may prematurely expire the session, even though it is in use by another node. -Thorough consideration of the `maxIdleTime` of the session when setting the `savePeriod` is imperative - there is no point in setting a `savePeriod` that is larger than the `maxIdleTime`. -____ From b078485d63d256b10d74affbb28dc632aef325ec Mon Sep 17 00:00:00 2001 From: stephane martin Date: Tue, 13 Jun 2017 19:26:19 +0200 Subject: [PATCH 052/147] HTTP/2 :authority: declaration should omit default ports in jetty-client (#1611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2b4f8e8373e3ba16361a37fd1f6549a4a2d97d60 Signed-off-by: Stéphane Martin --- .../eclipse/jetty/http2/client/http/HttpSenderOverHTTP2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpSenderOverHTTP2.java b/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpSenderOverHTTP2.java index c2230e75cb9..1e28d4e1b93 100644 --- a/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpSenderOverHTTP2.java +++ b/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpSenderOverHTTP2.java @@ -53,7 +53,7 @@ public class HttpSenderOverHTTP2 extends HttpSender { HttpRequest request = exchange.getRequest(); String path = relativize(request.getPath()); - HttpURI uri = new HttpURI(request.getScheme(), request.getHost(), request.getPort(), path, null, request.getQuery(), null); + HttpURI uri = HttpURI.createHttpURI(request.getScheme(), request.getHost(), request.getPort(), path, null, request.getQuery(), null); MetaData.Request metaData = new MetaData.Request(request.getMethod(), uri, HttpVersion.HTTP_2, request.getHeaders()); Supplier trailers = request.getTrailers(); metaData.setTrailerSupplier(trailers); From 9bdca678cb6bc631d93cee26d03b4d6e29746069 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 14 Jun 2017 09:46:36 +1000 Subject: [PATCH 053/147] fix file to use Signed-off-by: olivier lamy --- .../src/main/config/modules/session-store-hazelcast-remote.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod index 139fe8ff81e..5038684659d 100644 --- a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod +++ b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod @@ -12,7 +12,7 @@ maven://com.hazelcast/hazelcast-jetty9-sessionmanager/1.0.2|lib/hazelcast/hazelc maven://org.eclipse.jetty/jetty-nosql/${jetty.version}|lib/hazelcast/jetty-nosql-${jetty.version}.jar [xml] -etc/sessions/hazelcast/default.xml +etc/sessions/hazelcast/remote.xml [lib] lib/hazelcast/*.jar From 82581d25af0006c9391fb52b4540594143f72f25 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 14 Jun 2017 14:52:08 +1000 Subject: [PATCH 054/147] modify module names after Jan review Signed-off-by: olivier lamy --- .../session-configuration-hazelcast.adoc | 16 ++++++++-------- ...edded.mod => hazelcast-embedded-sessions.mod} | 0 ...-remote.mod => hazelcast-remote-sessions.mod} | 0 3 files changed, 8 insertions(+), 8 deletions(-) rename jetty-hazelcast/src/main/config/modules/{session-store-hazelcast-embedded.mod => hazelcast-embedded-sessions.mod} (100%) rename jetty-hazelcast/src/main/config/modules/{session-store-hazelcast-remote.mod => hazelcast-remote-sessions.mod} (100%) diff --git a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc index 1ca0b0749b1..e95a91a58c8 100644 --- a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc @@ -27,7 +27,7 @@ When using the Jetty distribution, you will first need to enable the `session-st mb-olamy:tmp-base olamy$ java -jar ../start.jar --create-startd MKDIR : ${jetty.base}/start.d INFO : Base directory was modified -mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=session-store-hazelcast-remote +mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=hazelcast-remote-sessions ALERT: There are enabled module(s) with licenses. The following 1 module(s): @@ -35,13 +35,13 @@ The following 1 module(s): + contains software not covered by the Eclipse Public License! + has not been audited for compliance with its license - Module: session-store-hazelcast-remote + Module: hazelcast-remote-sessions + Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license. + https://hazelcast.org/ + http://www.apache.org/licenses/LICENSE-2.0.html Proceed (y/N)? y -INFO: session-store-hazelcast-remote initialised in ${jetty.base}/start.ini +INFO: hazelcast-remote-sessions initialised in ${jetty.base}/start.ini COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar @@ -88,7 +88,7 @@ To enable this you will first need to enable the `session-store-hazelcast-embedd mb-olamy:tmp-base olamy$ java -jar ../start.jar --create-startd MKDIR : ${jetty.base}/start.d INFO : Base directory was modified -mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=session-store-hazelcast-embedded +mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=hazelcast-embedded-sessions ALERT: There are enabled module(s) with licenses. The following 1 module(s): @@ -96,13 +96,13 @@ The following 1 module(s): + contains software not covered by the Eclipse Public License! + has not been audited for compliance with its license - Module: session-store-hazelcast-embedded + Module: hazelcast-embedded-sessions + Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license. + https://hazelcast.org/ + http://www.apache.org/licenses/LICENSE-2.0.html Proceed (y/N)? y -INFO: session-store-hazelcast-embedded initialised in ${jetty.base}/start.ini +INFO: hazelcast-embedded-sessions initialised in ${jetty.base}/start.ini COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar @@ -125,8 +125,8 @@ Opening the `start.ini` will show a list of all the configurable options for the [source, screen, subs="{sub-order}"] ---- # --------------------------------------- -# Module: session-store-hazelcast-embedded ---module=session-store-hazelcast-embedded +# Module: hazelcast-embedded-sessions +--module=hazelcast-embedded-sessions #jetty.session.hazelcast.configurationLocation= ---- diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod b/jetty-hazelcast/src/main/config/modules/hazelcast-embedded-sessions.mod similarity index 100% rename from jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod rename to jetty-hazelcast/src/main/config/modules/hazelcast-embedded-sessions.mod diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod b/jetty-hazelcast/src/main/config/modules/hazelcast-remote-sessions.mod similarity index 100% rename from jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod rename to jetty-hazelcast/src/main/config/modules/hazelcast-remote-sessions.mod From b93f9b319d019e6dded1050716b1f0cb6ce540b4 Mon Sep 17 00:00:00 2001 From: "S K (xz64)" Date: Tue, 13 Jun 2017 20:58:22 -0700 Subject: [PATCH 055/147] add general purpose header filters Signed-off-by: S K (xz64) --- .../administration/extras/chapter.adoc | 1 + .../administration/extras/header-filter.adoc | 115 ++++++ .../eclipse/jetty/servlets/HeaderFilter.java | 197 ++++++++++ .../servlets/IncludeExcludeBasedFilter.java | 162 ++++++++ .../jetty/servlets/HeaderFilterTest.java | 137 +++++++ .../IncludeExcludeBasedFilterTest.java | 353 ++++++++++++++++++ 6 files changed, 965 insertions(+) create mode 100644 jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc create mode 100644 jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java create mode 100644 jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java create mode 100644 jetty-servlets/src/test/java/org/eclipse/jetty/servlets/HeaderFilterTest.java create mode 100644 jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/chapter.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/chapter.adoc index 9e3a200c29c..b44a7588c64 100644 --- a/jetty-documentation/src/main/asciidoc/administration/extras/chapter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/extras/chapter.adoc @@ -30,6 +30,7 @@ include::balancer-servlet.adoc[] include::cgi-servlet.adoc[] include::qos-filter.adoc[] include::dos-filter.adoc[] +include::header-filter.adoc[] include::gzip-filter.adoc[] include::cross-origin-filter.adoc[] include::resource-handler.adoc[] diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc new file mode 100644 index 00000000000..e7e97d9079e --- /dev/null +++ b/jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc @@ -0,0 +1,115 @@ +// ======================================================================== +// Copyright (c) 1995-2017 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. +// ======================================================================== + +[[header-filter]] +=== Header Filter + +[[header-filter-metadata]] +==== Info + +* Classname: `org.eclipse.jetty.servlets.HeaderFilter` +* Maven Artifact: org.eclipse.jetty:jetty-servlets +* Javadoc: {JDURL}/org/eclipse/jetty/servlets/HeaderFilter.html +* Xref: {JXURL}/org/eclipse/jetty/servlets/HeaderFilter.html + +[[header-filter-usage]] +==== Usage + +The header filter sets or adds headers to each response based on an optionally included/excluded list of path specs, mime types, and/or HTTP methods. + +===== Required JARs + +To use the Header Filter, these JAR files must be available in WEB-INF/lib: + +* $JETTY_HOME/lib/jetty-http.jar +* $JETTY_HOME/lib/jetty-servlets.jar +* $JETTY_HOME/lib/jetty-util.jar + +===== Sample Configuration + +Place the configuration in a webapp's `web.xml` or `jetty-web.xml`. +This filter will perform the following actions on each response: + +* Set the X-Frame-Options header to DENY. +* Add a Cache-Control header containing no-cache, no-store, must-revalidate +* Set the Expires header to approximately one year in the future. +* Add a Date header with the current system time. + +____ +[NOTE] +Each action must be separated by a comma. +____ + +[source, xml, subs="{sub-order}"] +---- + + HeaderFilter + org.eclipse.jetty.servlets.HeaderFilter + + headerConfig + + set X-Frame-Options: DENY, + "add Cache-Control: no-cache, no-store, must-revalidate", + setDate Expires: 31540000000, + addDate Date: 0 + + + +---- + +[[header-filter-init]] +===== Configuring Header Filter Parameters + +The following `init` parameters control the behavior of the filter: + +includedPaths:: +Optional. CSV of included path specs. + +excludedPaths:: +Optional. CSV of excluded path specs. + +includedMimeTypes:: +Optional. CSV of included mime types. + +excludedMimeTypes:: +Optional. CSV of excluded mime types. + +includedHttpMethods:: +Optional. CSV of included http methods. + +excludedHttpMethods:: +Optional. CSV of excluded http methods. + +headerConfig:: +CSV of actions to perform on headers. The syntax for each action is `action headerName: headerValue`. + +Supported header actions: + +* `set` - causes set `setHeader` to be called on the response +* `add` - causes set `addHeader` to be called on the response +* `setDate` - causes `setDateHeader` to be called on the response. +* `addDate` - causes `addDateHeader` to be called on the response. + +If `setDate` or `addDate` is used, `headerValue` should be the number of milliseconds to add to the current system time before writing the header value. + +If a property is both included and excluded by the filter configuration, then it will be considered excluded. + +Path spec rules: + +* If the spec starts with `^`, the spec is assumed to be a regex based path spec and will match with normal Java regex rules. +* If the spec starts with `/`, the spec is assumed to be a Servlet url-pattern rules path spec for either an exact match or prefix based match. +* If the spec starts with `*.`, the spec is assumed to be a Servlet url-pattern rules path spec for a suffix based match. +* All other syntaxes are unsupported. diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java new file mode 100644 index 00000000000..c23b6b5b88c --- /dev/null +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java @@ -0,0 +1,197 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.util.StringUtil; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; + +/** + * Header Filter + *

+ * This filter sets or adds a header to the response. + *

+ * The {@code headerConfig} init param is a CSV of actions to perform on headers, with the following syntax:
+ * [action] [header name]: [header value]
+ * [action] can be one of set, add, setDate, or addDate
+ * The date actions will add the header value in milliseconds to the current system time before setting a date header. + *

+ * Below is an example value for headerConfig:
+ * + *

+ * set X-Frame-Options: DENY,
+ * "add Cache-Control: no-cache, no-store, must-revalidate",
+ * setDate Expires: 31540000000,
+ * addDate Date: 0
+ * 
+ * + * @see IncludeExcludeBasedFilter + */ +public class HeaderFilter extends IncludeExcludeBasedFilter +{ + private List _configuredHeaders = new ArrayList<>(); + private static final Logger LOG = Log.getLogger(HeaderFilter.class); + + @Override + public void init(FilterConfig filterConfig) throws ServletException + { + super.init(filterConfig); + String header_config = filterConfig.getInitParameter("headerConfig"); + + if (header_config != null) + { + String[] configs = StringUtil.csvSplit(header_config); + for (String config : configs) + _configuredHeaders.add(parseHeaderConfiguration(config)); + } + + if (LOG.isDebugEnabled()) + LOG.debug(this.toString()); + } + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException + { + chain.doFilter(request,response); + + HttpServletRequest http_request = (HttpServletRequest)request; + HttpServletResponse http_response = (HttpServletResponse)response; + + if (!super.shouldFilter(http_request,http_response)) + { + return; + } + + for (ConfiguredHeader header : _configuredHeaders) + { + if (header.isDate()) + { + long header_value = System.currentTimeMillis() + header.getMsOffset(); + if (header.isAdd()) + { + http_response.addDateHeader(header.getName(),header_value); + } + else + { + http_response.setDateHeader(header.getName(),header_value); + } + } + else // constant header value + { + if (header.isAdd()) + { + http_response.addHeader(header.getName(),header.getValue()); + } + else + { + http_response.setHeader(header.getName(),header.getValue()); + } + } + } + } + + @Override + public String toString() + { + StringBuilder sb = new StringBuilder(); + sb.append(super.toString()).append("\n"); + sb.append("configured headers:\n"); + for (ConfiguredHeader c : _configuredHeaders) + sb.append(c).append("\n"); + + return sb.toString(); + } + + private ConfiguredHeader parseHeaderConfiguration(String config) + { + String[] config_tokens = config.trim().split(" ",2); + String method = config_tokens[0].trim(); + String header = config_tokens[1]; + String[] header_tokens = header.trim().split(":",2); + String header_name = header_tokens[0].trim(); + String header_value = header_tokens[1].trim(); + ConfiguredHeader configured_header = new ConfiguredHeader(header_name,header_value,method.startsWith("add"),method.endsWith("Date")); + return configured_header; + } + + private static class ConfiguredHeader + { + private String _name; + private String _value; + private long _msOffset; + private boolean _add; + private boolean _date; + + public ConfiguredHeader(String name, String value, boolean add, boolean date) + { + _name = name; + _value = value; + _add = add; + _date = date; + + if (_date) + { + _msOffset = Long.parseLong(_value); + } + } + + public String getName() + { + return _name; + } + + public String getValue() + { + return _value; + } + + public boolean isAdd() + { + return _add; + } + + public boolean isDate() + { + return _date; + } + + public long getMsOffset() + { + return _msOffset; + } + + @Override + public String toString() + { + return (_add?"add":"set") + (_date?"Date":"") + " " + _name + ": " + _value; + } + } +} diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java new file mode 100644 index 00000000000..b1ba2cf4342 --- /dev/null +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java @@ -0,0 +1,162 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 javax.servlet.Filter; +import javax.servlet.FilterConfig; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.http.MimeTypes; +import org.eclipse.jetty.http.pathmap.PathSpecSet; +import org.eclipse.jetty.util.IncludeExclude; +import org.eclipse.jetty.util.IncludeExcludeSet; +import org.eclipse.jetty.util.StringUtil; +import org.eclipse.jetty.util.URIUtil; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; + +/** + * Include Exclude Based Filter + *

+ * This is an abstract filter which helps with filtering based on include/exclude of paths, mime types, and/or http methods. + *

+ * Use the {@link #shouldFilter(HttpServletRequest, HttpServletResponse)} method to determine if a request/response should be filtered. If mime types are used, + * it should be called after {@link javax.servlet.FilterChain#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)} since the mime type may not + * be written until then. + * + * Supported init params: + *

    + *
  • includedPaths - CSV of path specs to include
  • + *
  • excludedPaths - CSV of path specs to exclude
  • + *
  • includedMimeTypes - CSV of mime types to include
  • + *
  • excludedMimeTypes - CSV of mime types to exclude
  • + *
  • includedHttpMethods - CSV of http methods to include
  • + *
  • excludedHttpMethods - CSV of http methods to exclude
  • + *
+ *

+ * Path spec rules: + *

    + *
  • If the spec starts with '^' the spec is assumed to be a regex based path spec and will match with normal Java regex rules.
  • + *
  • If the spec starts with '/' the spec is assumed to be a Servlet url-pattern rules path spec for either an exact match or prefix based + * match.
  • + *
  • If the spec starts with '*.' the spec is assumed to be a Servlet url-pattern rules path spec for a suffix based match.
  • + *
  • All other syntaxes are unsupported.
  • + *
+ *

+ * CSVs are parsed with {@link StringUtil#csvSplit(String)} + * + * @see PathSpecSet + * @see IncludeExcludeSet + */ +public abstract class IncludeExcludeBasedFilter implements Filter +{ + private final IncludeExclude _mimeTypes = new IncludeExclude<>(); + private final IncludeExclude _httpMethods = new IncludeExclude<>(); + private final IncludeExclude _paths = new IncludeExclude<>(PathSpecSet.class); + private static final Logger LOG = Log.getLogger(IncludeExcludeBasedFilter.class); + + @Override + public void init(FilterConfig filterConfig) throws ServletException + { + String included_paths = filterConfig.getInitParameter("includedPaths"); + String excluded_paths = filterConfig.getInitParameter("excludedPaths"); + String included_mime_types = filterConfig.getInitParameter("includedMimeTypes"); + String excluded_mime_types = filterConfig.getInitParameter("excludedMimeTypes"); + String included_http_methods = filterConfig.getInitParameter("includedHttpMethods"); + String excluded_http_methods = filterConfig.getInitParameter("excludedHttpMethods"); + + if (included_paths != null) + { + _paths.include(StringUtil.csvSplit(included_paths)); + } + if (excluded_paths != null) + { + _paths.exclude(StringUtil.csvSplit(excluded_paths)); + } + if (included_mime_types != null) + { + _mimeTypes.include(StringUtil.csvSplit(included_mime_types)); + } + if (excluded_mime_types != null) + { + _mimeTypes.exclude(StringUtil.csvSplit(excluded_mime_types)); + } + if (included_http_methods != null) + { + _httpMethods.include(StringUtil.csvSplit(included_http_methods)); + } + if (excluded_http_methods != null) + { + _httpMethods.exclude(StringUtil.csvSplit(excluded_http_methods)); + } + } + + protected boolean shouldFilter(HttpServletRequest http_request, HttpServletResponse http_response) + { + String http_method = http_request.getMethod(); + LOG.debug("HTTP method is: {}",http_method); + if (!_httpMethods.test(http_method)) + { + LOG.debug("should not apply filter because HTTP method does not match"); + return false; + } + + String content_type = http_response.getContentType(); + LOG.debug("Content Type is: {}",content_type); + content_type = (content_type == null)?"":content_type; + String mime_type = MimeTypes.getContentTypeWithoutCharset(content_type); + + LOG.debug("Mime Type is: {}",content_type); + if (!_mimeTypes.test(mime_type)) + { + LOG.debug("should not apply filter because mime type does not match"); + return false; + } + + ServletContext context = http_request.getServletContext(); + String path = context == null?http_request.getRequestURI():URIUtil.addPaths(http_request.getServletPath(),http_request.getPathInfo()); + LOG.debug("Path is: {}",path); + if (!_paths.test(path)) + { + LOG.debug("should not apply filter because path does not match"); + return false; + } + + return true; + } + + @Override + public void destroy() + { + } + + @Override + public String toString() + { + StringBuilder sb = new StringBuilder(); + sb.append("filter configuration:\n"); + sb.append("paths:\n").append(_paths).append("\n"); + sb.append("mime types:\n").append(_mimeTypes).append("\n"); + sb.append("http methods:\n").append(_httpMethods); + return sb.toString(); + } +} diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/HeaderFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/HeaderFilterTest.java new file mode 100644 index 00000000000..5230a96fd24 --- /dev/null +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/HeaderFilterTest.java @@ -0,0 +1,137 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.IOException; +import java.util.EnumSet; + +import javax.servlet.DispatcherType; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.http.HttpHeader; +import org.eclipse.jetty.http.HttpStatus; +import org.eclipse.jetty.http.HttpTester; +import org.eclipse.jetty.servlet.FilterHolder; +import org.eclipse.jetty.servlet.ServletTester; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class HeaderFilterTest +{ + private ServletTester _tester; + + @Before + public void setUp() throws Exception + { + _tester = new ServletTester(); + _tester.setContextPath("/context"); + _tester.addServlet(NullServlet.class,"/test/*"); + + _tester.start(); + } + + @After + public void tearDown() throws Exception + { + _tester.stop(); + } + + @Test + public void testHeaderFilterSet() throws Exception + { + FilterHolder holder = new FilterHolder(HeaderFilter.class); + holder.setInitParameter("headerConfig","set X-Frame-Options: DENY"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Frame-Options","DENY")); + } + + @Test + public void testHeaderFilterAdd() throws Exception + { + FilterHolder holder = new FilterHolder(HeaderFilter.class); + holder.setInitParameter("headerConfig","add X-Frame-Options: DENY"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Frame-Options","DENY")); + } + + @Test + public void testHeaderFilterSetDate() throws Exception + { + FilterHolder holder = new FilterHolder(HeaderFilter.class); + holder.setInitParameter("headerConfig","setDate Expires: 100"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains(HttpHeader.EXPIRES)); + } + + @Test + public void testHeaderFilterAddDate() throws Exception + { + FilterHolder holder = new FilterHolder(HeaderFilter.class); + holder.setInitParameter("headerConfig","addDate Expires: 100"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains(HttpHeader.EXPIRES)); + } + + public static class NullServlet extends HttpServlet + { + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException + { + resp.setStatus(HttpStatus.NO_CONTENT_204); + } + + } +} diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java new file mode 100644 index 00000000000..f9971247ad2 --- /dev/null +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java @@ -0,0 +1,353 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.IOException; +import java.util.EnumSet; + +import javax.servlet.DispatcherType; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.http.HttpStatus; +import org.eclipse.jetty.http.HttpTester; +import org.eclipse.jetty.servlet.FilterHolder; +import org.eclipse.jetty.servlet.ServletTester; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class IncludeExcludeBasedFilterTest +{ + private ServletTester _tester; + + @Before + public void setUp() throws Exception + { + _tester = new ServletTester(); + _tester.setContextPath("/context"); + _tester.addServlet(NullServlet.class,"/test/*"); + + _tester.start(); + } + + @After + public void tearDown() throws Exception + { + _tester.stop(); + } + + @Test + public void testIncludeExcludeFilterIncludedPathMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedPaths","^/test/0$"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludedPathNoMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedPaths","^/nomatchtest$"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterExcludedPathMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("excludedPaths","^/test/0$"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterExcludedPathNoMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("excludedPaths","^/nomatchtest$"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterExcludeOverridesInclude() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedPaths","^/test/0$"); + holder.setInitParameter("excludedPaths","^/test/0$"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMethodMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedHttpMethods","GET"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMethodNoMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedHttpMethods","POST,PUT"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterExcludeMethodMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("excludedHttpMethods","GET"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterExcludeMethodNoMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("excludedHttpMethods","POST,PUT"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/0"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMimeTypeMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedMimeTypes","application/json"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/json"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMimeTypeNoMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedMimeTypes","application/xml"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/json"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterExcludeMimeTypeMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("excludedMimeTypes","application/json"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/json"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterExcludeMimeTypeNoMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("excludedMimeTypes","application/xml"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/json"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMimeTypeSemicolonMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedMimeTypes","application/json"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/json-utf8"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMimeTypeSemicolonNoMatch() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedMimeTypes","application/xml"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/json-utf8"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + public static class MockIncludeExcludeFilter extends IncludeExcludeBasedFilter + { + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException + { + chain.doFilter(request,response); + HttpServletRequest http_request = (HttpServletRequest)request; + HttpServletResponse http_response = (HttpServletResponse)response; + + if (!super.shouldFilter(http_request,http_response)) + { + return; + } + + http_response.setHeader("X-Custom-Value","1"); + } + } + + public static class NullServlet extends HttpServlet + { + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException + { + if (req.getPathInfo().equals("/json")) + { + resp.setContentType("application/json"); + } + else if (req.getPathInfo().equals("/json-utf8")) + { + resp.setContentType("application/json; charset=utf-8"); + } + resp.setStatus(HttpStatus.NO_CONTENT_204); + } + + } +} From 20ca6277a8e49fa53932908f845b740182e88229 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 16 Jun 2017 10:46:21 +1000 Subject: [PATCH 056/147] use outputDirectory from reactor projects rather than having to install dependencies first #1623 Signed-off-by: olivier lamy --- jetty-maven-plugin/pom.xml | 6 ++ .../jetty/maven/plugin/AbstractJettyMojo.java | 2 +- .../jetty/maven/plugin/JettyRunMojo.java | 97 +++++++++++++++---- .../maven/plugin/JettyWebAppContext.java | 7 +- 4 files changed, 90 insertions(+), 22 deletions(-) diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index f23db716925..335e94a2bc7 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -71,6 +71,12 @@ + + org.apache.maven.plugin-tools + maven-plugin-annotations + ${pluginToolsVersion} + provided + org.eclipse.jetty jetty-util diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java index 09b1c399646..72b8bad3a95 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java @@ -341,7 +341,7 @@ public abstract class AbstractJettyMojo extends AbstractMojo { try { - List provided = new ArrayList(); + List provided = new ArrayList<>(); URL[] urls = null; for ( Iterator iter = projectArtifacts.iterator(); iter.hasNext(); ) diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java index 0fe35ff1896..259cb0f54d0 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java @@ -18,24 +18,29 @@ package org.eclipse.jetty.maven.plugin; +import org.apache.maven.artifact.Artifact; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.project.MavenProject; +import org.codehaus.plexus.util.StringUtils; +import org.eclipse.jetty.util.PathWatcher; +import org.eclipse.jetty.util.PathWatcher.PathWatchEvent; +import org.eclipse.jetty.util.resource.Resource; +import org.eclipse.jetty.webapp.WebAppContext; + import java.io.File; import java.io.IOException; import java.net.URL; +import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Collection; import java.util.Date; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.eclipse.jetty.util.PathWatcher; -import org.eclipse.jetty.util.PathWatcher.PathWatchEvent; -import org.eclipse.jetty.util.resource.Resource; -import org.eclipse.jetty.webapp.WebAppContext; - /** * This goal is used in-situ on a Maven project without first requiring that the project * is assembled into a war, saving time during the development cycle. @@ -154,18 +159,20 @@ public class JettyRunMojo extends AbstractJettyMojo * List of deps that are wars */ protected List warArtifacts; - - - - - - + + @Parameter(defaultValue = "${reactorProjects}", readonly = true, required = true) + private List reactorProjects; + /** * @see org.eclipse.jetty.maven.plugin.AbstractJettyMojo#execute() */ @Override public void execute() throws MojoExecutionException, MojoFailureException { + if ( !"war".equals( project.getPackaging() ) || skip ) + { + return; + } warPluginInfo = new WarPluginInfo(project); super.execute(); } @@ -273,7 +280,8 @@ public class JettyRunMojo extends AbstractJettyMojo webApp.setClasses (classesDirectory); if (useTestScope && (testClassesDirectory != null)) webApp.setTestClasses (testClassesDirectory); - + + webApp.getClassPathFiles().addAll( getDependencyProjects() ); webApp.setWebInfLib (getDependencyFiles()); //get copy of a list of war artifacts @@ -556,18 +564,22 @@ public class JettyRunMojo extends AbstractJettyMojo /** * @return */ - private List getDependencyFiles () + private List getDependencyFiles() { List dependencyFiles = new ArrayList(); for ( Iterator iter = projectArtifacts.iterator(); iter.hasNext(); ) { - Artifact artifact = (Artifact) iter.next(); + Artifact artifact = iter.next(); // Include runtime and compile time libraries, and possibly test libs too if(artifact.getType().equals("war")) { continue; } + if (getProjectReferences( artifact, project )!=null) + { + continue; + } if (Artifact.SCOPE_PROVIDED.equals(artifact.getScope())) continue; //never add dependencies of scope=provided to the webapp's classpath (see also param) @@ -581,6 +593,57 @@ public class JettyRunMojo extends AbstractJettyMojo return dependencyFiles; } + + private List getDependencyProjects() + { + List dependencyFiles = new ArrayList(); + for ( Iterator iter = projectArtifacts.iterator(); iter.hasNext(); ) + { + Artifact artifact = iter.next(); + + // Include runtime and compile time libraries, and possibly test libs too + if(artifact.getType().equals("war")) + { + continue; + } + + if (Artifact.SCOPE_PROVIDED.equals(artifact.getScope())) + continue; //never add dependencies of scope=provided to the webapp's classpath (see also param) + + if (Artifact.SCOPE_TEST.equals(artifact.getScope()) && !useTestScope) + continue; //only add dependencies of scope=test if explicitly required + + MavenProject mavenProject = getProjectReferences( artifact, project ); + if (mavenProject != null) + { + dependencyFiles.add( Paths.get(mavenProject.getBuild().getOutputDirectory()).toFile() ); + getLog().debug( "Adding project reference " + mavenProject.getBuild().getOutputDirectory() + + " for WEB-INF/classes " ); + } + } + + return dependencyFiles; + } + + + private MavenProject getProjectReferences( Artifact artifact, MavenProject project ) + { + if ( project.getProjectReferences() == null || project.getProjectReferences().isEmpty() ) + { + return null; + } + Collection mavenProjects = project.getProjectReferences().values(); + for ( MavenProject mavenProject : mavenProjects ) + { + if ( StringUtils.equals( mavenProject.getId(), artifact.getId() ) ) + { + return mavenProject; + } + } + return null; + } + + diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java index 638f8bf9996..a27903ceed5 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java @@ -95,10 +95,10 @@ public class JettyWebAppContext extends WebAppContext private File _classes = null; private File _testClasses = null; - private final List _webInfClasses = new ArrayList(); - private final List _webInfJars = new ArrayList(); + private final List _webInfClasses = new ArrayList<>(); + private final List _webInfJars = new ArrayList<>(); private final Map _webInfJarMap = new HashMap(); - private List _classpathFiles; //webInfClasses+testClasses+webInfJars + private List _classpathFiles = new ArrayList<>(); //webInfClasses+testClasses+webInfJars private String _jettyEnvXml; private List _overlays; private Resource _quickStartWebXml; @@ -411,7 +411,6 @@ public class JettyWebAppContext extends WebAppContext _webInfClasses.add(_classes); // Set up the classpath - _classpathFiles = new ArrayList(); _classpathFiles.addAll(_webInfClasses); _classpathFiles.addAll(_webInfJars); From 3104e2cf249f862a342d0d7299d3ce65d861368d Mon Sep 17 00:00:00 2001 From: Vijay Anand Date: Sun, 18 Jun 2017 22:45:25 +0530 Subject: [PATCH 057/147] Fix Typo Signed-off-by: Vijay Anand --- jetty-distribution/src/main/resources/webapps/README.TXT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-distribution/src/main/resources/webapps/README.TXT b/jetty-distribution/src/main/resources/webapps/README.TXT index 170137a0ec4..e6536844384 100644 --- a/jetty-distribution/src/main/resources/webapps/README.TXT +++ b/jetty-distribution/src/main/resources/webapps/README.TXT @@ -10,7 +10,7 @@ which case the context path is /. If the directory name ends with ".d" it is ignored (by may be used by explicit configuration). + A file called example.war will be deployed as a standard web application -with the context path /example (eg http://localhost:8080/example/). If he +with the context path /example (eg http://localhost:8080/example/). If the base name is root, then the context path is /. If example.war and example/ exist, then only the WAR is deployed (which may use the directory as an unpack location). From 11f2cc5294efab09b5b9bfe2118645e2069711fc Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 19 Jun 2017 08:23:56 -0700 Subject: [PATCH 058/147] Updating test to use HttpTester --- .../jetty/servlet/AsyncContextTest.java | 226 +++++++++--------- 1 file changed, 115 insertions(+), 111 deletions(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java index dac4f0a0bb3..32f4c8d7aea 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java @@ -18,9 +18,12 @@ package org.eclipse.jetty.servlet; -import java.io.BufferedReader; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.containsString; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + import java.io.IOException; -import java.io.StringReader; import java.util.concurrent.TimeUnit; import javax.servlet.AsyncContext; @@ -34,6 +37,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; +import org.eclipse.jetty.http.HttpTester; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.HttpChannel; import org.eclipse.jetty.server.HttpConnectionFactory; @@ -45,17 +49,9 @@ import org.eclipse.jetty.server.handler.DefaultHandler; import org.eclipse.jetty.server.handler.HandlerList; import org.eclipse.jetty.util.log.StacklessLogging; import org.junit.After; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.startsWith; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - /** * This tests the correct functioning of the AsyncContext *

@@ -115,12 +111,14 @@ public class AsyncContextTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); - assertThat(responseString, startsWith("HTTP/1.1 200 ")); - assertThat(responseString, containsString("doGet:getServletPath:/servletPath")); - assertThat(responseString, containsString("doGet:async:getServletPath:/servletPath")); - assertThat(responseString, containsString("async:run:attr:servletPath:/servletPath")); + String responseBody = response.getContent(); + + assertThat(responseBody, containsString("doGet:getServletPath:/servletPath")); + assertThat(responseBody, containsString("doGet:async:getServletPath:/servletPath")); + assertThat(responseBody, containsString("async:run:attr:servletPath:/servletPath")); } @Test @@ -131,12 +129,15 @@ public class AsyncContextTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request,10,TimeUnit.MINUTES); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request,10,TimeUnit.MINUTES)); - assertThat(responseString, startsWith("HTTP/1.1 500 ")); - assertThat(responseString, containsString("ERROR: /error")); - assertThat(responseString, containsString("PathInfo= /IOE")); - assertThat(responseString, containsString("EXCEPTION: org.eclipse.jetty.server.QuietServletException: java.io.IOException: Test")); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)); + + String responseBody = response.getContent(); + + assertThat(responseBody, containsString("ERROR: /error")); + assertThat(responseBody, containsString("PathInfo= /IOE")); + assertThat(responseBody, containsString("EXCEPTION: org.eclipse.jetty.server.QuietServletException: java.io.IOException: Test")); } @Test @@ -147,12 +148,15 @@ public class AsyncContextTest "Host: localhost\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); - assertThat(responseString, startsWith("HTTP/1.1 500 ")); - assertThat(responseString, containsString("ERROR: /error")); - assertThat(responseString, containsString("PathInfo= /IOE")); - assertThat(responseString, containsString("EXCEPTION: org.eclipse.jetty.server.QuietServletException: java.io.IOException: Test")); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)); + + String responseBody = response.getContent(); + + assertThat(responseBody, containsString("ERROR: /error")); + assertThat(responseBody, containsString("PathInfo= /IOE")); + assertThat(responseBody, containsString("EXCEPTION: org.eclipse.jetty.server.QuietServletException: java.io.IOException: Test")); } @Test @@ -163,106 +167,118 @@ public class AsyncContextTest "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); - BufferedReader br = new BufferedReader(new StringReader(responseString)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)); - assertEquals("HTTP/1.1 500 Server Error", br.readLine()); - readHeader(br); - Assert.assertEquals("ERROR: /error", br.readLine()); - Assert.assertEquals("PathInfo= /IOE", br.readLine()); - Assert.assertEquals("EXCEPTION: org.eclipse.jetty.server.QuietServletException: java.io.IOException: Test", br.readLine()); + String responseBody = response.getContent(); + assertThat(responseBody, containsString("ERROR: /error")); + assertThat(responseBody, containsString("PathInfo= /IOE")); + assertThat(responseBody, containsString("EXCEPTION: org.eclipse.jetty.server.QuietServletException: java.io.IOException: Test")); } @Test public void testStartFlushCompleteThrow() throws Exception { - try(StacklessLogging stackless = new StacklessLogging(HttpChannel.class)) + try(StacklessLogging ignore = new StacklessLogging(HttpChannel.class)) { String request = "GET /ctx/startthrow?flush=true&complete=true HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); - BufferedReader br = new BufferedReader(new StringReader(responseString)); + String responseBody = response.getContent(); - assertEquals("HTTP/1.1 200 OK",br.readLine()); - readHeader(br); - - Assert.assertEquals("error servlet","completeBeforeThrow",br.readLine()); + assertThat("error servlet", responseBody, containsString("completeBeforeThrow")); } } @Test public void testDispatchAsyncContext() throws Exception { - String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" - + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + + "Host: localhost\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n" + + "Connection: close\r\n" + + "\r\n"; + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); - BufferedReader br = parseHeader(responseString); - - Assert.assertEquals("servlet gets right path", "doGet:getServletPath:/servletPath2", br.readLine()); - Assert.assertEquals("async context gets right path in get", "doGet:async:getServletPath:/servletPath2", br.readLine()); - Assert.assertEquals("servlet path attr is original", "async:run:attr:servletPath:/servletPath", br.readLine()); - Assert.assertEquals("path info attr is correct", "async:run:attr:pathInfo:null", br.readLine()); - Assert.assertEquals("query string attr is correct", "async:run:attr:queryString:dispatch=true", br.readLine()); - Assert.assertEquals("context path attr is correct", "async:run:attr:contextPath:/ctx", br.readLine()); - Assert.assertEquals("request uri attr is correct", "async:run:attr:requestURI:/ctx/servletPath", br.readLine()); + String responseBody = response.getContent(); + assertThat("servlet gets right path", responseBody, containsString("doGet:getServletPath:/servletPath2")); + assertThat("async context gets right path in get", responseBody, containsString("doGet:async:getServletPath:/servletPath2")); + assertThat("servlet path attr is original", responseBody, containsString("async:run:attr:servletPath:/servletPath")); + assertThat("path info attr is correct", responseBody, containsString("async:run:attr:pathInfo:null")); + assertThat("query string attr is correct", responseBody, containsString("async:run:attr:queryString:dispatch=true")); + assertThat("context path attr is correct", responseBody, containsString("async:run:attr:contextPath:/ctx")); + assertThat("request uri attr is correct", responseBody, containsString("async:run:attr:requestURI:/ctx/servletPath")); } @Test public void testDispatchAsyncContextEncodedPathAndQueryString() throws Exception { - String request = "GET /ctx/path%20with%20spaces/servletPath?dispatch=true&queryStringWithEncoding=space%20space HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" - + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + String request = "GET /ctx/path%20with%20spaces/servletPath?dispatch=true&queryStringWithEncoding=space%20space HTTP/1.1\r\n" + + "Host: localhost\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n" + + "Connection: close\r\n" + + "\r\n"; + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); - BufferedReader br = parseHeader(responseString); + String responseBody = response.getContent(); - assertThat("servlet gets right path", br.readLine(), equalTo("doGet:getServletPath:/servletPath2")); - assertThat("async context gets right path in get", br.readLine(), equalTo("doGet:async:getServletPath:/servletPath2")); - assertThat("servlet path attr is original", br.readLine(), equalTo("async:run:attr:servletPath:/path with spaces/servletPath")); - assertThat("path info attr is correct", br.readLine(), equalTo("async:run:attr:pathInfo:null")); - assertThat("query string attr is correct", br.readLine(), equalTo("async:run:attr:queryString:dispatch=true&queryStringWithEncoding=space%20space")); - assertThat("context path attr is correct", br.readLine(), equalTo("async:run:attr:contextPath:/ctx")); - assertThat("request uri attr is correct", br.readLine(), equalTo("async:run:attr:requestURI:/ctx/path%20with%20spaces/servletPath")); + assertThat("servlet gets right path", responseBody, containsString("doGet:getServletPath:/servletPath2")); + assertThat("async context gets right path in get", responseBody, containsString("doGet:async:getServletPath:/servletPath2")); + assertThat("servlet path attr is original", responseBody, containsString("async:run:attr:servletPath:/path with spaces/servletPath")); + assertThat("path info attr is correct", responseBody, containsString("async:run:attr:pathInfo:null")); + assertThat("query string attr is correct", responseBody, containsString("async:run:attr:queryString:dispatch=true&queryStringWithEncoding=space%20space")); + assertThat("context path attr is correct", responseBody, containsString("async:run:attr:contextPath:/ctx")); + assertThat("request uri attr is correct", responseBody, containsString("async:run:attr:requestURI:/ctx/path%20with%20spaces/servletPath")); } @Test public void testSimpleWithContextAsyncContext() throws Exception { - String request = "GET /ctx/servletPath HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" - + "Connection: close\r\n" + "\r\n"; + String request = "GET /ctx/servletPath HTTP/1.1\r\n" + + "Host: localhost\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n" + + "Connection: close\r\n" + + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); - BufferedReader br = parseHeader(responseString); + String responseBody = response.getContent(); - Assert.assertEquals("servlet gets right path", "doGet:getServletPath:/servletPath", br.readLine()); - Assert.assertEquals("async context gets right path in get", "doGet:async:getServletPath:/servletPath", br.readLine()); - Assert.assertEquals("async context gets right path in async", "async:run:attr:servletPath:/servletPath", br.readLine()); + assertThat("servlet gets right path", responseBody, containsString("doGet:getServletPath:/servletPath")); + assertThat("async context gets right path in get", responseBody, containsString("doGet:async:getServletPath:/servletPath")); + assertThat("async context gets right path in async", responseBody, containsString("async:run:attr:servletPath:/servletPath")); } @Test public void testDispatchWithContextAsyncContext() throws Exception { - String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + "Host: localhost\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" - + "Connection: close\r\n" + "\r\n"; + String request = "GET /ctx/servletPath?dispatch=true HTTP/1.1\r\n" + + "Host: localhost\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n" + + "Connection: close\r\n" + + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); - BufferedReader br = parseHeader(responseString); + String responseBody = response.getContent(); - Assert.assertEquals("servlet gets right path", "doGet:getServletPath:/servletPath2", br.readLine()); - Assert.assertEquals("async context gets right path in get", "doGet:async:getServletPath:/servletPath2", br.readLine()); - Assert.assertEquals("servlet path attr is original", "async:run:attr:servletPath:/servletPath", br.readLine()); - Assert.assertEquals("path info attr is correct", "async:run:attr:pathInfo:null", br.readLine()); - Assert.assertEquals("query string attr is correct", "async:run:attr:queryString:dispatch=true", br.readLine()); - Assert.assertEquals("context path attr is correct", "async:run:attr:contextPath:/ctx", br.readLine()); - Assert.assertEquals("request uri attr is correct", "async:run:attr:requestURI:/ctx/servletPath", br.readLine()); + assertThat("servlet gets right path", responseBody, containsString("doGet:getServletPath:/servletPath2")); + assertThat("async context gets right path in get", responseBody, containsString("doGet:async:getServletPath:/servletPath2")); + assertThat("servlet path attr is original", responseBody, containsString("async:run:attr:servletPath:/servletPath")); + assertThat("path info attr is correct", responseBody, containsString("async:run:attr:pathInfo:null")); + assertThat("query string attr is correct", responseBody, containsString("async:run:attr:queryString:dispatch=true")); + assertThat("context path attr is correct", responseBody, containsString("async:run:attr:contextPath:/ctx")); + assertThat("request uri attr is correct", responseBody, containsString("async:run:attr:requestURI:/ctx/servletPath")); } @Test @@ -277,8 +293,11 @@ public class AsyncContextTest String responseString = _connector.getResponse(request); System.err.println(responseString); - BufferedReader br = parseHeader(responseString); - assertThat("!ForwardingServlet", br.readLine(), equalTo("Dispatched back to ForwardingServlet")); + HttpTester.Response response = HttpTester.parseResponse(responseString); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); + + String responseBody = response.getContent(); + assertThat("!ForwardingServlet", responseBody, containsString("Dispatched back to ForwardingServlet")); } @Test @@ -292,24 +311,12 @@ public class AsyncContextTest String responseString = _connector.getResponse(request); - BufferedReader br = parseHeader(responseString); + HttpTester.Response response = HttpTester.parseResponse(responseString); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); - assertThat("!AsyncDispatchingServlet", br.readLine(), equalTo("Dispatched back to AsyncDispatchingServlet")); - } + String responseBody = response.getContent(); - private BufferedReader parseHeader(String responseString) throws IOException - { - BufferedReader br = new BufferedReader(new StringReader(responseString)); - assertEquals("HTTP/1.1 200 OK", br.readLine()); - readHeader(br); - return br; - } - - private void readHeader(BufferedReader br) throws IOException - { - String line = br.readLine(); - while (line!=null && !line.isEmpty()) - line = br.readLine(); + assertThat("!AsyncDispatchingServlet", responseBody, containsString("Dispatched back to AsyncDispatchingServlet")); } private class ForwardingServlet extends HttpServlet @@ -369,13 +376,12 @@ public class AsyncContextTest "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)); - BufferedReader br = new BufferedReader(new StringReader(responseString)); + String responseBody = response.getContent(); - assertEquals("HTTP/1.1 500 Server Error", br.readLine()); - readHeader(br); - Assert.assertEquals("error servlet", "ERROR: /error", br.readLine()); + assertThat("error servlet", responseBody, containsString("ERROR: /error")); } @Test @@ -386,16 +392,14 @@ public class AsyncContextTest "Content-Type: application/x-www-form-urlencoded\r\n" + "Connection: close\r\n" + "\r\n"; - String responseString = _connector.getResponse(request); + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)); - BufferedReader br = new BufferedReader(new StringReader(responseString)); + String responseBody = response.getContent(); - assertEquals("HTTP/1.1 500 Server Error", br.readLine()); - readHeader(br); - - Assert.assertEquals("error servlet", "ERROR: /error", br.readLine()); - Assert.assertEquals("error servlet", "PathInfo= /500", br.readLine()); - Assert.assertEquals("error servlet", "EXCEPTION: java.lang.RuntimeException: TEST", br.readLine()); + assertThat("error servlet", responseBody, containsString("ERROR: /error")); + assertThat("error servlet", responseBody, containsString("PathInfo= /500")); + assertThat("error servlet", responseBody, containsString("EXCEPTION: java.lang.RuntimeException: TEST")); } private class DispatchingRunnable implements Runnable From 4556680ddb8dae48fb7c31e515ee7091918ae04d Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 19 Jun 2017 08:33:12 -0700 Subject: [PATCH 059/147] Issue #1618 - adding testcase to verify AsyncContext dispatch encoding --- .../jetty/servlet/AsyncContextTest.java | 74 ++++++++++++++++++- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java index 32f4c8d7aea..465a3b5c513 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java @@ -47,9 +47,11 @@ import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; import org.eclipse.jetty.server.handler.HandlerList; +import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.StacklessLogging; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; /** @@ -77,6 +79,13 @@ public class AsyncContextTest _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/servletPath"); _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/path with spaces/servletPath"); _contextHandler.addServlet(new ServletHolder(new TestServlet2()), "/servletPath2"); + + + ServletHolder testHolder = new ServletHolder(new TestServlet()); + testHolder.setInitParameter("dispatchPath", "/test2/something%2felse"); + _contextHandler.addServlet(testHolder, "/test/*"); + _contextHandler.addServlet(new ServletHolder(new TestServlet2()), "/test2/*"); + _contextHandler.addServlet(new ServletHolder(new TestStartThrowServlet()), "/startthrow/*"); _contextHandler.addServlet(new ServletHolder(new ForwardingServlet()), "/forward"); _contextHandler.addServlet(new ServletHolder(new AsyncDispatchingServlet()), "/dispatchingServlet"); @@ -217,6 +226,40 @@ public class AsyncContextTest assertThat("request uri attr is correct", responseBody, containsString("async:run:attr:requestURI:/ctx/servletPath")); } + @Test + @Ignore("See https://github.com/eclipse/jetty.project/issues/1618") + public void testDispatchAsyncContext_EncodedUrl() throws Exception + { + String request = "GET /ctx/test/hello%2fthere?dispatch=true HTTP/1.1\r\n" + + "Host: localhost\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n" + + "Connection: close\r\n" + + "\r\n"; + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); + + String responseBody = response.getContent(); + + // initial values + assertThat("servlet gets right path", responseBody, containsString("doGet:getServletPath:/test2")); + assertThat("request uri has correct encoding", responseBody, containsString("doGet:getRequestURI:/ctx/test2/something%2felse")); + assertThat("request url has correct encoding", responseBody, containsString("doGet:getRequestURL:http://localhost/ctx/test2/something%2felse")); + assertThat("path info has correct encoding", responseBody, containsString("doGet:getPathInfo:/something%2felse")); + + // async values + assertThat("async servlet gets right path", responseBody, containsString("doGet:async:getServletPath:/test2")); + assertThat("async request uri has correct encoding", responseBody, containsString("doGet:async:getRequestURI:/ctx/test2/something%2felse")); + assertThat("async request url has correct encoding", responseBody, containsString("doGet:async:getRequestURL:http://localhost/ctx/test2/something%2felse")); + assertThat("async path info has correct encoding", responseBody, containsString("doGet:async:getPathInfo:/something%2felse")); + + // async run attributes + assertThat("async run attr servlet path is original", responseBody, containsString("async:run:attr:servletPath:/test")); + assertThat("async run attr path info has correct encoding", responseBody, containsString("async:run:attr:pathInfo:/hello%2fthere")); + assertThat("async run attr query string", responseBody, containsString("async:run:attr:queryString:dispatch=true")); + assertThat("async run context path", responseBody, containsString("async:run:attr:contextPath:/ctx")); + assertThat("async run request uri has correct encoding", responseBody, containsString("async:run:attr:requestURI:/ctx/test/hello%2fthere")); + } + @Test public void testDispatchAsyncContextEncodedPathAndQueryString() throws Exception { @@ -499,6 +542,17 @@ public class AsyncContextTest private class TestServlet extends HttpServlet { private static final long serialVersionUID = 1L; + private String dispatchPath = "/servletPath2"; + + @Override + public void init() throws ServletException + { + String dispatchTo = getServletConfig().getInitParameter("dispatchPath"); + if (StringUtil.isNotBlank(dispatchTo)) + { + this.dispatchPath = dispatchTo; + } + } @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException @@ -506,13 +560,20 @@ public class AsyncContextTest if (request.getParameter("dispatch") != null) { AsyncContext asyncContext = request.startAsync(request, response); - asyncContext.dispatch("/servletPath2"); + asyncContext.dispatch(dispatchPath); } else { response.getOutputStream().print("doGet:getServletPath:" + request.getServletPath() + "\n"); + response.getOutputStream().print("doGet:getRequestURI:" + request.getRequestURI() + "\n"); + response.getOutputStream().print("doGet:getRequestURL:" + request.getRequestURL() + "\n"); + response.getOutputStream().print("doGet:getPathInfo:" + request.getPathInfo() + "\n"); AsyncContext asyncContext = request.startAsync(request, response); - response.getOutputStream().print("doGet:async:getServletPath:" + ((HttpServletRequest)asyncContext.getRequest()).getServletPath() + "\n"); + HttpServletRequest asyncRequest = (HttpServletRequest)asyncContext.getRequest(); + response.getOutputStream().print("doGet:async:getServletPath:" + asyncRequest.getServletPath() + "\n"); + response.getOutputStream().print("doGet:async:getRequestURI:" + asyncRequest.getRequestURI() + "\n"); + response.getOutputStream().print("doGet:async:getRequestURL:" + asyncRequest.getRequestURL() + "\n"); + response.getOutputStream().print("doGet:async:getPathInfo:" + asyncRequest.getPathInfo() + "\n"); asyncContext.start(new AsyncRunnable(asyncContext)); } @@ -527,8 +588,15 @@ public class AsyncContextTest protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.getOutputStream().print("doGet:getServletPath:" + request.getServletPath() + "\n"); + response.getOutputStream().print("doGet:getRequestURI:" + request.getRequestURI() + "\n"); + response.getOutputStream().print("doGet:getRequestURL:" + request.getRequestURL() + "\n"); + response.getOutputStream().print("doGet:getPathInfo:" + request.getPathInfo() + "\n"); AsyncContext asyncContext = request.startAsync(request, response); - response.getOutputStream().print("doGet:async:getServletPath:" + ((HttpServletRequest)asyncContext.getRequest()).getServletPath() + "\n"); + HttpServletRequest asyncRequest = (HttpServletRequest)asyncContext.getRequest(); + response.getOutputStream().print("doGet:async:getServletPath:" + asyncRequest.getServletPath() + "\n"); + response.getOutputStream().print("doGet:async:getRequestURI:" + asyncRequest.getRequestURI() + "\n"); + response.getOutputStream().print("doGet:async:getRequestURL:" + asyncRequest.getRequestURL() + "\n"); + response.getOutputStream().print("doGet:async:getPathInfo:" + asyncRequest.getPathInfo() + "\n"); asyncContext.start(new AsyncRunnable(asyncContext)); } } From 8c96fdde4c8e11e9cde999a7fff3a63bde548d4e Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 19 Jun 2017 08:39:39 -0700 Subject: [PATCH 060/147] Issue #1618 - updating testcase expectations for getPathInfo to match javadoc --- .../java/org/eclipse/jetty/servlet/AsyncContextTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java index 465a3b5c513..4830c61120a 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java @@ -51,7 +51,6 @@ import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.StacklessLogging; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; /** @@ -227,7 +226,6 @@ public class AsyncContextTest } @Test - @Ignore("See https://github.com/eclipse/jetty.project/issues/1618") public void testDispatchAsyncContext_EncodedUrl() throws Exception { String request = "GET /ctx/test/hello%2fthere?dispatch=true HTTP/1.1\r\n" + @@ -244,17 +242,17 @@ public class AsyncContextTest assertThat("servlet gets right path", responseBody, containsString("doGet:getServletPath:/test2")); assertThat("request uri has correct encoding", responseBody, containsString("doGet:getRequestURI:/ctx/test2/something%2felse")); assertThat("request url has correct encoding", responseBody, containsString("doGet:getRequestURL:http://localhost/ctx/test2/something%2felse")); - assertThat("path info has correct encoding", responseBody, containsString("doGet:getPathInfo:/something%2felse")); + assertThat("path info has correct encoding", responseBody, containsString("doGet:getPathInfo:/something/else")); // async values assertThat("async servlet gets right path", responseBody, containsString("doGet:async:getServletPath:/test2")); assertThat("async request uri has correct encoding", responseBody, containsString("doGet:async:getRequestURI:/ctx/test2/something%2felse")); assertThat("async request url has correct encoding", responseBody, containsString("doGet:async:getRequestURL:http://localhost/ctx/test2/something%2felse")); - assertThat("async path info has correct encoding", responseBody, containsString("doGet:async:getPathInfo:/something%2felse")); + assertThat("async path info has correct encoding", responseBody, containsString("doGet:async:getPathInfo:/something/else")); // async run attributes assertThat("async run attr servlet path is original", responseBody, containsString("async:run:attr:servletPath:/test")); - assertThat("async run attr path info has correct encoding", responseBody, containsString("async:run:attr:pathInfo:/hello%2fthere")); + assertThat("async run attr path info has correct encoding", responseBody, containsString("async:run:attr:pathInfo:/hello/there")); assertThat("async run attr query string", responseBody, containsString("async:run:attr:queryString:dispatch=true")); assertThat("async run context path", responseBody, containsString("async:run:attr:contextPath:/ctx")); assertThat("async run request uri has correct encoding", responseBody, containsString("async:run:attr:requestURI:/ctx/test/hello%2fthere")); From 61904052f4058efa73a4be4158ee822b9f0f008b Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 19 Jun 2017 13:38:19 -0700 Subject: [PATCH 061/147] Issue #1618 - new testcase for startAsync(req,resp).dispatch() behavior with regards to URL/URI --- .../jetty/servlet/AsyncContextTest.java | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java index 4830c61120a..884396bcd62 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java @@ -51,6 +51,7 @@ import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.StacklessLogging; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; /** @@ -79,12 +80,13 @@ public class AsyncContextTest _contextHandler.addServlet(new ServletHolder(new TestServlet()), "/path with spaces/servletPath"); _contextHandler.addServlet(new ServletHolder(new TestServlet2()), "/servletPath2"); - ServletHolder testHolder = new ServletHolder(new TestServlet()); testHolder.setInitParameter("dispatchPath", "/test2/something%2felse"); _contextHandler.addServlet(testHolder, "/test/*"); _contextHandler.addServlet(new ServletHolder(new TestServlet2()), "/test2/*"); + _contextHandler.addServlet(new ServletHolder(new SelfDispatchingServlet()), "/self/*"); + _contextHandler.addServlet(new ServletHolder(new TestStartThrowServlet()), "/startthrow/*"); _contextHandler.addServlet(new ServletHolder(new ForwardingServlet()), "/forward"); _contextHandler.addServlet(new ServletHolder(new AsyncDispatchingServlet()), "/dispatchingServlet"); @@ -258,6 +260,24 @@ public class AsyncContextTest assertThat("async run request uri has correct encoding", responseBody, containsString("async:run:attr:requestURI:/ctx/test/hello%2fthere")); } + @Test + @Ignore("See https://github.com/eclipse/jetty.project/issues/1618") + public void testDispatchAsyncContext_SelfEncodedUrl() throws Exception + { + String request = "GET /ctx/self/hello%2fthere?dispatch=true HTTP/1.1\r\n" + + "Host: localhost\r\n" + + "Content-Type: application/x-www-form-urlencoded\r\n" + + "Connection: close\r\n" + + "\r\n"; + HttpTester.Response response = HttpTester.parseResponse(_connector.getResponse(request)); + assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); + + String responseBody = response.getContent(); + + assertThat("servlet request uri initial", responseBody, containsString("doGet:REQUEST.requestURI:/ctx/self/hello%2fthere")); + assertThat("servlet request uri async", responseBody, containsString("doGet:ASYNC.requestURI:/ctx/self/hello%2fthere")); + } + @Test public void testDispatchAsyncContextEncodedPathAndQueryString() throws Exception { @@ -378,6 +398,28 @@ public class AsyncContextTest } } + private class SelfDispatchingServlet extends HttpServlet + { + private static final long serialVersionUID = 1L; + + @Override + protected void doGet(HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException + { + DispatcherType dispatcherType = request.getDispatcherType(); + response.getOutputStream().print("doGet." + dispatcherType.name() + ".requestURI:" + request.getRequestURI() + "\n"); + + if (dispatcherType == DispatcherType.ASYNC) + { + response.getOutputStream().print("Dispatched back to " + SelfDispatchingServlet.class.getSimpleName() + "\n"); + } + else + { + final AsyncContext asyncContext = request.startAsync(request, response); + new Thread(() -> asyncContext.dispatch()).start(); + } + } + } + private class AsyncDispatchingServlet extends HttpServlet { private static final long serialVersionUID = 1L; From b81115dfbc1e0767af01c20fef50277af8b24554 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Tue, 20 Jun 2017 09:08:19 -0400 Subject: [PATCH 062/147] Updating SSL documentation for clarity. --- .../connectors/configuring-ssl.adoc | 58 ++++++++----------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc index e9c7fe131ae..62a1a3bbdf3 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc @@ -363,10 +363,15 @@ An example of this setup: [source, plain, subs="{sub-order}"] ---- $ cd /path/to/mybase +$ java -jar ../start.jar --create-startd +MKDIR : ${jetty.base}/start.d +INFO : Base directory was modified $ java -jar /path/to/jetty-dist/start.jar --add-to-start=ssl -INFO : server initialised (transitively) in ${jetty.base}/start.d/server.ini -INFO : ssl initialised in ${jetty.base}/start.d/ssl.ini -INFO : Base directory was modified +INFO : server transitively enabled, ini template available with --add-to-start=server +INFO : ssl initialized in ${jetty.base}/start.d/ssl.ini +MKDIR : ${jetty.base}/etc +COPY : ${jetty.home}/modules/ssl/keystore to ${jetty.base}/etc/keystore +INFO : Base directory was modified $ tree . ├── etc @@ -394,44 +399,30 @@ jetty.sslContext.keyStorePassword:: [[two-way-authentication]] ==== Two Way Authentication -To enable two-way authentication, you first need to activate the ssl module as shown in the previous section. +To enable two-way authentication both the `ssl` and `https` modules need to be activated. +Once enabled, set the `jetty.sslContext.needClientAuth` property to `true`. -First you need load the `ssl` module and `https` module. [source%nowrap,ini,linenums] .$JETTY_BASE/start.d/ssl.ini ---- # Module: ssl --module=ssl - -jetty.ssl.host=0.0.0.0 -jetty.ssl.port=8583 -jetty.sslContext.keyStorePath=etc/keystore -jetty.sslContext.trustStorePath=etc/keystore -jetty.sslContext.keyStorePassword=OBF: -jetty.sslContext.keyManagerPassword=OBF: -jetty.sslContext.trustStorePassword=OBF: -jetty.sslContext.trustStoreType=JKS -# enable two way authentication +... +## whether client certificate authentication is required jetty.sslContext.needClientAuth=true ----- - -[source%nowrap,ini,linenums] -.$JETTY_BASE/start.d/https.ini ----- -# Module: https ---module=https +... ---- [[layout-of-keystore-and-truststore]] -===== Layout of `keystore` and `truststore` +==== Layout of keystore and truststore -`keystore` only contains the server's private key and certificate. +The server's private key and certificate are contained within the keystore. [[img-certificate-chain]] image::images/certificate-chain.png[title="Certificate chain", alt="Certificate chain"] [literal] -.The structure of KeyStore file +.The structure of a KeyStore file .... ├── PrivateKeyEntry │   ├── PrivateKey @@ -447,11 +438,7 @@ image::images/certificate-chain.png[title="Certificate chain", alt="Certificate [TIP] ==== -└── PrivateKeyEntry + -    └── Certificate chain + -       ├── Intermediary CA certificate + -       └── Root CA certificate + -are optional +`PrivateKeyEntry`, `Certificate chain`, `Intermediary CA certificate` and `Root CA certificate` are all optional values. ==== [source%nowrap,plain,linenums] @@ -709,9 +696,10 @@ KeyIdentifier [ ******************************************* ---- -In addition, you can split `$JETTY/etc/keystore` as two files. -One is `$JETTY/etc/keystore` which only contains the server’s private key and certificate, -the other is `$JETTY/etc/truststore` which contains intermediary CA and root CA. +Additionally, you can split `$JETTY/etc/keystore` into two files. +One being `$JETTY/etc/keystore` which only contains the server’s private key and certificate, while the other would be `$JETTY/etc/truststore` which contains intermediary CA and root CA. + +An example of this would look like the following: [literal] .The structure of `$JETTY/etc/keystore` @@ -759,7 +747,7 @@ setKeyStorePath:: The configured keystore to use for all SSL/TLS in configured Jetty Connector (or Client). ____ [NOTE] -As a keystore is vital security information, it can be desirable to locate the file in a directory with *very* restricted access. +As the keystore is vital security information, it recommended the file is located in a directory with *very* restricted access. ____ setKeyStorePassword:: @@ -784,7 +772,7 @@ ____ ____ [CAUTION] -The keystore and truststore passwords may also be set using the system properties: `org.eclipse.jetty.ssl.keypassword` `org.eclipse.jetty.ssl.password`. +The keystore and truststore passwords may also be set using the system properties: `org.eclipse.jetty.ssl.keypassword` and `org.eclipse.jetty.ssl.password`. This is _not_ a recommended usage. ____ From c9a1395f08a06a523ac6654d1781f8f007a09cf9 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 21 Jun 2017 10:28:26 +0200 Subject: [PATCH 063/147] Issue #1618 Async dispatch encoded passed URI --- .../main/java/org/eclipse/jetty/server/Request.java | 10 +++++++++- .../org/eclipse/jetty/servlet/AsyncContextTest.java | 6 ++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index ed6b8525e7b..d84f7e5713e 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -2258,7 +2258,15 @@ public class Request implements HttpServletRequest _async=new AsyncContextState(state); AsyncContextEvent event = new AsyncContextEvent(_context,_async,state,this,servletRequest,servletResponse); event.setDispatchContext(getServletContext()); - event.setDispatchPath(URIUtil.encodePath(URIUtil.addPaths(getServletPath(),getPathInfo()))); + + String uri = ((HttpServletRequest)servletRequest).getRequestURI(); + if (uri.startsWith(_contextPath)) + uri = uri.substring(_contextPath.length()); + else + // TODO probably need to strip encoded context from requestURI, but will do this for now: + uri = URIUtil.encodePath(URIUtil.addPaths(getServletPath(),getPathInfo())); + + event.setDispatchPath(uri); state.startAsync(event); return _async; } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java index 884396bcd62..ed11db421a9 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncContextTest.java @@ -261,7 +261,6 @@ public class AsyncContextTest } @Test - @Ignore("See https://github.com/eclipse/jetty.project/issues/1618") public void testDispatchAsyncContext_SelfEncodedUrl() throws Exception { String request = "GET /ctx/self/hello%2fthere?dispatch=true HTTP/1.1\r\n" + @@ -274,8 +273,8 @@ public class AsyncContextTest String responseBody = response.getContent(); - assertThat("servlet request uri initial", responseBody, containsString("doGet:REQUEST.requestURI:/ctx/self/hello%2fthere")); - assertThat("servlet request uri async", responseBody, containsString("doGet:ASYNC.requestURI:/ctx/self/hello%2fthere")); + assertThat("servlet request uri initial", responseBody, containsString("doGet.REQUEST.requestURI:/ctx/self/hello%2fthere")); + assertThat("servlet request uri async", responseBody, containsString("doGet.ASYNC.requestURI:/ctx/self/hello%2fthere")); } @Test @@ -353,7 +352,6 @@ public class AsyncContextTest "\r\n"; String responseString = _connector.getResponse(request); - System.err.println(responseString); HttpTester.Response response = HttpTester.parseResponse(responseString); assertThat("Response.status", response.getStatus(), is(HttpServletResponse.SC_OK)); From a105be95e44fae91fcf8b85b5d6d0f78fd143a04 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 21 Jun 2017 11:48:41 +0200 Subject: [PATCH 064/147] Issue #1637 Thread per HTTP/2 Connection This fix simplifies the EWYK scheduler by factoring out the preallocated producer into a ReservedThreadExecutor class. A shared ReservedThreadExecutor can then be used by multiple EWYK instances to avoid over allocation of threads. Squashed commit of the following: commit c435dc20e25bd274d69423be1be7b0565925f249 Merge: 58a5a9a 90e5b56 Author: Greg Wilkins Date: Wed Jun 21 10:48:22 2017 +0200 Merge branch 'jetty-9.4.x' into jetty-9.4.x-ewyk3 commit 58a5a9a655ee1a72a66f54ac8c95d7c9d73afe85 Author: Simone Bordet Date: Wed Jun 14 15:56:43 2017 +0200 Code cleanups. commit 4e5296216b52948523572352cba391438ff6b494 Author: Greg Wilkins Date: Wed Jun 14 07:34:58 2017 +0200 refixed Producing to Reproducing commit a1f8682f86d1f0803121162e3f14d7768286d3ed Author: Greg Wilkins Date: Wed Jun 14 07:26:29 2017 +0200 fixed Producing to Reproducing commit 9468932e062d2271d8dc1d43a78544757732fff5 Author: Greg Wilkins Date: Tue Jun 13 16:33:44 2017 +0200 fixed javadoc commit 9d4941eb97638fec09b3fe34d423538d17943b6f Author: Greg Wilkins Date: Tue Jun 13 16:05:27 2017 +0200 Renamed Preallocated to ReservedThread commit 6d3379ab64c6dcc2a7aa8ec7088afd77863816c2 Author: Greg Wilkins Date: Tue Jun 13 12:28:52 2017 +0200 Added configuration in modules commit 1bd1adea4682538e1546c2ae53f4c9340dafb3bb Merge: 83418a9 6702248 Author: Greg Wilkins Date: Tue Jun 13 10:09:29 2017 +0200 Merge branch 'jetty-9.4.x' into jetty-9.4.x-ewyk3 commit 83418a91320c8bfc54465ca02efdce0d2c874a0e Author: Greg Wilkins Date: Tue Jun 13 10:08:35 2017 +0200 javadoc commit 62918fd39189fed3414fec4a7c8380c21e90a4b8 Author: Greg Wilkins Date: Sat Jun 10 00:04:06 2017 +0200 Improved EatWhatYouKill implementation Simplified by abstracting out PreallocatedExecutor Removed invocation execution HTTP2 now uses a shared PreallocationExcecutor between connection --- .../client/HTTP2ClientConnectionFactory.java | 33 +- .../eclipse/jetty/http2/HTTP2Connection.java | 14 +- .../src/main/config/etc/jetty-http2.xml | 6 +- .../src/main/config/modules/http2.mod | 11 +- .../AbstractHTTP2ServerConnectionFactory.java | 43 ++- .../http2/server/HTTP2ServerConnection.java | 3 +- .../http2/server/HttpChannelOverHTTP2.java | 9 +- .../org/eclipse/jetty/io/ManagedSelector.java | 22 +- .../org/eclipse/jetty/io/SelectorManager.java | 38 +- .../maven/plugin/MavenServerConnector.java | 4 +- .../src/main/config/etc/jetty-http.xml | 4 + .../src/main/config/etc/jetty-ssl.xml | 4 + jetty-server/src/main/config/modules/http.mod | 6 + jetty-server/src/main/config/modules/ssl.mod | 6 + .../org/eclipse/jetty/server/Connector.java | 3 +- .../eclipse/jetty/server/ServerConnector.java | 1 + .../jetty/util/component/Container.java | 26 ++ .../util/component/ContainerLifeCycle.java | 3 + .../eclipse/jetty/util/thread/Invocable.java | 80 ----- .../jetty/util/thread/QueuedThreadPool.java | 20 +- .../util/thread/ReservedThreadExecutor.java | 235 ++++++++++++ .../util/thread/strategy/EatWhatYouKill.java | 339 +++++++----------- .../strategy/ExecuteProduceConsume.java | 15 +- .../strategy/ProduceExecuteConsume.java | 10 +- .../thread/ReservedThreadExecutorTest.java | 204 +++++++++++ .../strategy/ExecutionStrategyTest.java | 4 +- 26 files changed, 804 insertions(+), 339 deletions(-) create mode 100644 jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java create mode 100644 jetty-util/src/test/java/org/eclipse/jetty/util/thread/ReservedThreadExecutorTest.java diff --git a/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java b/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java index 7b0d8ad39a6..3a356bc7445 100644 --- a/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java +++ b/jetty-http2/http2-client/src/main/java/org/eclipse/jetty/http2/client/HTTP2ClientConnectionFactory.java @@ -39,6 +39,7 @@ import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.Promise; import org.eclipse.jetty.util.component.LifeCycle; +import org.eclipse.jetty.util.thread.ReservedThreadExecutor; import org.eclipse.jetty.util.thread.Scheduler; public class HTTP2ClientConnectionFactory implements ClientConnectionFactory @@ -46,6 +47,7 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory public static final String CLIENT_CONTEXT_KEY = "http2.client"; public static final String BYTE_BUFFER_POOL_CONTEXT_KEY = "http2.client.byteBufferPool"; public static final String EXECUTOR_CONTEXT_KEY = "http2.client.executor"; + public static final String PREALLOCATED_EXECUTOR_CONTEXT_KEY = "http2.client.preallocatedExecutor"; public static final String SCHEDULER_CONTEXT_KEY = "http2.client.scheduler"; public static final String SESSION_LISTENER_CONTEXT_KEY = "http2.client.sessionListener"; public static final String SESSION_PROMISE_CONTEXT_KEY = "http2.client.sessionPromise"; @@ -58,6 +60,7 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory HTTP2Client client = (HTTP2Client)context.get(CLIENT_CONTEXT_KEY); ByteBufferPool byteBufferPool = (ByteBufferPool)context.get(BYTE_BUFFER_POOL_CONTEXT_KEY); Executor executor = (Executor)context.get(EXECUTOR_CONTEXT_KEY); + ReservedThreadExecutor preallocatedExecutor = (ReservedThreadExecutor)context.get(PREALLOCATED_EXECUTOR_CONTEXT_KEY); Scheduler scheduler = (Scheduler)context.get(SCHEDULER_CONTEXT_KEY); Session.Listener listener = (Session.Listener)context.get(SESSION_LISTENER_CONTEXT_KEY); @SuppressWarnings("unchecked") @@ -67,7 +70,33 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory FlowControlStrategy flowControl = client.getFlowControlStrategyFactory().newFlowControlStrategy(); HTTP2ClientSession session = new HTTP2ClientSession(scheduler, endPoint, generator, listener, flowControl); Parser parser = new Parser(byteBufferPool, session, 4096, 8192); - HTTP2ClientConnection connection = new HTTP2ClientConnection(client, byteBufferPool, executor, endPoint, + + if (preallocatedExecutor==null) + { + // TODO move this to non lazy construction + preallocatedExecutor=client.getBean(ReservedThreadExecutor.class); + if (preallocatedExecutor==null) + { + synchronized (this) + { + if (preallocatedExecutor==null) + { + try + { + preallocatedExecutor = new ReservedThreadExecutor(executor,1); // TODO configure size + preallocatedExecutor.start(); + client.addBean(preallocatedExecutor,true); + } + catch (Exception e) + { + throw new RuntimeException(e); + } + } + } + } + } + + HTTP2ClientConnection connection = new HTTP2ClientConnection(client, byteBufferPool, preallocatedExecutor, endPoint, parser, session, client.getInputBufferSize(), promise, listener); connection.addListener(connectionListener); return customize(connection, context); @@ -79,7 +108,7 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory private final Promise promise; private final Session.Listener listener; - private HTTP2ClientConnection(HTTP2Client client, ByteBufferPool byteBufferPool, Executor executor, EndPoint endpoint, Parser parser, ISession session, int bufferSize, Promise promise, Session.Listener listener) + private HTTP2ClientConnection(HTTP2Client client, ByteBufferPool byteBufferPool, ReservedThreadExecutor executor, EndPoint endpoint, Parser parser, ISession session, int bufferSize, Promise promise, Session.Listener listener) { super(byteBufferPool, executor, endpoint, parser, session, bufferSize); this.client = client; diff --git a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java index 65a04cbd0e6..39350c2e70b 100644 --- a/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java +++ b/jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java @@ -35,6 +35,7 @@ import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.thread.ExecutionStrategy; +import org.eclipse.jetty.util.thread.ReservedThreadExecutor; import org.eclipse.jetty.util.thread.strategy.EatWhatYouKill; public class HTTP2Connection extends AbstractConnection @@ -50,14 +51,14 @@ public class HTTP2Connection extends AbstractConnection private final int bufferSize; private final ExecutionStrategy strategy; - public HTTP2Connection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, Parser parser, ISession session, int bufferSize) + public HTTP2Connection(ByteBufferPool byteBufferPool, ReservedThreadExecutor executor, EndPoint endPoint, Parser parser, ISession session, int bufferSize) { - super(endPoint, executor); + super(endPoint, executor.getExecutor()); this.byteBufferPool = byteBufferPool; this.parser = parser; this.session = session; this.bufferSize = bufferSize; - this.strategy = new EatWhatYouKill(producer, executor, 0); + this.strategy = new EatWhatYouKill(producer, executor.getExecutor(), executor); LifeCycle.start(strategy); } @@ -147,7 +148,10 @@ public class HTTP2Connection extends AbstractConnection protected void offerTask(Runnable task, boolean dispatch) { offerTask(task); - strategy.dispatch(); + if (dispatch) + strategy.dispatch(); + else + strategy.produce(); } @Override @@ -180,7 +184,7 @@ public class HTTP2Connection extends AbstractConnection private ByteBuffer buffer; @Override - public synchronized Runnable produce() + public Runnable produce() { Runnable task = pollTask(); if (LOG.isDebugEnabled()) diff --git a/jetty-http2/http2-server/src/main/config/etc/jetty-http2.xml b/jetty-http2/http2-server/src/main/config/etc/jetty-http2.xml index 226941d5e71..1d6423589e3 100644 --- a/jetty-http2/http2-server/src/main/config/etc/jetty-http2.xml +++ b/jetty-http2/http2-server/src/main/config/etc/jetty-http2.xml @@ -9,8 +9,10 @@ - - + + + + diff --git a/jetty-http2/http2-server/src/main/config/modules/http2.mod b/jetty-http2/http2-server/src/main/config/modules/http2.mod index e1e700ba372..2ffa068ede6 100644 --- a/jetty-http2/http2-server/src/main/config/modules/http2.mod +++ b/jetty-http2/http2-server/src/main/config/modules/http2.mod @@ -20,7 +20,14 @@ etc/jetty-http2.xml [ini-template] ## Max number of concurrent streams per connection -# jetty.http2.maxConcurrentStreams=1024 +# jetty.http2.maxConcurrentStreams=128 ## Initial stream receive window (client to server) -# jetty.http2.initialStreamRecvWindow=65535 +# jetty.http2.initialStreamRecvWindow=524288 + +## Initial session receive window (client to server) +# jetty.http2.initialSessionRecvWindow=1048576 + +## Reserve threads for high priority tasks (-1 use number of Selectors, 0 no reserved threads) +# jetty.http2.reservedThreads=-1 + diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java index 82ed664041e..b0e6c8d2dbe 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/AbstractHTTP2ServerConnectionFactory.java @@ -35,6 +35,7 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.annotation.Name; import org.eclipse.jetty.util.component.LifeCycle; +import org.eclipse.jetty.util.thread.ReservedThreadExecutor; @ManagedObject public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConnectionFactory @@ -48,6 +49,7 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne private int maxHeaderBlockFragment = 0; private FlowControlStrategy.Factory flowControlStrategyFactory = () -> new BufferingFlowControlStrategy(0.5F); private long streamIdleTimeout; + private int reservedThreads = -1; public AbstractHTTP2ServerConnectionFactory(@Name("config") HttpConfiguration httpConfiguration) { @@ -108,6 +110,7 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne this.maxConcurrentStreams = maxConcurrentStreams; } + @ManagedAttribute("The max header block fragment") public int getMaxHeaderBlockFragment() { return maxHeaderBlockFragment; @@ -139,6 +142,21 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne this.streamIdleTimeout = streamIdleTimeout; } + /** + * @see ReservedThreadExecutor + * @return The number of reserved threads + */ + @ManagedAttribute("The number of threads reserved for high priority tasks") + public int getReservedThreads() + { + return reservedThreads; + } + + public void setReservedThreads(int threads) + { + this.reservedThreads = threads; + } + public HttpConfiguration getHttpConfiguration() { return httpConfiguration; @@ -163,9 +181,32 @@ public abstract class AbstractHTTP2ServerConnectionFactory extends AbstractConne streamIdleTimeout = endPoint.getIdleTimeout(); session.setStreamIdleTimeout(streamIdleTimeout); session.setInitialSessionRecvWindow(getInitialSessionRecvWindow()); + + ReservedThreadExecutor executor = connector.getBean(ReservedThreadExecutor.class); + if (executor==null) + { + synchronized (this) + { + executor = connector.getBean(ReservedThreadExecutor.class); + if (executor==null) + { + try + { + executor = new ReservedThreadExecutor(connector.getExecutor(),getReservedThreads()); + executor.start(); + connector.addBean(executor,true); + } + catch (Exception e) + { + throw new RuntimeException(e); + } + } + } + } + ServerParser parser = newServerParser(connector, session); - HTTP2Connection connection = new HTTP2ServerConnection(connector.getByteBufferPool(), connector.getExecutor(), + HTTP2Connection connection = new HTTP2ServerConnection(connector.getByteBufferPool(), executor, endPoint, httpConfiguration, parser, session, getInputBufferSize(), listener); connection.addListener(connectionListener); return configure(connection, connector, endPoint); diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java index 18e6d47c22a..a1f9ed0d394 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java @@ -56,6 +56,7 @@ import org.eclipse.jetty.util.B64Code; import org.eclipse.jetty.util.BufferUtil; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.TypeUtil; +import org.eclipse.jetty.util.thread.ReservedThreadExecutor; public class HTTP2ServerConnection extends HTTP2Connection implements Connection.UpgradeTo { @@ -91,7 +92,7 @@ public class HTTP2ServerConnection extends HTTP2Connection implements Connection private final HttpConfiguration httpConfig; private boolean recycleHttpChannels; - public HTTP2ServerConnection(ByteBufferPool byteBufferPool, Executor executor, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, ISession session, int inputBufferSize, ServerSessionListener listener) + public HTTP2ServerConnection(ByteBufferPool byteBufferPool, ReservedThreadExecutor executor, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, ISession session, int inputBufferSize, ServerSessionListener listener) { super(byteBufferPool, executor, endPoint, parser, session, inputBufferSize); this.listener = listener; diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java index 81a8cc490ff..6487577ba87 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpChannelOverHTTP2.java @@ -18,6 +18,7 @@ package org.eclipse.jetty.http2.server; +import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; @@ -46,7 +47,7 @@ import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; -public class HttpChannelOverHTTP2 extends HttpChannel +public class HttpChannelOverHTTP2 extends HttpChannel implements Closeable { private static final Logger LOG = Log.getLogger(HttpChannelOverHTTP2.class); private static final HttpField SERVER_VERSION = new PreEncodedHttpField(HttpHeader.SERVER, HttpConfiguration.SERVER_VERSION); @@ -377,6 +378,12 @@ public class HttpChannelOverHTTP2 extends HttpChannel } } + @Override + public void close() + { + abort(new IOException("Unexpected close")); + } + @Override public String toString() { diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java index 8868befb44c..1af25a979f4 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java @@ -38,7 +38,6 @@ import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import org.eclipse.jetty.util.component.AbstractLifeCycle; import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.component.Dumpable; import org.eclipse.jetty.util.log.Log; @@ -47,10 +46,9 @@ import org.eclipse.jetty.util.thread.ExecutionStrategy; import org.eclipse.jetty.util.thread.Invocable; import org.eclipse.jetty.util.thread.Invocable.InvocationType; import org.eclipse.jetty.util.thread.Locker; +import org.eclipse.jetty.util.thread.ReservedThreadExecutor; import org.eclipse.jetty.util.thread.Scheduler; import org.eclipse.jetty.util.thread.strategy.EatWhatYouKill; -import org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume; -import org.eclipse.jetty.util.thread.strategy.ProduceExecuteConsume; /** *

{@link ManagedSelector} wraps a {@link Selector} simplifying non-blocking operations on channels.

@@ -76,8 +74,8 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable _id = id; SelectorProducer producer = new SelectorProducer(); Executor executor = selectorManager.getExecutor(); - _strategy = new EatWhatYouKill(producer,executor); - addBean(_strategy); + _strategy = new EatWhatYouKill(producer,executor,_selectorManager.getBean(ReservedThreadExecutor.class)); + addBean(_strategy,true); setStopTimeout(5000); } @@ -446,24 +444,26 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable @Override public String dump() { + super.dump(); return ContainerLifeCycle.dump(this); } @Override public void dump(Appendable out, String indent) throws IOException { - out.append(String.valueOf(this)).append(" id=").append(String.valueOf(_id)).append(System.lineSeparator()); - Selector selector = _selector; - if (selector != null && selector.isOpen()) + if (selector == null || !selector.isOpen()) + dumpBeans(out, indent); + else { final ArrayList dump = new ArrayList<>(selector.keys().size() * 2); - DumpKeys dumpKeys = new DumpKeys(dump); submit(dumpKeys); dumpKeys.await(5, TimeUnit.SECONDS); - - ContainerLifeCycle.dump(out, indent, dump); + if (dump.isEmpty()) + dumpBeans(out, indent); + else + dumpBeans(out, indent, dump); } } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java index 80f7d732ba3..5b86b80c09c 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java @@ -29,12 +29,15 @@ import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import java.util.concurrent.Executor; +import org.eclipse.jetty.util.annotation.ManagedAttribute; +import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.component.Dumpable; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; -import org.eclipse.jetty.util.thread.ExecutionStrategy; +import org.eclipse.jetty.util.thread.ReservedThreadExecutor; import org.eclipse.jetty.util.thread.Scheduler; +import org.eclipse.jetty.util.thread.strategy.EatWhatYouKill; /** *

{@link SelectorManager} manages a number of {@link ManagedSelector}s that @@ -42,6 +45,8 @@ import org.eclipse.jetty.util.thread.Scheduler; *

{@link SelectorManager} subclasses implement methods to return protocol-specific * {@link EndPoint}s and {@link Connection}s.

*/ + +@ManagedObject("Manager of the NIO Selectors") public abstract class SelectorManager extends ContainerLifeCycle implements Dumpable { public static final int DEFAULT_CONNECT_TIMEOUT = 15000; @@ -52,6 +57,7 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump private final ManagedSelector[] _selectors; private long _connectTimeout = DEFAULT_CONNECT_TIMEOUT; private long _selectorIndex; + private int _reservedThreads = -2; protected SelectorManager(Executor executor, Scheduler scheduler) { @@ -67,11 +73,13 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump _selectors = new ManagedSelector[selectors]; } + @ManagedAttribute("The Executor") public Executor getExecutor() { return executor; } + @ManagedAttribute("The Scheduler") public Scheduler getScheduler() { return scheduler; @@ -82,6 +90,7 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump * * @return the connect timeout (in milliseconds) */ + @ManagedAttribute("The Connection timeout (ms)") public long getConnectTimeout() { return _connectTimeout; @@ -97,6 +106,30 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump _connectTimeout = milliseconds; } + /** + * Get the number of preallocated producing threads + * @see EatWhatYouKill + * @see ReservedThreadExecutor + * @return The number of threads preallocated to producing (default 1). + */ + @ManagedAttribute("The number of preallocated producer threads") + public int getReservedThreads() + { + return _reservedThreads; + } + + /** + * Set the number of preallocated threads for high priority tasks + * @see EatWhatYouKill + * @see ReservedThreadExecutor + * @param threads The number of producing threads to preallocate (default 1). + * The EatWhatYouKill scheduler will be disabled with a value of 0. + */ + public void setReservedThreads(int threads) + { + _reservedThreads = threads; + } + /** * Executes the given task in a different thread. * @@ -110,6 +143,7 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump /** * @return the number of selectors in use */ + @ManagedAttribute("The number of NIO Selectors") public int getSelectorCount() { return _selectors.length; @@ -231,6 +265,7 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump @Override protected void doStart() throws Exception { + addBean(new ReservedThreadExecutor(getExecutor(),_reservedThreads==-2?_selectors.length:_reservedThreads),true); for (int i = 0; i < _selectors.length; i++) { ManagedSelector selector = newSelector(i); @@ -373,4 +408,5 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump * @throws IOException if unable to create new connection */ public abstract Connection newConnection(SelectableChannel channel, EndPoint endpoint, Object attachment) throws IOException; + } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java index b5cc6360b69..075f4d9c66b 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java @@ -31,7 +31,7 @@ import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.util.annotation.ManagedAttribute; -import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.thread.Scheduler; @@ -45,7 +45,7 @@ import org.eclipse.jetty.util.thread.Scheduler; * be referenced in the pom.xml. This class wraps a ServerConnector, delaying setting the * server instance. Only a few of the setters from the ServerConnector class are supported. */ -public class MavenServerConnector extends AbstractLifeCycle implements Connector +public class MavenServerConnector extends ContainerLifeCycle implements Connector { public static String PORT_SYSPROPERTY = "jetty.http.port"; diff --git a/jetty-server/src/main/config/etc/jetty-http.xml b/jetty-server/src/main/config/etc/jetty-http.xml index 70d317bab86..93ce0739193 100644 --- a/jetty-server/src/main/config/etc/jetty-http.xml +++ b/jetty-server/src/main/config/etc/jetty-http.xml @@ -40,6 +40,10 @@ + + + + diff --git a/jetty-server/src/main/config/etc/jetty-ssl.xml b/jetty-server/src/main/config/etc/jetty-ssl.xml index a079c1f6ab2..956809bda28 100644 --- a/jetty-server/src/main/config/etc/jetty-ssl.xml +++ b/jetty-server/src/main/config/etc/jetty-ssl.xml @@ -32,6 +32,10 @@ + + + + diff --git a/jetty-server/src/main/config/modules/http.mod b/jetty-server/src/main/config/modules/http.mod index fa13822fff5..d833a6da297 100644 --- a/jetty-server/src/main/config/modules/http.mod +++ b/jetty-server/src/main/config/modules/http.mod @@ -40,5 +40,11 @@ etc/jetty-http.xml ## Thread priority delta to give to acceptor threads # jetty.http.acceptorPriorityDelta=0 +## Reserve threads for high priority tasks (-2 use number of selectors,-1 use number of CPUs, 0 no reserved threads) +# jetty.http.reservedThreads=-2 + +## Connect Timeout in milliseconds +# jetty.http.connectTimeout=15000 + ## HTTP Compliance: RFC7230, RFC2616, LEGACY # jetty.http.compliance=RFC7230 diff --git a/jetty-server/src/main/config/modules/ssl.mod b/jetty-server/src/main/config/modules/ssl.mod index 3efb90e3b93..cac38448246 100644 --- a/jetty-server/src/main/config/modules/ssl.mod +++ b/jetty-server/src/main/config/modules/ssl.mod @@ -44,6 +44,12 @@ basehome:modules/ssl/keystore|etc/keystore ## Thread priority delta to give to acceptor threads # jetty.ssl.acceptorPriorityDelta=0 +## Preallocated producer threads (0 disables EatWhatYouKill scheduling) +# jetty.ssl.reservedThreads=-1 + +## Connect Timeout in milliseconds +# jetty.ssl.connectTimeout=15000 + ## Whether request host names are checked to match any SNI names # jetty.ssl.sniHostCheck=true diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java index 8b2f3707dbd..2e38fc81ba5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Connector.java @@ -27,6 +27,7 @@ import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; +import org.eclipse.jetty.util.component.Container; import org.eclipse.jetty.util.component.Graceful; import org.eclipse.jetty.util.component.LifeCycle; import org.eclipse.jetty.util.thread.Scheduler; @@ -37,7 +38,7 @@ import org.eclipse.jetty.util.thread.Scheduler; * the machinery needed to handle such tasks.

*/ @ManagedObject("Connector Interface") -public interface Connector extends LifeCycle, Graceful +public interface Connector extends LifeCycle, Container, Graceful { /** * @return the {@link Server} instance associated with this {@link Connector} diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java index db6a05e17f8..4137f226e0c 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java @@ -378,6 +378,7 @@ public class ServerConnector extends AbstractNetworkConnector } } + @ManagedAttribute("The Selector Manager") public SelectorManager getSelectorManager() { return _manager; diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/component/Container.java b/jetty-util/src/main/java/org/eclipse/jetty/util/component/Container.java index 260e4451a2a..6a582351cb1 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/component/Container.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/component/Container.java @@ -20,6 +20,7 @@ package org.eclipse.jetty.util.component; import java.util.Collection; + /** * A Container */ @@ -76,6 +77,31 @@ public interface Container */ public void removeEventListener(Listener listener); + /** + * Unmanages a bean already contained by this aggregate, so that it is not started/stopped/destroyed with this + * aggregate. + * + * @param bean The bean to unmanage (must already have been added). + */ + void unmanage(Object bean); + + /** + * Manages a bean already contained by this aggregate, so that it is started/stopped/destroyed with this + * aggregate. + * + * @param bean The bean to manage (must already have been added). + */ + void manage(Object bean); + + /** + * Adds the given bean, explicitly managing it or not. + * + * @param o The bean object to add + * @param managed whether to managed the lifecycle of the bean + * @return true if the bean was added, false if it was already present + */ + boolean addBean(Object o, boolean managed); + /** * A listener for Container events. * If an added bean implements this interface it will receive the events diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java b/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java index fdc0b9cd60e..533c1949537 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/component/ContainerLifeCycle.java @@ -236,6 +236,7 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container, * @param managed whether to managed the lifecycle of the bean * @return true if the bean was added, false if it was already present */ + @Override public boolean addBean(Object o, boolean managed) { if (o instanceof LifeCycle) @@ -380,6 +381,7 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container, * * @param bean The bean to manage (must already have been added). */ + @Override public void manage(Object bean) { for (Bean b : _beans) @@ -426,6 +428,7 @@ public class ContainerLifeCycle extends AbstractLifeCycle implements Container, * * @param bean The bean to unmanage (must already have been added). */ + @Override public void unmanage(Object bean) { for (Bean b : _beans) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/Invocable.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/Invocable.java index cb926417b28..e060a4b30ad 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/Invocable.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/Invocable.java @@ -186,84 +186,4 @@ public interface Invocable return InvocationType.BLOCKING; } - /** - * An Executor wrapper that knows about Invocable - * - */ - public static class InvocableExecutor implements Executor - { - private static final Logger LOG = Log.getLogger(InvocableExecutor.class); - - private final Executor _executor; - private final InvocationType _preferredInvocationForExecute; - private final InvocationType _preferredInvocationForInvoke; - - public InvocableExecutor(Executor executor,InvocationType preferred) - { - this(executor,preferred,preferred); - } - - public InvocableExecutor(Executor executor,InvocationType preferredInvocationForExecute,InvocationType preferredInvocationForIvoke) - { - _executor=executor; - _preferredInvocationForExecute=preferredInvocationForExecute; - _preferredInvocationForInvoke=preferredInvocationForIvoke; - } - - public Invocable.InvocationType getPreferredInvocationType() - { - return _preferredInvocationForInvoke; - } - - public void invoke(Runnable task) - { - if (LOG.isDebugEnabled()) - LOG.debug("{} invoke {}", this, task); - Invocable.invokePreferred(task,_preferredInvocationForInvoke); - if (LOG.isDebugEnabled()) - LOG.debug("{} invoked {}", this, task); - } - - public void execute(Runnable task) - { - tryExecute(task,_preferredInvocationForExecute); - } - - public void execute(Runnable task, InvocationType preferred) - { - tryExecute(task,preferred); - } - - public boolean tryExecute(Runnable task) - { - return tryExecute(task,_preferredInvocationForExecute); - } - - public boolean tryExecute(Runnable task, InvocationType preferred) - { - try - { - _executor.execute(Invocable.asPreferred(task,preferred)); - return true; - } - catch(RejectedExecutionException e) - { - // If we cannot execute, then close the task - LOG.debug(e); - LOG.warn("Rejected execution of {}",task); - try - { - if (task instanceof Closeable) - ((Closeable)task).close(); - } - catch (Exception x) - { - e.addSuppressed(x); - LOG.warn(e); - } - } - return false; - } - - } } diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java index 4cb6fcfa3c4..efadbcf694f 100755 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java @@ -506,16 +506,22 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo for (final Thread thread : _threads) { final StackTraceElement[] trace = thread.getStackTrace(); - boolean inIdleJobPoll = false; + String knownMethod = ""; for (StackTraceElement t : trace) { if ("idleJobPoll".equals(t.getMethodName())) { - inIdleJobPoll = true; + knownMethod = "IDLE "; + break; + } + + if ("preallocatedWait".equals(t.getMethodName())) + { + knownMethod = "PREALLOCATED "; break; } } - final boolean idle = inIdleJobPoll; + final String known = knownMethod; if (isDetailedDump()) { @@ -524,11 +530,11 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo @Override public void dump(Appendable out, String indent) throws IOException { - out.append(String.valueOf(thread.getId())).append(' ').append(thread.getName()).append(' ').append(thread.getState().toString()).append(idle ? " IDLE" : ""); + out.append(String.valueOf(thread.getId())).append(' ').append(thread.getName()).append(' ').append(known).append(thread.getState().toString()); if (thread.getPriority()!=Thread.NORM_PRIORITY) out.append(" prio=").append(String.valueOf(thread.getPriority())); out.append(System.lineSeparator()); - if (!idle) + if (known.length()==0) ContainerLifeCycle.dump(out, indent, Arrays.asList(trace)); } @@ -542,7 +548,7 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo else { int p=thread.getPriority(); - threads.add(thread.getId() + " " + thread.getName() + " " + thread.getState() + " @ " + (trace.length > 0 ? trace[0] : "???") + (idle ? " IDLE" : "")+ (p==Thread.NORM_PRIORITY?"":(" prio="+p))); + threads.add(thread.getId() + " " + thread.getName() + " " + known + thread.getState() + " @ " + (trace.length > 0 ? trace[0] : "???") + (p==Thread.NORM_PRIORITY?"":(" prio="+p))); } } @@ -557,7 +563,7 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo @Override public String toString() { - return String.format("%s{%s,%d<=%d<=%d,i=%d,q=%d}", _name, getState(), getMinThreads(), getThreads(), getMaxThreads(), getIdleThreads(), (_jobs == null ? -1 : _jobs.size())); + return String.format("org.eclipse.jetty.util.thread.QueuedThreadPool@%s{%s,%d<=%d<=%d,i=%d,q=%d}", _name, getState(), getMinThreads(), getThreads(), getMaxThreads(), getIdleThreads(), (_jobs == null ? -1 : _jobs.size())); } private Runnable idleJobPoll() throws InterruptedException diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java new file mode 100644 index 00000000000..95045b29386 --- /dev/null +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java @@ -0,0 +1,235 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.util.thread; + +import java.util.concurrent.Executor; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.locks.Condition; + +import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; + +/** + * An Executor using preallocated/reserved Threads from a wrapped Executor. + *

Calls to {@link #execute(Runnable)} on a {@link ReservedThreadExecutor} will either succeed + * with a Thread immediately being assigned the Runnable task, or fail if no Thread is + * available. Threads are preallocated up to the capacity from a wrapped {@link Executor}. + */ +public class ReservedThreadExecutor extends AbstractLifeCycle implements Executor +{ + private static final Logger LOG = Log.getLogger(ReservedThreadExecutor.class); + + private final Executor _executor; + private final Locker _locker = new Locker(); + private final ReservedThread[] _queue; + private int _head; + private int _size; + private int _pending; + + public ReservedThreadExecutor(Executor executor) + { + this(executor,1); + } + + /** + * @param executor The executor to use to obtain threads + * @param capacity The number of threads to preallocate. If less than 0 then the number of available processors is used. + */ + public ReservedThreadExecutor(Executor executor,int capacity) + { + _executor = executor; + _queue = new ReservedThread[capacity>=0?capacity:Runtime.getRuntime().availableProcessors()]; + } + + public Executor getExecutor() + { + return _executor; + } + + public int getCapacity() + { + return _queue.length; + } + + public int getPreallocated() + { + try (Locker.Lock lock = _locker.lock()) + { + return _size; + } + } + + @Override + public void doStart() throws Exception + { + try (Locker.Lock lock = _locker.lock()) + { + _head = _size = _pending = 0; + while (_pending<_queue.length) + { + _executor.execute(new ReservedThread()); + _pending++; + } + } + } + + @Override + public void doStop() throws Exception + { + try (Locker.Lock lock = _locker.lock()) + { + while (_size>0) + { + ReservedThread thread = _queue[_head]; + _queue[_head] = null; + _head = (_head+1)%_queue.length; + _size--; + thread._wakeup.signal(); + } + } + } + + @Override + public void execute(Runnable task) throws RejectedExecutionException + { + if (!tryExecute(task)) + throw new RejectedExecutionException(); + } + + /** + * @param task The task to run + * @return True iff a reserved thread was available and has been assigned the task to run. + */ + public boolean tryExecute(Runnable task) + { + if (task==null) + return false; + + try (Locker.Lock lock = _locker.lock()) + { + if (_size==0) + { + if (_pending<_queue.length) + { + _executor.execute(new ReservedThread()); + _pending++; + } + return false; + } + + ReservedThread thread = _queue[_head]; + _queue[_head] = null; + _head = (_head+1)%_queue.length; + _size--; + + if (_size==0 && _pending<_queue.length) + { + _executor.execute(new ReservedThread()); + _pending++; + } + + thread._task = task; + thread._wakeup.signal(); + + return true; + } + catch(RejectedExecutionException e) + { + LOG.ignore(e); + return false; + } + } + + private class ReservedThread implements Runnable + { + private Condition _wakeup = null; + private Runnable _task = null; + + private void reservedWait() throws InterruptedException + { + _wakeup.await(); + } + + @Override + public void run() + { + while (true) + { + Runnable task = null; + + try (Locker.Lock lock = _locker.lock()) + { + // if this is our first loop, decrement pending count + if (_wakeup==null) + { + _pending--; + _wakeup = _locker.newCondition(); + } + + // Exit if no longer running or there now too many preallocated threads + if (!isRunning() || _size>=_queue.length) + break; + + // Insert ourselves in the queue + _queue[(_head+_size++)%_queue.length] = this; + + // Wait for a task, ignoring spurious interrupts + do + { + try + { + reservedWait(); + task = _task; + _task = null; + } + catch (InterruptedException e) + { + LOG.ignore(e); + } + } + while (isRunning() && task==null); + } + + // Run any task + if (task!=null) + { + try + { + task.run(); + } + catch (Exception e) + { + LOG.warn(e); + break; + } + } + } + } + } + + @Override + public String toString() + { + try (Locker.Lock lock = _locker.lock()) + { + return String.format("%s{s=%d,p=%d}",super.toString(),_size,_pending); + } + } +} diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/EatWhatYouKill.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/EatWhatYouKill.java index 84898e4fecb..6e8854d3aba 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/EatWhatYouKill.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/EatWhatYouKill.java @@ -18,18 +18,19 @@ package org.eclipse.jetty.util.thread.strategy; +import java.io.Closeable; import java.util.concurrent.Executor; -import java.util.concurrent.locks.Condition; +import java.util.concurrent.RejectedExecutionException; -import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.thread.ExecutionStrategy; import org.eclipse.jetty.util.thread.Invocable; -import org.eclipse.jetty.util.thread.Invocable.InvocableExecutor; import org.eclipse.jetty.util.thread.Invocable.InvocationType; import org.eclipse.jetty.util.thread.Locker; import org.eclipse.jetty.util.thread.Locker.Lock; +import org.eclipse.jetty.util.thread.ReservedThreadExecutor; /** *

A strategy where the thread that produces will run the resulting task if it @@ -57,100 +58,61 @@ import org.eclipse.jetty.util.thread.Locker.Lock; *

* */ -public class EatWhatYouKill extends AbstractLifeCycle implements ExecutionStrategy, Runnable +public class EatWhatYouKill extends ContainerLifeCycle implements ExecutionStrategy, Runnable { private static final Logger LOG = Log.getLogger(EatWhatYouKill.class); - enum State { IDLE, PRODUCING, REPRODUCING }; + private enum State { IDLE, PRODUCING, REPRODUCING } private final Locker _locker = new Locker(); private State _state = State.IDLE; private final Runnable _runProduce = new RunProduce(); private final Producer _producer; - private final InvocableExecutor _executor; - private int _pendingProducersMax; - private int _pendingProducers; - private int _pendingProducersDispatched; - private int _pendingProducersSignalled; - private Condition _produce = _locker.newCondition(); + private final Executor _executor; + private final ReservedThreadExecutor _producers; public EatWhatYouKill(Producer producer, Executor executor) { - this(producer,executor,InvocationType.NON_BLOCKING,InvocationType.BLOCKING); + this(producer,executor,new ReservedThreadExecutor(executor,1)); } - public EatWhatYouKill(Producer producer, Executor executor, int maxProducersPending ) + public EatWhatYouKill(Producer producer, Executor executor, int maxProducersPending) { - this(producer,executor,InvocationType.NON_BLOCKING,InvocationType.BLOCKING); + this(producer,executor,new ReservedThreadExecutor(executor,maxProducersPending)); } - - public EatWhatYouKill(Producer producer, Executor executor, InvocationType preferredInvocationPEC, InvocationType preferredInvocationEPC) - { - this(producer,executor,preferredInvocationPEC,preferredInvocationEPC,Integer.getInteger("org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.maxProducersPending",1)); - } - - public EatWhatYouKill(Producer producer, Executor executor, InvocationType preferredInvocationPEC, InvocationType preferredInvocationEPC, int maxProducersPending ) + + public EatWhatYouKill(Producer producer, Executor executor, ReservedThreadExecutor producers) { _producer = producer; - _pendingProducersMax = maxProducersPending; - _executor = new InvocableExecutor(executor,preferredInvocationPEC,preferredInvocationEPC); - } - - @Override - public void produce() - { - boolean produce; - try (Lock locked = _locker.lock()) - { - switch(_state) - { - case IDLE: - _state = State.PRODUCING; - produce = true; - break; - - case PRODUCING: - _state = State.REPRODUCING; - produce = false; - break; - - default: - produce = false; - } - } - - if (LOG.isDebugEnabled()) - LOG.debug("{} execute {}", this, produce); - - if (produce) - doProduce(); + _executor = executor; + _producers = producers; + addBean(_producer); } @Override public void dispatch() { - boolean dispatch = false; + boolean execute = false; try (Lock locked = _locker.lock()) { switch(_state) { case IDLE: - dispatch = true; + execute = true; break; case PRODUCING: _state = State.REPRODUCING; - dispatch = false; break; - default: - dispatch = false; + default: + break; } } if (LOG.isDebugEnabled()) - LOG.debug("{} dispatch {}", this, dispatch); - if (dispatch) - _executor.execute(_runProduce,InvocationType.BLOCKING); + LOG.debug("{} dispatch {}", this, execute); + if (execute) + _executor.execute(_runProduce); } @Override @@ -158,160 +120,139 @@ public class EatWhatYouKill extends AbstractLifeCycle implements ExecutionStrate { if (LOG.isDebugEnabled()) LOG.debug("{} run", this); - if (!isRunning()) - return; + produce(); + } + + @Override + public void produce() + { + boolean reproduce = true; + while(isRunning() && tryProduce(reproduce) && doProduce()) + reproduce = false; + } + + public boolean tryProduce(boolean reproduce) + { boolean producing = false; try (Lock locked = _locker.lock()) { - _pendingProducersDispatched--; - _pendingProducers++; - - loop: while (isRunning()) + switch (_state) { - try - { - _produce.await(); - - if (_pendingProducersSignalled==0) - { - // spurious wakeup! - continue loop; - } - - _pendingProducersSignalled--; - if (_state == State.IDLE) - { - _state = State.PRODUCING; - producing = true; - } - } - catch (InterruptedException e) - { - LOG.debug(e); - _pendingProducers--; - } - - break loop; - } + case IDLE: + // Enter PRODUCING + _state = State.PRODUCING; + producing = true; + break; + + case PRODUCING: + // Keep other Thread producing + if (reproduce) + _state = State.REPRODUCING; + break; + + default: + break; + } } - - if (producing) - doProduce(); + return producing; } - private void doProduce() + public boolean doProduce() { - boolean may_block_caller = !Invocable.isNonBlockingInvocation(); - if (LOG.isDebugEnabled()) - LOG.debug("{} produce {}", this,may_block_caller?"non-blocking":"blocking"); - - producing: while (isRunning()) + boolean producing = true; + while (isRunning() && producing) { // If we got here, then we are the thread that is producing. - Runnable task = _producer.produce(); - - boolean produce; - boolean consume; - boolean execute_producer; - - StringBuilder state = null; - - try (Lock locked = _locker.lock()) + Runnable task = null; + try { - if (LOG.isDebugEnabled()) + task = _producer.produce(); + } + catch(Throwable e) + { + LOG.warn(e); + } + + if (LOG.isDebugEnabled()) + LOG.debug("{} t={}/{}",this,task,Invocable.getInvocationType(task)); + + if (task==null) + { + try (Lock locked = _locker.lock()) { - state = new StringBuilder(); - getString(state); - getState(state); - state.append("->"); - } - - // Did we produced a task? - if (task == null) - { - // There is no task. // Could another one just have been queued with a produce call? if (_state==State.REPRODUCING) - { _state = State.PRODUCING; - continue producing; + else + { + if (LOG.isDebugEnabled()) + LOG.debug("{} IDLE",toStringLocked()); + _state = State.IDLE; + producing = false; } - - // ... and no additional calls to execute, so we are idle - _state = State.IDLE; - break producing; } - - // Will we eat our own kill - ie consume the task we just produced? - if (Invocable.getInvocationType(task)==InvocationType.NON_BLOCKING) - { - // ProduceConsume - produce = true; - consume = true; - execute_producer = false; - } - else if (may_block_caller && (_pendingProducers>0 || _pendingProducersMax==0)) - { - // ExecuteProduceConsume (eat what we kill!) - produce = false; - consume = true; - execute_producer = true; - _pendingProducersDispatched++; - _state = State.IDLE; - _pendingProducers--; - _pendingProducersSignalled++; - _produce.signal(); - } - else - { - // ProduceExecuteConsume - produce = true; - consume = false; - execute_producer = (_pendingProducersDispatched + _pendingProducers)<_pendingProducersMax; - if (execute_producer) - _pendingProducersDispatched++; - } - + } + else if (Invocable.getInvocationType(task)==InvocationType.NON_BLOCKING) + { + // PRODUCE CONSUME (EWYK!) if (LOG.isDebugEnabled()) - getState(state); - + LOG.debug("{} PC t={}",this,task); + task.run(); } - - if (LOG.isDebugEnabled()) - { - LOG.debug("{} {} {}", - state, - consume?(execute_producer?"EPC!":"PC"):"PEC", - task); - } - - if (execute_producer) - // Spawn a new thread to continue production by running the produce loop. - _executor.execute(this); - - // Run or execute the task. - if (consume) - _executor.invoke(task); else - _executor.execute(task); - - // Once we have run the task, we can try producing again. - if (produce) - continue producing; - - try (Lock locked = _locker.lock()) { - if (_state==State.IDLE) + boolean consume; + try (Lock locked = _locker.lock()) { - _state = State.PRODUCING; - continue producing; + if (_producers.tryExecute(this)) + { + // EXECUTE PRODUCE CONSUME! + // We have executed a new Producer, so we can EWYK consume + _state = State.IDLE; + producing = false; + consume = true; + } + else + { + // PRODUCE EXECUTE CONSUME! + consume = false; + } + } + + if (LOG.isDebugEnabled()) + LOG.debug("{} {} t={}",this,consume?"EPC":"PEC",task); + + // Consume or execute task + try + { + if (consume) + task.run(); + else + _executor.execute(task); + } + catch(RejectedExecutionException e) + { + LOG.warn(e); + if (task instanceof Closeable) + { + try + { + ((Closeable)task).close(); + } + catch(Throwable e2) + { + LOG.ignore(e2); + } + } + } + catch(Throwable e) + { + LOG.warn(e); } } - - break producing; } - if (LOG.isDebugEnabled()) - LOG.debug("{} produce exit",this); + + return producing; } public Boolean isIdle() @@ -322,25 +263,19 @@ public class EatWhatYouKill extends AbstractLifeCycle implements ExecutionStrate } } - @Override - protected void doStop() throws Exception + public String toString() { try (Lock locked = _locker.lock()) { - _pendingProducersSignalled=_pendingProducers+_pendingProducersDispatched; - _pendingProducers=0; - _produce.signalAll(); + return toStringLocked(); } } - public String toString() + public String toStringLocked() { StringBuilder builder = new StringBuilder(); getString(builder); - try (Lock locked = _locker.lock()) - { - getState(builder); - } + getState(builder); return builder.toString(); } @@ -358,9 +293,7 @@ public class EatWhatYouKill extends AbstractLifeCycle implements ExecutionStrate { builder.append(_state); builder.append('/'); - builder.append(_pendingProducers); - builder.append('/'); - builder.append(_pendingProducersMax); + builder.append(_producers); } private class RunProduce implements Runnable diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceConsume.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceConsume.java index 1a8d3666df6..8d21b7f37c6 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceConsume.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceConsume.java @@ -24,7 +24,6 @@ import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.thread.ExecutionStrategy; import org.eclipse.jetty.util.thread.Invocable; -import org.eclipse.jetty.util.thread.Invocable.InvocableExecutor; import org.eclipse.jetty.util.thread.Invocable.InvocationType; import org.eclipse.jetty.util.thread.Locker; import org.eclipse.jetty.util.thread.Locker.Lock; @@ -49,7 +48,7 @@ public class ExecuteProduceConsume implements ExecutionStrategy, Runnable private final Locker _locker = new Locker(); private final Runnable _runProduce = new RunProduce(); private final Producer _producer; - private final InvocableExecutor _executor; + private final Executor _executor; private boolean _idle = true; private boolean _execute; private boolean _producing; @@ -57,14 +56,9 @@ public class ExecuteProduceConsume implements ExecutionStrategy, Runnable public ExecuteProduceConsume(Producer producer, Executor executor) - { - this(producer,executor,InvocationType.BLOCKING); - } - - public ExecuteProduceConsume(Producer producer, Executor executor, InvocationType preferred ) { this._producer = producer; - _executor = new InvocableExecutor(executor,preferred); + _executor = executor; } @Override @@ -192,15 +186,14 @@ public class ExecuteProduceConsume implements ExecutionStrategy, Runnable // Spawn a new thread to continue production by running the produce loop. if (LOG.isDebugEnabled()) LOG.debug("{} dispatch", this); - if (!_executor.tryExecute(this)) - task = null; + _executor.execute(this); } // Run the task. if (LOG.isDebugEnabled()) LOG.debug("{} run {}", this, task); if (task != null) - _executor.invoke(task); + task.run(); if (LOG.isDebugEnabled()) LOG.debug("{} ran {}", this, task); diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.java index 4e14596bc45..6e5e1783d35 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.java @@ -24,7 +24,6 @@ import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.thread.ExecutionStrategy; import org.eclipse.jetty.util.thread.Invocable.InvocationType; -import org.eclipse.jetty.util.thread.Invocable.InvocableExecutor; import org.eclipse.jetty.util.thread.Locker; import org.eclipse.jetty.util.thread.Locker.Lock; @@ -38,18 +37,13 @@ public class ProduceExecuteConsume implements ExecutionStrategy private final Locker _locker = new Locker(); private final Producer _producer; - private final InvocableExecutor _executor; + private final Executor _executor; private State _state = State.IDLE; public ProduceExecuteConsume(Producer producer, Executor executor) - { - this(producer,executor,InvocationType.NON_BLOCKING); - } - - public ProduceExecuteConsume(Producer producer, Executor executor, InvocationType preferred) { _producer = producer; - _executor = new InvocableExecutor(executor,preferred); + _executor = executor; } @Override diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/ReservedThreadExecutorTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/ReservedThreadExecutorTest.java new file mode 100644 index 00000000000..f6209683a59 --- /dev/null +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/ReservedThreadExecutorTest.java @@ -0,0 +1,204 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.util.thread; + +import java.util.ArrayDeque; +import java.util.Deque; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executor; +import java.util.concurrent.TimeUnit; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +public class ReservedThreadExecutorTest +{ + final static int SIZE = 2; + TestExecutor _executor; + ReservedThreadExecutor _pae; + + @Before + public void before() throws Exception + { + _executor = new TestExecutor(); + _pae = new ReservedThreadExecutor(_executor,SIZE); + _pae.start(); + } + + + @After + public void after() throws Exception + { + _pae.stop(); + } + + @Test + public void testStarted() throws Exception + { + assertThat(_executor._queue.size(),is(SIZE)); + while(!_executor._queue.isEmpty()) + _executor.execute(); + + assertThat(_pae.getCapacity(),is(SIZE)); + + long started = System.nanoTime(); + while (_pae.getPreallocated()10) + break; + Thread.sleep(100); + } + assertThat(_pae.getPreallocated(),is(SIZE)); + } + + @Test + public void testPending() throws Exception + { + assertThat(_executor._queue.size(),is(SIZE)); + assertThat(_pae.tryExecute(new NOOP()),is(false)); + assertThat(_executor._queue.size(),is(SIZE)); + + _executor.execute(); + assertThat(_executor._queue.size(),is(SIZE-1)); + while (!_executor._queue.isEmpty()) + _executor.execute(); + + long started = System.nanoTime(); + while (_pae.getPreallocated()10) + break; + Thread.sleep(100); + } + assertThat(_executor._queue.size(),is(0)); + assertThat(_pae.getPreallocated(),is(SIZE)); + + for (int i=SIZE;i-->0;) + assertThat(_pae.tryExecute(new Task()),is(true)); + assertThat(_executor._queue.size(),is(1)); + assertThat(_pae.getPreallocated(),is(0)); + + for (int i=SIZE;i-->0;) + assertThat(_pae.tryExecute(new NOOP()),is(false)); + assertThat(_executor._queue.size(),is(SIZE)); + assertThat(_pae.getPreallocated(),is(0)); + + assertThat(_pae.tryExecute(new NOOP()),is(false)); + assertThat(_executor._queue.size(),is(SIZE)); + assertThat(_pae.getPreallocated(),is(0)); + } + + @Test + public void testExecuted() throws Exception + { + while(!_executor._queue.isEmpty()) + _executor.execute(); + long started = System.nanoTime(); + while (_pae.getPreallocated()10) + break; + Thread.sleep(100); + } + assertThat(_pae.getPreallocated(),is(SIZE)); + + Task[] task = new Task[SIZE]; + for (int i=SIZE;i-->0;) + { + task[i] = new Task(); + assertThat(_pae.tryExecute(task[i]),is(true)); + } + + for (int i=SIZE;i-->0;) + { + task[i]._ran.await(10,TimeUnit.SECONDS); + } + + assertThat(_executor._queue.size(),is(1)); + Task extra = new Task(); + assertThat(_pae.tryExecute(extra),is(false)); + assertThat(_executor._queue.size(),is(2)); + Thread.sleep(100); + assertThat(extra._ran.getCount(),is(1L)); + + for (int i=SIZE;i-->0;) + { + task[i]._complete.countDown(); + } + + started = System.nanoTime(); + while (_pae.getPreallocated()10) + break; + Thread.sleep(100); + } + assertThat(_pae.getPreallocated(),is(SIZE)); + + + } + + + private static class TestExecutor implements Executor + { + Deque _queue = new ArrayDeque<>(); + + @Override + public void execute(Runnable task) + { + _queue.addLast(task); + } + + public void execute() + { + Runnable task = _queue.pollFirst(); + if (task!=null) + new Thread(task).start(); + } + } + + private static class NOOP implements Runnable + { + @Override + public void run() {} + } + + private static class Task implements Runnable + { + private CountDownLatch _ran = new CountDownLatch(1); + private CountDownLatch _complete = new CountDownLatch(1); + @Override + public void run() + { + _ran.countDown(); + try + { + _complete.await(); + } + catch (InterruptedException e) + { + e.printStackTrace(); + } + } + } +} diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecutionStrategyTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecutionStrategyTest.java index 23981455096..f5156598cd4 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecutionStrategyTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecutionStrategyTest.java @@ -158,7 +158,8 @@ public class ExecutionStrategyTest @Override public Runnable produce() { - if (tasks-->0) + final int id = --tasks; + if (id>=0) { try { @@ -171,6 +172,7 @@ public class ExecutionStrategyTest @Override public void run() { + // System.err.println("RUN "+id); latch.countDown(); } }; From e32136f74c469cfefa1fdce4bdc077bcac719ea8 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 21 Jun 2017 16:27:44 +0200 Subject: [PATCH 065/147] Issue #1639 --- .../test-webapps/test-servlet-spec/test-spec-webapp/pom.xml | 5 ----- 1 file changed, 5 deletions(-) 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 212abd36d48..2a9186175c3 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 @@ -212,11 +212,6 @@ ${project.version} provided - - org.eclipse.jetty.orbit - javax.mail.glassfish - provided - javax.servlet javax.servlet-api From a7e4f920546f5cab83c4fcd874600bd614a866bf Mon Sep 17 00:00:00 2001 From: S K Date: Wed, 21 Jun 2017 23:18:30 -0700 Subject: [PATCH 066/147] Issue #1622 - HeaderFilter does not work if response has been committed (#1628) Signed-off-by: S K (xz64) --- .../administration/extras/header-filter.adoc | 17 ++-- .../eclipse/jetty/servlets/HeaderFilter.java | 58 ++++++------ .../servlets/IncludeExcludeBasedFilter.java | 33 ++++++- .../IncludeExcludeBasedFilterTest.java | 92 +++++++++---------- 4 files changed, 107 insertions(+), 93 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc b/jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc index e7e97d9079e..58a08ac74ae 100644 --- a/jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/extras/header-filter.adoc @@ -28,7 +28,8 @@ [[header-filter-usage]] ==== Usage -The header filter sets or adds headers to each response based on an optionally included/excluded list of path specs, mime types, and/or HTTP methods. +The header filter sets or adds headers to each response based on an optionally included/excluded list of path specs, mime types, and/or HTTP methods. +This filter processes its configured headers before calling `doFilter` in the filter chain. Some of the headers configured in this filter may get overwritten by other filters and/or the servlet processing the request. ===== Required JARs @@ -76,25 +77,25 @@ ____ The following `init` parameters control the behavior of the filter: includedPaths:: -Optional. CSV of included path specs. +Optional. Comma separated values of included path specs. excludedPaths:: -Optional. CSV of excluded path specs. +Optional. Comma separated values of excluded path specs. includedMimeTypes:: -Optional. CSV of included mime types. +Optional. Comma separated values of included mime types. The mime type will be guessed from the extension at the end of the request URL if the content type has not been set on the response. excludedMimeTypes:: -Optional. CSV of excluded mime types. +Optional. Comma separated values of excluded mime types. The mime type will be guessed from the extension at the end of the request URL if the content type has not been set on the response. includedHttpMethods:: -Optional. CSV of included http methods. +Optional. Comma separated values of included http methods. excludedHttpMethods:: -Optional. CSV of excluded http methods. +Optional. Comma separated values of excluded http methods. headerConfig:: -CSV of actions to perform on headers. The syntax for each action is `action headerName: headerValue`. +Comma separated values of actions to perform on headers. The syntax for each action is `action headerName: headerValue`. Supported header actions: diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java index c23b6b5b88c..0c2dc0dba24 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/HeaderFilter.java @@ -80,42 +80,40 @@ public class HeaderFilter extends IncludeExcludeBasedFilter @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { - chain.doFilter(request,response); - HttpServletRequest http_request = (HttpServletRequest)request; HttpServletResponse http_response = (HttpServletResponse)response; - if (!super.shouldFilter(http_request,http_response)) + if (super.shouldFilter(http_request,http_response)) { - return; + for (ConfiguredHeader header : _configuredHeaders) + { + if (header.isDate()) + { + long header_value = System.currentTimeMillis() + header.getMsOffset(); + if (header.isAdd()) + { + http_response.addDateHeader(header.getName(),header_value); + } + else + { + http_response.setDateHeader(header.getName(),header_value); + } + } + else // constant header value + { + if (header.isAdd()) + { + http_response.addHeader(header.getName(),header.getValue()); + } + else + { + http_response.setHeader(header.getName(),header.getValue()); + } + } + } } - for (ConfiguredHeader header : _configuredHeaders) - { - if (header.isDate()) - { - long header_value = System.currentTimeMillis() + header.getMsOffset(); - if (header.isAdd()) - { - http_response.addDateHeader(header.getName(),header_value); - } - else - { - http_response.setDateHeader(header.getName(),header_value); - } - } - else // constant header value - { - if (header.isAdd()) - { - http_response.addHeader(header.getName(),header.getValue()); - } - else - { - http_response.setHeader(header.getName(),header.getValue()); - } - } - } + chain.doFilter(request,response); } @Override diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java index b1ba2cf4342..35f40be4823 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilter.java @@ -110,6 +110,33 @@ public abstract class IncludeExcludeBasedFilter implements Filter } } + protected String guessMimeType(HttpServletRequest http_request, HttpServletResponse http_response) + { + String content_type = http_response.getContentType(); + LOG.debug("Content Type is: {}",content_type); + + String mime_type = ""; + if (content_type != null) + { + mime_type = MimeTypes.getContentTypeWithoutCharset(content_type); + LOG.debug("Mime Type is: {}",mime_type); + } + else + { + String request_url = http_request.getPathInfo(); + mime_type = MimeTypes.getDefaultMimeByExtension(request_url); + + if (mime_type == null) + { + mime_type = ""; + } + + LOG.debug("Guessed mime type is {}",mime_type); + } + + return mime_type; + } + protected boolean shouldFilter(HttpServletRequest http_request, HttpServletResponse http_response) { String http_method = http_request.getMethod(); @@ -120,12 +147,8 @@ public abstract class IncludeExcludeBasedFilter implements Filter return false; } - String content_type = http_response.getContentType(); - LOG.debug("Content Type is: {}",content_type); - content_type = (content_type == null)?"":content_type; - String mime_type = MimeTypes.getContentTypeWithoutCharset(content_type); + String mime_type = guessMimeType(http_request,http_response); - LOG.debug("Mime Type is: {}",content_type); if (!_mimeTypes.test(mime_type)) { LOG.debug("should not apply filter because mime type does not match"); diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java index f9971247ad2..29285f70f82 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludeExcludeBasedFilterTest.java @@ -224,7 +224,24 @@ public class IncludeExcludeBasedFilterTest request.setMethod("GET"); request.setVersion("HTTP/1.1"); request.setHeader("Host","localhost"); - request.setURI("/context/test/json"); + request.setURI("/context/test/json.json"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertTrue(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMimeTypeMatchWithQueryString() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedMimeTypes","application/json"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/json.json?some=value"); HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); Assert.assertTrue(response.contains("X-Custom-Value","1")); @@ -241,7 +258,24 @@ public class IncludeExcludeBasedFilterTest request.setMethod("GET"); request.setVersion("HTTP/1.1"); request.setHeader("Host","localhost"); - request.setURI("/context/test/json"); + request.setURI("/context/test/json.json"); + + HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); + Assert.assertFalse(response.contains("X-Custom-Value","1")); + } + + @Test + public void testIncludeExcludeFilterIncludeMimeTypeNoMatchNoExtension() throws Exception + { + FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); + holder.setInitParameter("includedMimeTypes","application/json"); + _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); + + HttpTester.Request request = HttpTester.newRequest(); + request.setMethod("GET"); + request.setVersion("HTTP/1.1"); + request.setHeader("Host","localhost"); + request.setURI("/context/test/abcdef"); HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); Assert.assertFalse(response.contains("X-Custom-Value","1")); @@ -258,7 +292,7 @@ public class IncludeExcludeBasedFilterTest request.setMethod("GET"); request.setVersion("HTTP/1.1"); request.setHeader("Host","localhost"); - request.setURI("/context/test/json"); + request.setURI("/context/test/json.json"); HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); Assert.assertFalse(response.contains("X-Custom-Value","1")); @@ -275,61 +309,26 @@ public class IncludeExcludeBasedFilterTest request.setMethod("GET"); request.setVersion("HTTP/1.1"); request.setHeader("Host","localhost"); - request.setURI("/context/test/json"); + request.setURI("/context/test/json.json"); HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); Assert.assertTrue(response.contains("X-Custom-Value","1")); } - @Test - public void testIncludeExcludeFilterIncludeMimeTypeSemicolonMatch() throws Exception - { - FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); - holder.setInitParameter("includedMimeTypes","application/json"); - _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); - - HttpTester.Request request = HttpTester.newRequest(); - request.setMethod("GET"); - request.setVersion("HTTP/1.1"); - request.setHeader("Host","localhost"); - request.setURI("/context/test/json-utf8"); - - HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); - Assert.assertTrue(response.contains("X-Custom-Value","1")); - } - - @Test - public void testIncludeExcludeFilterIncludeMimeTypeSemicolonNoMatch() throws Exception - { - FilterHolder holder = new FilterHolder(MockIncludeExcludeFilter.class); - holder.setInitParameter("includedMimeTypes","application/xml"); - _tester.getContext().getServletHandler().addFilterWithMapping(holder,"/*",EnumSet.of(DispatcherType.REQUEST)); - - HttpTester.Request request = HttpTester.newRequest(); - request.setMethod("GET"); - request.setVersion("HTTP/1.1"); - request.setHeader("Host","localhost"); - request.setURI("/context/test/json-utf8"); - - HttpTester.Response response = HttpTester.parseResponse(_tester.getResponses(request.generate())); - Assert.assertFalse(response.contains("X-Custom-Value","1")); - } - public static class MockIncludeExcludeFilter extends IncludeExcludeBasedFilter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { - chain.doFilter(request,response); HttpServletRequest http_request = (HttpServletRequest)request; HttpServletResponse http_response = (HttpServletResponse)response; - if (!super.shouldFilter(http_request,http_response)) + if (super.shouldFilter(http_request,http_response)) { - return; + http_response.setHeader("X-Custom-Value","1"); } - http_response.setHeader("X-Custom-Value","1"); + chain.doFilter(request,response); } } @@ -338,15 +337,8 @@ public class IncludeExcludeBasedFilterTest @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - if (req.getPathInfo().equals("/json")) - { - resp.setContentType("application/json"); - } - else if (req.getPathInfo().equals("/json-utf8")) - { - resp.setContentType("application/json; charset=utf-8"); - } resp.setStatus(HttpStatus.NO_CONTENT_204); + resp.flushBuffer(); } } From b0e5681451c6c4638883fc70b4a4972b88619ac1 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Thu, 22 Jun 2017 16:24:13 +1000 Subject: [PATCH 067/147] add it for run mojo #1638 Signed-off-by: olivier lamy --- jetty-maven-plugin/pom.xml | 50 ++++++++++- .../it/jetty-run-mojo-it/invoker.properties | 1 + .../jetty-simple-base/pom.xml | 50 +++++++++++ .../its/jetty_run_mojo_it/HelloServlet.java | 44 +++++++++ .../jetty-simple-webapp/pom.xml | 84 +++++++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 7 ++ .../jetty_run_mojo_it/TestHelloServlet.java | 66 ++++++++++++++ .../src/it/jetty-run-mojo-it/pom.xml | 89 +++++++++++++++++++ jetty-maven-plugin/src/it/settings.xml | 36 ++++++++ .../jetty/maven/plugin/AbstractJettyMojo.java | 54 ++++++++--- .../jetty/maven/plugin/JettyDeployWar.java | 4 +- .../jetty/maven/plugin/JettyRunMojo.java | 10 +-- .../jetty/maven/plugin/JettyStartMojo.java | 2 +- .../maven/plugin/MavenServerConnector.java | 5 ++ 14 files changed, 483 insertions(+), 19 deletions(-) create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/invoker.properties create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml create mode 100644 jetty-maven-plugin/src/it/settings.xml diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index 335e94a2bc7..4fb6579684b 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -10,7 +10,9 @@ Jetty :: Jetty Maven Plugin 3.0.3 - 3.1 + 3.4 + ${project.groupId}.maven.plugin + false @@ -153,6 +155,12 @@ javax.transaction-api compile + + org.eclipse.jetty + jetty-client + ${project.version} + test + @@ -178,4 +186,44 @@ + + + run-its + + + + org.apache.maven.plugins + maven-invoker-plugin + 3.0.0 + + + integration-test + + install + integration-test + verify + + + + + ${it.debug} + true + src/it + ${project.build.directory}/it + + */pom.xml + + setup + verify + ${project.build.directory}/local-repo + src/it/settings.xml + + clean + + + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-mojo-it/invoker.properties new file mode 100644 index 00000000000..e0222d4d54e --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/invoker.properties @@ -0,0 +1 @@ +invoker.goals = test \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml new file mode 100644 index 00000000000..c29b270cb61 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-base + jar + + Jetty :: Simple :: Base + + + + + javax.servlet + javax.servlet-api + jar + provided + + + + org.slf4j + slf4j-api + + + + commons-io + commons-io + + + + org.eclipse.jetty.toolchain + jetty-perf-helper + 1.0.5 + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.1 + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java new file mode 100644 index 00000000000..bb6915814df --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -0,0 +1,44 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * + */ +@WebServlet("/hello") +public class HelloServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml new file mode 100644 index 00000000000..a11175216c8 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-webapp + war + + Jetty :: Simple :: Webapp + + + + + com.webtide.jetty.its.jetty-run-mojo-it + jetty-simple-base + + + + org.eclipse.jetty + jetty-servlet + provided + + + + org.eclipse.jetty + jetty-client + @project.version@ + test + + + + junit + junit + 4.12 + test + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin-version} + + false + + + + + + + org.eclipse.jetty + jetty-maven-plugin + + + start-jetty + test-compile + + run + + + true + ${project.build.directory}/jetty.properties + + 0 + + + + + + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..2a5ac4b71bf --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + Jetty Simple Webapp run-mojo-it + diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java new file mode 100644 index 00000000000..699c3171145 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -0,0 +1,66 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import org.eclipse.jetty.client.HttpClient; +import org.junit.Assert; +import org.junit.Test; + +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Properties; + +/** + * + */ +public class TestHelloServlet +{ + @Test + public void hello_servlet() + throws Exception + { + + Path path = Paths.get( "target/jetty.properties" ); + int port; + try (InputStream inputStream = Files.newInputStream( path )) + { + Properties properties = new Properties(); + properties.load( inputStream ); + port = Integer.parseInt( properties.getProperty( "port" ) ); + } + + HttpClient httpClient = new HttpClient(); + try + { + httpClient.start(); + + String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "hello beer", response.trim() ); + } + finally + { + httpClient.stop(); + } + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml new file mode 100644 index 00000000000..44247ef1e75 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml @@ -0,0 +1,89 @@ + + + 4.0.0 + + com.webtide.jetty.its.jetty-run-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + pom + + Jetty :: Simple + + + UTF-8 + UTF-8 + 1.8 + 3.0.0 + + + + jetty-simple-base + jetty-simple-webapp + + + + + + + com.webtide.jetty.its.jetty-run-mojo-it + jetty-simple-base + ${project.version} + + + + javax.servlet + javax.servlet-api + 3.1.0 + jar + provided + + + + org.slf4j + slf4j-api + 1.7.21 + + + + commons-io + commons-io + 2.5 + + + + org.eclipse.jetty + jetty-servlet + @project.version@ + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.1 + + + org.eclipse.jetty + jetty-maven-plugin + @project.version@ + + + + + + diff --git a/jetty-maven-plugin/src/it/settings.xml b/jetty-maven-plugin/src/it/settings.xml new file mode 100644 index 00000000000..d64bdb89034 --- /dev/null +++ b/jetty-maven-plugin/src/it/settings.xml @@ -0,0 +1,36 @@ + + + + + + it-repo + + true + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + + diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java index 72b8bad3a95..ae15f544235 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java @@ -21,9 +21,13 @@ package org.eclipse.jetty.maven.plugin; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; +import java.io.OutputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.Enumeration; @@ -36,11 +40,14 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.FileUtils; import org.eclipse.jetty.security.LoginService; +import org.eclipse.jetty.server.NetworkConnector; import org.eclipse.jetty.server.RequestLog; import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.ShutdownMonitor; import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.server.handler.ContextHandlerCollection; @@ -272,9 +279,14 @@ public abstract class AbstractJettyMojo extends AbstractMojo protected Thread consoleScanner; protected ServerSupport serverSupport; - - - + + + /** + * Will dump port in a properties file with key port. + * If empty no file generated + * @parameter + */ + protected String propertiesPortFilePath; /** *

@@ -287,8 +299,9 @@ public abstract class AbstractJettyMojo extends AbstractMojo * If true, the server will not block the execution of subsequent code. This * is the behaviour of the jetty:start and default behaviour of the jetty:deploy goals. *

+ * @parameter default-value="false" */ - protected boolean nonblocking = false; + protected boolean nonBlocking = false; public abstract void restartWebApp(boolean reconfigureScanner) throws Exception; @@ -429,11 +442,13 @@ public abstract class AbstractJettyMojo extends AbstractMojo // if a was specified in the pom, use it if (httpConnector != null) { + // check that its port was set - if (httpConnector.getPort() <= 0) + if (httpConnector.getPort() < 0) { //use any jetty.http.port settings provided - String tmp = System.getProperty(MavenServerConnector.PORT_SYSPROPERTY, System.getProperty("jetty.port", MavenServerConnector.DEFAULT_PORT_STR)); + String tmp = System.getProperty(MavenServerConnector.PORT_SYSPROPERTY, + System.getProperty("jetty.port", MavenServerConnector.DEFAULT_PORT_STR)); httpConnector.setPort(Integer.parseInt(tmp.trim())); } httpConnector.setServer(server); @@ -459,7 +474,25 @@ public abstract class AbstractJettyMojo extends AbstractMojo // start Jetty this.server.start(); - getLog().info("Started Jetty Server"); + if (httpConnector != null) + { + int port = httpConnector.getLocalPort(); + getLog().info( "Started Jetty Server on port: " + port ); + if (propertiesPortFilePath != null) + { + Path propertiesPath = Paths.get( propertiesPortFilePath); + Files.deleteIfExists(propertiesPath); + try(OutputStream outputStream = Files.newOutputStream( propertiesPath )) + { + Properties properties = new Properties( ); + properties.put( "port", Integer.toString( port ) ); + properties.store( outputStream, "Eclipse Jetty Maven Plugin port used" ); + } + } + } else + { + getLog().info( "Started Jetty Server" ); + } if ( dumpOnStart ) { @@ -478,10 +511,11 @@ public abstract class AbstractJettyMojo extends AbstractMojo startConsoleScanner(); // keep the thread going if not in daemon mode - if (!nonblocking ) + if (!nonBlocking ) { server.join(); } + } catch (Exception e) { @@ -489,7 +523,7 @@ public abstract class AbstractJettyMojo extends AbstractMojo } finally { - if (!nonblocking ) + if (!nonBlocking ) { getLog().info("Jetty server exiting."); } @@ -504,7 +538,7 @@ public abstract class AbstractJettyMojo extends AbstractMojo ShutdownMonitor monitor = ShutdownMonitor.getInstance(); monitor.setPort(stopPort); monitor.setKey(stopKey); - monitor.setExitVm(!nonblocking); + monitor.setExitVm(!nonBlocking ); } } 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 96ea192a519..8a20299896e 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 @@ -61,7 +61,7 @@ public class JettyDeployWar extends JettyRunWarMojo @Override public void execute() throws MojoExecutionException, MojoFailureException { - nonblocking = daemon; + nonBlocking = daemon; super.execute(); } @@ -72,7 +72,7 @@ public class JettyDeployWar extends JettyRunWarMojo { super.finishConfigurationBeforeStart(); //only stop the server at shutdown if we are blocking - server.setStopAtShutdown(!nonblocking); + server.setStopAtShutdown(!nonBlocking ); } } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java index 259cb0f54d0..cdedd33c921 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java @@ -222,7 +222,7 @@ public class JettyRunMojo extends AbstractJettyMojo { getLog().info("Reload Mechanic: " + reload ); } - + getLog().info( "nonBlocking:" + nonBlocking ); // check the classes to form a classpath with try @@ -566,7 +566,7 @@ public class JettyRunMojo extends AbstractJettyMojo */ private List getDependencyFiles() { - List dependencyFiles = new ArrayList(); + List dependencyFiles = new ArrayList<>(); for ( Iterator iter = projectArtifacts.iterator(); iter.hasNext(); ) { Artifact artifact = iter.next(); @@ -596,7 +596,7 @@ public class JettyRunMojo extends AbstractJettyMojo private List getDependencyProjects() { - List dependencyFiles = new ArrayList(); + List dependencyFiles = new ArrayList<>(); for ( Iterator iter = projectArtifacts.iterator(); iter.hasNext(); ) { Artifact artifact = iter.next(); @@ -656,10 +656,10 @@ public class JettyRunMojo extends AbstractJettyMojo if (warArtifacts != null) return warArtifacts; - warArtifacts = new ArrayList(); + warArtifacts = new ArrayList<>(); for ( Iterator iter = projectArtifacts.iterator(); iter.hasNext(); ) { - Artifact artifact = (Artifact) iter.next(); + Artifact artifact = iter.next(); if (artifact.getType().equals("war") || artifact.getType().equals("zip")) { try diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyStartMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyStartMojo.java index ca7068c3ecc..1909536e0ee 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyStartMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyStartMojo.java @@ -44,7 +44,7 @@ public class JettyStartMojo extends JettyRunMojo @Override public void execute() throws MojoExecutionException, MojoFailureException { - nonblocking = true; //ensure that starting jetty won't hold up the thread + nonBlocking = true; //ensure that starting jetty won't hold up the thread super.execute(); } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java index 075f4d9c66b..aed7f8dddaf 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenServerConnector.java @@ -270,6 +270,11 @@ public class MavenServerConnector extends ContainerLifeCycle implements Connecto { return this.name; } + + public int getLocalPort() + { + return this.delegate.getLocalPort(); + } private void checkDelegate() throws IllegalStateException { From 3aa42d989bb3bb748f563f0c13dc8b57a73ad063 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 22 Jun 2017 12:05:43 -0700 Subject: [PATCH 068/147] Issue #1642 - avoid casting to get to (base) Request --- .../jetty/rewrite/handler/RuleContainer.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java b/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java index afaac89d4e9..3f2395c9c02 100644 --- a/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java +++ b/jetty-rewrite/src/main/java/org/eclipse/jetty/rewrite/handler/RuleContainer.java @@ -163,7 +163,7 @@ public class RuleContainer extends Rule if (_rules==null) return target; - + for (Rule rule : _rules) { String applied=rule.matchAndApply(target,request, response); @@ -179,26 +179,29 @@ public class RuleContainer extends Rule String query = request.getQueryString(); if (query != null) request.setAttribute(_originalQueryStringAttribute,query); - } + } + + // Ugly hack, we should just pass baseRequest into the API from RewriteHandler itself. + Request baseRequest = Request.getBaseRequest(request); if (_rewriteRequestURI) { String encoded=URIUtil.encodePath(applied); if (rule instanceof Rule.ApplyURI) - ((Rule.ApplyURI)rule).applyURI((Request)request,((Request)request).getRequestURI(), encoded); + ((Rule.ApplyURI)rule).applyURI(baseRequest, baseRequest.getRequestURI(), encoded); else - ((Request)request).setURIPathQuery(encoded); + baseRequest.setURIPathQuery(encoded); } if (_rewritePathInfo) - ((Request)request).setPathInfo(applied); + baseRequest.setPathInfo(applied); target=applied; if (rule.isHandling()) { LOG.debug("handling {}",rule); - Request.getBaseRequest(request).setHandled(true); + baseRequest.setHandled(true); } if (rule.isTerminating()) From 4d2f66a2521d3a12c72e4155761bd68e312d8bd0 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Thu, 22 Jun 2017 17:18:01 -0400 Subject: [PATCH 069/147] Script doco update --- .../startup/startup-unix-service.adoc | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/startup/startup-unix-service.adoc b/jetty-documentation/src/main/asciidoc/administration/startup/startup-unix-service.adoc index b11aa50a28a..1f7b701123b 100644 --- a/jetty-documentation/src/main/asciidoc/administration/startup/startup-unix-service.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/startup/startup-unix-service.adoc @@ -136,7 +136,7 @@ jetty-distribution-{VERSION}/ .... It might seem strange or undesirable to unpack the first portion of the jetty-distribution directory name too. -But starting with Jetty 9.1 the split between `${jetty.home}` and `${jetty.base}` allows for easier upgrades of Jetty itself while isolating your webapp specific configuration. +But starting with Jetty 9 the split between `${jetty.home}` and `${jetty.base}` allows for easier upgrades of Jetty itself while isolating your webapp specific configuration. For more information on the Jetty home and base concepts see the section on managing a Jetty installation <> The `/opt/jetty/temp` directory is created as a durable place for Jetty to use for temp and working directories. @@ -156,16 +156,17 @@ While this is still supported, we encourage you to setup a proper `${jetty.base} # cd /opt/web/mybase/ [/opt/web/mybase]# ls [/opt/web/mybase]# java -jar /opt/jetty/jetty-distribution-{VERSION}/start.jar \ - --add-to-start=deploy,http,logging -WARNING: deploy initialised in ${jetty.base}/start.ini (appended) -WARNING: deploy enabled in ${jetty.base}/start.ini -WARNING: server initialised in ${jetty.base}/start.ini (appended) -WARNING: server enabled in ${jetty.base}/start.ini -WARNING: http initialised in ${jetty.base}/start.ini (appended) -WARNING: http enabled in ${jetty.base}/start.ini -WARNING: server enabled in ${jetty.base}/start.ini -WARNING: logging initialised in ${jetty.base}/start.ini (appended) -WARNING: logging enabled in ${jetty.base}/start.ini + --add-to-start=deploy,http,console-capture + INFO : webapp transitively enabled, ini template available with --add-to-start=webapp + INFO : server transitively enabled, ini template available with --add-to-start=server + INFO : security transitively enabled + INFO : servlet transitively enabled + INFO : console-capture initialized in ${jetty.base}/start.ini + INFO : http initialized in ${jetty.base}/start.ini + INFO : deploy initialized in ${jetty.base}/start.ini + MKDIR : ${jetty.base}/logs + MKDIR : ${jetty.base}/webapps + INFO : Base directory was modified [/opt/web/mybase]# ls -F start.ini webapps/ .... @@ -178,10 +179,12 @@ http:: This sets up a single Connector that listens for basic HTTP requests. + See the created `start.ini` for configuring this connector. -logging:: +console-capture:: When running Jetty as a service it is very important to have logging enabled. This module will enable the basic STDOUT and STDERR capture logging to the `/opt/web/mybase/logs/` directory. +Additionally, the `webapp`, `server`, `security` and `servlet` modules were enabled as they are dependencies for other modules. + See xref:start-jar[] for more details and options on setting up and configuring a `${jetty.base}` directory. Copy your war file into place. @@ -238,7 +241,7 @@ JAVA_OPTIONS = -Djetty.state=/opt/web/mybase/jetty.state -Djetty.home=/opt/jetty/jetty-distribution-{VERSION} -Djetty.base=/opt/web/mybase -Djava.io.tmpdir=/opt/jetty/temp -JETTY_ARGS = jetty-logging.xml jetty-started.xml +JETTY_ARGS = console-capture.xml jetty-started.xml RUN_CMD = /usr/bin/java -Djetty.state=/opt/web/mybase/jetty.state -Djetty.logs=/opt/web/mybase/logs @@ -246,11 +249,11 @@ RUN_CMD = /usr/bin/java -Djetty.base=/opt/web/mybase -Djava.io.tmpdir=/opt/jetty/temp -jar /opt/jetty/jetty-distribution-{VERSION}/start.jar - jetty-logging.xml + console-capture.xml jetty-started.xml .... -You now have a configured `${jetty.base}` in `/opt/web/mybase` and a jetty-distribution in `/opt/jetty/jetty-distribution-{VERSION}`, along with the service level files necessary to start the service. +You now have a configured `${jetty.base}` in `/opt/web/mybase` and a `${jetty.home}` in `/opt/jetty/jetty-distribution-{VERSION}`, along with the service level files necessary to start the service. Test the service to make sure it starts up and runs successfully. @@ -268,4 +271,4 @@ USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND jetty 2958 5.3 0.1 11179176 53984 ? Sl 12:46 0:00 /usr/bin/java -Djetty... .... -You should now have your server running. Try it out +You should now have your server running. From 1cdc94f0a56e1ab72fe12810f909fee620408f03 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 23 Jun 2017 10:42:03 +1000 Subject: [PATCH 070/147] add test for run forked mojo Signed-off-by: olivier lamy --- jetty-maven-plugin/pom.xml | 26 ++++ .../invoker.properties | 1 + .../jetty-simple-base/pom.xml | 50 +++++++ .../its/jetty_run_mojo_it/HelloServlet.java | 45 ++++++ .../jetty-simple-webapp/pom.xml | 133 ++++++++++++++++++ .../jetty-simple-webapp/src/config/jetty.xml | 33 +++++ .../src/main/webapp/WEB-INF/web.xml | 7 + .../jetty_run_mojo_it/TestHelloServlet.java | 52 +++++++ .../src/it/jetty-run-forked-mojo-it/pom.xml | 89 ++++++++++++ .../it/jetty-run-forked-mojo-it/postbuild.foo | 8 ++ .../its/jetty_run_mojo_it/HelloServlet.java | 3 +- .../jetty-simple-webapp/pom.xml | 13 +- .../jetty_run_mojo_it/TestHelloServlet.java | 21 +-- .../jetty/maven/plugin/AbstractJettyMojo.java | 32 +---- .../maven/plugin/JettyRunForkedMojo.java | 17 ++- .../jetty/maven/plugin/JettyRunMojo.java | 2 +- .../eclipse/jetty/maven/plugin/Starter.java | 4 +- 17 files changed, 480 insertions(+), 56 deletions(-) create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/invoker.properties create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index 4fb6579684b..f574267f2f9 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -13,6 +13,7 @@ 3.4 ${project.groupId}.maven.plugin false + FOOBEER @@ -217,11 +218,36 @@ verify ${project.build.directory}/local-repo src/it/settings.xml + + ${jetty.stopKey} + ${jetty.stopPort} + ${jetty.runPort} + clean + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + reserve-ports + pre-integration-test + + reserve-network-port + + + + jetty.stopPort + jetty.runPort + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/invoker.properties new file mode 100644 index 00000000000..2fc6409821b --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/invoker.properties @@ -0,0 +1 @@ +invoker.goals = test -fae \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml new file mode 100644 index 00000000000..594ddba4c8d --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-forked-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-base + jar + + Jetty :: Simple :: Base + + + + + javax.servlet + javax.servlet-api + jar + provided + + + + org.slf4j + slf4j-api + + + + commons-io + commons-io + + + + org.eclipse.jetty.toolchain + jetty-perf-helper + 1.0.5 + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.1 + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java new file mode 100644 index 00000000000..a6d2a3e256d --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -0,0 +1,45 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * + */ +@WebServlet("/hello") +public class HelloServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml new file mode 100644 index 00000000000..21f5b01073a --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml @@ -0,0 +1,133 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-forked-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-webapp + war + + Jetty :: Simple :: Webapp + + + @jetty.runPort@ + + + + + + com.webtide.jetty.its.jetty-run-forked-mojo-it + jetty-simple-base + + + + org.eclipse.jetty + jetty-servlet + provided + + + + org.eclipse.jetty + jetty-client + @project.version@ + test + + + + junit + junit + 4.12 + test + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin-version} + + false + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + + @jetty.runPort@ + + + + + org.eclipse.jetty + jetty-maven-plugin + + @jetty.stopPort@ + @jetty.stopKey@ + + + + start-jetty + test-compile + + run-forked + + + true + false + ${project.build.directory}/config/jetty.xml + + + + stop-jetty + test + + stop + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.2 + + + copy-resources-jetty + generate-resources + + copy-resources + + + ${project.build.directory}/config + + + ${basedir}/src/config/ + true + + **/** + + + + + + + + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml new file mode 100644 index 00000000000..a057f0664eb --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/config/jetty.xml @@ -0,0 +1,33 @@ + + + + + + https + + 32768 + 8192 + 8192 + 512 + + + + + + + + + + + + + + + + + + 30000 + + + + \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..2a5ac4b71bf --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + Jetty Simple Webapp run-mojo-it + diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java new file mode 100644 index 00000000000..27d9d55c787 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -0,0 +1,52 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import org.eclipse.jetty.client.HttpClient; +import org.junit.Assert; +import org.junit.Test; + +/** + * + */ +public class TestHelloServlet +{ + @Test + public void hello_servlet() + throws Exception + { + int port = Integer.getInteger( "jetty.runPort" ); + System.out.println( "port used:" + port ); + HttpClient httpClient = new HttpClient(); + try + { + httpClient.start(); + + String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "hello beer", response.trim() ); + } + finally + { + httpClient.stop(); + } + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml new file mode 100644 index 00000000000..e45f2ad1fcd --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml @@ -0,0 +1,89 @@ + + + 4.0.0 + + com.webtide.jetty.its.jetty-run-forked-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + pom + + Jetty :: Simple + + + UTF-8 + UTF-8 + 1.8 + 3.0.0 + + + + jetty-simple-base + jetty-simple-webapp + + + + + + + com.webtide.jetty.its.jetty-run-forked-mojo-it + jetty-simple-base + ${project.version} + + + + javax.servlet + javax.servlet-api + 3.1.0 + jar + provided + + + + org.slf4j + slf4j-api + 1.7.21 + + + + commons-io + commons-io + 2.5 + + + + org.eclipse.jetty + jetty-servlet + @project.version@ + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.1 + + + org.eclipse.jetty + jetty-maven-plugin + @project.version@ + + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo new file mode 100644 index 00000000000..134e91137c7 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo @@ -0,0 +1,8 @@ + +Socket s=new Socket(InetAddress.getByName("127.0.0.1"),Integer.getInteger( "jetty.runPort" )); +s.setSoLinger(false, 0); + +OutputStream out=s.getOutputStream(); +out.write((System.getProperty( "jetty.stopKey" )+"\r\n"+command+"\r\n").getBytes()); +out.flush(); +s.close() \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java index bb6915814df..a6d2a3e256d 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -1,6 +1,6 @@ // // ======================================================================== -// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// Copyright (c) 1995-2017 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 @@ -16,6 +16,7 @@ // ======================================================================== // + package com.webtide.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml index a11175216c8..ce4d50f13ec 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml @@ -57,6 +57,16 @@ + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + + @jetty.runPort@ + + + org.eclipse.jetty jetty-maven-plugin @@ -69,9 +79,8 @@ true - ${project.build.directory}/jetty.properties - 0 + @jetty.runPort@ diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 699c3171145..1ec2da6ff78 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -1,6 +1,6 @@ // // ======================================================================== -// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// Copyright (c) 1995-2017 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 @@ -16,18 +16,13 @@ // ======================================================================== // + package com.webtide.jetty.its.jetty_run_mojo_it; import org.eclipse.jetty.client.HttpClient; import org.junit.Assert; import org.junit.Test; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Properties; - /** * */ @@ -37,16 +32,8 @@ public class TestHelloServlet public void hello_servlet() throws Exception { - - Path path = Paths.get( "target/jetty.properties" ); - int port; - try (InputStream inputStream = Files.newInputStream( path )) - { - Properties properties = new Properties(); - properties.load( inputStream ); - port = Integer.parseInt( properties.getProperty( "port" ) ); - } - + int port = Integer.getInteger( "jetty.runPort" ); + System.out.println( "port used:" + port ); HttpClient httpClient = new HttpClient(); try { diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java index ae15f544235..ef9dbb2674a 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/AbstractJettyMojo.java @@ -280,14 +280,6 @@ public abstract class AbstractJettyMojo extends AbstractMojo protected ServerSupport serverSupport; - - /** - * Will dump port in a properties file with key port. - * If empty no file generated - * @parameter - */ - protected String propertiesPortFilePath; - /** *

* Determines whether or not the server blocks when started. The default @@ -444,10 +436,10 @@ public abstract class AbstractJettyMojo extends AbstractMojo { // check that its port was set - if (httpConnector.getPort() < 0) + if (httpConnector.getPort() <= 0) { //use any jetty.http.port settings provided - String tmp = System.getProperty(MavenServerConnector.PORT_SYSPROPERTY, + String tmp = System.getProperty(MavenServerConnector.PORT_SYSPROPERTY, // System.getProperty("jetty.port", MavenServerConnector.DEFAULT_PORT_STR)); httpConnector.setPort(Integer.parseInt(tmp.trim())); } @@ -474,25 +466,7 @@ public abstract class AbstractJettyMojo extends AbstractMojo // start Jetty this.server.start(); - if (httpConnector != null) - { - int port = httpConnector.getLocalPort(); - getLog().info( "Started Jetty Server on port: " + port ); - if (propertiesPortFilePath != null) - { - Path propertiesPath = Paths.get( propertiesPortFilePath); - Files.deleteIfExists(propertiesPath); - try(OutputStream outputStream = Files.newOutputStream( propertiesPath )) - { - Properties properties = new Properties( ); - properties.put( "port", Integer.toString( port ) ); - properties.store( outputStream, "Eclipse Jetty Maven Plugin port used" ); - } - } - } else - { - getLog().info( "Started Jetty Server" ); - } + getLog().info( "Started Jetty Server" ); if ( dumpOnStart ) { diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java index c4d03008abf..6e6b35b46a3 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java @@ -44,6 +44,7 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.descriptor.PluginDescriptor; +import org.apache.maven.project.MavenProject; import org.eclipse.jetty.annotations.AnnotationConfiguration; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.util.IO; @@ -169,10 +170,18 @@ public class JettyRunForkedMojo extends JettyRunMojo } } } - - - + + @Override + /** + * we o + */ + protected MavenProject getProjectReferences( Artifact artifact, MavenProject project ) + { + + return null; + } + /** * ConsoleStreamer * @@ -349,7 +358,7 @@ public class JettyRunForkedMojo extends JettyRunMojo builder.directory(project.getBasedir()); if (PluginLog.getLog().isDebugEnabled()) - PluginLog.getLog().debug(Arrays.toString(cmd.toArray())); + PluginLog.getLog().debug("Forked cli:"+Arrays.toString(cmd.toArray())); PluginLog.getLog().info("Forked process starting"); diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java index cdedd33c921..00a6b9f3ec8 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java @@ -626,7 +626,7 @@ public class JettyRunMojo extends AbstractJettyMojo } - private MavenProject getProjectReferences( Artifact artifact, MavenProject project ) + protected MavenProject getProjectReferences( Artifact artifact, MavenProject project ) { if ( project.getProjectReferences() == null || project.getProjectReferences().isEmpty() ) { diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java index 040a58202cf..37a155f6b89 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java @@ -246,7 +246,7 @@ public class Starter Set matchedWars = new HashSet(); //process any overlays and the war type artifacts - List overlays = new ArrayList(); + List overlays = new ArrayList<>(); for (OverlayConfig config:orderedConfigs.values()) { //overlays can be individually skipped @@ -302,7 +302,7 @@ public class Starter // - the equivalent of web-inf lib - str = (String)props.getProperty("lib.jars"); + str = props.getProperty("lib.jars"); if (str != null && !"".equals(str.trim())) { List jars = new ArrayList(); From 2f9dc5869905ceb88c8a78431b64e7c7b59fc4c5 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 23 Jun 2017 14:55:44 +1000 Subject: [PATCH 071/147] fix run forked support of reactor projects Signed-off-by: olivier lamy --- jetty-maven-plugin/pom.xml | 11 ++--- .../jetty-simple-webapp/pom.xml | 4 ++ .../it/jetty-run-forked-mojo-it/postbuild.foo | 8 --- .../jetty-run-forked-mojo-it/postbuild.groovy | 13 +++++ .../maven/plugin/JettyRunForkedMojo.java | 49 ++++++++++++------- .../jetty/maven/plugin/ServerSupport.java | 2 +- .../eclipse/jetty/maven/plugin/Starter.java | 36 +++++++++----- 7 files changed, 77 insertions(+), 46 deletions(-) delete mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.groovy diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index f574267f2f9..e7b62ffc8fc 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -14,6 +14,7 @@ ${project.groupId}.maven.plugin false FOOBEER + @@ -195,7 +196,7 @@ org.apache.maven.plugins maven-invoker-plugin - 3.0.0 + 3.0.1-SNAPSHOT integration-test @@ -214,14 +215,12 @@ */pom.xml - setup - verify ${project.build.directory}/local-repo src/it/settings.xml - ${jetty.stopKey} - ${jetty.stopPort} - ${jetty.runPort} + ${jetty.stopKey} + ${jetty.stopPort} + ${jetty.runPort} clean diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml index 21f5b01073a..3c6f21d22ea 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml @@ -16,6 +16,7 @@ @jetty.runPort@ + @jetty.jvmArgs@ @@ -89,8 +90,10 @@ true false ${project.build.directory}/config/jetty.xml + ${jetty.jvmArgs} + diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo deleted file mode 100644 index 134e91137c7..00000000000 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.foo +++ /dev/null @@ -1,8 +0,0 @@ - -Socket s=new Socket(InetAddress.getByName("127.0.0.1"),Integer.getInteger( "jetty.runPort" )); -s.setSoLinger(false, 0); - -OutputStream out=s.getOutputStream(); -out.write((System.getProperty( "jetty.stopKey" )+"\r\n"+command+"\r\n").getBytes()); -out.flush(); -s.close() \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.groovy b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.groovy new file mode 100644 index 00000000000..8a524044e2a --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/postbuild.groovy @@ -0,0 +1,13 @@ + + +System.out.println( "running postbuild.groovy port " + jettyStopPort + ", key:" + jettyStopKey ) + +int port = Integer.parseInt( jettyStopPort ) + +Socket s=new Socket(InetAddress.getByName("127.0.0.1"),port ) +s.setSoLinger(false, 0) + +OutputStream out=s.getOutputStream() +out.write(( jettyStopKey +"\r\nforcestop\r\n").getBytes()) +out.flush() +s.close() \ No newline at end of file diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java index 6e6b35b46a3..4de7f20ae53 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java @@ -18,6 +18,17 @@ package org.eclipse.jetty.maven.plugin; +import org.apache.maven.artifact.Artifact; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugin.descriptor.PluginDescriptor; +import org.eclipse.jetty.annotations.AnnotationConfiguration; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.util.IO; +import org.eclipse.jetty.util.resource.Resource; +import org.eclipse.jetty.util.resource.ResourceCollection; +import org.eclipse.jetty.util.thread.QueuedThreadPool; + import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.File; @@ -40,18 +51,6 @@ import java.util.Properties; import java.util.Random; import java.util.Set; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugin.descriptor.PluginDescriptor; -import org.apache.maven.project.MavenProject; -import org.eclipse.jetty.annotations.AnnotationConfiguration; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.util.IO; -import org.eclipse.jetty.util.resource.Resource; -import org.eclipse.jetty.util.resource.ResourceCollection; -import org.eclipse.jetty.util.thread.QueuedThreadPool; - /** * This goal is used to deploy your unassembled webapp into a forked JVM. @@ -172,15 +171,14 @@ public class JettyRunForkedMojo extends JettyRunMojo } - @Override /** * we o */ - protected MavenProject getProjectReferences( Artifact artifact, MavenProject project ) - { - - return null; - } +// protected MavenProject getProjectReferences( Artifact artifact, MavenProject project ) +// { +// +// return null; +// } /** * ConsoleStreamer @@ -519,6 +517,19 @@ public class JettyRunForkedMojo extends JettyRunMojo props.put("testClasses.dir", webApp.getTestClasses().getAbsolutePath()); } + if ( !webApp.getClassPathFiles().isEmpty() ) + { + StringBuilder stringBuilder = new StringBuilder(); + for ( File dependency : webApp.getClassPathFiles() ) + { + if (dependency.isDirectory()) + { + stringBuilder.append( dependency.getCanonicalPath() ).append( '|' ); + } + } + props.put( "projects.classes.dir", stringBuilder.toString() ); + } + //web-inf lib List deps = webApp.getWebInfLib(); StringBuffer strbuff = new StringBuffer(); @@ -587,7 +598,7 @@ public class JettyRunForkedMojo extends JettyRunMojo List warArtifacts = new ArrayList(); for ( Iterator iter = project.getArtifacts().iterator(); iter.hasNext(); ) { - Artifact artifact = (Artifact) iter.next(); + Artifact artifact = iter.next(); if (artifact.getType().equals("war")) warArtifacts.add(artifact); diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java index eeda81108f0..3b0512ced41 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java @@ -164,7 +164,7 @@ public class ServerSupport if (server == null) return null; - return (ContextHandlerCollection)server.getChildHandlerByClass(ContextHandlerCollection.class); + return server.getChildHandlerByClass(ContextHandlerCollection.class); } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java index 37a155f6b89..88f542db616 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java @@ -22,7 +22,9 @@ import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.net.URL; +import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.Enumeration; import java.util.HashSet; import java.util.Iterator; @@ -30,6 +32,8 @@ import java.util.List; import java.util.Properties; import java.util.Set; import java.util.TreeMap; +import java.util.regex.Pattern; +import java.util.stream.Collectors; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; @@ -174,31 +178,31 @@ public class Starter //apply a properties file that defines the things that we configure in the jetty:run plugin: // - the context path - String str = (String)props.get("context.path"); + String str = props.getProperty("context.path"); if (str != null) webApp.setContextPath(str); // - web.xml - str = (String)props.get("web.xml"); + str = props.getProperty("web.xml"); if (str != null) webApp.setDescriptor(str); - str = (String)props.get("quickstart.web.xml"); + str = props.getProperty("quickstart.web.xml"); if (str != null) webApp.setQuickStartWebDescriptor(Resource.newResource(new File(str))); // - the tmp directory - str = (String)props.getProperty("tmp.dir"); + str = props.getProperty("tmp.dir"); if (str != null) webApp.setTempDirectory(new File(str.trim())); - str = (String)props.getProperty("tmp.dir.persist"); + str = props.getProperty("tmp.dir.persist"); if (str != null) webApp.setPersistTempDirectory(Boolean.valueOf(str)); //Get the calculated base dirs which includes the overlays - str = (String)props.getProperty("base.dirs"); + str = props.getProperty("base.dirs"); if (str != null && !"".equals(str.trim())) { ResourceCollection bases = new ResourceCollection(StringUtil.csvSplit(str)); @@ -207,7 +211,7 @@ public class Starter } //Get the original base dirs without the overlays - str = (String)props.get("base.dirs.orig"); + str = props.getProperty("base.dirs.orig"); if (str != null && !"".equals(str.trim())) { ResourceCollection bases = new ResourceCollection(StringUtil.csvSplit(str)); @@ -215,9 +219,9 @@ public class Starter } //For overlays - str = (String)props.getProperty("maven.war.includes"); + str = props.getProperty("maven.war.includes"); List defaultWarIncludes = fromCSV(str); - str = (String)props.getProperty("maven.war.excludes"); + str = props.getProperty("maven.war.excludes"); List defaultWarExcludes = fromCSV(str); //List of war artifacts @@ -288,19 +292,18 @@ public class Starter // - the equivalent of web-inf classes - str = (String)props.getProperty("classes.dir"); + str = props.getProperty("classes.dir"); if (str != null && !"".equals(str.trim())) { webApp.setClasses(new File(str)); } - str = (String)props.getProperty("testClasses.dir"); + str = props.getProperty("testClasses.dir"); if (str != null && !"".equals(str.trim())) { webApp.setTestClasses(new File(str)); } - // - the equivalent of web-inf lib str = props.getProperty("lib.jars"); if (str != null && !"".equals(str.trim())) @@ -311,6 +314,15 @@ public class Starter jars.add(new File(names[j].trim())); webApp.setWebInfLib(jars); } + + str = props.getProperty( "projects.classes.dir" ); + if (str != null && !"".equals(str.trim())) + { + List classesDirectories = // + Arrays.stream(str.split( Pattern.quote("|") )) // + .map( s -> Paths.get( s).toFile() ).collect( Collectors.toList() ); + webApp.getWebInfLib().addAll( classesDirectories ); + } } From 4024273fa64db6ad2cf805b5656b6cac99705174 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 23 Jun 2017 15:07:18 +1000 Subject: [PATCH 072/147] Add it test for Maven Plugin #1638 Signed-off-by: olivier lamy --- .../it/jetty-start-mojo-it/invoker.properties | 1 + .../jetty-simple-base/pom.xml | 50 ++++++++++ .../its/jetty_run_mojo_it/HelloServlet.java | 45 +++++++++ .../jetty-simple-webapp/pom.xml | 92 +++++++++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 7 ++ .../jetty_run_mojo_it/TestHelloServlet.java | 53 +++++++++++ .../src/it/jetty-start-mojo-it/pom.xml | 89 ++++++++++++++++++ 7 files changed, 337 insertions(+) create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/invoker.properties create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-start-mojo-it/invoker.properties new file mode 100644 index 00000000000..e0222d4d54e --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/invoker.properties @@ -0,0 +1 @@ +invoker.goals = test \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml new file mode 100644 index 00000000000..7a9a5382308 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-start-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-base + jar + + Jetty :: Simple :: Base + + + + + javax.servlet + javax.servlet-api + jar + provided + + + + org.slf4j + slf4j-api + + + + commons-io + commons-io + + + + org.eclipse.jetty.toolchain + jetty-perf-helper + 1.0.5 + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.1 + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java new file mode 100644 index 00000000000..a6d2a3e256d --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -0,0 +1,45 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * + */ +@WebServlet("/hello") +public class HelloServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml new file mode 100644 index 00000000000..38ae1555a4b --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-start-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-webapp + war + + Jetty :: Simple :: Webapp + + + + + com.webtide.jetty.its.jetty-start-mojo-it + jetty-simple-base + + + + org.eclipse.jetty + jetty-servlet + provided + + + + org.eclipse.jetty + jetty-client + @project.version@ + test + + + + junit + junit + 4.12 + test + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin-version} + + false + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + + @jetty.runPort@ + + + + + org.eclipse.jetty + jetty-maven-plugin + + + start-jetty + test-compile + + start + + + + @jetty.runPort@ + + + + + + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..2a5ac4b71bf --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + Jetty Simple Webapp run-mojo-it + diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java new file mode 100644 index 00000000000..1ec2da6ff78 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -0,0 +1,53 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import org.eclipse.jetty.client.HttpClient; +import org.junit.Assert; +import org.junit.Test; + +/** + * + */ +public class TestHelloServlet +{ + @Test + public void hello_servlet() + throws Exception + { + int port = Integer.getInteger( "jetty.runPort" ); + System.out.println( "port used:" + port ); + HttpClient httpClient = new HttpClient(); + try + { + httpClient.start(); + + String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "hello beer", response.trim() ); + } + finally + { + httpClient.stop(); + } + } +} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml new file mode 100644 index 00000000000..bc0398916e7 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml @@ -0,0 +1,89 @@ + + + 4.0.0 + + com.webtide.jetty.its.jetty-start-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + pom + + Jetty :: Simple + + + UTF-8 + UTF-8 + 1.8 + 3.0.0 + + + + jetty-simple-base + jetty-simple-webapp + + + + + + + com.webtide.jetty.its.jetty-start-mojo-it + jetty-simple-base + ${project.version} + + + + javax.servlet + javax.servlet-api + 3.1.0 + jar + provided + + + + org.slf4j + slf4j-api + 1.7.21 + + + + commons-io + commons-io + 2.5 + + + + org.eclipse.jetty + jetty-servlet + @project.version@ + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.1 + + + org.eclipse.jetty + jetty-maven-plugin + @project.version@ + + + + + + From 7dcab0e5a20a1893f74f4b806ed5973207ba1e13 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 23 Jun 2017 15:51:38 +1000 Subject: [PATCH 073/147] add test with fragment for #1623 Signed-off-by: olivier lamy --- .../its/jetty_run_mojo_it/PingServlet.java | 41 +++++++++++++++++++ .../main/resources/META-INF/web-fragment.xml | 32 +++++++++++++++ .../jetty_run_mojo_it/TestHelloServlet.java | 6 +++ .../its/jetty_run_mojo_it/PingServlet.java | 41 +++++++++++++++++++ .../main/resources/META-INF/web-fragment.xml | 32 +++++++++++++++ .../jetty_run_mojo_it/TestHelloServlet.java | 6 +++ .../its/jetty_run_mojo_it/PingServlet.java | 41 +++++++++++++++++++ .../java/resources/META-INF/web-fragment.xml | 32 +++++++++++++++ .../jetty_run_mojo_it/TestHelloServlet.java | 6 +++ .../main/resources/META-INF/web-fragment.xml | 1 - 10 files changed, 237 insertions(+), 1 deletion(-) create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/resources/META-INF/web-fragment.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java new file mode 100644 index 00000000000..f5686592252 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -0,0 +1,41 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class PingServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml new file mode 100644 index 00000000000..031012f7fed --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -0,0 +1,32 @@ + + + + + FragmentA + + + + + + + Ping + com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + + extra1123 + + + extra2345 + + + + + Ping + /ping + + + + \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 27d9d55c787..f48eee38074 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -43,6 +43,12 @@ public class TestHelloServlet System.out.println( "httpResponse:" + response ); Assert.assertEquals( "hello beer", response.trim() ); + + response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "pong beer", response.trim() ); } finally { diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java new file mode 100644 index 00000000000..f5686592252 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -0,0 +1,41 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class PingServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml new file mode 100644 index 00000000000..031012f7fed --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -0,0 +1,32 @@ + + + + + FragmentA + + + + + + + Ping + com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + + extra1123 + + + extra2345 + + + + + Ping + /ping + + + + \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 1ec2da6ff78..4e3ced68d91 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -44,6 +44,12 @@ public class TestHelloServlet System.out.println( "httpResponse:" + response ); Assert.assertEquals( "hello beer", response.trim() ); + + response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "pong beer", response.trim() ); } finally { diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java new file mode 100644 index 00000000000..f5686592252 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -0,0 +1,41 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class PingServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/resources/META-INF/web-fragment.xml new file mode 100644 index 00000000000..031012f7fed --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/resources/META-INF/web-fragment.xml @@ -0,0 +1,32 @@ + + + + + FragmentA + + + + + + + Ping + com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + + extra1123 + + + extra2345 + + + + + Ping + /ping + + + + \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 1ec2da6ff78..4e3ced68d91 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -44,6 +44,12 @@ public class TestHelloServlet System.out.println( "httpResponse:" + response ); Assert.assertEquals( "hello beer", response.trim() ); + + response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "pong beer", response.trim() ); } finally { diff --git a/tests/test-webapps/test-servlet-spec/test-web-fragment/src/main/resources/META-INF/web-fragment.xml b/tests/test-webapps/test-servlet-spec/test-web-fragment/src/main/resources/META-INF/web-fragment.xml index a85aea5f030..ae015f2712c 100644 --- a/tests/test-webapps/test-servlet-spec/test-web-fragment/src/main/resources/META-INF/web-fragment.xml +++ b/tests/test-webapps/test-servlet-spec/test-web-fragment/src/main/resources/META-INF/web-fragment.xml @@ -32,7 +32,6 @@ Fragment /fragment/* - From 8095da38481968f7a2786510f7d9ad19d65828e3 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 23 Jun 2017 20:35:59 +1000 Subject: [PATCH 074/147] try to fix web fragment for directory classes #1623 Signed-off-by: olivier lamy --- jetty-maven-plugin/pom.xml | 12 ++++++++++++ .../org/eclipse/jetty/maven/plugin/JettyRunMojo.java | 12 +++++++++--- .../eclipse/jetty/webapp/MetaInfConfiguration.java | 3 +-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index e7b62ffc8fc..b17414749bd 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -249,6 +249,18 @@ + + + apache.snaphots + https://repository.apache.org/content/repositories/snapshots + + false + + + true + + + diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java index 00a6b9f3ec8..23f21a7125f 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java @@ -40,6 +40,8 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; +import java.util.stream.Collector; +import java.util.stream.Collectors; /** * This goal is used in-situ on a Maven project without first requiring that the project @@ -281,14 +283,18 @@ public class JettyRunMojo extends AbstractJettyMojo if (useTestScope && (testClassesDirectory != null)) webApp.setTestClasses (testClassesDirectory); - webApp.getClassPathFiles().addAll( getDependencyProjects() ); + List dependencyProjects = getDependencyProjects(); + webApp.getClassPathFiles().addAll( dependencyProjects ); + List dependencyResources = // + dependencyProjects.stream() // + .map( file -> Resource.newResource( file ) ) // + .collect( Collectors.toList() ); + webApp.getMetaData().getContainerResources().addAll( dependencyResources ); webApp.setWebInfLib (getDependencyFiles()); //get copy of a list of war artifacts Set matchedWarArtifacts = new HashSet(); - - //process any overlays and the war type artifacts List overlays = new ArrayList(); for (OverlayConfig config:warPluginInfo.getMavenWarOverlayConfigs()) diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java index ea973624719..e06a55cda1e 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java @@ -276,8 +276,7 @@ public class MetaInfConfiguration extends AbstractConfiguration if (LOG.isDebugEnabled()) LOG.debug(jar+" META-INF/web-fragment.xml checked"); if (jar.isDirectory()) { - //TODO ???? - webFrag = jar.addPath("/META-INF/web-fragment.xml"); + webFrag = Resource.newResource( new File (jar.getFile(),"/META-INF/web-fragment.xml")); } else { From aae7b38b82a9867c30c2405face786d92e84f752 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 23 Jun 2017 20:46:09 +1000 Subject: [PATCH 075/147] version in only one place Signed-off-by: olivier lamy --- jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml | 5 +++-- jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml | 5 +++-- jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml index e45f2ad1fcd..cada3739cce 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml @@ -15,6 +15,7 @@ UTF-8 1.8 3.0.0 + @project.version@ @@ -54,7 +55,7 @@ org.eclipse.jetty jetty-servlet - @project.version@ + ${jetty.version} @@ -80,7 +81,7 @@ org.eclipse.jetty jetty-maven-plugin - @project.version@ + ${jetty.version} diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml index 44247ef1e75..3d303f4caf8 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml @@ -15,6 +15,7 @@ UTF-8 1.8 3.0.0 + @project.version@ @@ -54,7 +55,7 @@ org.eclipse.jetty jetty-servlet - @project.version@ + ${jetty.version} @@ -80,7 +81,7 @@ org.eclipse.jetty jetty-maven-plugin - @project.version@ + ${jetty.version} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml index bc0398916e7..7319c0d604f 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml @@ -15,6 +15,7 @@ UTF-8 1.8 3.0.0 + @project.version@ @@ -54,7 +55,7 @@ org.eclipse.jetty jetty-servlet - @project.version@ + ${jetty.version} @@ -80,7 +81,7 @@ org.eclipse.jetty jetty-maven-plugin - @project.version@ + ${jetty.version} From dfb4e85c0ace7840975b0e12683a8bcea1645b7b Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Fri, 23 Jun 2017 21:32:11 +1000 Subject: [PATCH 076/147] fix fragment from dependent projects #1623 Signed-off-by: olivier lamy --- .../resources/META-INF/web-fragment.xml | 0 .../jetty/maven/plugin/JettyRunMojo.java | 18 ++++++++++++++++-- .../jetty/maven/plugin/JettyWebAppContext.java | 9 ++++++--- .../maven/plugin/MavenWebInfConfiguration.java | 2 ++ 4 files changed, 24 insertions(+), 5 deletions(-) rename jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/{java => }/resources/META-INF/web-fragment.xml (100%) diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml similarity index 100% rename from jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/resources/META-INF/web-fragment.xml rename to jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java index 23f21a7125f..94102e9db95 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java @@ -291,7 +291,11 @@ public class JettyRunMojo extends AbstractJettyMojo .collect( Collectors.toList() ); webApp.getMetaData().getContainerResources().addAll( dependencyResources ); webApp.setWebInfLib (getDependencyFiles()); - +// webApp.getWebInfLib().addAll( dependencyResources // +// .stream() // +// .map( resource -> toFile(resource) ) // +// .collect( Collectors.toList() ) ); + webApp.getDependentProjects().addAll( dependencyResources ); //get copy of a list of war artifacts Set matchedWarArtifacts = new HashSet(); @@ -373,7 +377,17 @@ public class JettyRunMojo extends AbstractJettyMojo getLog().info("Webapp directory = " + webAppSourceDirectory.getCanonicalPath()); } - + private static File toFile(Resource resource) + { + try + { + return resource.getFile(); + } + catch ( IOException e ) + { + throw new RuntimeException( e.getMessage(), e ); + } + } /** diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java index a27903ceed5..3ec20ce8081 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java @@ -104,9 +104,7 @@ public class JettyWebAppContext extends WebAppContext private Resource _quickStartWebXml; private String _originAttribute; private boolean _generateOrigin; - - - + private List dependentProjects = new ArrayList<>(); /** * Set the "org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern" with a pattern for matching jars on @@ -321,6 +319,11 @@ public class JettyWebAppContext extends WebAppContext { return _webInfJars; } + + public List getDependentProjects() + { + return dependentProjects; + } /* ------------------------------------------------------------ */ public void setGenerateQuickStart (boolean quickStart) diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java index 2ea7443713e..440238d22b4 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java @@ -93,6 +93,8 @@ public class MavenWebInfConfiguration extends WebInfConfiguration public void preConfigure(WebAppContext context) throws Exception { super.preConfigure(context); + ((JettyWebAppContext)context).getDependentProjects() + .stream().forEach( resource -> context.getMetaData().addWebInfJar( resource ) ); } From 4b513c61e8ac7400826880d18729c71eca1b6ae8 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Sat, 24 Jun 2017 21:22:06 +1000 Subject: [PATCH 077/147] add it test for run war mojo Signed-off-by: olivier lamy --- .../jetty-run-war-mojo-it/invoker.properties | 2 + .../jetty-simple-base/pom.xml | 50 ++++++++ .../its/jetty_run_mojo_it/HelloServlet.java | 45 +++++++ .../its/jetty_run_mojo_it/PingServlet.java | 41 ++++++ .../main/resources/META-INF/web-fragment.xml | 32 +++++ .../jetty-simple-webapp/pom.xml | 121 ++++++++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 7 + .../jetty_run_mojo_it/TestHelloServlet.java | 59 +++++++++ .../src/it/jetty-run-war-mojo-it/pom.xml | 90 +++++++++++++ .../jetty/maven/plugin/JettyRunWarMojo.java | 4 + 10 files changed, 451 insertions(+) create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/invoker.properties create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/invoker.properties new file mode 100644 index 00000000000..161dd58f0af --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/invoker.properties @@ -0,0 +1,2 @@ +invoker.goals = verify +#test-compile failsafe:integration-test \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml new file mode 100644 index 00000000000..8903e68d8a0 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-war-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-base + jar + + Jetty :: Simple :: Base + + + + + javax.servlet + javax.servlet-api + jar + provided + + + + org.slf4j + slf4j-api + + + + commons-io + commons-io + + + + org.eclipse.jetty.toolchain + jetty-perf-helper + 1.0.5 + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.1 + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java new file mode 100644 index 00000000000..a6d2a3e256d --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -0,0 +1,45 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * + */ +@WebServlet("/hello") +public class HelloServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java new file mode 100644 index 00000000000..f5686592252 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -0,0 +1,41 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class PingServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml new file mode 100644 index 00000000000..031012f7fed --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -0,0 +1,32 @@ + + + + + FragmentA + + + + + + + Ping + com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + + extra1123 + + + extra2345 + + + + + Ping + /ping + + + + \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml new file mode 100644 index 00000000000..23109b90f00 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml @@ -0,0 +1,121 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-war-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-webapp + war + + Jetty :: Simple :: Webapp + + + + + com.webtide.jetty.its.jetty-run-war-mojo-it + jetty-simple-base + + + + org.eclipse.jetty + jetty-servlet + provided + + + + org.eclipse.jetty + jetty-client + @project.version@ + test + + + + junit + junit + 4.12 + test + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin-version} + + false + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + true + + @jetty.runPort@ + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.20 + + + @jetty.runPort@ + + + **/*TestHelloServlet* + + + + + integration-test + + integration-test + + + + verify + + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + + + start-jetty + test-compile + + run-war + + + true + + @jetty.runPort@ + + + + + + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..2a5ac4b71bf --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + Jetty Simple Webapp run-mojo-it + diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java new file mode 100644 index 00000000000..4e3ced68d91 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -0,0 +1,59 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import org.eclipse.jetty.client.HttpClient; +import org.junit.Assert; +import org.junit.Test; + +/** + * + */ +public class TestHelloServlet +{ + @Test + public void hello_servlet() + throws Exception + { + int port = Integer.getInteger( "jetty.runPort" ); + System.out.println( "port used:" + port ); + HttpClient httpClient = new HttpClient(); + try + { + httpClient.start(); + + String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "hello beer", response.trim() ); + + response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "pong beer", response.trim() ); + } + finally + { + httpClient.stop(); + } + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml new file mode 100644 index 00000000000..432f0120781 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml @@ -0,0 +1,90 @@ + + + 4.0.0 + + com.webtide.jetty.its.jetty-run-war-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + pom + + Jetty :: Simple + + + UTF-8 + UTF-8 + 1.8 + 3.0.0 + @project.version@ + + + + jetty-simple-base + jetty-simple-webapp + + + + + + + com.webtide.jetty.its.jetty-run-war-mojo-it + jetty-simple-base + ${project.version} + + + + javax.servlet + javax.servlet-api + 3.1.0 + jar + provided + + + + org.slf4j + slf4j-api + 1.7.21 + + + + commons-io + commons-io + 2.5 + + + + org.eclipse.jetty + jetty-servlet + ${jetty.version} + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.1 + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty.version} + + + + + + diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunWarMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunWarMojo.java index 46249291769..aa81cb021d3 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunWarMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunWarMojo.java @@ -61,6 +61,10 @@ public class JettyRunWarMojo extends AbstractJettyMojo */ public void execute() throws MojoExecutionException, MojoFailureException { + if ( !"war".equals( project.getPackaging() ) || skip ) + { + return; + } super.execute(); } From 6ac625e22605719fabef61041619a583b44a7035 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Sat, 24 Jun 2017 21:27:24 +1000 Subject: [PATCH 078/147] add it test for run war exploded mojo Signed-off-by: olivier lamy --- .../invoker.properties | 2 + .../jetty-simple-base/pom.xml | 50 ++++++++ .../its/jetty_run_mojo_it/HelloServlet.java | 45 +++++++ .../its/jetty_run_mojo_it/PingServlet.java | 41 ++++++ .../main/resources/META-INF/web-fragment.xml | 32 +++++ .../jetty-simple-webapp/pom.xml | 121 ++++++++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 7 + .../jetty_run_mojo_it/TestHelloServlet.java | 59 +++++++++ .../it/jetty-run-war-exploded-mojo-it/pom.xml | 90 +++++++++++++ 9 files changed, 447 insertions(+) create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/invoker.properties create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/invoker.properties b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/invoker.properties new file mode 100644 index 00000000000..161dd58f0af --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/invoker.properties @@ -0,0 +1,2 @@ +invoker.goals = verify +#test-compile failsafe:integration-test \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml new file mode 100644 index 00000000000..4425c34f117 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-base + jar + + Jetty :: Simple :: Base + + + + + javax.servlet + javax.servlet-api + jar + provided + + + + org.slf4j + slf4j-api + + + + commons-io + commons-io + + + + org.eclipse.jetty.toolchain + jetty-perf-helper + 1.0.5 + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.1 + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java new file mode 100644 index 00000000000..a6d2a3e256d --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -0,0 +1,45 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * + */ +@WebServlet("/hello") +public class HelloServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java new file mode 100644 index 00000000000..f5686592252 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -0,0 +1,41 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class PingServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml new file mode 100644 index 00000000000..031012f7fed --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -0,0 +1,32 @@ + + + + + FragmentA + + + + + + + Ping + com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + + extra1123 + + + extra2345 + + + + + Ping + /ping + + + + \ No newline at end of file diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml new file mode 100644 index 00000000000..0489e0e1a2c --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml @@ -0,0 +1,121 @@ + + + 4.0.0 + + + com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + + + jetty-simple-webapp + war + + Jetty :: Simple :: Webapp + + + + + com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + jetty-simple-base + + + + org.eclipse.jetty + jetty-servlet + provided + + + + org.eclipse.jetty + jetty-client + @project.version@ + test + + + + junit + junit + 4.12 + test + + + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin-version} + + false + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.20 + + true + + @jetty.runPort@ + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.20 + + + @jetty.runPort@ + + + **/*TestHelloServlet* + + + + + integration-test + + integration-test + + + + verify + + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + + + start-jetty + test-compile + + run-exploded + + + true + + @jetty.runPort@ + + + + + + + + + + diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..2a5ac4b71bf --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + Jetty Simple Webapp run-mojo-it + diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java new file mode 100644 index 00000000000..4e3ced68d91 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -0,0 +1,59 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; + +import org.eclipse.jetty.client.HttpClient; +import org.junit.Assert; +import org.junit.Test; + +/** + * + */ +public class TestHelloServlet +{ + @Test + public void hello_servlet() + throws Exception + { + int port = Integer.getInteger( "jetty.runPort" ); + System.out.println( "port used:" + port ); + HttpClient httpClient = new HttpClient(); + try + { + httpClient.start(); + + String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "hello beer", response.trim() ); + + response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); + + System.out.println( "httpResponse:" + response ); + + Assert.assertEquals( "pong beer", response.trim() ); + } + finally + { + httpClient.stop(); + } + } +} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml new file mode 100644 index 00000000000..5b88c8fd196 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml @@ -0,0 +1,90 @@ + + + 4.0.0 + + com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + jetty-simple-project + 0.0.1-SNAPSHOT + pom + + Jetty :: Simple + + + UTF-8 + UTF-8 + 1.8 + 3.0.0 + @project.version@ + + + + jetty-simple-base + jetty-simple-webapp + + + + + + + com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + jetty-simple-base + ${project.version} + + + + javax.servlet + javax.servlet-api + 3.1.0 + jar + provided + + + + org.slf4j + slf4j-api + 1.7.21 + + + + commons-io + commons-io + 2.5 + + + + org.eclipse.jetty + jetty-servlet + ${jetty.version} + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.1 + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty.version} + + + + + + From d438c510751216a4cb5f07b2361e7c3b5d37d21e Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Sat, 24 Jun 2017 21:28:31 +1000 Subject: [PATCH 079/147] activate mojo it profile in Jenkinsfile Signed-off-by: olivier lamy --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0016dc734dd..185f2d6ab31 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,7 +53,7 @@ node { withEnv(mvnEnv) { timeout(time: 90, unit: 'MINUTES') { // Run test phase / ignore test failures - sh "mvn -B install -Dmaven.test.failure.ignore=true" + sh "mvn -B install -Dmaven.test.failure.ignore=true -Prun-its" // Report failures in the jenkins UI step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) From 2648b9a6e27f2d02ce1ee0a0783cd800b0309f07 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 26 Jun 2017 13:38:00 -0700 Subject: [PATCH 080/147] Restoring 8u131 profile to main pom From c6d45c0af1f15e1433cd30748ff40b5f16f62fad Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 26 Jun 2017 13:49:30 -0700 Subject: [PATCH 081/147] Restoring Jenkinsfile testing --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 185f2d6ab31..0016dc734dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,7 +53,7 @@ node { withEnv(mvnEnv) { timeout(time: 90, unit: 'MINUTES') { // Run test phase / ignore test failures - sh "mvn -B install -Dmaven.test.failure.ignore=true -Prun-its" + sh "mvn -B install -Dmaven.test.failure.ignore=true" // Report failures in the jenkins UI step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) From 27d85cb77ed01c88dec47fd9601ad0e33792217a Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 27 Jun 2017 10:36:17 +0200 Subject: [PATCH 082/147] Issue #1643 Configure selectors for AbstractProxyServlet --- .../org/eclipse/jetty/proxy/AbstractProxyServlet.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java index 09c50264057..5fc8e34813d 100644 --- a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java +++ b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java @@ -44,6 +44,7 @@ import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.ProtocolHandlers; import org.eclipse.jetty.client.api.Request; import org.eclipse.jetty.client.api.Response; +import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP; import org.eclipse.jetty.http.HttpField; import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.http.HttpHeaderValue; @@ -259,7 +260,7 @@ public abstract class AbstractProxyServlet extends HttpServlet * * * - * + * @see #newHttpClient() * @return a {@link HttpClient} configured from the {@link #getServletConfig() servlet configuration} * @throws ServletException if the {@link HttpClient} cannot be created */ @@ -340,11 +341,17 @@ public abstract class AbstractProxyServlet extends HttpServlet } /** + * The servlet init parameter 'selectors' can be set for the number of + * selector threads to be used by the HttpClient. * @return a new HttpClient instance */ protected HttpClient newHttpClient() { - return new HttpClient(); + int selectors = (Runtime.getRuntime().availableProcessors() + 1) / 2; + String value = getServletConfig().getInitParameter("selectors"); + if (value != null) + selectors = Integer.parseInt(value); + return new HttpClient(new HttpClientTransportOverHTTP(selectors),null); } protected HttpClient getHttpClient() From c2598408d06186aa634a5532d4d2c75e2f45cea6 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 27 Jun 2017 14:15:19 -0700 Subject: [PATCH 083/147] Issue #1650 - update clirr to report on API changes --- pom.xml | 6 +++--- tests/pom.xml | 46 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 860dc214aa2..4bf8f67c652 100644 --- a/pom.xml +++ b/pom.xml @@ -1092,9 +1092,9 @@ - org.neo4j.build.plugins + org.codehaus.mojo clirr-maven-plugin - 1.0.1 + 2.8 clirr-report.html ${project.build.directory}/clirr-report.xml @@ -1103,7 +1103,7 @@ false true info - 9.3.8.v20160314 + 9.4.6.v20170531 false diff --git a/tests/pom.xml b/tests/pom.xml index 27e448c5e96..ea58838cf0e 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -30,16 +30,42 @@ http://www.eclipse.org/jetty pom - - - org.codehaus.mojo - findbugs-maven-plugin - - - true - - - + + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + true + + + + org.codehaus.mojo + findbugs-maven-plugin + + + true + + + + org.codehaus.mojo + clirr-maven-plugin + + + true + + + + test-webapps From f2970967167745d5fb407e16964a834423d74ff8 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 29 Jun 2017 08:12:11 +0200 Subject: [PATCH 084/147] Fix #1653 --- .../jetty/webapp/ClasspathPattern.java | 2 +- .../eclipse/jetty/webapp/WebAppContext.java | 33 +++++++++++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/ClasspathPattern.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/ClasspathPattern.java index 9c224ef9ff0..5c089b1a331 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/ClasspathPattern.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/ClasspathPattern.java @@ -43,7 +43,7 @@ import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.resource.Resource; /** - * Classpath classes list performs sequential pattern matching of a class name + * Classpath classes list performs pattern matching of a class name * against an internal array of classpath pattern entries. * A class pattern is a string of one of the forms:

    *
  • 'org.package.SomeClass' will match a specific class diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java index 070c670bd1c..5268e9e9c8a 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java @@ -702,6 +702,10 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL } /* ------------------------------------------------------------ */ + /** + * @deprecated Use {@link #getServerClasspathPattern()}.{@link ClasspathPattern#add(String)} + * @param classOrPackageOrLocation pattern (see {@link ClasspathPattern} + */ @Deprecated public void addServerClass(String classOrPackageOrLocation) { @@ -713,13 +717,10 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL /* ------------------------------------------------------------ */ /** Prepend to the list of Server classes. - * @param classOrPackage A fully qualified class name (eg com.foo.MyClass) - * or a qualified package name ending with '.' (eg com.foo.). If the class - * or package has '-' it is excluded from the server classes and order is thus - * important when added system class patterns. This argument may also be a comma - * separated list of classOrPackage patterns. + * @param classOrPackage A pattern. * @see #setServerClasses(String[]) * @see Jetty Documentation: Classloading + * @deprecated Use {@link #getServerClasspathPattern()}.{@link ClasspathPattern#add(String)} */ @Deprecated public void prependServerClass(String classOrPackage) @@ -757,6 +758,11 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL } /* ------------------------------------------------------------ */ + /** + * + * @param classOrPackage pattern + * @deprecated Use {@link #getSystemClasspathPattern()}.{@link ClasspathPattern#add(String)} + */ @Deprecated public void addSystemClass(String classOrPackage) { @@ -769,13 +775,10 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL /* ------------------------------------------------------------ */ /** Prepend to the list of System classes. - * @param classOrPackage A fully qualified class name (eg com.foo.MyClass) - * or a qualified package name ending with '.' (eg com.foo.). If the class - * or package has '-' it is excluded from the system classes and order is thus - * important when added system class patterns.This argument may also be a comma - * separated list of classOrPackage patterns. + * @param classOrPackage A pattern. * @see #setSystemClasses(String[]) * @see Jetty Documentation: Classloading + * @deprecated Use {@link #getSystemClasspathPattern()}.{@link ClasspathPattern#add(String)} */ @Deprecated public void prependSystemClass(String classOrPackage) @@ -787,6 +790,11 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL } /* ------------------------------------------------------------ */ + /** + * @param name class name + * @return true if matched by {@link #getServerClasspathPattern()} + * @deprecated Use {@link #getServerClasspathPattern()}.{@link ClasspathPattern#match(String)} + */ @Deprecated public boolean isServerClass(String name) { @@ -797,6 +805,11 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL } /* ------------------------------------------------------------ */ + /** + * @param name class name + * @return true if matched by {@link #getServerClasspathPattern()} + * @deprecated Use {@link #getSystemClasspathPattern()}.{@link ClasspathPattern#match(String)} + */ @Deprecated public boolean isSystemClass(String name) { From e65d0ba0e741eabe56b540c2eefede43fd771646 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 29 Jun 2017 06:43:27 -0700 Subject: [PATCH 085/147] Improving test reliability (esp on Windows) --- .../eclipse/jetty/util/BufferUtilTest.java | 14 +++++++------- .../util/RolloverFileOutputStreamTest.java | 6 +++--- .../org/eclipse/jetty/util/TypeUtilTest.java | 19 +++++++++++-------- .../util/resource/FileSystemResourceTest.java | 7 +++---- .../jetty/util/resource/ResourceTest.java | 5 +++-- 5 files changed, 27 insertions(+), 24 deletions(-) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/BufferUtilTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/BufferUtilTest.java index 7c7a038dd4d..89a1f7e6470 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/BufferUtilTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/BufferUtilTest.java @@ -19,6 +19,12 @@ package org.eclipse.jetty.util; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileWriter; @@ -35,12 +41,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - public class BufferUtilTest { @Test @@ -346,7 +346,7 @@ public class BufferUtilTest String data="Now is the time for all good men to come to the aid of the party"; File file = File.createTempFile("test",".txt"); file.deleteOnExit(); - try(FileWriter out = new FileWriter(file);) + try(FileWriter out = new FileWriter(file)) { out.write(data); } diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java index 9ee1410fc8d..2b6aeaa5493 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java @@ -35,7 +35,7 @@ import java.util.TimeZone; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.toolchain.test.FS; -import org.eclipse.jetty.toolchain.test.TestingDir; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.hamcrest.Matchers; import org.junit.Rule; import org.junit.Test; @@ -166,7 +166,7 @@ public class RolloverFileOutputStreamTest @Test public void testFileHandling() throws Exception { - File testDir = testingDir.getEmptyPathDir().toFile(); + File testDir = MavenTestingUtils.getTargetTestingDir(RolloverFileOutputStreamTest.class.getName() + "_testFileHandling"); Path testPath = testDir.toPath(); FS.ensureEmpty(testDir); @@ -277,7 +277,7 @@ public class RolloverFileOutputStreamTest @Test public void testRollover() throws Exception { - File testDir = testingDir.getEmptyPathDir().toFile(); + File testDir = MavenTestingUtils.getTargetTestingDir(RolloverFileOutputStreamTest.class.getName() + "_testRollover"); FS.ensureEmpty(testDir); TimeZone zone = toZoneId("Australia/Sydney"); diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java index 032cae7c313..d7085b9c77f 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/TypeUtilTest.java @@ -19,14 +19,16 @@ package org.eclipse.jetty.util; -import org.eclipse.jetty.toolchain.test.JDK; -import org.hamcrest.Matchers; -import org.junit.Assert; -import org.junit.Test; +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertThat; import java.nio.file.Path; import java.nio.file.Paths; +import org.eclipse.jetty.toolchain.test.JDK; +import org.junit.Assert; +import org.junit.Test; + public class TypeUtilTest { @Test @@ -129,18 +131,19 @@ public class TypeUtilTest public void testGetLocationOfClass() throws Exception { Path mavenRepoPath = Paths.get( System.getProperty( "mavenRepoPath" ) ); - String mavenRepo = mavenRepoPath.toFile().getPath(); + String mavenRepo = mavenRepoPath.toFile().getPath().replaceAll("\\\\", "/"); + // Classes from maven dependencies - Assert.assertThat(TypeUtil.getLocationOfClass(Assert.class).toASCIIString(),Matchers.containsString(mavenRepo)); + assertThat(TypeUtil.getLocationOfClass(Assert.class).toASCIIString(),containsString(mavenRepo)); // Class from project dependencies - Assert.assertThat(TypeUtil.getLocationOfClass(TypeUtil.class).toASCIIString(),Matchers.containsString("/classes/")); + assertThat(TypeUtil.getLocationOfClass(TypeUtil.class).toASCIIString(),containsString("/classes/")); // Class from JVM core String expectedJavaBase = "/rt.jar"; if(JDK.IS_9) expectedJavaBase = "/java.base/"; - Assert.assertThat(TypeUtil.getLocationOfClass(String.class).toASCIIString(),Matchers.containsString(expectedJavaBase)); + assertThat(TypeUtil.getLocationOfClass(String.class).toASCIIString(),containsString(expectedJavaBase)); } } diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java index f1e3e16316b..68b8d28266a 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java @@ -1404,13 +1404,12 @@ public class FileSystemResourceTest assumeTrue("Only windows supports UNC paths", OS.IS_WINDOWS); assumeFalse("FileResource does not support this test", _class.equals(FileResource.class)); - try (Resource base = newResource(URI.create("file://127.0.0.1/path"))) + try (Resource base = newResource(URI.create("file:////127.0.0.1/path"))) { Resource resource = base.addPath("WEB-INF/"); assertThat("getURI()", resource.getURI().toASCIIString(), containsString("path/WEB-INF/")); - assertThat("isAlias()", resource.isAlias(), is(true)); - assertThat("getAlias()", resource.getAlias(), notNullValue()); - assertThat("getAlias()", resource.getAlias().toASCIIString(), containsString("path/WEB-INF")); + assertThat("isAlias()", resource.isAlias(), is(false)); + assertThat("getAlias()", resource.getAlias(), nullValue()); } } } diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java index 3937d97a248..f978024bf4d 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/resource/ResourceTest.java @@ -196,8 +196,9 @@ public class ResourceTest File testDir = MavenTestingUtils.getTargetTestingDir(ResourceTest.class.getName()); FS.ensureEmpty(testDir); - File tmpFile = File.createTempFile("test",null,testDir); - + File tmpFile = new File(testDir, "test.tmp"); + FS.touch(tmpFile); + cases.addCase(new Data(tmpFile.toString(),EXISTS,!DIR)); // Some resource references. From 12e61bf97370f6975b7e51cb8eeaa10ab83ac31e Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 29 Jun 2017 09:57:28 -0700 Subject: [PATCH 086/147] Making tests more reliable on lesser FileSystems --- .../jetty/servlet/DefaultServletTest.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) 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 cff16eeea75..833d9236298 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 @@ -19,6 +19,7 @@ package org.eclipse.jetty.servlet; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeTrue; import java.io.File; import java.io.FileOutputStream; @@ -231,10 +232,7 @@ public class DefaultServletTest createFile(index, "

    Hello Index

    "); File wackyDir = new File(resBase, "dir?"); - if (!OS.IS_WINDOWS) - { - FS.ensureDirExists(wackyDir); - } + assumeTrue("FileSystem should support question dirs", wackyDir.mkdirs()); wackyDir = new File(resBase, "dir;"); assertTrue(wackyDir.mkdirs()); @@ -266,13 +264,8 @@ public class DefaultServletTest response = connector.getResponse("GET /context/dir?/ HTTP/1.0\r\n\r\n"); assertResponseContains("404", response); - if (!OS.IS_WINDOWS) - { - response = connector.getResponse("GET /context/dir%3F/ HTTP/1.0\r\n\r\n"); - assertResponseContains("Directory: /context/dir?/<", response); - } - else - assertResponseContains("404", response); + response = connector.getResponse("GET /context/dir%3F/ HTTP/1.0\r\n\r\n"); + assertResponseContains("Directory: /context/dir?/<", response); response = connector.getResponse("GET /context/index.html HTTP/1.0\r\n\r\n"); assertResponseContains("Hello Index", response); @@ -421,7 +414,8 @@ public class DefaultServletTest context.setBaseResource(Resource.newResource(resBase)); File dir = new File(resBase, "dir?"); - assertTrue(dir.mkdirs()); + assumeTrue("FileSystem should support question dirs", dir.mkdirs()); + File index = new File(dir, "index.html"); createFile(index, "

    Hello Index

    "); @@ -437,7 +431,6 @@ public class DefaultServletTest response = connector.getResponse("GET /context/dir%3F/ HTTP/1.0\r\n\r\n"); assertResponseContains("Location: http://0.0.0.0/context/dir%3F/index.html", response); } - @Test public void testWelcomeServlet() throws Exception From 47b72399a5f3ae896bc4b71f4a47e947ad84731a Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Thu, 29 Jun 2017 14:09:37 -0400 Subject: [PATCH 087/147] Resolves #1408 --- .../clients/http/http-client-cookie.adoc | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/jetty-documentation/src/main/asciidoc/development/clients/http/http-client-cookie.adoc b/jetty-documentation/src/main/asciidoc/development/clients/http/http-client-cookie.adoc index a2ab7b39eaa..9aa7d8839f2 100644 --- a/jetty-documentation/src/main/asciidoc/development/clients/http/http-client-cookie.adoc +++ b/jetty-documentation/src/main/asciidoc/development/clients/http/http-client-cookie.adoc @@ -86,3 +86,33 @@ public class GoogleOnlyCookieStore extends HttpCookieStore ---- The example above will retain only cookies that come from the `google.com` domain or sub-domains. + +==== Special Characters in Cookies +Jetty is compliant with link:https://tools.ietf.org/html/rfc6265[RFC6265], and as such care must be taken when setting a cookie value that includes special characters such as `;`. + +Previously, Version=1 cookies defined in link:https://tools.ietf.org/html/rfc2109[RFC2109] (and continued in link:https://tools.ietf.org/html/rfc2965[RFC2965]) allowed for special/reserved characters to be enclosed within double quotes when declared in a `Set-Cookie` response header: + +[source, java, subs="{sub-order}"] +---- +Set-Cookie: foo="bar;baz";Version=1;Path="/secur" +---- + +This was added to the HTTP Response header as follows: + +[source, java, subs="{sub-order}"] +---- +Cookie cookie = new Cookie("foo", "bar;baz"); +cookie.setPath("/secur"); +response.addCookie(cookie); +---- + +The introduction of RFC6265 has rendered this approach no longer possible; users are now required to encode cookie values that use these special characters. +This can be done utilizing `javax.servlet.http.Cookie` as follows: + +[source, java, subs="{sub-order}"] +---- +Cookie cookie = new Cookie("foo", URLEncoder.encode("bar;baz", "utf-8")); +---- + +Jetty validates all cookie names and values being added to the `HttpServletResponse` via the `addCookie(Cookie)` method. +If an illegal value is discovered Jetty will throw an `IllegalArgumentException` with the details. From 349ee90b5d19a670f1891edea55f9a7d17c193db Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 3 Jul 2017 13:15:45 +0200 Subject: [PATCH 088/147] Issue #1643 - ProxyServlet always uses default number of selector threads. Reviewed changes and applied them to FastCGIProxyServlet as well. --- .../server/proxy/FastCGIProxyServlet.java | 20 +++++++++++-------- .../jetty/proxy/AbstractProxyServlet.java | 7 ++++++- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/jetty-fcgi/fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/proxy/FastCGIProxyServlet.java b/jetty-fcgi/fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/proxy/FastCGIProxyServlet.java index b2cc9ffa25a..b5a42262c40 100644 --- a/jetty-fcgi/fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/proxy/FastCGIProxyServlet.java +++ b/jetty-fcgi/fcgi-server/src/main/java/org/eclipse/jetty/fcgi/server/proxy/FastCGIProxyServlet.java @@ -45,23 +45,23 @@ import org.eclipse.jetty.proxy.AsyncProxyServlet; * Specific implementation of {@link org.eclipse.jetty.proxy.AsyncProxyServlet.Transparent} for FastCGI. *

    * This servlet accepts a HTTP request and transforms it into a FastCGI request - * that is sent to the FastCGI server specified in the proxyTo + * that is sent to the FastCGI server specified in the {@code proxyTo} * init-param. *

    * This servlet accepts two additional init-params: *

      - *
    • scriptRoot, mandatory, that must be set to the directory where + *
    • {@code scriptRoot}, mandatory, that must be set to the directory where * the application that must be served via FastCGI is installed and corresponds to * the FastCGI DOCUMENT_ROOT parameter
    • - *
    • scriptPattern, optional, defaults to (.+?\.php), + *
    • {@code scriptPattern}, optional, defaults to {@code (.+?\.php)}, * that specifies a regular expression with at least 1 and at most 2 groups that specify * respectively: *
        *
      • the FastCGI SCRIPT_NAME parameter
      • *
      • the FastCGI PATH_INFO parameter
      • *
    • - *
    • fastCGI.HTTPS, optional, defaults to false, that specifies whether - * to force the FastCGI HTTPS parameter to the value on
    • + *
    • {@code fastCGI.HTTPS}, optional, defaults to false, that specifies whether + * to force the FastCGI {@code HTTPS} parameter to the value {@code on}
    • *
    * * @see TryFilesFilter @@ -111,7 +111,11 @@ public class FastCGIProxyServlet extends AsyncProxyServlet.Transparent String scriptRoot = config.getInitParameter(SCRIPT_ROOT_INIT_PARAM); if (scriptRoot == null) throw new IllegalArgumentException("Mandatory parameter '" + SCRIPT_ROOT_INIT_PARAM + "' not configured"); - return new HttpClient(new ProxyHttpClientTransportOverFCGI(scriptRoot), null); + int selectors = Math.max(1, Runtime.getRuntime().availableProcessors() / 2); + String value = config.getInitParameter("selectors"); + if (value != null) + selectors = Integer.parseInt(value); + return new HttpClient(new ProxyHttpClientTransportOverFCGI(selectors, scriptRoot), null); } @Override @@ -238,9 +242,9 @@ public class FastCGIProxyServlet extends AsyncProxyServlet.Transparent private class ProxyHttpClientTransportOverFCGI extends HttpClientTransportOverFCGI { - public ProxyHttpClientTransportOverFCGI(String scriptRoot) + private ProxyHttpClientTransportOverFCGI(int selectors, String scriptRoot) { - super(scriptRoot); + super(selectors, false, scriptRoot); } @Override diff --git a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java index 5fc8e34813d..cda4db05d1d 100644 --- a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java +++ b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java @@ -258,6 +258,11 @@ public abstract class AbstractProxyServlet extends HttpServlet * HttpClient's default * The response buffer size, see {@link HttpClient#setResponseBufferSize(int)} * + * + * selectors + * cores / 2 + * The number of NIO selectors used by {@link HttpClient} + * * * * @see #newHttpClient() @@ -347,7 +352,7 @@ public abstract class AbstractProxyServlet extends HttpServlet */ protected HttpClient newHttpClient() { - int selectors = (Runtime.getRuntime().availableProcessors() + 1) / 2; + int selectors = Math.max(1, Runtime.getRuntime().availableProcessors() / 2); String value = getServletConfig().getInitParameter("selectors"); if (value != null) selectors = Integer.parseInt(value); From 386ca510e6a6fa177ad2a55e938fdbd844fb1293 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 3 Jul 2017 14:51:45 +0200 Subject: [PATCH 089/147] Issue #1655 added openAcceptChannel --- .../eclipse/jetty/server/ServerConnector.java | 62 +++++++++++-------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java index 4137f226e0c..70dab444d05 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java @@ -279,36 +279,44 @@ public class ServerConnector extends AbstractNetworkConnector { if (_acceptChannel == null) { - ServerSocketChannel serverChannel = null; - if (isInheritChannel()) - { - Channel channel = System.inheritedChannel(); - if (channel instanceof ServerSocketChannel) - serverChannel = (ServerSocketChannel)channel; - else - LOG.warn("Unable to use System.inheritedChannel() [{}]. Trying a new ServerSocketChannel at {}:{}", channel, getHost(), getPort()); - } - - if (serverChannel == null) - { - serverChannel = ServerSocketChannel.open(); - - InetSocketAddress bindAddress = getHost() == null ? new InetSocketAddress(getPort()) : new InetSocketAddress(getHost(), getPort()); - serverChannel.socket().setReuseAddress(getReuseAddress()); - serverChannel.socket().bind(bindAddress, getAcceptQueueSize()); - - _localPort = serverChannel.socket().getLocalPort(); - if (_localPort <= 0) - throw new IOException("Server channel not bound"); - } - - serverChannel.configureBlocking(true); - addBean(serverChannel); - - _acceptChannel = serverChannel; + _acceptChannel = openAcceptChannel(); + _acceptChannel.configureBlocking(true); + _localPort = _acceptChannel.socket().getLocalPort(); + if (_localPort <= 0) + throw new IOException("Server channel not bound"); + addBean(_acceptChannel); } } + /** + * Called by {@link #open()} to obtain the accepting channel. + * @return ServerSocketChannel used to accept connections. + * @throws IOException + */ + protected ServerSocketChannel openAcceptChannel() throws IOException + { + ServerSocketChannel serverChannel = null; + if (isInheritChannel()) + { + Channel channel = System.inheritedChannel(); + if (channel instanceof ServerSocketChannel) + serverChannel = (ServerSocketChannel)channel; + else + LOG.warn("Unable to use System.inheritedChannel() [{}]. Trying a new ServerSocketChannel at {}:{}", channel, getHost(), getPort()); + } + + if (serverChannel == null) + { + serverChannel = ServerSocketChannel.open(); + + InetSocketAddress bindAddress = getHost() == null ? new InetSocketAddress(getPort()) : new InetSocketAddress(getHost(), getPort()); + serverChannel.socket().setReuseAddress(getReuseAddress()); + serverChannel.socket().bind(bindAddress, getAcceptQueueSize()); + } + + return serverChannel; + } + @Override public Future shutdown() { From 7dc2559c8ba1f5cb98f7316791443d313a3240e6 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 3 Jul 2017 15:34:23 +0200 Subject: [PATCH 090/147] Issue #1655 added setter for accept channel --- .../org/eclipse/jetty/server/ServerConnector.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java index 70dab444d05..399bff510fe 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java @@ -274,6 +274,20 @@ public class ServerConnector extends AbstractNetworkConnector _inheritChannel = inheritChannel; } + + public ServerSocketChannel getAcceptChannel() + { + return _acceptChannel; + } + + public void setAcceptChannel(ServerSocketChannel acceptChannel) + { + if (isStarted()) + throw new IllegalStateException(getState()); + updateBean(_acceptChannel,acceptChannel); + _acceptChannel = acceptChannel; + } + @Override public void open() throws IOException { @@ -288,6 +302,7 @@ public class ServerConnector extends AbstractNetworkConnector } } + /** * Called by {@link #open()} to obtain the accepting channel. * @return ServerSocketChannel used to accept connections. From 2202d333fe08dc30bc9179a92d0f31460dccb2ea Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 3 Jul 2017 17:48:07 +0200 Subject: [PATCH 091/147] Issue #1655 ServerConnector configured with channel converted setter to open method added test harness --- .../eclipse/jetty/server/ServerConnector.java | 21 ++++---- .../jetty/server/ServerConnectorTest.java | 48 +++++++++++++++++++ 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java index 399bff510fe..1d296fb82f9 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java @@ -266,7 +266,7 @@ public class ServerConnector extends AbstractNetworkConnector *

    Use it with xinetd/inetd, to launch an instance of Jetty on demand. The port * used to access pages on the Jetty instance is the same as the port used to * launch Jetty.

    - * + * @see ServerConnector#openAcceptChannel() * @param inheritChannel whether this connector uses a channel inherited from the JVM. */ public void setInheritChannel(boolean inheritChannel) @@ -274,18 +274,22 @@ public class ServerConnector extends AbstractNetworkConnector _inheritChannel = inheritChannel; } - - public ServerSocketChannel getAcceptChannel() - { - return _acceptChannel; - } - - public void setAcceptChannel(ServerSocketChannel acceptChannel) + /** + * Open the connector using the passed ServerSocketChannel. + * This open method can be called before starting the connector to pass it a ServerSocketChannel + * that will be used instead of one returned from {@link #openAcceptChannel()} + * @param acceptChannel the channel to use + * @throws IOException + */ + public void open(ServerSocketChannel acceptChannel) throws IOException { if (isStarted()) throw new IllegalStateException(getState()); updateBean(_acceptChannel,acceptChannel); _acceptChannel = acceptChannel; + _localPort = _acceptChannel.socket().getLocalPort(); + if (_localPort <= 0) + throw new IOException("Server channel not bound"); } @Override @@ -302,7 +306,6 @@ public class ServerConnector extends AbstractNetworkConnector } } - /** * Called by {@link #open()} to obtain the accepting channel. * @return ServerSocketChannel used to accept connections. diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java index 832ca51f836..d89088a6634 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java @@ -32,9 +32,11 @@ import java.io.InputStream; import java.io.PrintWriter; import java.lang.reflect.Field; import java.net.HttpURLConnection; +import java.net.InetSocketAddress; import java.net.Socket; import java.net.URI; import java.net.URISyntaxException; +import java.nio.channels.ServerSocketChannel; import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.concurrent.atomic.AtomicLong; @@ -52,8 +54,20 @@ import org.eclipse.jetty.toolchain.test.OS; import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.log.StacklessLogging; import org.hamcrest.Matchers; +import org.junit.Assert; import org.junit.Test; +import static org.hamcrest.Matchers.anyOf; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + public class ServerConnectorTest { public static class ReuseInfoHandler extends AbstractHandler @@ -265,5 +279,39 @@ public class ServerConnectorTest { server.stop(); } + } + + @Test + public void testOpenWithServerSocketChannel() throws Exception + { + Server server = new Server(); + ServerConnector connector = new ServerConnector(server); + server.addConnector(connector); + + ServerSocketChannel channel = ServerSocketChannel.open(); + channel.bind(new InetSocketAddress(0)); + + assertTrue(channel.isOpen()); + int port = channel.socket().getLocalPort(); + assertThat(port,greaterThan(0)); + + connector.open(channel); + + assertThat(connector.getLocalPort(),is(port)); + + server.start(); + + assertThat(connector.getLocalPort(),is(port)); + assertThat(connector.getTransport(),is(channel)); + + server.stop(); + + assertThat(connector.getTransport(),Matchers.nullValue()); + + + + + + } } From 191b6e044f285f4bb131f512b8a20e5f336dbb36 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 4 Jul 2017 11:23:17 +0200 Subject: [PATCH 092/147] Fixes #1656 - Improve configurability of ConnectionPools. Introduced ConnectionPool.Factory and HttpClientTransport.connectionPoolFactory. This allows applications to create a ConnectionPool given the HttpDestination. --- .../AbstractConnectorHttpClientTransport.java | 183 ++++++++++++++++++ .../client/AbstractHttpClientTransport.java | 160 +-------------- .../eclipse/jetty/client/ConnectionPool.java | 53 +++++ .../jetty/client/HttpClientTransport.java | 10 + .../eclipse/jetty/client/HttpDestination.java | 5 +- .../client/MultiplexHttpDestination.java | 6 - .../jetty/client/PoolingHttpDestination.java | 5 - .../http/HttpClientTransportOverHTTP.java | 6 +- .../client/ValidatingConnectionPoolTest.java | 31 +-- .../http/HttpClientTransportOverFCGI.java | 15 +- .../server/AbstractHttpClientServerTest.java | 29 +-- .../http/HttpClientTransportOverHTTP2.java | 32 ++- .../jetty/http/client/HttpClientLoadTest.java | 58 ++---- 13 files changed, 313 insertions(+), 280 deletions(-) create mode 100644 jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java new file mode 100644 index 00000000000..e50294ba3f5 --- /dev/null +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectorHttpClientTransport.java @@ -0,0 +1,183 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.client; + +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.net.SocketException; +import java.nio.channels.SelectableChannel; +import java.nio.channels.SelectionKey; +import java.nio.channels.SocketChannel; +import java.util.Map; + +import org.eclipse.jetty.client.api.Connection; +import org.eclipse.jetty.io.EndPoint; +import org.eclipse.jetty.io.ManagedSelector; +import org.eclipse.jetty.io.SelectorManager; +import org.eclipse.jetty.io.SocketChannelEndPoint; +import org.eclipse.jetty.io.ssl.SslClientConnectionFactory; +import org.eclipse.jetty.util.Promise; +import org.eclipse.jetty.util.annotation.ManagedAttribute; + +public abstract class AbstractConnectorHttpClientTransport extends AbstractHttpClientTransport +{ + private final int selectors; + private SelectorManager selectorManager; + + protected AbstractConnectorHttpClientTransport(int selectors) + { + this.selectors = selectors; + } + + @ManagedAttribute(value = "The number of selectors", readonly = true) + public int getSelectors() + { + return selectors; + } + + @Override + protected void doStart() throws Exception + { + HttpClient httpClient = getHttpClient(); + selectorManager = newSelectorManager(httpClient); + selectorManager.setConnectTimeout(httpClient.getConnectTimeout()); + addBean(selectorManager); + super.doStart(); + } + + @Override + protected void doStop() throws Exception + { + super.doStop(); + removeBean(selectorManager); + } + + @Override + public void connect(InetSocketAddress address, Map context) + { + SocketChannel channel = null; + try + { + channel = SocketChannel.open(); + HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY); + HttpClient client = destination.getHttpClient(); + SocketAddress bindAddress = client.getBindAddress(); + if (bindAddress != null) + channel.bind(bindAddress); + configure(client, channel); + + context.put(SslClientConnectionFactory.SSL_PEER_HOST_CONTEXT_KEY, destination.getHost()); + context.put(SslClientConnectionFactory.SSL_PEER_PORT_CONTEXT_KEY, destination.getPort()); + + if (client.isConnectBlocking()) + { + channel.socket().connect(address, (int)client.getConnectTimeout()); + channel.configureBlocking(false); + selectorManager.accept(channel, context); + } + else + { + channel.configureBlocking(false); + if (channel.connect(address)) + selectorManager.accept(channel, context); + else + selectorManager.connect(channel, context); + } + } + // Must catch all exceptions, since some like + // UnresolvedAddressException are not IOExceptions. + catch (Throwable x) + { + // If IPv6 is not deployed, a generic SocketException "Network is unreachable" + // exception is being thrown, so we attempt to provide a better error message. + if (x.getClass() == SocketException.class) + x = new SocketException("Could not connect to " + address).initCause(x); + + try + { + if (channel != null) + channel.close(); + } + catch (IOException xx) + { + LOG.ignore(xx); + } + finally + { + connectFailed(context, x); + } + } + } + + protected void connectFailed(Map context, Throwable x) + { + if (LOG.isDebugEnabled()) + LOG.debug("Could not connect to {}", context.get(HTTP_DESTINATION_CONTEXT_KEY)); + @SuppressWarnings("unchecked") + Promise promise = (Promise)context.get(HTTP_CONNECTION_PROMISE_CONTEXT_KEY); + promise.failed(x); + } + + protected void configure(HttpClient client, SocketChannel channel) throws IOException + { + channel.socket().setTcpNoDelay(client.isTCPNoDelay()); + } + + protected SelectorManager newSelectorManager(HttpClient client) + { + return new ClientSelectorManager(client, getSelectors()); + } + + protected class ClientSelectorManager extends SelectorManager + { + private final HttpClient client; + + protected ClientSelectorManager(HttpClient client, int selectors) + { + super(client.getExecutor(), client.getScheduler(), selectors); + this.client = client; + } + + @Override + protected EndPoint newEndPoint(SelectableChannel channel, ManagedSelector selector, SelectionKey key) + { + SocketChannelEndPoint endp = new SocketChannelEndPoint(channel, selector, key, getScheduler()); + endp.setIdleTimeout(client.getIdleTimeout()); + return endp; + } + + @Override + public org.eclipse.jetty.io.Connection newConnection(SelectableChannel channel, EndPoint endPoint, Object attachment) throws IOException + { + @SuppressWarnings("unchecked") + Map context = (Map)attachment; + HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY); + return destination.getClientConnectionFactory().newConnection(endPoint, context); + } + + @Override + protected void connectionFailed(SelectableChannel channel, Throwable x, Object attachment) + { + @SuppressWarnings("unchecked") + Map context = (Map)attachment; + connectFailed(context, x); + } + } +} diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java index 0b120aa6a16..499c170c69e 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractHttpClientTransport.java @@ -18,24 +18,6 @@ package org.eclipse.jetty.client; -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import java.net.SocketException; -import java.nio.channels.SelectableChannel; -import java.nio.channels.SelectionKey; -import java.nio.channels.SocketChannel; -import java.util.Map; - -import org.eclipse.jetty.client.api.Connection; -import org.eclipse.jetty.io.EndPoint; -import org.eclipse.jetty.io.ManagedSelector; -import org.eclipse.jetty.io.SelectChannelEndPoint; -import org.eclipse.jetty.io.SelectorManager; -import org.eclipse.jetty.io.SocketChannelEndPoint; -import org.eclipse.jetty.io.ssl.SslClientConnectionFactory; -import org.eclipse.jetty.util.Promise; -import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.log.Log; @@ -46,14 +28,8 @@ public abstract class AbstractHttpClientTransport extends ContainerLifeCycle imp { protected static final Logger LOG = Log.getLogger(HttpClientTransport.class); - private final int selectors; - private volatile HttpClient client; - private volatile SelectorManager selectorManager; - - protected AbstractHttpClientTransport(int selectors) - { - this.selectors = selectors; - } + private HttpClient client; + private ConnectionPool.Factory factory; protected HttpClient getHttpClient() { @@ -66,137 +42,15 @@ public abstract class AbstractHttpClientTransport extends ContainerLifeCycle imp this.client = client; } - @ManagedAttribute(value = "The number of selectors", readonly = true) - public int getSelectors() + @Override + public ConnectionPool.Factory getConnectionPoolFactory() { - return selectors; + return factory; } @Override - protected void doStart() throws Exception + public void setConnectionPoolFactory(ConnectionPool.Factory factory) { - selectorManager = newSelectorManager(client); - selectorManager.setConnectTimeout(client.getConnectTimeout()); - addBean(selectorManager); - super.doStart(); - } - - @Override - protected void doStop() throws Exception - { - super.doStop(); - removeBean(selectorManager); - } - - @Override - public void connect(InetSocketAddress address, Map context) - { - SocketChannel channel = null; - try - { - channel = SocketChannel.open(); - HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY); - HttpClient client = destination.getHttpClient(); - SocketAddress bindAddress = client.getBindAddress(); - if (bindAddress != null) - channel.bind(bindAddress); - configure(client, channel); - - context.put(SslClientConnectionFactory.SSL_PEER_HOST_CONTEXT_KEY, destination.getHost()); - context.put(SslClientConnectionFactory.SSL_PEER_PORT_CONTEXT_KEY, destination.getPort()); - - if (client.isConnectBlocking()) - { - channel.socket().connect(address, (int)client.getConnectTimeout()); - channel.configureBlocking(false); - selectorManager.accept(channel, context); - } - else - { - channel.configureBlocking(false); - if (channel.connect(address)) - selectorManager.accept(channel, context); - else - selectorManager.connect(channel, context); - } - } - // Must catch all exceptions, since some like - // UnresolvedAddressException are not IOExceptions. - catch (Throwable x) - { - // If IPv6 is not deployed, a generic SocketException "Network is unreachable" - // exception is being thrown, so we attempt to provide a better error message. - if (x.getClass() == SocketException.class) - x = new SocketException("Could not connect to " + address).initCause(x); - - try - { - if (channel != null) - channel.close(); - } - catch (IOException xx) - { - LOG.ignore(xx); - } - finally - { - connectFailed(context, x); - } - } - } - - protected void connectFailed(Map context, Throwable x) - { - if (LOG.isDebugEnabled()) - LOG.debug("Could not connect to {}", context.get(HTTP_DESTINATION_CONTEXT_KEY)); - @SuppressWarnings("unchecked") - Promise promise = (Promise)context.get(HTTP_CONNECTION_PROMISE_CONTEXT_KEY); - promise.failed(x); - } - - protected void configure(HttpClient client, SocketChannel channel) throws IOException - { - channel.socket().setTcpNoDelay(client.isTCPNoDelay()); - } - - protected SelectorManager newSelectorManager(HttpClient client) - { - return new ClientSelectorManager(client, selectors); - } - - protected class ClientSelectorManager extends SelectorManager - { - private final HttpClient client; - - protected ClientSelectorManager(HttpClient client, int selectors) - { - super(client.getExecutor(), client.getScheduler(), selectors); - this.client = client; - } - - @Override - protected EndPoint newEndPoint(SelectableChannel channel, ManagedSelector selector, SelectionKey key) - { - SocketChannelEndPoint endp = new SocketChannelEndPoint(channel, selector, key, getScheduler()); - endp.setIdleTimeout(client.getIdleTimeout()); - return endp; - } - - @Override - public org.eclipse.jetty.io.Connection newConnection(SelectableChannel channel, EndPoint endPoint, Object attachment) throws IOException - { - @SuppressWarnings("unchecked") - Map context = (Map)attachment; - HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY); - return destination.getClientConnectionFactory().newConnection(endPoint, context); - } - - @Override - protected void connectionFailed(SelectableChannel channel, Throwable x, Object attachment) - { - @SuppressWarnings("unchecked") - Map context = (Map)attachment; - connectFailed(context, x); - } + this.factory = factory; } } diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java b/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java index 9bdcc297a44..effaa0da802 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java @@ -22,20 +22,73 @@ import java.io.Closeable; import org.eclipse.jetty.client.api.Connection; +/** + *

    Client-side connection pool abstraction.

    + */ public interface ConnectionPool extends Closeable { + /** + * @param connection the connection to test + * @return whether the given connection is currently in use + */ boolean isActive(Connection connection); + /** + * @return whether this ConnectionPool has no open connections + */ boolean isEmpty(); + /** + * @return whether this ConnectionPool has been closed + * @see #close() + */ boolean isClosed(); + /** + *

    Returns an idle connection, if available, or schedules the opening + * of a new connection and returns {@code null}.

    + * + * @return an available connection, or null + */ Connection acquire(); + /** + *

    Returns the given connection, previously obtained via {@link #acquire()}, + * back to this ConnectionPool.

    + * + * @param connection the connection to release + * @return true if the connection has been released, false if the connection + * was not obtained from the this ConnectionPool + */ boolean release(Connection connection); + /** + *

    Removes the given connection from this ConnectionPool.

    + * + * @param connection the connection to remove + * @return true if the connection was removed from this ConnectionPool + */ boolean remove(Connection connection); + /** + * Closes this ConnectionPool. + * + * @see #isClosed() + */ @Override void close(); + + /** + * Factory for ConnectionPool instances. + */ + interface Factory + { + /** + * Creates a new ConnectionPool for the given destination. + * + * @param destination the destination to create the ConnectionPool for + * @return the newly created ConnectionPool + */ + ConnectionPool newConnectionPool(HttpDestination destination); + } } diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java index 45382531b1d..b799b1be1de 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClientTransport.java @@ -68,4 +68,14 @@ public interface HttpClientTransport extends ClientConnectionFactory * @param context the context information to establish the connection */ public void connect(InetSocketAddress address, Map context); + + /** + * @return the factory for ConnectionPool instances + */ + public ConnectionPool.Factory getConnectionPoolFactory(); + + /** + * @param factory the factory for ConnectionPool instances + */ + public void setConnectionPoolFactory(ConnectionPool.Factory factory); } diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java index dbc4ba4f787..bbe3bb375e5 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java @@ -114,7 +114,10 @@ public abstract class HttpDestination extends ContainerLifeCycle implements Dest removeBean(connectionPool); } - protected abstract ConnectionPool newConnectionPool(HttpClient client); + protected ConnectionPool newConnectionPool(HttpClient client) + { + return client.getTransport().getConnectionPoolFactory().newConnectionPool(this); + } protected Queue newExchangeQueue(HttpClient client) { diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/MultiplexHttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/MultiplexHttpDestination.java index 4267a40be15..da168f889f0 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/MultiplexHttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/MultiplexHttpDestination.java @@ -25,12 +25,6 @@ public abstract class MultiplexHttpDestination extends HttpDestination super(client, origin); } - protected ConnectionPool newConnectionPool(HttpClient client) - { - return new MultiplexConnectionPool(this, client.getMaxConnectionsPerDestination(), this, - client.getMaxRequestsQueuedPerDestination()); - } - public int getMaxRequestsPerConnection() { ConnectionPool connectionPool = getConnectionPool(); diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java index a9ee093e67a..9746052497f 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java @@ -24,9 +24,4 @@ public abstract class PoolingHttpDestination extends HttpDestination { super(client, origin); } - - protected ConnectionPool newConnectionPool(HttpClient client) - { - return new DuplexConnectionPool(this, client.getMaxConnectionsPerDestination(), this); - } } diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpClientTransportOverHTTP.java b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpClientTransportOverHTTP.java index 931ca304299..1380c52b48b 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpClientTransportOverHTTP.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpClientTransportOverHTTP.java @@ -21,7 +21,8 @@ package org.eclipse.jetty.client.http; import java.io.IOException; import java.util.Map; -import org.eclipse.jetty.client.AbstractHttpClientTransport; +import org.eclipse.jetty.client.AbstractConnectorHttpClientTransport; +import org.eclipse.jetty.client.DuplexConnectionPool; import org.eclipse.jetty.client.HttpDestination; import org.eclipse.jetty.client.Origin; import org.eclipse.jetty.client.api.Connection; @@ -30,7 +31,7 @@ import org.eclipse.jetty.util.Promise; import org.eclipse.jetty.util.annotation.ManagedObject; @ManagedObject("The HTTP/1.1 client transport") -public class HttpClientTransportOverHTTP extends AbstractHttpClientTransport +public class HttpClientTransportOverHTTP extends AbstractConnectorHttpClientTransport { public HttpClientTransportOverHTTP() { @@ -40,6 +41,7 @@ public class HttpClientTransportOverHTTP extends AbstractHttpClientTransport public HttpClientTransportOverHTTP(int selectors) { super(selectors); + setConnectionPoolFactory(destination -> new DuplexConnectionPool(destination, getHttpClient().getMaxConnectionsPerDestination(), destination)); } @Override diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/ValidatingConnectionPoolTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/ValidatingConnectionPoolTest.java index 5beda2959fa..5629d2dc938 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/ValidatingConnectionPoolTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/ValidatingConnectionPoolTest.java @@ -29,7 +29,6 @@ import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.client.api.ContentResponse; import org.eclipse.jetty.client.api.Request; import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP; -import org.eclipse.jetty.client.http.HttpDestinationOverHTTP; import org.eclipse.jetty.client.util.FutureResponseListener; import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.http.HttpHeaderValue; @@ -50,7 +49,11 @@ public class ValidatingConnectionPoolTest extends AbstractHttpClientServerTest @Override protected void startClient() throws Exception { - startClient(new ValidatingHttpClientTransportOverHTTP(1000)); + long timeout = 1000; + HttpClientTransportOverHTTP transport = new HttpClientTransportOverHTTP(1); + transport.setConnectionPoolFactory(destination -> + new ValidatingConnectionPool(destination, destination.getHttpClient().getMaxConnectionsPerDestination(), destination, destination.getHttpClient().getScheduler(), timeout)); + startClient(transport); } @Test @@ -177,28 +180,4 @@ public class ValidatingConnectionPoolTest extends AbstractHttpClientServerTest ContentResponse response2 = listener2.get(5, TimeUnit.SECONDS); Assert.assertEquals(200, response2.getStatus()); } - - private static class ValidatingHttpClientTransportOverHTTP extends HttpClientTransportOverHTTP - { - private final long timeout; - - public ValidatingHttpClientTransportOverHTTP(long timeout) - { - super(1); - this.timeout = timeout; - } - - @Override - public HttpDestination newHttpDestination(Origin origin) - { - return new HttpDestinationOverHTTP(getHttpClient(), origin) - { - @Override - protected DuplexConnectionPool newConnectionPool(HttpClient client) - { - return new ValidatingConnectionPool(this, client.getMaxConnectionsPerDestination(), this, client.getScheduler(), timeout); - } - }; - } - } } diff --git a/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java b/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java index aded21e1b48..693c56fb990 100644 --- a/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java +++ b/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/client/http/HttpClientTransportOverFCGI.java @@ -21,8 +21,11 @@ package org.eclipse.jetty.fcgi.client.http; import java.io.IOException; import java.util.Map; -import org.eclipse.jetty.client.AbstractHttpClientTransport; +import org.eclipse.jetty.client.AbstractConnectorHttpClientTransport; +import org.eclipse.jetty.client.DuplexConnectionPool; +import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.HttpDestination; +import org.eclipse.jetty.client.MultiplexConnectionPool; import org.eclipse.jetty.client.Origin; import org.eclipse.jetty.client.api.Connection; import org.eclipse.jetty.client.api.Request; @@ -34,7 +37,7 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; @ManagedObject("The FastCGI/1.0 client transport") -public class HttpClientTransportOverFCGI extends AbstractHttpClientTransport +public class HttpClientTransportOverFCGI extends AbstractConnectorHttpClientTransport { private final boolean multiplexed; private final String scriptRoot; @@ -49,6 +52,14 @@ public class HttpClientTransportOverFCGI extends AbstractHttpClientTransport super(selectors); this.multiplexed = multiplexed; this.scriptRoot = scriptRoot; + setConnectionPoolFactory(destination -> + { + HttpClient httpClient = getHttpClient(); + int maxConnections = httpClient.getMaxConnectionsPerDestination(); + return isMultiplexed() ? + new MultiplexConnectionPool(destination, maxConnections, destination, httpClient.getMaxRequestsQueuedPerDestination()) : + new DuplexConnectionPool(destination, maxConnections, destination); + }); } public boolean isMultiplexed() diff --git a/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java b/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java index b9a8346e7ee..58452512ccd 100644 --- a/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java +++ b/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/AbstractHttpClientServerTest.java @@ -20,13 +20,10 @@ package org.eclipse.jetty.fcgi.server; import java.util.concurrent.atomic.AtomicLong; -import org.eclipse.jetty.client.DuplexConnectionPool; import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.HttpDestination; +import org.eclipse.jetty.client.HttpClientTransport; import org.eclipse.jetty.client.LeakTrackingConnectionPool; -import org.eclipse.jetty.client.Origin; import org.eclipse.jetty.fcgi.client.http.HttpClientTransportOverFCGI; -import org.eclipse.jetty.fcgi.client.http.HttpDestinationOverFCGI; import org.eclipse.jetty.http.HttpScheme; import org.eclipse.jetty.io.LeakTrackingByteBufferPool; import org.eclipse.jetty.io.MappedByteBufferPool; @@ -72,28 +69,16 @@ public abstract class AbstractHttpClientServerTest QueuedThreadPool executor = new QueuedThreadPool(); executor.setName(executor.getName() + "-client"); - client = new HttpClient(new HttpClientTransportOverFCGI(1, false, "") + HttpClientTransport transport = new HttpClientTransportOverFCGI(1, false, ""); + transport.setConnectionPoolFactory(destination -> new LeakTrackingConnectionPool(destination, client.getMaxConnectionsPerDestination(), destination) { @Override - public HttpDestination newHttpDestination(Origin origin) + protected void leaked(LeakDetector.LeakInfo leakInfo) { - return new HttpDestinationOverFCGI(client, origin) - { - @Override - protected DuplexConnectionPool newConnectionPool(HttpClient client) - { - return new LeakTrackingConnectionPool(this, client.getMaxConnectionsPerDestination(), this) - { - @Override - protected void leaked(LeakDetector.LeakInfo leakInfo) - { - connectionLeaks.incrementAndGet(); - } - }; - } - }; + connectionLeaks.incrementAndGet(); } - }, null); + }); + client = new HttpClient(transport, null); client.setExecutor(executor); clientBufferPool = new LeakTrackingByteBufferPool(new MappedByteBufferPool.Tagged()); client.setByteBufferPool(clientBufferPool); diff --git a/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java b/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java index 81f96481bf6..76a5cf036eb 100644 --- a/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java +++ b/jetty-http2/http2-http-client-transport/src/main/java/org/eclipse/jetty/http2/client/http/HttpClientTransportOverHTTP2.java @@ -24,9 +24,10 @@ import java.util.HashMap; import java.util.Map; import org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory; +import org.eclipse.jetty.client.AbstractHttpClientTransport; import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.HttpClientTransport; import org.eclipse.jetty.client.HttpDestination; +import org.eclipse.jetty.client.MultiplexConnectionPool; import org.eclipse.jetty.client.Origin; import org.eclipse.jetty.client.ProxyConfiguration; import org.eclipse.jetty.client.api.Connection; @@ -42,20 +43,23 @@ import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.util.Promise; import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; -import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.ssl.SslContextFactory; @ManagedObject("The HTTP/2 client transport") -public class HttpClientTransportOverHTTP2 extends ContainerLifeCycle implements HttpClientTransport +public class HttpClientTransportOverHTTP2 extends AbstractHttpClientTransport { private final HTTP2Client client; private ClientConnectionFactory connectionFactory; - private HttpClient httpClient; private boolean useALPN = true; public HttpClientTransportOverHTTP2(HTTP2Client client) { this.client = client; + setConnectionPoolFactory(destination -> + { + HttpClient httpClient = getHttpClient(); + return new MultiplexConnectionPool(destination, httpClient.getMaxConnectionsPerDestination(), destination, httpClient.getMaxRequestsQueuedPerDestination()); + }); } @ManagedAttribute(value = "The number of selectors", readonly = true) @@ -79,6 +83,7 @@ public class HttpClientTransportOverHTTP2 extends ContainerLifeCycle implements { if (!client.isStarted()) { + HttpClient httpClient = getHttpClient(); client.setExecutor(httpClient.getExecutor()); client.setScheduler(httpClient.getScheduler()); client.setByteBufferPool(httpClient.getByteBufferPool()); @@ -104,34 +109,23 @@ public class HttpClientTransportOverHTTP2 extends ContainerLifeCycle implements removeBean(client); } - protected HttpClient getHttpClient() - { - return httpClient; - } - - @Override - public void setHttpClient(HttpClient client) - { - httpClient = client; - } - @Override public HttpDestination newHttpDestination(Origin origin) { - return new HttpDestinationOverHTTP2(httpClient, origin); + return new HttpDestinationOverHTTP2(getHttpClient(), origin); } @Override public void connect(InetSocketAddress address, Map context) { - client.setConnectTimeout(httpClient.getConnectTimeout()); + client.setConnectTimeout(getHttpClient().getConnectTimeout()); SessionListenerPromise listenerPromise = new SessionListenerPromise(context); HttpDestinationOverHTTP2 destination = (HttpDestinationOverHTTP2)context.get(HTTP_DESTINATION_CONTEXT_KEY); SslContextFactory sslContextFactory = null; if (HttpScheme.HTTPS.is(destination.getScheme())) - sslContextFactory = httpClient.getSslContextFactory(); + sslContextFactory = getHttpClient().getSslContextFactory(); client.connect(sslContextFactory, address, listenerPromise, listenerPromise, context); } @@ -139,7 +133,7 @@ public class HttpClientTransportOverHTTP2 extends ContainerLifeCycle implements @Override public org.eclipse.jetty.io.Connection newConnection(EndPoint endPoint, Map context) throws IOException { - endPoint.setIdleTimeout(httpClient.getIdleTimeout()); + endPoint.setIdleTimeout(getHttpClient().getIdleTimeout()); ClientConnectionFactory factory = connectionFactory; HttpDestinationOverHTTP2 destination = (HttpDestinationOverHTTP2)context.get(HTTP_DESTINATION_CONTEXT_KEY); diff --git a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientLoadTest.java b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientLoadTest.java index 99e65cb44de..4da12ae0527 100644 --- a/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientLoadTest.java +++ b/tests/test-http-client-transport/src/test/java/org/eclipse/jetty/http/client/HttpClientLoadTest.java @@ -34,20 +34,14 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.eclipse.jetty.client.ConnectionPool; -import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.HttpClientTransport; -import org.eclipse.jetty.client.HttpDestination; import org.eclipse.jetty.client.LeakTrackingConnectionPool; -import org.eclipse.jetty.client.Origin; import org.eclipse.jetty.client.api.Request; import org.eclipse.jetty.client.api.Response; import org.eclipse.jetty.client.api.Result; import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP; -import org.eclipse.jetty.client.http.HttpDestinationOverHTTP; import org.eclipse.jetty.client.util.BytesContentProvider; import org.eclipse.jetty.fcgi.client.http.HttpClientTransportOverFCGI; -import org.eclipse.jetty.fcgi.client.http.HttpDestinationOverFCGI; import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.io.ArrayByteBufferPool; @@ -97,55 +91,31 @@ public class HttpClientLoadTest extends AbstractTest case HTTP: case HTTPS: { - return new HttpClientTransportOverHTTP(1) + HttpClientTransport clientTransport = new HttpClientTransportOverHTTP(1); + clientTransport.setConnectionPoolFactory(destination -> new LeakTrackingConnectionPool(destination, client.getMaxConnectionsPerDestination(), destination) { @Override - public HttpDestination newHttpDestination(Origin origin) + protected void leaked(LeakDetector.LeakInfo leakInfo) { - return new HttpDestinationOverHTTP(getHttpClient(), origin) - { - @Override - protected ConnectionPool newConnectionPool(HttpClient client) - { - return new LeakTrackingConnectionPool(this, client.getMaxConnectionsPerDestination(), this) - { - @Override - protected void leaked(LeakDetector.LeakInfo leakInfo) - { - super.leaked(leakInfo); - connectionLeaks.incrementAndGet(); - } - }; - } - }; + super.leaked(leakInfo); + connectionLeaks.incrementAndGet(); } - }; + }); + return clientTransport; } case FCGI: { - return new HttpClientTransportOverFCGI(1, false, "") + HttpClientTransport clientTransport = new HttpClientTransportOverFCGI(1, false, ""); + clientTransport.setConnectionPoolFactory(destination -> new LeakTrackingConnectionPool(destination, client.getMaxConnectionsPerDestination(), destination) { @Override - public HttpDestination newHttpDestination(Origin origin) + protected void leaked(LeakDetector.LeakInfo leakInfo) { - return new HttpDestinationOverFCGI(getHttpClient(), origin) - { - @Override - protected ConnectionPool newConnectionPool(HttpClient client) - { - return new LeakTrackingConnectionPool(this, client.getMaxConnectionsPerDestination(), this) - { - @Override - protected void leaked(LeakDetector.LeakInfo leakInfo) - { - super.leaked(leakInfo); - connectionLeaks.incrementAndGet(); - } - }; - } - }; + super.leaked(leakInfo); + connectionLeaks.incrementAndGet(); } - }; + }); + return clientTransport; } default: { From d63c7a4eb645ae0e237bf4cc36c3d69a25f21955 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 5 Jul 2017 10:54:57 -0700 Subject: [PATCH 093/147] Updating .gitattributes --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitattributes b/.gitattributes index 362c7b13a4a..2d74f3a7f01 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,8 @@ *.sh eol=lf *.bat eol=crlf *.txt eol=lf +*.properties eol=lf +*.java eol=lf +*.xml eol=lf +Jenkinsfile eol=lf *.js eol=lf \ No newline at end of file From b8759bc2c7f91a633e3fae4be76f0665c3aa6203 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 10 Jul 2017 18:17:16 -0700 Subject: [PATCH 094/147] Renaming to fit Eclipse Jetty naming guidelines --- .../jetty-simple-base/pom.xml | 2 +- .../its/jetty_run_mojo_it/HelloServlet.java | 2 +- .../its/jetty_run_mojo_it/PingServlet.java | 2 +- .../main/resources/META-INF/web-fragment.xml | 2 +- .../jetty-simple-webapp/pom.xml | 4 +- .../jetty_run_mojo_it/TestHelloServlet.java | 2 +- .../src/it/jetty-run-forked-mojo-it/pom.xml | 4 +- .../jetty-simple-base/pom.xml | 2 +- .../its/jetty_run_mojo_it/HelloServlet.java | 2 +- .../its/jetty_run_mojo_it/PingServlet.java | 2 +- .../main/resources/META-INF/web-fragment.xml | 2 +- .../jetty-simple-webapp/pom.xml | 4 +- .../jetty_run_mojo_it/TestHelloServlet.java | 2 +- .../src/it/jetty-run-mojo-it/pom.xml | 4 +- .../jetty-simple-base/pom.xml | 2 +- .../its/jetty_run_mojo_it/HelloServlet.java | 2 +- .../its/jetty_run_mojo_it/PingServlet.java | 2 +- .../main/resources/META-INF/web-fragment.xml | 2 +- .../jetty-simple-webapp/pom.xml | 4 +- .../jetty_run_mojo_it/TestHelloServlet.java | 2 +- .../it/jetty-run-war-exploded-mojo-it/pom.xml | 4 +- .../jetty-simple-base/pom.xml | 2 +- .../its/jetty_run_mojo_it/HelloServlet.java | 2 +- .../its/jetty_run_mojo_it/PingServlet.java | 2 +- .../main/resources/META-INF/web-fragment.xml | 2 +- .../jetty-simple-webapp/pom.xml | 4 +- .../jetty_run_mojo_it/TestHelloServlet.java | 2 +- .../src/it/jetty-run-war-mojo-it/pom.xml | 4 +- .../jetty-simple-base/pom.xml | 2 +- .../its/jetty_run_mojo_it/HelloServlet.java | 45 ------------------- .../its/jetty_run_mojo_it/PingServlet.java | 41 ----------------- .../its/jetty_run_mojo_it/HelloServlet.java | 45 +++++++++++++++++++ .../its/jetty_run_mojo_it/PingServlet.java | 41 +++++++++++++++++ .../main/resources/META-INF/web-fragment.xml | 2 +- .../jetty-simple-webapp/pom.xml | 4 +- .../jetty_run_mojo_it/TestHelloServlet.java | 2 +- .../src/it/jetty-start-mojo-it/pom.xml | 4 +- 37 files changed, 129 insertions(+), 129 deletions(-) rename jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/{com/webtide => org/eclipse}/jetty/its/jetty_run_mojo_it/HelloServlet.java (96%) rename jetty-maven-plugin/src/it/{jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide => jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse}/jetty/its/jetty_run_mojo_it/PingServlet.java (96%) rename jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/{com/webtide => org/eclipse}/jetty/its/jetty_run_mojo_it/TestHelloServlet.java (97%) rename jetty-maven-plugin/src/it/{jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide => jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse}/jetty/its/jetty_run_mojo_it/HelloServlet.java (96%) rename jetty-maven-plugin/src/it/{jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide => jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse}/jetty/its/jetty_run_mojo_it/PingServlet.java (96%) rename jetty-maven-plugin/src/it/{jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide => jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse}/jetty/its/jetty_run_mojo_it/TestHelloServlet.java (97%) rename jetty-maven-plugin/src/it/{jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide => jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse}/jetty/its/jetty_run_mojo_it/HelloServlet.java (96%) rename jetty-maven-plugin/src/it/{jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide => jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse}/jetty/its/jetty_run_mojo_it/PingServlet.java (96%) rename jetty-maven-plugin/src/it/{jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide => jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse}/jetty/its/jetty_run_mojo_it/TestHelloServlet.java (97%) rename jetty-maven-plugin/src/it/{jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide => jetty-run-war-mojo-it/jetty-simple-base/src/main/java/org/eclipse}/jetty/its/jetty_run_mojo_it/HelloServlet.java (96%) rename jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/{com/webtide => org/eclipse}/jetty/its/jetty_run_mojo_it/PingServlet.java (96%) rename jetty-maven-plugin/src/it/{jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide => jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse}/jetty/its/jetty_run_mojo_it/TestHelloServlet.java (97%) delete mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java delete mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java create mode 100644 jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java rename jetty-maven-plugin/src/it/{jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide => jetty-start-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse}/jetty/its/jetty_run_mojo_it/TestHelloServlet.java (97%) diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml index 594ddba4c8d..7cb2a2e00be 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-run-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java index a6d2a3e256d..b45f5d2c476 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java rename to jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java index f5686592252..c43fe013720 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml index 031012f7fed..a1ec4e27ce4 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -14,7 +14,7 @@ Ping - com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + org.eclipse.jetty.its.jetty_run_mojo_it.PingServlet extra1123 diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml index 3c6f21d22ea..fa400e45aa1 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-run-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT @@ -22,7 +22,7 @@ - com.webtide.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-run-forked-mojo-it jetty-simple-base diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java similarity index 97% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index f48eee38074..31a195c1407 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -16,7 +16,7 @@ // ======================================================================== // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import org.eclipse.jetty.client.HttpClient; import org.junit.Assert; diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml index cada3739cce..fae3f39a0c6 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.webtide.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-run-forked-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom @@ -27,7 +27,7 @@ - com.webtide.jetty.its.jetty-run-forked-mojo-it + org.eclipse.jetty.its.jetty-run-forked-mojo-it jetty-simple-base ${project.version} diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml index c29b270cb61..94e3cf2b8ee 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-mojo-it + org.eclipse.jetty.its.jetty-run-mojo-it jetty-simple-project 0.0.1-SNAPSHOT diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java index a6d2a3e256d..b45f5d2c476 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java rename to jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java index f5686592252..c43fe013720 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml index 031012f7fed..a1ec4e27ce4 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -14,7 +14,7 @@ Ping - com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + org.eclipse.jetty.its.jetty_run_mojo_it.PingServlet extra1123 diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml index ce4d50f13ec..7fb521911d7 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-mojo-it + org.eclipse.jetty.its.jetty-run-mojo-it jetty-simple-project 0.0.1-SNAPSHOT @@ -17,7 +17,7 @@ - com.webtide.jetty.its.jetty-run-mojo-it + org.eclipse.jetty.its.jetty-run-mojo-it jetty-simple-base diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java similarity index 97% rename from jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 4e3ced68d91..5d700a60525 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import org.eclipse.jetty.client.HttpClient; import org.junit.Assert; diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml index 3d303f4caf8..213a79af16b 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.webtide.jetty.its.jetty-run-mojo-it + org.eclipse.jetty.its.jetty-run-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom @@ -27,7 +27,7 @@ - com.webtide.jetty.its.jetty-run-mojo-it + org.eclipse.jetty.its.jetty-run-mojo-it jetty-simple-base ${project.version} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml index 4425c34f117..3ae1e093bb8 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it jetty-simple-project 0.0.1-SNAPSHOT diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java index a6d2a3e256d..b45f5d2c476 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java rename to jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java index f5686592252..c43fe013720 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml index 031012f7fed..a1ec4e27ce4 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -14,7 +14,7 @@ Ping - com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + org.eclipse.jetty.its.jetty_run_mojo_it.PingServlet extra1123 diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml index 0489e0e1a2c..6cab86275c0 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it jetty-simple-project 0.0.1-SNAPSHOT @@ -17,7 +17,7 @@ - com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it jetty-simple-base diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java similarity index 97% rename from jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 4e3ced68d91..5d700a60525 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import org.eclipse.jetty.client.HttpClient; import org.junit.Assert; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml index 5b88c8fd196..a6ef2713d27 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-exploded-mojo-it/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom @@ -27,7 +27,7 @@ - com.webtide.jetty.its.jetty-run-war-exploded-mojo-it + org.eclipse.jetty.its.jetty-run-war-exploded-mojo-it jetty-simple-base ${project.version} diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml index 8903e68d8a0..8f0aab6e5ad 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-war-mojo-it + org.eclipse.jetty.its.jetty-run-war-mojo-it jetty-simple-project 0.0.1-SNAPSHOT diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java index a6d2a3e256d..b45f5d2c476 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java similarity index 96% rename from jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java rename to jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java index f5686592252..c43fe013720 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml index 031012f7fed..a1ec4e27ce4 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -14,7 +14,7 @@ Ping - com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + org.eclipse.jetty.its.jetty_run_mojo_it.PingServlet extra1123 diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml index 23109b90f00..f9ba41b965d 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-run-war-mojo-it + org.eclipse.jetty.its.jetty-run-war-mojo-it jetty-simple-project 0.0.1-SNAPSHOT @@ -17,7 +17,7 @@ - com.webtide.jetty.its.jetty-run-war-mojo-it + org.eclipse.jetty.its.jetty-run-war-mojo-it jetty-simple-base diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java similarity index 97% rename from jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java rename to jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 4e3ced68d91..5d700a60525 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import org.eclipse.jetty.client.HttpClient; import org.junit.Assert; diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml index 432f0120781..a48c4d51db1 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.webtide.jetty.its.jetty-run-war-mojo-it + org.eclipse.jetty.its.jetty-run-war-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom @@ -27,7 +27,7 @@ - com.webtide.jetty.its.jetty-run-war-mojo-it + org.eclipse.jetty.its.jetty-run-war-mojo-it jetty-simple-base ${project.version} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml index 7a9a5382308..a5e1cb9cea5 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-start-mojo-it + org.eclipse.jetty.its.jetty-start-mojo-it jetty-simple-project 0.0.1-SNAPSHOT diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java deleted file mode 100644 index a6d2a3e256d..00000000000 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/HelloServlet.java +++ /dev/null @@ -1,45 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * - */ -@WebServlet("/hello") -public class HelloServlet - extends HttpServlet -{ - - @Override - protected void doGet( HttpServletRequest req, HttpServletResponse resp ) - throws ServletException, IOException - { - String who = req.getParameter( "name" ); - - resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); - } -} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java deleted file mode 100644 index f5686592252..00000000000 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/com/webtide/jetty/its/jetty_run_mojo_it/PingServlet.java +++ /dev/null @@ -1,41 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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 com.webtide.jetty.its.jetty_run_mojo_it; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -public class PingServlet - extends HttpServlet -{ - - @Override - protected void doGet( HttpServletRequest req, HttpServletResponse resp ) - throws ServletException, IOException - { - String who = req.getParameter( "name" ); - - resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); - } -} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java new file mode 100644 index 00000000000..b45f5d2c476 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/HelloServlet.java @@ -0,0 +1,45 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * + */ +@WebServlet("/hello") +public class HelloServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "hello " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java new file mode 100644 index 00000000000..c43fe013720 --- /dev/null +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/java/org/eclipse/jetty/its/jetty_run_mojo_it/PingServlet.java @@ -0,0 +1,41 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.its.jetty_run_mojo_it; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class PingServlet + extends HttpServlet +{ + + @Override + protected void doGet( HttpServletRequest req, HttpServletResponse resp ) + throws ServletException, IOException + { + String who = req.getParameter( "name" ); + + resp.getWriter().write( "pong " + (who == null ? "unknown" : who) ); + } +} diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml index 031012f7fed..a1ec4e27ce4 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-base/src/main/resources/META-INF/web-fragment.xml @@ -14,7 +14,7 @@ Ping - com.webtide.jetty.its.jetty_run_mojo_it.PingServlet + org.eclipse.jetty.its.jetty_run_mojo_it.PingServlet extra1123 diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml index 38ae1555a4b..fdb6bf16cff 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - com.webtide.jetty.its.jetty-start-mojo-it + org.eclipse.jetty.its.jetty-start-mojo-it jetty-simple-project 0.0.1-SNAPSHOT @@ -17,7 +17,7 @@ - com.webtide.jetty.its.jetty-start-mojo-it + org.eclipse.jetty.its.jetty-start-mojo-it jetty-simple-base diff --git a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java similarity index 97% rename from jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java rename to jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 4e3ced68d91..5d700a60525 100644 --- a/jetty-maven-plugin/src/it/jetty-run-war-mojo-it/jetty-simple-webapp/src/test/java/com/webtide/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -17,7 +17,7 @@ // -package com.webtide.jetty.its.jetty_run_mojo_it; +package org.eclipse.jetty.its.jetty_run_mojo_it; import org.eclipse.jetty.client.HttpClient; import org.junit.Assert; diff --git a/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml index 7319c0d604f..58add42c68c 100644 --- a/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-start-mojo-it/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.webtide.jetty.its.jetty-start-mojo-it + org.eclipse.jetty.its.jetty-start-mojo-it jetty-simple-project 0.0.1-SNAPSHOT pom @@ -27,7 +27,7 @@ - com.webtide.jetty.its.jetty-start-mojo-it + org.eclipse.jetty.its.jetty-start-mojo-it jetty-simple-base ${project.version} From 15cc8f1d40bc1ba7cfa5090bdbadaa8a2b5aa595 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Wed, 12 Jul 2017 11:34:14 -0400 Subject: [PATCH 095/147] Documentation update for Connectors. Resolves #1663 --- .../configuring/connectors/configuring-connectors.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-connectors.adoc b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-connectors.adoc index d3df02c9f34..5f9719ae1f7 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-connectors.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-connectors.adoc @@ -41,6 +41,8 @@ link:{GITBROWSEURL}/jetty-server/src/main/config/etc/jetty-ssl.xml[`jetty-ssl.xm On it's own, this connector is not functional and requires one or more of the following files to also be configured to add link:{JDURL}/org/eclipse/jetty/server/ConnectionFactory.html[`ConnectionFactories`] to make the connector functional. link:{GITBROWSEURL}/jetty-server/src/main/config/etc/jetty-https.xml[`jetty-https.xml`]:: Adds a link:{JDURL}/org/eclipse/jetty/server/HttpConnectionFactory.html[`HttpConnectionFactory`] to the link:{JDURL}/org/eclipse/jetty/server/ServerConnector.html[`ServerConnector`] configured by `jetty-ssl.xml` which combine to provide support for HTTPS. +link:{GITBROWSEURL}/jetty-server/src/main/config/etc/jetty-http-forwarded.xml[`jetty-http-forwarded.xml`]:: + Adds a link:{JDURL}/org/eclipse/jetty/server/ForwardedRequestCustomizer.html[`ForwardedRequestCustomizer`]to the HTTP Connector to process forwarded-for style headers from a proxy. link:{GITBROWSEURL}/jetty-http2/http2-server/src/main/config/etc/jetty-http2.xml[`jetty-http2.xml`]:: Adds a link:{JDURL}/org/eclipse/jetty/http2/server/HTTP2ServerConnectionFactory.html[`Http2ServerConnectionFactory`] to the link:{JDURL}/org/eclipse/jetty/server/ServerConnector.html[`ServerConnector`] configured by `jetty-ssl.xml` to support the http2 protocol. Also prepends either `protonego-alpn.xml` or `protonego-npn.xml` so that the next protocol can be negotiated, which allows the same SSL port to handle multiple protocols. link:{GITBROWSEURL}/jetty-alpn/jetty-alpn-server/src/main/config/etc/jetty-alpn.xml[`jetty-alpn.xml`]:: @@ -49,6 +51,12 @@ link:{GITBROWSEURL}/jetty-alpn/jetty-alpn-server/src/main/config/etc/jetty-alpn. Typically connectors require very little configuration aside from setting the listening port (see link:#jetty-connectors-network-settings[Network Settings]), and enabling `X-Forwarded-For` customization when applicable. (see link:#jetty-connectors-http-configuration[HTTP Configuration]). Additional settings are for expert configuration only. +____ +[NOTE] +All the connectors discussed in this chapter can be enabled in the Jetty Distribution by enabling them via the module system. +Please refer to our chapter on link:#startup-modules[Managing Startup Modules] for more information. +____ + ==== Constructing a ServerConnector The services a link:{JDURL}/org/eclipse/jetty/server/ServerConnector.html[`ServerConnector`] instance uses are set by constructor injection and once instantiated cannot be changed. From 6a2dd626e0836a0b31d02f87ca45e558a2853217 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 13 Jul 2017 14:14:36 +0200 Subject: [PATCH 096/147] Issue #1661 Portable onProxyResponseFailure avoid using sendError(-1) --- .../jetty/proxy/AbstractProxyServlet.java | 62 +++++++++---------- .../eclipse/jetty/proxy/ProxyServletTest.java | 6 +- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java index cda4db05d1d..9199c27f2e6 100644 --- a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java +++ b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java @@ -638,35 +638,14 @@ public abstract class AbstractProxyServlet extends HttpServlet if (_log.isDebugEnabled()) _log.debug(getRequestId(clientRequest) + " proxying failed", failure); - if (proxyResponse.isCommitted()) - { - try - { - // Use Jetty specific behavior to close connection. - proxyResponse.sendError(-1); - if (clientRequest.isAsyncStarted()) - { - AsyncContext asyncContext = clientRequest.getAsyncContext(); - asyncContext.complete(); - } - } - catch (Throwable x) - { - if (_log.isDebugEnabled()) - _log.debug(getRequestId(clientRequest) + " could not close the connection", failure); - } - } - else - { - proxyResponse.resetBuffer(); - int status = failure instanceof TimeoutException ? - HttpStatus.GATEWAY_TIMEOUT_504 : - HttpStatus.BAD_GATEWAY_502; - int serverStatus = serverResponse == null ? status : serverResponse.getStatus(); - if (expects100Continue(clientRequest) && serverStatus >= HttpStatus.OK_200) - status = serverStatus; - sendProxyResponseError(clientRequest, proxyResponse, status); - } + int status = failure instanceof TimeoutException ? + HttpStatus.GATEWAY_TIMEOUT_504 : + HttpStatus.BAD_GATEWAY_502; + int serverStatus = serverResponse == null ? status : serverResponse.getStatus(); + if (expects100Continue(clientRequest) && serverStatus >= HttpStatus.OK_200) + status = serverStatus; + sendProxyResponseError(clientRequest, proxyResponse, status); + } protected int getRequestId(HttpServletRequest clientRequest) @@ -676,10 +655,27 @@ public abstract class AbstractProxyServlet extends HttpServlet protected void sendProxyResponseError(HttpServletRequest clientRequest, HttpServletResponse proxyResponse, int status) { - proxyResponse.setStatus(status); - proxyResponse.setHeader(HttpHeader.CONNECTION.asString(), HttpHeaderValue.CLOSE.asString()); - if (clientRequest.isAsyncStarted()) - clientRequest.getAsyncContext().complete(); + try + { + System.err.println("sendError "+status+" "+proxyResponse.isCommitted()); + new Throwable().printStackTrace(); + if (!proxyResponse.isCommitted()) + { + proxyResponse.resetBuffer(); + proxyResponse.setHeader(HttpHeader.CONNECTION.asString(), HttpHeaderValue.CLOSE.asString()); + } + proxyResponse.sendError(status); + } + catch(Exception e) + { + e.printStackTrace(); + _log.ignore(e); + } + finally + { + if (clientRequest.isAsyncStarted()) + clientRequest.getAsyncContext().complete(); + } } protected void onContinue(HttpServletRequest clientRequest, Request proxyRequest) diff --git a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java index fe6118e0d62..52fd04c6a4e 100644 --- a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java +++ b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java @@ -1087,10 +1087,10 @@ public class ProxyServletTest Response response = listener.get(5, TimeUnit.SECONDS); Assert.assertEquals(504, response.getStatus()); - // Make sure there is no content, as the proxy-to-client response has been reset. + // Make sure there is error page content, as the proxy-to-client response has been reset. InputStream input = listener.getInputStream(); - Assert.assertEquals(-1, input.read()); - + String body = IO.toString(input); + Assert.assertThat(body,Matchers.containsString("HTTP ERROR: 504")); chunk1Latch.countDown(); // Result succeeds because a 504 is a valid HTTP response. From 2b4494e3f649c2f69bd3bccf73db79b0ef05da25 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 13 Jul 2017 14:16:51 +0200 Subject: [PATCH 097/147] Issue #1661 remove debug --- .../java/org/eclipse/jetty/proxy/AbstractProxyServlet.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java index 9199c27f2e6..d51e14053dc 100644 --- a/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java +++ b/jetty-proxy/src/main/java/org/eclipse/jetty/proxy/AbstractProxyServlet.java @@ -657,8 +657,6 @@ public abstract class AbstractProxyServlet extends HttpServlet { try { - System.err.println("sendError "+status+" "+proxyResponse.isCommitted()); - new Throwable().printStackTrace(); if (!proxyResponse.isCommitted()) { proxyResponse.resetBuffer(); @@ -668,7 +666,6 @@ public abstract class AbstractProxyServlet extends HttpServlet } catch(Exception e) { - e.printStackTrace(); _log.ignore(e); } finally From e5f7fee279b03e0d122c96b6b45758f5eede7ab2 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 13 Jul 2017 15:41:21 +0200 Subject: [PATCH 098/147] Fix #1664 CIDR IP --- .../java/org/eclipse/jetty/util/InetAddressSet.java | 4 ++-- .../org/eclipse/jetty/util/InetAddressSetTest.java | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/InetAddressSet.java b/jetty-util/src/main/java/org/eclipse/jetty/util/InetAddressSet.java index 0c616878fbf..c42f2a3ea33 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/InetAddressSet.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/InetAddressSet.java @@ -246,11 +246,11 @@ public class InetAddressSet extends AbstractSet implements Set, _octets = cidr/8; _mask = 0xff&(0xff<<(8-cidr%8)); _masked = _mask==0?0:_raw[_octets]&_mask; - + if (cidr>(_raw.length*8)) throw new IllegalArgumentException("CIDR too large: "+pattern); - if (_mask!=0 && _raw[_octets]!=_masked) + if (_mask!=0 && (0xff&_raw[_octets])!=_masked) throw new IllegalArgumentException("CIDR bits non zero: "+pattern); for (int o=_octets+(_mask==0?0:1);o<_raw.length;o++) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/InetAddressSetTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/InetAddressSetTest.java index c52585291c0..14c650980ea 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/InetAddressSetTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/InetAddressSetTest.java @@ -134,8 +134,21 @@ public class InetAddressSetTest set.add("0.0.0.0/0"); assertTrue(set.test(InetAddress.getByName("10.11.0.0"))); + + // test #1664 + set.add("2.144.0.0/14"); + set.add("2.176.0.0/12"); + set.add("5.22.0.0/17"); + set.add("5.22.192.0/19"); + assertTrue(set.test(InetAddress.getByName("2.144.0.1"))); + assertTrue(set.test(InetAddress.getByName("2.176.0.1"))); + assertTrue(set.test(InetAddress.getByName("5.22.0.1"))); + assertTrue(set.test(InetAddress.getByName("5.22.192.1"))); } + + + @Test public void testBadCIDR() throws Exception { From e39c66d42568cc63e50d935ad7036bd87dd1bd18 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 13 Jul 2017 16:03:58 +0200 Subject: [PATCH 099/147] Issue #1645 --- .../org/eclipse/jetty/servlets/DoSFilter.java | 131 +++++++++++++++--- .../jetty/servlets/AbstractDoSFilterTest.java | 21 +++ .../eclipse/jetty/servlets/DoSFilterTest.java | 9 +- 3 files changed, 140 insertions(+), 21 deletions(-) diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java index a5dab447b6b..9920479b944 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java @@ -146,7 +146,8 @@ public class DoSFilter implements Filter private static final long __DEFAULT_THROTTLE_MS = 30000L; private static final long __DEFAULT_MAX_REQUEST_MS_INIT_PARAM = 30000L; private static final long __DEFAULT_MAX_IDLE_TRACKER_MS_INIT_PARAM = 30000L; - + + static final String NAME = "name"; static final String MANAGED_ATTR_INIT_PARAM = "managedAttr"; static final String MAX_REQUESTS_PER_S_INIT_PARAM = "maxRequestsPerSec"; static final String DELAY_MS_INIT_PARAM = "delayMs"; @@ -181,12 +182,14 @@ public class DoSFilter implements Filter private volatile boolean _trackSessions; private volatile boolean _remotePort; private volatile boolean _enabled; + private volatile String _name; private Semaphore _passes; private volatile int _throttledRequests; private volatile int _maxRequestsPerSec; private Queue[] _queues; private AsyncListener[] _listeners; private Scheduler _scheduler; + private ServletContext _context; public void init(FilterConfig filterConfig) throws ServletException { @@ -263,11 +266,14 @@ public class DoSFilter implements Filter parameter = filterConfig.getInitParameter(TOO_MANY_CODE); setTooManyCode(parameter==null?429:Integer.parseInt(parameter)); - _scheduler = startScheduler(); + setName(filterConfig.getFilterName()); + _context = filterConfig.getServletContext(); + if (_context != null ) + { + _context.setAttribute(filterConfig.getFilterName(), this); + } - ServletContext context = filterConfig.getServletContext(); - if (context != null && Boolean.parseBoolean(filterConfig.getInitParameter(MANAGED_ATTR_INIT_PARAM))) - context.setAttribute(filterConfig.getFilterName(), this); + _scheduler = startScheduler(); } protected Scheduler startScheduler() throws ServletException @@ -536,6 +542,11 @@ public class DoSFilter implements Filter { return USER_AUTH; } + + public void schedule (RateTracker tracker) + { + _scheduler.schedule(tracker, getMaxIdleTrackerMs(), TimeUnit.MILLISECONDS); + } /** * Return a request rate tracker associated with this connection; keeps @@ -583,8 +594,9 @@ public class DoSFilter implements Filter { boolean allowed = checkWhitelist(request.getRemoteAddr()); int maxRequestsPerSec = getMaxRequestsPerSec(); - tracker = allowed ? new FixedRateTracker(loadId, type, maxRequestsPerSec) - : new RateTracker(loadId, type, maxRequestsPerSec); + tracker = allowed ? new FixedRateTracker(_context, _name, loadId, type, maxRequestsPerSec) + : new RateTracker(_context,_name, loadId, type, maxRequestsPerSec); + tracker.setContext(_context); RateTracker existing = _rateTrackers.putIfAbsent(loadId, tracker); if (existing != null) tracker = existing; @@ -603,6 +615,16 @@ public class DoSFilter implements Filter return tracker; } + + public void addToRateTracker (RateTracker tracker) + { + _rateTrackers.put(tracker.getId(), tracker); + } + + public void removeFromRateTracker (String id) + { + _rateTrackers.remove(id); + } protected boolean checkWhitelist(String candidate) { @@ -931,6 +953,25 @@ public class DoSFilter implements Filter _maxIdleTrackerMs = value; } + /** + * The unique name of the filter when there is more than + * one DosFilter instance. + * + * @return the name + */ + public String getName() + { + return _name; + } + + /** + * @param name the name to set + */ + public void setName(String name) + { + _name = name; + } + /** * Check flag to insert the DoSFilter headers into the response. * @@ -1103,17 +1144,22 @@ public class DoSFilter implements Filter * A RateTracker is associated with a connection, and stores request rate * data. */ - class RateTracker implements Runnable, HttpSessionBindingListener, HttpSessionActivationListener, Serializable + static class RateTracker implements Runnable, HttpSessionBindingListener, HttpSessionActivationListener, Serializable { private static final long serialVersionUID = 3534663738034577872L; + protected final String _filterName; + protected transient ServletContext _context; protected final String _id; protected final int _type; protected final long[] _timestamps; + protected int _next; - public RateTracker(String id, int type, int maxRequestsPerSecond) + public RateTracker(ServletContext context, String filterName, String id, int type, int maxRequestsPerSecond) { + _context = context; + _filterName = filterName; _id = id; _type = type; _timestamps = new long[maxRequestsPerSecond]; @@ -1151,40 +1197,87 @@ public class DoSFilter implements Filter { if (LOG.isDebugEnabled()) LOG.debug("Value bound: {}", getId()); + _context = event.getSession().getServletContext(); } public void valueUnbound(HttpSessionBindingEvent event) { //take the tracker out of the list of trackers - _rateTrackers.remove(_id); - if (LOG.isDebugEnabled()) - LOG.debug("Tracker removed: {}", getId()); + DoSFilter filter = (DoSFilter)event.getSession().getServletContext().getAttribute(_filterName); + removeFromRateTrackers(filter, _id); + _context = null; } public void sessionWillPassivate(HttpSessionEvent se) { //take the tracker of the list of trackers (if its still there) - _rateTrackers.remove(_id); + DoSFilter filter = (DoSFilter)se.getSession().getServletContext().getAttribute(_filterName); + removeFromRateTrackers(filter, _id); + _context = null; } public void sessionDidActivate(HttpSessionEvent se) { RateTracker tracker = (RateTracker)se.getSession().getAttribute(__TRACKER); - if (tracker!=null) - _rateTrackers.put(tracker.getId(),tracker); + ServletContext context = se.getSession().getServletContext(); + tracker.setContext(context); + DoSFilter filter = (DoSFilter)context.getAttribute(_filterName); + if (filter == null) + { + LOG.info("No filter {} for rate tracker {}", _filterName, tracker); + return; + } + addToRateTrackers(filter, tracker); + } + + public void setContext (ServletContext context) + { + _context = context; + } + + + protected void removeFromRateTrackers (DoSFilter filter, String id) + { + if (filter == null) + return; + + filter.removeFromRateTracker(id); + if (LOG.isDebugEnabled()) + LOG.debug("Tracker removed: {}", getId()); + } + + + protected void addToRateTrackers (DoSFilter filter, RateTracker tracker) + { + if (filter == null) + return; + filter.addToRateTracker(tracker); } @Override public void run() { + if (_context == null) + { + LOG.warn("Unknkown context for rate tracker {}", this); + return; + } + int latestIndex = _next == 0 ? (_timestamps.length - 1) : (_next - 1); long last = _timestamps[latestIndex]; boolean hasRecentRequest = last != 0 && (System.currentTimeMillis() - last) < 1000L; + DoSFilter filter = (DoSFilter)_context.getAttribute(_filterName); + if (hasRecentRequest) - _scheduler.schedule(this, getMaxIdleTrackerMs(), TimeUnit.MILLISECONDS); + { + if (filter != null) + filter.schedule(this); + else + LOG.warn("No filter {}", _filterName); + } else - _rateTrackers.remove(_id); + removeFromRateTrackers(filter, _id); } @Override @@ -1196,9 +1289,9 @@ public class DoSFilter implements Filter class FixedRateTracker extends RateTracker { - public FixedRateTracker(String id, int type, int numRecentRequestsTracked) + public FixedRateTracker(ServletContext context, String filterName, String id, int type, int numRecentRequestsTracked) { - super(id, type, numRecentRequestsTracked); + super(context, filterName, id, type, numRecentRequestsTracked); } @Override diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java index 74141ddc872..d1c8f7810bb 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/AbstractDoSFilterTest.java @@ -18,11 +18,13 @@ 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.charset.StandardCharsets; +import java.nio.file.Path; import java.util.EnumSet; import javax.servlet.DispatcherType; @@ -34,12 +36,17 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.http.HttpURI; +import org.eclipse.jetty.server.session.DefaultSessionCache; +import org.eclipse.jetty.server.session.FileSessionDataStore; import org.eclipse.jetty.servlet.FilterHolder; import org.eclipse.jetty.servlet.ServletTester; +import org.eclipse.jetty.toolchain.test.FS; +import org.eclipse.jetty.toolchain.test.TestingDir; import org.eclipse.jetty.util.IO; import org.hamcrest.Matchers; import org.junit.After; import org.junit.Assert; +import org.junit.Rule; import org.junit.Test; public abstract class AbstractDoSFilterTest @@ -49,9 +56,23 @@ public abstract class AbstractDoSFilterTest protected int _port; protected long _requestMaxTime = 200; + @Rule + public TestingDir _testDir = new TestingDir(); + public void startServer(Class filter) throws Exception { _tester = new ServletTester("/ctx"); + + DefaultSessionCache sessionCache = new DefaultSessionCache(_tester.getContext().getSessionHandler()); + FileSessionDataStore fileStore = new FileSessionDataStore(); + + Path p = _testDir.getPathFile("sessions"); + FS.ensureEmpty(p); + fileStore.setStoreDir(p.toFile()); + sessionCache.setSessionDataStore(fileStore); + + _tester.getContext().getSessionHandler().setSessionCache(sessionCache); + HttpURI uri = new HttpURI(_tester.createConnector(true)); _host = uri.getHost(); _port = uri.getPort(); diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java index 72bec4061c6..bbbe09bb5e2 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java @@ -18,6 +18,9 @@ package org.eclipse.jetty.servlets; +import javax.servlet.ServletContext; + +import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.servlets.DoSFilter.RateTracker; import org.hamcrest.Matchers; import org.junit.Assert; @@ -36,7 +39,7 @@ public class DoSFilterTest extends AbstractDoSFilterTest public void testRateIsRateExceeded() throws InterruptedException { DoSFilter doSFilter = new DoSFilter(); - + doSFilter.setName("foo"); boolean exceeded = hitRateTracker(doSFilter,0); Assert.assertTrue("Last hit should have exceeded",exceeded); @@ -49,6 +52,7 @@ public class DoSFilterTest extends AbstractDoSFilterTest public void testWhitelist() throws Exception { DoSFilter filter = new DoSFilter(); + filter.setName("foo"); filter.setWhitelist("192.168.0.1/32,10.0.0.0/8,4d8:0:a:1234:ABc:1F:b18:17,4d8:0:a:1234:ABc:1F:0:0/96"); Assert.assertTrue(filter.checkWhitelist("192.168.0.1")); Assert.assertFalse(filter.checkWhitelist("192.168.0.2")); @@ -72,7 +76,8 @@ public class DoSFilterTest extends AbstractDoSFilterTest private boolean hitRateTracker(DoSFilter doSFilter, int sleep) throws InterruptedException { boolean exceeded = false; - RateTracker rateTracker = doSFilter.new RateTracker("test2",0,4); + ServletContext context = new ContextHandler.StaticContext(); + RateTracker rateTracker = new RateTracker(context, doSFilter.getName(), "test2",0,4); for (int i = 0; i < 5; i++) { From e94660b7ba047df0f8cc3bb529fdecb1959b3601 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 13 Jul 2017 16:51:24 +0200 Subject: [PATCH 100/147] fixed merge --- .../src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java index 52fd04c6a4e..51f9d40ccc3 100644 --- a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java +++ b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java @@ -1090,7 +1090,7 @@ public class ProxyServletTest // Make sure there is error page content, as the proxy-to-client response has been reset. InputStream input = listener.getInputStream(); String body = IO.toString(input); - Assert.assertThat(body,Matchers.containsString("HTTP ERROR: 504")); + Assert.assertThat(body,Matchers.containsString("HTTP ERROR 504")); chunk1Latch.countDown(); // Result succeeds because a 504 is a valid HTTP response. From b8168f2bb0f1ee3632b26d7d13fe6b381a3fd224 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Fri, 14 Jul 2017 11:17:51 -0400 Subject: [PATCH 101/147] Updates to SSL documentation. Resolves #1667 --- .../connectors/configuring-ssl.adoc | 177 ++++++++++-------- 1 file changed, 97 insertions(+), 80 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc index 62a1a3bbdf3..bace232bf7d 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc @@ -19,6 +19,16 @@ This document provides an overview of how to configure SSL and TLS for Jetty. +[[configuring-jetty-for-ssl]] +===== Configuring Jetty for SSL + +To configure Jetty for SSL, complete the tasks in the following sections: + +* xref:generating-key-pairs-and-certificates[] +* xref:requesting-trusted-certificate[] +* xref:loading-keys-and-certificates[] +* xref:configuring-sslcontextfactory[] + [[tls-and-ssl-versions]] ==== TLS and SSL versions @@ -78,16 +88,6 @@ Since Apache and other servers commonly use the OpenSSL tool suite to generate a If you want the option of using the same certificate with Jetty or a web server such as Apache not written in Java, you might prefer to generate your private key and certificate with OpenSSL. -[[configuring-jetty-for-ssl]] -===== Configuring Jetty for SSL - -To configure Jetty for SSL, complete the tasks in the following sections: - -* xref:generating-key-pairs-and-certificates[] -* xref:requesting-trusted-certificate[] -* xref:loading-keys-and-certificates[] -* xref:configuring-sslcontextfactory[] - [[generating-key-pairs-and-certificates]] ===== Generating Key Pairs and Certificates @@ -354,75 +354,16 @@ $ keytool -importkeystore -srckeystore jetty.pkcs12 -srcstoretype PKCS12 -destke If you are updating your configuration to use a newer certificate, as when the old one is expiring, just load the newer certificate as described in the section, xref:loading-keys-and-certificates[]. If you imported the key and certificate originally using the PKCS12 method, use an alias of "1" rather than "jetty", because that is the alias the PKCS12 process enters into the keystore. -==== Configuring SSL in Jetty Distribution - -For those of you using the Jetty Distribution, enabling SSL support is as easy as activating the `ssl` module. - -An example of this setup: - -[source, plain, subs="{sub-order}"] ----- -$ cd /path/to/mybase -$ java -jar ../start.jar --create-startd -MKDIR : ${jetty.base}/start.d -INFO : Base directory was modified -$ java -jar /path/to/jetty-dist/start.jar --add-to-start=ssl -INFO : server transitively enabled, ini template available with --add-to-start=server -INFO : ssl initialized in ${jetty.base}/start.d/ssl.ini -MKDIR : ${jetty.base}/etc -COPY : ${jetty.home}/modules/ssl/keystore to ${jetty.base}/etc/keystore -INFO : Base directory was modified -$ tree -. -├── etc -│   └── keystore -└── start.d - ├── server.ini - └── ssl.ini ----- - -When you open `start.d/ssl.ini`, you will see many commented properties ready for you to configure the `SslContextFactory` basics. - -To highlight some of the more commonly used properties: - -jetty.ssl.host:: - Configures which interfaces the SSL/TLS Connector should listen on. -jetty.ssl.port:: - Configures which port the SSL/TLS Connector should listen on. -jetty.httpConfig.securePort:: - If a webapp needs to redirect to a secure version of the same resource, then this is the port reported back on the response `location` line (having this be separate is useful if you have something sitting in front of Jetty, such as a Load Balancer or proxy). -jetty.sslContext.keyStorePath:: - Sets the location of the `keystore` that you configured with your certificates. -jetty.sslContext.keyStorePassword:: - Sets the Password for the `keystore`. - -[[two-way-authentication]] -==== Two Way Authentication - -To enable two-way authentication both the `ssl` and `https` modules need to be activated. -Once enabled, set the `jetty.sslContext.needClientAuth` property to `true`. - -[source%nowrap,ini,linenums] -.$JETTY_BASE/start.d/ssl.ini ----- -# Module: ssl ---module=ssl -... -## whether client certificate authentication is required -jetty.sslContext.needClientAuth=true -... ----- - [[layout-of-keystore-and-truststore]] -==== Layout of keystore and truststore +===== Layout of keystore and truststore -The server's private key and certificate are contained within the keystore. +The `keystore` only contains the server's private key and certificate. [[img-certificate-chain]] image::images/certificate-chain.png[title="Certificate chain", alt="Certificate chain"] [literal] -.The structure of a KeyStore file +.The structure of KeyStore file: .... ├── PrivateKeyEntry │   ├── PrivateKey @@ -436,10 +377,10 @@ image::images/certificate-chain.png[title="Certificate chain", alt="Certificate    └── Root CA certificate .... -[TIP] -==== -`PrivateKeyEntry`, `Certificate chain`, `Intermediary CA certificate` and `Root CA certificate` are all optional values. -==== +____ +[NOTE] +Both the `Intermediary CA certificate` and `Root CA certificate` are optional. +____ [source%nowrap,plain,linenums] ---- @@ -779,8 +720,84 @@ ____ ==== Configuring SNI From Java 8, the JVM contains support for the http://en.wikipedia.org/wiki/Server_Name_Indication[Server Name Indicator (SNI)] extension, which allows a SSL connection handshake to indicate one or more DNS names that it applies to. -To support this, the `ExtendedSslContextFactory` is used that will look for multiple X509 certificates within the keystore, each of which may have multiple DNS names (including wildcards) associated with the http://en.wikipedia.org/wiki/SubjectAltName[Subject Alternate Name] extension. -When using the `ExtendedSSlContextFactory`, the correct certificate is automatically selected if the SNI extension is present in the handshake. + +To support this, the `SslContextFactory` is used. +The `SslContextFactory` will look for multiple X509 certificates within the keystore, each of which may have multiple DNS names (including wildcards) associated with the http://en.wikipedia.org/wiki/SubjectAltName[Subject Alternate Name] extension. +When using the `SslContextFactory`, the correct certificate is automatically selected if the SNI extension is present in the handshake. + + +==== Configuring SSL in Jetty Distribution + +For those of you using the Jetty Distribution, enabling SSL support is as easy as activating the `ssl` module. + +An example of this setup: + +[source, plain, subs="{sub-order}"] +---- +$ cd /path/to/mybase +$ java -jar /path/to/jetty-dist/start.jar --add-to-startd=ssl +INFO : server initialised (transitively) in ${jetty.base}/start.d/server.ini +INFO : ssl initialised in ${jetty.base}/start.d/ssl.ini +INFO : Base directory was modified +$ tree +. +├── etc +│   └── keystore +└── start.d + ├── server.ini + └── ssl.ini +---- + +When you open `start.d/ssl.ini`, you will see several commented properties ready for use when configuring `SslContextFactory` basics. + +To highlight some of the more commonly used properties: + +jetty.ssl.host:: + Configures which interfaces the SSL/TLS Connector should listen on. +jetty.ssl.port:: + Configures which port the SSL/TLS Connector should listen on. +jetty.httpConfig.securePort:: + If a webapp needs to redirect to a secure version of the same resource, then this is the port reported back on the response `location` line (having this be separate is useful if you have something sitting in front of Jetty, such as a Load Balancer or proxy). +jetty.sslContext.keyStorePath:: + Sets the location of the `keystore` that you configured with your certificates. +jetty.sslContext.keyStorePassword:: + Sets the Password for the `keystore`. + +[[two-way-authentication]] +==== Two Way Authentication + +To enable two-way authentication in the Jetty Distribution, you need to enable the both the `ssl` and `https` modules. + +[source, plain, subs="{sub-order}"] +---- +$ cd /path/to/mybase +$ java -jar /path/to/jetty-dist/start.jar --add-to-startd=ssl,https +---- + +[source%nowrap,ini,linenums] +.$JETTY_BASE/start.d/ssl.ini +---- +# Module: ssl +--module=ssl + +jetty.ssl.host=0.0.0.0 +jetty.ssl.port=8583 +jetty.sslContext.keyStorePath=etc/keystore +jetty.sslContext.trustStorePath=etc/keystore +jetty.sslContext.keyStorePassword=OBF: +jetty.sslContext.keyManagerPassword=OBF: +jetty.sslContext.trustStorePassword=OBF: +jetty.sslContext.trustStoreType=JKS +# enable two way authentication +jetty.sslContext.needClientAuth=true +---- + +[source%nowrap,ini,linenums] +.$JETTY_BASE/start.d/https.ini +---- +# Module: https +--module=https +---- [[configuring-sslcontextfactory-cipherSuites]] ==== Disabling/Enabling Specific Cipher Suites @@ -796,7 +813,7 @@ Tools like ssllabs.com might report slightly different names which will be ignor ____ ____ -[NOTE] +[IMPORTANT] It's recommended to install the Java Cryptography Extension (JCE) Unlimited Strength policy files in your JRE to get full strength ciphers such as AES-256. The files can be found on the http://www.oracle.com/technetwork/java/javase/downloads/index.html[Java download page]. Just overwrite the two present JAR files in `/lib/security/`. @@ -849,7 +866,7 @@ ____ [NOTE] The default `SslContextFactory` implementation applies the latest SSL/TLS recommendations surrounding vulnerabilities in SSL/TLS. Check the release notes (the `VERSION.txt` found in the root of the Jetty Distribution, or the http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.eclipse.jetty%22%20AND%20a%3A%22jetty-project%22[alternate (classified 'version') artifacts for the `jetty-project` component]on Maven Central) for updates. -The Java JVM is also applying exclusions at the JVM level and as such if you have a need to enable something that is generally accepted by the industry as being insecure or vulnerable you will likely have to enable it in BOTH the Java JVM and the Jetty configuration. +The Java JVM also applies exclusions at the JVM level and, as such, if you have a need to enable something that is generally accepted by the industry as being insecure or vulnerable you will likely have to enable it in *both* the Java JVM and your Jetty configuration. ____ ____ From c9959fd63347e559b8f5ceed802f08cf08055b33 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Fri, 14 Jul 2017 12:16:00 -0400 Subject: [PATCH 102/147] Restoring SSL dump info From 0bc9149ff1d0200410a7208863d5e31e24784bba Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 17 Jul 2017 11:37:03 +0200 Subject: [PATCH 103/147] Issue #1671 asymmetric trailer usage on MetaData.Request --- .../java/org/eclipse/jetty/server/HttpChannel.java | 13 ++++++++++++- .../main/java/org/eclipse/jetty/server/Request.java | 13 +++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 5a929d57cef..251082166e8 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Supplier; import javax.servlet.DispatcherType; import javax.servlet.RequestDispatcher; @@ -75,9 +76,18 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor private final HttpChannelState _state; private final Request _request; private final Response _response; + private final Supplier _trailerSupplier = new Supplier() + { + @Override + public HttpFields get() + { + return _trailers; + } + }; private MetaData.Response _committedMetaData; private RequestLog _requestLog; private long _oldIdleTimeout; + private HttpFields _trailers; /** Bytes written after interception (eg after compression) */ private long _written; @@ -581,6 +591,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor if (idleTO>=0 && _oldIdleTimeout!=idleTO) setIdleTimeout(idleTO); + request.setTrailerSupplier(_trailerSupplier); _request.setMetaData(request); if (LOG.isDebugEnabled()) @@ -608,7 +619,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor { if (LOG.isDebugEnabled()) LOG.debug("{} onTrailers {}", this, trailers); - _request.setTrailers(trailers); + _trailers = trailers; } public boolean onRequestComplete() diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index d84f7e5713e..0a7f16b7c40 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -39,6 +39,7 @@ import java.util.EventListener; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.function.Supplier; import java.util.stream.Collectors; import javax.servlet.AsyncContext; @@ -199,7 +200,6 @@ public class Request implements HttpServletRequest private long _timeStamp; private MultiPartInputStreamParser _multiPartInputStream; //if the request is a multi-part mime private AsyncContextState _async; - private HttpFields _trailers; /* ------------------------------------------------------------ */ public Request(HttpChannel channel, HttpInput input) @@ -215,9 +215,12 @@ public class Request implements HttpServletRequest return metadata==null?null:metadata.getFields(); } + /* ------------------------------------------------------------ */ public HttpFields getTrailers() { - return _trailers; + MetaData.Request metadata=_metaData; + Supplier trailers = metadata==null?null:metadata.getTrailerSupplier(); + return trailers==null?null:trailers.get(); } /* ------------------------------------------------------------ */ @@ -1859,7 +1862,6 @@ public class Request implements HttpServletRequest _multiPartInputStream = null; _remote=null; _input.recycle(); - _trailers = null; } /* ------------------------------------------------------------ */ @@ -2228,11 +2230,6 @@ public class Request implements HttpServletRequest _scope = scope; } - public void setTrailers(HttpFields trailers) - { - _trailers = trailers; - } - /* ------------------------------------------------------------ */ @Override public AsyncContext startAsync() throws IllegalStateException From 91e7087fcdad776501254b7d4deda0b42bfacbb0 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 17 Jul 2017 15:24:33 +0200 Subject: [PATCH 104/147] Fix #1672 Proxy tests HttpTester.from usage --- .../org/eclipse/jetty/http/HttpTester.java | 8 +- .../proxy/AbstractConnectHandlerTest.java | 6 -- .../jetty/proxy/ConnectHandlerSSLTest.java | 8 +- .../jetty/proxy/ConnectHandlerTest.java | 88 +++++++++++-------- 4 files changed, 61 insertions(+), 49 deletions(-) diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java index 0ade4d7777a..6e5e46a4508 100644 --- a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java +++ b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java @@ -121,11 +121,11 @@ public class HttpTester public abstract static class Input { - final ByteBuffer _buffer; - boolean _eof=false; - HttpParser _parser; + protected final ByteBuffer _buffer; + protected boolean _eof=false; + protected HttpParser _parser; - Input() + public Input() { this(BufferUtil.allocate(8192)); } diff --git a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AbstractConnectHandlerTest.java b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AbstractConnectHandlerTest.java index 29f2430d3df..2b3fb3820c8 100644 --- a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AbstractConnectHandlerTest.java +++ b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/AbstractConnectHandlerTest.java @@ -66,12 +66,6 @@ public abstract class AbstractConnectHandlerTest proxy.stop(); } - protected HttpTester.Response readResponse(InputStream inputStream) throws IOException - { - HttpTester.Input input = HttpTester.from(inputStream); - return HttpTester.parseResponse(input); - } - protected Socket newSocket() throws IOException { Socket socket = new Socket("localhost", proxyConnector.getLocalPort()); diff --git a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerSSLTest.java b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerSSLTest.java index 084d47a8768..db0d0b04aab 100644 --- a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerSSLTest.java +++ b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerSSLTest.java @@ -81,7 +81,7 @@ public class ConnectHandlerSSLTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(socket.getInputStream()); + HttpTester.Response response = HttpTester.parseResponse(HttpTester.from(socket.getInputStream())); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); // Upgrade the socket to SSL @@ -96,7 +96,7 @@ public class ConnectHandlerSSLTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(sslSocket.getInputStream()); + response = HttpTester.parseResponse(HttpTester.from(sslSocket.getInputStream())); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -119,7 +119,7 @@ public class ConnectHandlerSSLTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(socket.getInputStream()); + HttpTester.Response response = HttpTester.parseResponse(HttpTester.from(socket.getInputStream())); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); // Upgrade the socket to SSL @@ -138,7 +138,7 @@ public class ConnectHandlerSSLTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(sslSocket.getInputStream()); + response = HttpTester.parseResponse(HttpTester.from(sslSocket.getInputStream())); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("POST /echo?param=" + i + "\r\nHELLO", response.getContent()); } diff --git a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerTest.java b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerTest.java index ca040509897..04e7450c53c 100644 --- a/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerTest.java +++ b/jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ConnectHandlerTest.java @@ -79,7 +79,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(socket.getInputStream()); + HttpTester.Response response = HttpTester.parseResponse(HttpTester.from(socket.getInputStream())); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); } } @@ -100,7 +100,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(socket.getInputStream()); + HttpTester.Response response = HttpTester.parseResponse(HttpTester.from(socket.getInputStream())); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); } } @@ -122,7 +122,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -132,7 +133,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -159,7 +160,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 403 from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.FORBIDDEN_403, response.getStatus()); // Socket should be closed @@ -180,7 +182,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -190,7 +193,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -217,7 +220,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 403 from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.FORBIDDEN_403, response.getStatus()); // Socket should be closed @@ -238,7 +242,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -248,7 +253,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -294,7 +299,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 407 from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.PROXY_AUTHENTICATION_REQUIRED_407, response.getStatus()); Assert.assertTrue(response.containsKey("Proxy-Authenticate".toLowerCase(Locale.ENGLISH))); @@ -318,7 +324,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -328,7 +335,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -370,7 +377,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 500 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals("Response Code", HttpStatus.INTERNAL_SERVER_ERROR_500, response.getStatus()); } } @@ -392,7 +400,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -402,7 +411,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -428,11 +437,12 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); // The pipelined request must have gone up to the server as is - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -455,7 +465,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); for (int i = 0; i < 10; ++i) @@ -467,7 +478,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -491,7 +502,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -501,7 +513,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); @@ -530,7 +542,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -562,7 +575,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -574,7 +588,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("POST /echo\r\nHELLO", response.getContent()); @@ -585,7 +599,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -617,7 +631,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); StringBuilder body = new StringBuilder(); @@ -634,7 +649,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("POST /echo\r\n" + body, response.getContent()); } @@ -702,7 +717,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); String body = "0123456789ABCDEF"; @@ -715,12 +731,12 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.write(request.getBytes(StandardCharsets.UTF_8)); output.flush(); - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("POST /echo\r\n" + body, response.getContent()); } } - + @Test public void testCONNECTAndGETPipelinedAndOutputShutdown() throws Exception { @@ -742,11 +758,12 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest socket.shutdownOutput(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); // The pipelined request must have gone up to the server as is - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } @@ -769,7 +786,8 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest output.flush(); // Expect 200 OK from the CONNECT request - HttpTester.Response response = readResponse(input); + HttpTester.Input in = HttpTester.from(input); + HttpTester.Response response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); request = "" + @@ -781,7 +799,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest socket.shutdownOutput(); // The pipelined request must have gone up to the server as is - response = readResponse(input); + response = HttpTester.parseResponse(in); Assert.assertEquals(HttpStatus.OK_200, response.getStatus()); Assert.assertEquals("GET /echo", response.getContent()); } From a1f614fd0ee12ce145efecad34c0f05f4108f47e Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 17 Jul 2017 14:17:40 -0700 Subject: [PATCH 105/147] Removing Test/Testing related commits from VERSION.txt --- VERSION.txt | 88 ----------------------------------------------------- 1 file changed, 88 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 0c4e19d0b4f..9aeaa9a38d4 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -38,7 +38,6 @@ jetty-9.4.5.v20170502 - 02 May 2017 + 1448 StackOverflowError when using URLStreamHandlerFactory in WebAppClassloader + 1475 SIOOBE in ContextHandler startup - + 1480 Expand URIUtil.canonicalPath() testing + 1481 Add convenient method to add user to Realm + 1486 redirect to welcome file broken for sub directory + 1487 add decoded paths @@ -84,7 +83,6 @@ jetty-9.4.4.v20170414 - 14 April 2017 WebAppClassloader + 1449 Unable to find the JVM Lib directory in WebAppContext + 1450 JMX does not export session statistics - + 1452 Add tests for [want|need]ClientAuth + 1454 CachedContentFactory locks filesystem after first read of file + 1456 Error dispatch race with async write + 1463 SSL Renegotiate limit @@ -98,10 +96,8 @@ jetty-9.4.4.v20170414 - 14 April 2017 jetty-9.4.3.v20170317 - 17 March 2017 + 329 Javadoc for HttpTester and ServletTester needs to reference limited HTTP version scope - + 609 websocket ClientCloseTest testServerNoCloseHandshake is failing + 856 Add server/port and auth configuration for mongo sessions + 1015 Ensure jetty-distribution excludes git / temp files - + 1049 test-jetty-osgi test exits/crashes the surefire forked JVM + 1184 IllegalStateException for HEAD requests responded with 404 + 1340 PushCacheFilter question + 1351 StringIndexOutOfBoundsException thrown on incomplete Accept-Language @@ -118,10 +114,8 @@ jetty-9.4.3.v20170317 - 17 March 2017 + 1387 Windows and paxexam failure due to "renaming bundle" + 1389 Update to gcloud datastore-0.9.4-beta + 1390 HashLoginService and "this.web-inf.url" property are incompatible - + 1394 Default OS Locale/Encoding/Charset can cause test failures + 1396 Set-Cookie produced by Jetty is invalid for RFC6265 and Chrome + 1398 Ensure all SessionDataStores store lastsaved time - + 1399 SlowClientTest is failing on CI + 1401 HttpOutput.recycle() does not clear the write listener + 1402 Move RFC syntax validation to jetty-http Syntax class + 1403 Move new CookieCompliance class to jetty-http @@ -137,11 +131,8 @@ jetty-9.3.18.v20170406 - 06 April 2017 jetty-9.3.17.v20170317 - 17 March 2017 + 329 Javadoc for HttpTester and ServletTester needs to reference limited HTTP version scope - + 609 websocket ClientCloseTest testServerNoCloseHandshake is failing + 1015 Ensure jetty-distribution excludes git / temp files + 1047 ReadPendingException and then thread death - + 1049 test-jetty-osgi test exits/crashes the surefire forked JVM - + 1282 ByteArrayEndPointTest.testIdle() failure + 1296 Introduce HTTP parser "content complete" event + 1326 Jetty shutdown command got NullPointerException (http2 module added to start) @@ -159,17 +150,13 @@ jetty-9.3.17.v20170317 - 17 March 2017 + 1387 Windows and paxexam failure due to "renaming bundle" + 1389 Update to gcloud datastore-0.9.4-beta + 1390 HashLoginService and "this.web-inf.url" property are incompatible - + 1394 Default OS Locale/Encoding/Charset can cause test failures + 1396 Set-Cookie produced by Jetty is invalid for RFC6265 and Chrome - + 1399 SlowClientTest is failing on CI + 1401 HttpOutput.recycle() does not clear the write listener jetty-9.4.2.v20170220 - 20 February 2017 + 612 Support HTTP Trailer + 1047 ReadPendingException and then thread death - + 1150 Rationalize the session tests + 1226 Undefined JETTY_LOGS breaks jetty.sh - + 1282 ByteArrayEndPointTest.testIdle() failure + 1284 IllegalStateException updating session inactive interval + 1290 http2-hpack not visible in OSGi + Allow application to hint that chunking should be used @@ -182,8 +169,6 @@ jetty-9.4.2.v20170220 - 20 February 2017 + 1313 Insufficient Bytes behavior change in jetty 9.4.x due to HTTP Trailers support? + 1315 Update to gcloud datastore 0.8.3-beta - + 1317 AsyncProxyServletLoadTest fails - + 1318 SessionEvictionFailure test fails on Windows + 1326 Jetty shutdown command got NullPointerException (http2 module added to start) + 1328 Response.setBufferSize(int) ISE should be more clear on reason @@ -198,7 +183,6 @@ jetty-9.4.1.v20170120 - 20 January 2017 + 612 Support HTTP Trailer + 1044 Unix socket connector blocks for 30 seconds on stopping the server + 1073 JDK9 support in Jetty 9.3.x - + 1114 Add testcase for WSUF for stop/start of the Server + 1138 Ensure xml validation works on web descriptors + 1139 Support configuration of properties during --add-to-start + 1146 jetty.server.HttpInput deadlock @@ -215,8 +199,6 @@ jetty-9.4.1.v20170120 - 20 January 2017 + 1181 Review buffer underflow cases in SslConnection + 1184 IllegalStateException for HEAD requests responded with 404 + 1185 Connection abruptly closed for HEAD requests - + 1186 Where can i find SocketConnector .java and - BlockingChannelConnector.java etc? + 1188 Cannot --add-to-start=logback-access due to logback-core dependancy + 1195 Problem using STOP.PORT and STOP.KEY with --exec + 1197 WebSocketClient not sending `Authorization` request header @@ -234,7 +216,6 @@ jetty-9.4.1.v20170120 - 20 January 2017 + 1218 ReadPendingException is thrown when using o.e.j.websocket.api.Session.suspend + 1220 PushCacheFilter does not add the context path to pushed resources - + 1221 Session AbstractCreateAndInvalidateTest needs synchronization + 1222 Authenticated sessions throw exception on invalidate + 1223 Allow session workername to be null + 1224 HttpSessionListener.sessionDestroyed can no longer access session @@ -243,27 +224,8 @@ jetty-9.4.1.v20170120 - 20 January 2017 + 1229 ClassLoader constraint issue when using NativeWebSocketConfiguration with WEB-INF/lib/jetty-http.jar present + 1234 onBadMessage called from with handled message - + 1239 Charset=unknown produces Exception during testing - + 1242 - org.eclipse.jetty.client.HttpRequestAbortTest.testAbortOnCommitWithContent[1]() - results in EofException - + 1243 - org.eclipse.jetty.proxy.ProxyServletFailureTest.testServerException[0]() - results in ServletException - + 1244 - ProxyServletFailureTest.testProxyRequestStallsContentServerIdlesTimeout() - has TimeoutException visible - + 1248 - org.eclipse.jetty.http2.client.StreamResetTest.testServerExceptionConsumesQueuedData - results in visible Stacktrace - + 1252 - HttpClientStreamTest.testInputStreamContentProviderThrowingWhileReading[transport: - HTTPS]() results in Early EOF + 1254 9.4.x Server resource handler welcome files forwarding not working - + 1259 HostnameVerificationTest.simpleGetWithHostnameVerificationEnabledTest - is broken + 1260 Expand system properties in start - + 1261 Intermittent H2C test failure AsyncIOServletTest.testAsyncReadEarlyEOF + 1262 BufferUtil.isMappedBuffer() uses reflection on private JDK fields + 1265 JAXB not available in JDK 9 + 1267 Request.getRemoteUser can throw undeclared IllegalStateException via @@ -275,10 +237,8 @@ jetty-9.4.1.v20170120 - 20 January 2017 + 1272 Update ALPN versions for 8u111 + 1274 Distinguish no tlds vs no MetaInfConfiguration tld scanning for quickstart - + 1275 Get rid of Mockito + 1276 Remove org.eclipse.jetty.websocket.server.WebSocketServerFactory from SPI - + 1277 http2 alpn test error jetty-9.4.0.v20161208 - 08 December 2016 + 1112 How config async support in jsp tag? @@ -305,9 +265,6 @@ jetty-9.3.16.v20170120 - 20 January 2017 + 1229 ClassLoader constraint issue when using NativeWebSocketConfiguration with WEB-INF/lib/jetty-http.jar present + 1234 onBadMessage called from with handled message - + 1259 HostnameVerificationTest.simpleGetWithHostnameVerificationEnabledTest - is broken - + 1261 Intermittent H2C test failure AsyncIOServletTest.testAsyncReadEarlyEOF + 1262 BufferUtil.isMappedBuffer() uses reflection on private JDK fields + 1265 JAXB not available in JDK 9 + 1267 Request.getRemoteUser can throw undeclared IllegalStateException via @@ -321,7 +278,6 @@ jetty-9.3.16.v20170120 - 20 January 2017 + 1275 Get rid of Mockito + 1276 Remove org.eclipse.jetty.websocket.server.WebSocketServerFactory from SPI - + 1277 http2 alpn test error jetty-9.3.15.v20161220 - 20 December 2016 + 240 Missing content for multipart request after upgrade to Jetty > 9.2.7 @@ -350,7 +306,6 @@ jetty-9.3.15.v20161220 - 20 December 2016 + 1099 PushCacheFilter pushes POST requests + 1108 Please improve logging in SslContextFactory when there are no approved cipher suites - + 1114 Add testcase for WSUF for stop/start of the Server + 1118 Filter.destroy() conflicts with ContainerLifeCycle.destroy() in WebSocketUpgradeFilter + 1123 Broken lifecycle for WebSocket's mappings @@ -390,7 +345,6 @@ jetty-9.4.0.RC3 - 05 December 2016 WebSocketUpgradeFilter + 1123 Broken lifecycle for WebSocket's mappings + 1124 Allow configuration of WebSocket mappings from Spring - + 1127 AsyncMiddleManServletTest Test failure + 1128 Stats Servlet hidden from classpath + 1130 PROXY protocol support reports incorrect remote address + 1134 Jetty HTTP/2 client problems @@ -439,8 +393,6 @@ jetty-9.4.0.RC2 - 16 November 2016 IPAccessHandler did + 1074 Improve HttpInput for non dispatched calls + 1075 If read from session data cache fails, fallback to session data store - + 1076 bad error handling in - ServerTimeoutsTest.testBlockingReadWithMinimumDataRateBelowLimit + 1077 doHandle defined twice for ScopedHandler + 1078 DigestAuthentication should use realm from server, even if unknown in advance @@ -450,7 +402,6 @@ jetty-9.4.0.RC2 - 16 November 2016 charset=UTF-8" + 1099 PushCacheFilter pushes POST requests + 1103 AbstractNCSARequestLog reports too much of the Request URI - + 480764 Suppress stacks in multipart filter tests jetty-9.4.0.RC1 - 21 October 2016 + 277 Proxy servlet does not handle HTTP status 100 correctly @@ -518,7 +469,6 @@ jetty-9.4.0.RC0 - 15 September 2016 String + 897 Remove GzipHandler interceptor when out of scope + 898 GzipHandler adds multiple Vary header - + 899 PathFinderTest fails in jetty-9.2.x + 902 Expect: 100-Continue does not work with HTTP/2 + 906 Expose jetty juli log for jasper in osgi + 909 Path and Domain not properly matched in addCookie() @@ -543,20 +493,16 @@ jetty-9.4.0.M1 - 15 August 2016 + 56 Fix authn issues in LdapLoginModule + 592 Support no-value Host header in HttpParser + 620 Missing call to setPattern in RewritePatternRule constructor - + 622 NoSqlSessionManager test for expired session does not use - session.maxInactiveInterval + 623 Add --gzip suffix to 304 responses with ETAGs + 624 AsyncContext.onCompleted called twice + 627 Use only start.ini or start.d, not both + 628 IOException: Unable to open root Jar file MetaInfConfiguration.getTlds(MetaInfConfiguration.java:406) with Spring boot loader + WebAppContext + non-expanded war - + 632 JMX tests rely on fixed port + 638 ConnectHandler responses should have Content-Length + 639 ServerContainer stores WebSocket sessions twice + 640 ClientContainer should store WebSocket sessions as beans + 641 MongoSessionIdManager uses deprecated ensureIndex - + 643 NPE in passing websocket client test + 644 Modules for enabling logging + 647 HTTP/2 CONTINUATION frame parsing throws IllegalStateException + 648 Problem using InputStreamResponseListener to handle HTTP/2 responses @@ -587,9 +533,6 @@ jetty-9.4.0.M1 - 15 August 2016 + 689 Drop support for http2 drafts + 690 jetty-maven-plugin does not configure AnnotationConfiguration for jetty:effective-web-xml goal - + 693 QoSFilterTest failures are not capture by junit - + 694 http2.client.StreamResetTest.testServerExceptionConsumesQueuedData stack - not suppressed in test + 695 Deprecate LocalConnector.getResponses() in favor of using .getResponse() + 696 LocalConnector.getResponse() doesn't find close if using HTTP/1.1 w/Connection: close @@ -628,15 +571,12 @@ jetty-9.4.0.M1 - 15 August 2016 + 804 setting default Url Encoding broken in Jetty >= 9.3 + 815 Simplify infinispan session module + 817 NPE in jndi Resource - + 819 Allow jetty-start Output assertions in TestUseCases + 826 Better default for HTTP/2's max concurrent streams + 827 HTTPClient fails connecting to HTTPS host through an HTTP proxy w/authentication + 830 Test webapp not properly copied to demo-base + 832 ServerWithJNDI example uses wrong webapp - + 836 Test Failure: HttpClientTransportOverHTTP2Test.testLastStreamId() + 837 Update to support apache jasper 8.5.4 - + 839 Test Failure: MaxConcurrentStreamsTest.testOneConcurrentStream() + 841 support reset in buffering interceptors jetty-9.4.0.M0 - 03 June 2016 @@ -650,7 +590,6 @@ jetty-9.4.0.M0 - 03 June 2016 + 437786 SslContextFactory: Allow Password.getPassword to be overridden + 469 Update to Apache Jasper 8.0.33 + 472675 No main manifest attribute, in jetty-runner regression - + 473 SessionTest.testBasicEcho_FromClient frequently failing + 478918 Change javax.servlet.error,forward,include literals to RequestDispatcher constants + 479179 Fixed NPE from debug @@ -682,8 +621,6 @@ jetty-9.4.0.M0 - 03 June 2016 + 482042 New API, Allow customization of ServletHandler path mapping + 482056 Compact path before using it in getRequestDispatcher() + 482057 MultiPartInputStream temp file permissions should be limited to user - + 482058 MultiPartInputStream test initial part boundary incorrectly allows - empty string + 482172 Report form key size count in UrlEncoded exceptions + 482173 Track original Query string in Rewrite RuleContainer too + 483059 Remove cache of authenticated users @@ -712,11 +649,8 @@ jetty-9.4.0.M0 - 03 June 2016 + 525 fix blockForContent spin + 532 Get rid of generated jetty-start/dependency-reduced-pom.xml + 533 Do not hide file resource exception - + 572 Ignore failing test pending further analysis + 605 Guard concurrent calls to WebSocketSession.close() + 608 reset encoding set from content type - + 609 ignore failing test - + 610 Ignore failing test jetty-9.3.14.v20161028 - 28 October 2016 + 292 NPE in SslConnectionFactory newConnection @@ -733,7 +667,6 @@ jetty-9.3.14.v20161028 - 28 October 2016 ${jetty.base} + 1039 AttributeNormalizer should not track attributes that are null + 1046 Improve HTTP2Flusher error report - + 480764 Add extra tests for empty multipart jetty-9.3.13.v20161014 - 14 October 2016 + 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid @@ -808,7 +741,6 @@ jetty-9.3.11.v20160721 - 21 July 2016 + 230 customize Content-Type in ErrorHandler's default error page + 592 Support no-value Host header in HttpParser + 631 SLOTH protection - + 643 NPE in passing websocket client test + 649 LDAPLoginModule should disallow blank username and password + 658 Add memcached option for gcloud-sessions in jetty-9.3 + 660 NullPointerException in Request.getParameter: _parameters is null @@ -833,9 +765,6 @@ jetty-9.3.11.v20160721 - 21 July 2016 + 687 AllowSymLinkAliasChecker not normalizing relative symlinks properly + 690 jetty-maven-plugin does not configure AnnotationConfiguration for jetty:effective-web-xml goal - + 693 QoSFilterTest failures are not capture by junit - + 694 http2.client.StreamResetTest.testServerExceptionConsumesQueuedData stack - not suppressed in test + 695 Deprecate LocalConnector.getResponses() in favor of using .getResponse() + 696 LocalConnector.getResponse() doesn't find close if using HTTP/1.1 w/Connection: close @@ -871,7 +800,6 @@ jetty-9.2.19.v20160908 - 08 September 2016 + 882 Add IPv6 support to IPAddressMap in jetty-util + 894 When adding servless class, preserve Class instead of going through String - + 899 PathFinderTest fails in jetty-9.2.x jetty-9.2.18.v20160721 - 21 July 2016 + 425 Incorrect @ServerEndpoint Encoder/Decoder lifecycle @@ -895,17 +823,12 @@ jetty-9.3.10.v20160621 - 21 June 2016 + 388 Add methods to send text frames with pre-encoded strings + 605 Guard concurrent calls to WebSocketSession.close() + 608 reset encoding set from content type? - + 609 websocket ClientCloseTest testServerNoCloseHandshake is failing - + 610 HttpClientRedirectTest/testRedirectWithWrongScheme test failing in CI + 620 Missing call to setPattern in RewritePatternRule constructor - + 622 NoSqlSessionManager test for expired session does not use - session.maxInactiveInterval + 623 Add --gzip suffix to 304 responses with ETAGs + 624 AsyncContext.onCompleted called twice + 628 IOException: Unable to open root Jar file MetaInfConfiguration.getTlds(MetaInfConfiguration.java:406) with Spring boot loader + WebAppContext + non-expanded war - + 632 JMX tests rely on fixed port + 633 If jmx and websocket is enabled, redploying a context produces a NullPointerException + 638 ConnectHandler responses should have Content-Length @@ -947,7 +870,6 @@ jetty-9.3.9.v20160517 - 17 May 2016 + 558 HTTP/2 server hangs when thread pool is low on threads + 560 Jetty Client Proxy Authentication does not work with HTTP Proxy tunneling - + 561 Fixed test timer + 567 NPE in ErrorPageErrorHandler debug + 570 URIUtil.encodePath does not always encode utf8 chars + 571 AbstractAuthentication.matchesURI() fails to match scheme @@ -993,8 +915,6 @@ jetty-9.3.9.M1 - 11 April 2016 + 418 Add osgi capability for endpoint configurator + 424 Jetty impl. of Websocket ServerEndpointConfig.Configurator lifecycle out of spec - + 427 Squelch intentional exceptions seen during websocket testing - + 434 RequestTest stack traces + 435 adjust debug log message + 437 Avoid NPE on receiving empty message though MessageHandler.Partial + 438 File and Path Resources with control characters should be rejected @@ -1014,7 +934,6 @@ jetty-9.3.9.M1 - 11 April 2016 + 476 HttpClient should not send absolute-form target with non HttpProxy jetty-9.3.8.v20160314 - 14 March 2016 - + 107 ResourceHandler range support testcase + 124 Don't produce text/html if the request doesn't accept it + 247 improving invalid buffer manipulation exception messages + 258 Http request to origin server over https proxy contains absolute URL @@ -1023,8 +942,6 @@ jetty-9.3.8.v20160314 - 14 March 2016 + 305 NPE when notifying the session listener if the channel is closed before a session has been opened + 316 Add *.chm mimetype mapping - + 343 ensure release deployment of test-jetty-webapp:war and - test-proxy-webapp:war + 346 HttpParser RFC2616 Compliance mode + 353 Jetty Client doesn't forward authentication headers with redirects when using proxy @@ -1043,7 +960,6 @@ jetty-9.3.8.v20160314 - 14 March 2016 + 386 Explicit Authorization header is dropped when handling 407s + 397 Multipart EOF handling + 402 Don't use Thread.isAlive() in ShutdownMonitor - + 405 adding testcase for problematic HttpURI parsing of path params + 406 GzipHandler: allow to override the Vary response header + 407 JSR356 Server WebSocket Sessions no longer being tracked + 408 Http client does not work on https with proxy @@ -1138,7 +1054,6 @@ jetty-9.3.7.RC0 - 05 January 2016 + 482243 Fixed GzipHandler for Include + 482270 Expose upgrade request locales + 482272 Fixed relative symlink checking - + 482506 HTTP/2 load test with h2load fails + 482670 HttpURI wrongly parser URI paths starting with /@ + 482855 Content-Length omitted for POST requests with empty body + 482959 Local stream count never decrements when closing a stream causing @@ -1459,8 +1374,6 @@ jetty-9.3.0.v20150612 - 12 June 2015 + 452503 Start.jar --add-to-start=jstl results in GraphException: Unable to expand property in name: jsp-impl/${jsp-impl}-jstl + 453487 Recycle HttpChannelOverHTTP2 - + 453627 Fixed FileSystem test for nanosecond filesystems - + 453636 Improved spin detection on test + 453829 Added HeaderRegexRule + 453834 CDI Support for WebSocket + 454152 Remove mux remnants from WebSocketClient @@ -1471,7 +1384,6 @@ jetty-9.3.0.v20150612 - 12 June 2015 + 456956 Reduce ThreadLocal.remove() weak reference garbage + 457130 HTTPS request with IP host and HTTP proxy throws IllegalArgumentException. - + 457309 Add test to ensure GET and HEAD response headers same for gzip + 457508 Add flag to scan exploded jars in jetty-jspc-maven-plugin + 457788 Powered By in o.e.j.util.Jetty conditional on sendServerVersion + 458478 JarFileResource improve performance of exist method From 56bf71aec2e222819a68528eb7e566c64f6f8537 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 18 Jul 2017 09:44:58 +0200 Subject: [PATCH 106/147] Issue #1675 --- .../org/eclipse/jetty/server/session/AbstractSessionCache.java | 3 ++- .../main/java/org/eclipse/jetty/server/session/Session.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java index afa00c255a6..4f72e7e8f8e 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java @@ -762,7 +762,8 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements _sessionDataStore.delete(oldId); //delete the session data with the old id _sessionDataStore.store(newId, session.getSessionData()); //save the session data with the new id } - LOG.info("Session id {} swapped for new id {}", oldId, newId); + if (LOG.isDebugEnabled()) + LOG.debug ("Session id {} swapped for new id {}", oldId, newId); return session; } } diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/Session.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/Session.java index 29a3548b6bc..859736992a6 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/Session.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/Session.java @@ -905,7 +905,7 @@ public class Session implements SessionHandler.SessionIf } default: { - LOG.info("Session {} already being invalidated", _sessionData.getId()); + if (LOG.isDebugEnabled()) LOG.debug("Session {} already being invalidated", _sessionData.getId()); } } } From 0fac9c390aeb567cd10dd10342fb2c673cd828e4 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 19 Jul 2017 21:50:37 +1000 Subject: [PATCH 107/147] simplify code, add more details in junit failure #1623 Signed-off-by: olivier lamy --- .../jetty_run_mojo_it/TestHelloServlet.java | 4 +- .../jetty-simple-webapp/pom.xml | 5 ++ .../jetty_run_mojo_it/TestHelloServlet.java | 4 +- .../src/it/jetty-run-mojo-it/pom.xml | 6 +++ .../jetty/maven/plugin/JettyRunMojo.java | 53 +++---------------- .../plugin/MavenWebInfConfiguration.java | 4 +- 6 files changed, 23 insertions(+), 53 deletions(-) diff --git a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 31a195c1407..286dcccae2c 100644 --- a/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-forked-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -40,13 +40,13 @@ public class TestHelloServlet String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); - System.out.println( "httpResponse:" + response ); + System.out.println( "httpResponse hello annotation servlet:" + response ); Assert.assertEquals( "hello beer", response.trim() ); response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); - System.out.println( "httpResponse:" + response ); + System.out.println( "httpResponse ping fragment servlet:" + response ); Assert.assertEquals( "pong beer", response.trim() ); } diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml index 7fb521911d7..a7e8ccdba9b 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/pom.xml @@ -21,6 +21,11 @@ jetty-simple-base + + org.slf4j + slf4j-simple + + org.eclipse.jetty jetty-servlet diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java index 5d700a60525..6fc5cb06e25 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/jetty-simple-webapp/src/test/java/org/eclipse/jetty/its/jetty_run_mojo_it/TestHelloServlet.java @@ -41,13 +41,13 @@ public class TestHelloServlet String response = httpClient.GET( "http://localhost:" + port + "/hello?name=beer" ).getContentAsString(); - System.out.println( "httpResponse:" + response ); + System.out.println( "httpResponse hello annotation servlet:" + response ); Assert.assertEquals( "hello beer", response.trim() ); response = httpClient.GET( "http://localhost:" + port + "/ping?name=beer" ).getContentAsString(); - System.out.println( "httpResponse:" + response ); + System.out.println( "httpResponse ping fragment servlet:" + response ); Assert.assertEquals( "pong beer", response.trim() ); } diff --git a/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml index 213a79af16b..313904bfff4 100644 --- a/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-run-mojo-it/pom.xml @@ -46,6 +46,12 @@ 1.7.21 + + org.slf4j + slf4j-simple + 1.7.21 + + commons-io commons-io diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java index 94102e9db95..a5f0e546ceb 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java @@ -283,24 +283,13 @@ public class JettyRunMojo extends AbstractJettyMojo if (useTestScope && (testClassesDirectory != null)) webApp.setTestClasses (testClassesDirectory); - List dependencyProjects = getDependencyProjects(); - webApp.getClassPathFiles().addAll( dependencyProjects ); - List dependencyResources = // - dependencyProjects.stream() // - .map( file -> Resource.newResource( file ) ) // - .collect( Collectors.toList() ); - webApp.getMetaData().getContainerResources().addAll( dependencyResources ); - webApp.setWebInfLib (getDependencyFiles()); -// webApp.getWebInfLib().addAll( dependencyResources // -// .stream() // -// .map( resource -> toFile(resource) ) // -// .collect( Collectors.toList() ) ); - webApp.getDependentProjects().addAll( dependencyResources ); + webApp.setWebInfLib(getDependencyFiles()); + //get copy of a list of war artifacts Set matchedWarArtifacts = new HashSet(); //process any overlays and the war type artifacts - List overlays = new ArrayList(); + List overlays = new ArrayList<>(); for (OverlayConfig config:warPluginInfo.getMavenWarOverlayConfigs()) { //overlays can be individually skipped @@ -596,8 +585,10 @@ public class JettyRunMojo extends AbstractJettyMojo { continue; } - if (getProjectReferences( artifact, project )!=null) + MavenProject mavenProject = getProjectReferences( artifact, project ); + if (mavenProject != null) { + dependencyFiles.add( Paths.get(mavenProject.getBuild().getOutputDirectory()).toFile() ); continue; } @@ -614,38 +605,6 @@ public class JettyRunMojo extends AbstractJettyMojo return dependencyFiles; } - private List getDependencyProjects() - { - List dependencyFiles = new ArrayList<>(); - for ( Iterator iter = projectArtifacts.iterator(); iter.hasNext(); ) - { - Artifact artifact = iter.next(); - - // Include runtime and compile time libraries, and possibly test libs too - if(artifact.getType().equals("war")) - { - continue; - } - - if (Artifact.SCOPE_PROVIDED.equals(artifact.getScope())) - continue; //never add dependencies of scope=provided to the webapp's classpath (see also param) - - if (Artifact.SCOPE_TEST.equals(artifact.getScope()) && !useTestScope) - continue; //only add dependencies of scope=test if explicitly required - - MavenProject mavenProject = getProjectReferences( artifact, project ); - if (mavenProject != null) - { - dependencyFiles.add( Paths.get(mavenProject.getBuild().getOutputDirectory()).toFile() ); - getLog().debug( "Adding project reference " + mavenProject.getBuild().getOutputDirectory() - + " for WEB-INF/classes " ); - } - } - - return dependencyFiles; - } - - protected MavenProject getProjectReferences( Artifact artifact, MavenProject project ) { if ( project.getProjectReferences() == null || project.getProjectReferences().isEmpty() ) diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java index 440238d22b4..47ce80168eb 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java @@ -93,8 +93,8 @@ public class MavenWebInfConfiguration extends WebInfConfiguration public void preConfigure(WebAppContext context) throws Exception { super.preConfigure(context); - ((JettyWebAppContext)context).getDependentProjects() - .stream().forEach( resource -> context.getMetaData().addWebInfJar( resource ) ); +// ((JettyWebAppContext)context).getDependentProjects() +// .stream().forEach( resource -> context.getMetaData().addWebInfJar( resource ) ); } From ce4a8df311fef29c26bfe8bfea41ad18bdf30619 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 19 Jul 2017 14:51:41 -0700 Subject: [PATCH 108/147] Fixing module [name] warning --- jetty-jndi/src/main/jndi-config/modules/mail.mod | 2 +- jetty-plus/src/main/plus-config/modules/transactions.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-jndi/src/main/jndi-config/modules/mail.mod b/jetty-jndi/src/main/jndi-config/modules/mail.mod index 1dd711dfc7a..69e8470f9c9 100644 --- a/jetty-jndi/src/main/jndi-config/modules/mail.mod +++ b/jetty-jndi/src/main/jndi-config/modules/mail.mod @@ -1,7 +1,7 @@ [description] Adds the javax.mail implementation to the classpath. -[name] +[provides] mail [lib] diff --git a/jetty-plus/src/main/plus-config/modules/transactions.mod b/jetty-plus/src/main/plus-config/modules/transactions.mod index 025f2cf2dec..9b692f2f755 100644 --- a/jetty-plus/src/main/plus-config/modules/transactions.mod +++ b/jetty-plus/src/main/plus-config/modules/transactions.mod @@ -1,7 +1,7 @@ [description] Puts javax.transaction api on the classpath -[name] +[provides] transactions [lib] From 86b4870d140759d4959cdafa63f96fcbc6967e23 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 19 Jul 2017 15:29:31 -0700 Subject: [PATCH 109/147] Fixed #1679 - making DeploymentManager usable in JMX without error --- .../jetty/deploy/DeploymentManager.java | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java index acccfe5c0aa..a2357f14596 100644 --- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java +++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.stream.Collectors; import org.eclipse.jetty.deploy.bindings.StandardDeployer; import org.eclipse.jetty.deploy.bindings.StandardStarter; @@ -311,7 +312,7 @@ public class DeploymentManager extends ContainerLifeCycle */ public Collection getApps(Node node) { - List ret = new ArrayList(); + List ret = new ArrayList<>(); for (AppEntry entry : _apps) { if (entry.lifecyleNode == node) @@ -592,13 +593,40 @@ public class DeploymentManager extends ContainerLifeCycle { return _lifecycle.getNodes(); } + + @SuppressWarnings("unused") + @ManagedOperation(value="list nodes that are tracked by DeploymentManager", impact="INFO") + public Collection getNodeNames() + { + return _lifecycle.getNodes().stream().map(Node::getName).collect(Collectors.toList()); + } - @ManagedOperation(value="list apps that are located at specified App LifeCycle nodes", impact="ACTION") public Collection getApps(@Name("nodeName") String nodeName) { return getApps(_lifecycle.getNodeByName(nodeName)); } + @SuppressWarnings("unused") + @ManagedOperation(value="list apps that are located at specified App LifeCycle nodes", impact="ACTION") + public Collection getAppNames(@Name("nodeName") String nodeName) + { + Node node = _lifecycle.getNodeByName(nodeName); + if(node == null) + { + throw new IllegalArgumentException("Unable to find node [" + nodeName + "]"); + } + + List ret = new ArrayList<>(); + for (AppEntry entry : _apps) + { + if (entry.lifecyleNode == node) + { + ret.add(String.format("contextPath=%s,originId=%s,appProvider=%s", entry.app.getContextPath(), entry.app.getOriginId(), entry.app.getAppProvider().getClass().getName())); + } + } + return ret; + } + public void scope(XmlConfiguration xmlc, Resource webapp) throws IOException { From 2c60f593251c10328ed5f5f5f3834ebbafef1941 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Thu, 20 Jul 2017 14:10:42 +1000 Subject: [PATCH 110/147] some cleanup per Jan review Signed-off-by: olivier lamy --- .../jetty/maven/plugin/JettyRunMojo.java | 5 +- .../maven/plugin/JettyWebAppContext.java | 7 ++- .../plugin/MavenWebInfConfiguration.java | 48 +++++++------------ 3 files changed, 24 insertions(+), 36 deletions(-) diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java index a5f0e546ceb..3db13bf6f90 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunMojo.java @@ -32,6 +32,7 @@ import org.eclipse.jetty.webapp.WebAppContext; import java.io.File; import java.io.IOException; import java.net.URL; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collection; @@ -588,7 +589,9 @@ public class JettyRunMojo extends AbstractJettyMojo MavenProject mavenProject = getProjectReferences( artifact, project ); if (mavenProject != null) { - dependencyFiles.add( Paths.get(mavenProject.getBuild().getOutputDirectory()).toFile() ); + File projectPath = Paths.get(mavenProject.getBuild().getOutputDirectory()).toFile(); + getLog().debug( "Adding project directory " + projectPath.toString() ); + dependencyFiles.add( projectPath ); continue; } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java index 3ec20ce8081..fbd9a36e4ec 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java @@ -104,7 +104,6 @@ public class JettyWebAppContext extends WebAppContext private Resource _quickStartWebXml; private String _originAttribute; private boolean _generateOrigin; - private List dependentProjects = new ArrayList<>(); /** * Set the "org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern" with a pattern for matching jars on @@ -320,9 +319,9 @@ public class JettyWebAppContext extends WebAppContext return _webInfJars; } - public List getDependentProjects() + public List getWebInfClasses() { - return dependentProjects; + return _webInfClasses; } /* ------------------------------------------------------------ */ @@ -336,7 +335,7 @@ public class JettyWebAppContext extends WebAppContext { return _isGenerateQuickStart; } - + /* ------------------------------------------------------------ */ diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java index 47ce80168eb..e875c19c0d7 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java @@ -84,23 +84,6 @@ public class MavenWebInfConfiguration extends WebInfConfiguration context.setServerClasses( newServerClasses ); } - - - - /** - * @see org.eclipse.jetty.webapp.WebInfConfiguration#preConfigure(org.eclipse.jetty.webapp.WebAppContext) - */ - public void preConfigure(WebAppContext context) throws Exception - { - super.preConfigure(context); -// ((JettyWebAppContext)context).getDependentProjects() -// .stream().forEach( resource -> context.getMetaData().addWebInfJar( resource ) ); - - } - - - - /** * @see org.eclipse.jetty.webapp.AbstractConfiguration#postConfigure(org.eclipse.jetty.webapp.WebAppContext) */ @@ -197,24 +180,26 @@ public class MavenWebInfConfiguration extends WebInfConfiguration protected List findJars (WebAppContext context) throws Exception { - List list = new ArrayList(); + List list = new ArrayList<>(); JettyWebAppContext jwac = (JettyWebAppContext)context; - if (jwac.getClassPathFiles() != null) + List files = jwac.getWebInfLib(); + if (files != null) { - for (File f: jwac.getClassPathFiles()) - { - if (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar")) + files.forEach( file -> { + if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(".jar") + || file.isDirectory()) { try { - list.add(Resource.newResource(f.toURI())); + LOG.debug( " add resource to resources to examine {}", file ); + list.add(Resource.newResource(file.toURI())); } catch (Exception e) { LOG.warn("Bad url ", e); } } - } + } ); } List superList = super.findJars(context); @@ -234,25 +219,26 @@ public class MavenWebInfConfiguration extends WebInfConfiguration @Override protected List findClassDirs(WebAppContext context) throws Exception { - List list = new ArrayList(); + List list = new ArrayList<>(); JettyWebAppContext jwac = (JettyWebAppContext)context; - if (jwac.getClassPathFiles() != null) + List files = jwac.getWebInfClasses(); + if (files != null) { - for (File f: jwac.getClassPathFiles()) - { - if (f.exists() && f.isDirectory()) + files.forEach( file -> { + if (file.exists() && file.isDirectory()) { try { - list.add(Resource.newResource(f.toURI())); + list.add(Resource.newResource(file.toURI())); } catch (Exception e) { LOG.warn("Bad url ", e); } } - } + } ); + } List classesDirs = super.findClassDirs(context); From ccf89b81adfa541bd2c454f5da70a1b937af7186 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 20 Jul 2017 13:24:46 +0200 Subject: [PATCH 111/147] Issue #1623 Ensure restarts recreate classpath. --- .../org/eclipse/jetty/maven/plugin/JettyWebAppContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java index fbd9a36e4ec..e8240e764fa 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java @@ -98,7 +98,7 @@ public class JettyWebAppContext extends WebAppContext private final List _webInfClasses = new ArrayList<>(); private final List _webInfJars = new ArrayList<>(); private final Map _webInfJarMap = new HashMap(); - private List _classpathFiles = new ArrayList<>(); //webInfClasses+testClasses+webInfJars + private List _classpathFiles; //webInfClasses+testClasses+webInfJars private String _jettyEnvXml; private List _overlays; private Resource _quickStartWebXml; @@ -413,6 +413,7 @@ public class JettyWebAppContext extends WebAppContext _webInfClasses.add(_classes); // Set up the classpath + _classpathFiles = new ArrayList<>(); _classpathFiles.addAll(_webInfClasses); _classpathFiles.addAll(_webInfJars); From 9546db266bf5ed84aba384d3ec25aa8d6814c2c2 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 20 Jul 2017 16:11:19 +0200 Subject: [PATCH 112/147] Issue #1681 (cherry picked from commit 0d99bde0c1e740493b6dfab772b3c4933c1e7d75) --- .../ReloadedSessionMissingClassTest.java | 3 --- .../sessions/CachingSessionDataStoreTest.java | 3 --- ...tractClusteredInvalidationSessionTest.java | 2 -- ...bstractClusteredSessionScavengingTest.java | 4 --- ...AbstractModifyMaxInactiveIntervalTest.java | 27 ------------------- ...ractNonClusteredSessionScavengingTest.java | 6 ----- .../AbstractProxySerializationTest.java | 3 --- .../session/AbstractSessionExpiryTest.java | 15 +---------- ...ctSessionInvalidateCreateScavengeTest.java | 3 --- .../jetty/server/session/CreationTest.java | 3 --- .../server/session/DirtyAttributeTest.java | 7 +---- .../jetty/server/session/IdleSessionTest.java | 7 ----- .../server/session/ImmortalSessionTest.java | 3 --- .../session/ReentrantRequestSessionTest.java | 2 -- .../server/session/RemoveSessionTest.java | 5 +--- .../SameContextForwardedSessionTest.java | 3 --- .../server/session/SameNodeLoadTest.java | 4 --- .../server/session/SaveOptimizeTest.java | 17 ------------ .../session/SessionEvictionFailureTest.java | 6 +---- .../server/session/SessionListenerTest.java | 4 --- .../server/session/SessionRenewTest.java | 1 - 21 files changed, 4 insertions(+), 124 deletions(-) diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java index af2bedf084b..a820209cda0 100644 --- a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java +++ b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java @@ -114,8 +114,6 @@ public class ReloadedSessionMissingClassTest assertTrue(sessionCookie != null); String sessionId = (String)webApp.getServletContext().getAttribute("foo"); assertNotNull(sessionId); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //Stop the webapp webApp.stop(); @@ -126,7 +124,6 @@ public class ReloadedSessionMissingClassTest webApp.start(); Request request = client.newRequest("http://localhost:" + port1 + contextPath + "/bar?action=get"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); diff --git a/tests/test-sessions/test-memcached-sessions/src/test/java/org/eclipse/jetty/memcached/sessions/CachingSessionDataStoreTest.java b/tests/test-sessions/test-memcached-sessions/src/test/java/org/eclipse/jetty/memcached/sessions/CachingSessionDataStoreTest.java index 4223b905220..488710af8a7 100644 --- a/tests/test-sessions/test-memcached-sessions/src/test/java/org/eclipse/jetty/memcached/sessions/CachingSessionDataStoreTest.java +++ b/tests/test-sessions/test-memcached-sessions/src/test/java/org/eclipse/jetty/memcached/sessions/CachingSessionDataStoreTest.java @@ -83,8 +83,6 @@ public class CachingSessionDataStoreTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); String id = TestServer.extractSessionId(sessionCookie); //check that the memcache contains the session, and the session data store contains the session @@ -102,7 +100,6 @@ public class CachingSessionDataStoreTest // ((MockDataStore)persistentStore).zeroLoadCount(); Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=update"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); assertEquals(0, ((MockDataStore)persistentStore).getLoadCount()); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java index ccd39817ee0..697c2b431aa 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredInvalidationSessionTest.java @@ -104,13 +104,11 @@ public abstract class AbstractClusteredInvalidationSessionTest extends AbstractT // Invalidate on node1 Request request1 = client.newRequest(urls[0] + "?action=invalidate"); - request1.header("Cookie", sessionCookie); response1 = request1.send(); assertEquals(HttpServletResponse.SC_OK, response1.getStatus()); // Be sure on node2 we don't see the session anymore request2 = client.newRequest(urls[1] + "?action=test"); - request2.header("Cookie", sessionCookie); response2 = request2.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); } diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java index 1e624e5d5f3..d9b8709e8bd 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractClusteredSessionScavengingTest.java @@ -117,8 +117,6 @@ public abstract class AbstractClusteredSessionScavengingTest extends AbstractTes assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); SessionHandler m1 = context1.getSessionHandler(); assertEquals(1, m1.getSessionsCreated()); @@ -212,7 +210,6 @@ public abstract class AbstractClusteredSessionScavengingTest extends AbstractTes // Check that node1 does not have any local session cached request = client.newRequest(urls[0] + "?action=check"); - request.header("Cookie", sessionCookie); response1 = request.send(); assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); @@ -224,7 +221,6 @@ public abstract class AbstractClusteredSessionScavengingTest extends AbstractTes // Check that node2 does not have any local session cached request = client.newRequest(urls[1] + "?action=check"); - request.header("Cookie", sessionCookie); response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); } diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractModifyMaxInactiveIntervalTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractModifyMaxInactiveIntervalTest.java index f09a507901f..f05d1d9c7a5 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractModifyMaxInactiveIntervalTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractModifyMaxInactiveIntervalTest.java @@ -81,18 +81,14 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //do another request to reduce the maxinactive interval Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=change&val="+newMaxInactive+"&wait="+sleep); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); //do another request using the cookie to ensure the session is still there request= client.newRequest("http://localhost:" + port + "/mod/test?action=test&val="+newMaxInactive); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -140,18 +136,14 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //do another request to increase the maxinactive interval, first waiting until the old expiration should have passed Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=change&val="+newMaxInactive+"&wait="+sleep); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); //do another request using the cookie to ensure the session is still there request= client.newRequest("http://localhost:" + port + "/mod/test?action=test&val="+newMaxInactive); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -199,18 +191,14 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //do another request to reduce the maxinactive interval Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=change&val="+newMaxInactive+"&wait="+sleep); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); //do another request using the cookie to ensure the session is still there request= client.newRequest("http://localhost:" + port + "/mod/test?action=test&val="+newMaxInactive); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -258,18 +246,14 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //do another request to reduce the maxinactive interval Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=change&val="+newMaxInactive+"&wait="+sleep); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); //do another request using the cookie to ensure the session is still there request= client.newRequest("http://localhost:" + port + "/mod/test?action=test&val="+newMaxInactive); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -314,18 +298,14 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //do another request to change the maxinactive interval Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=change&val="+newMaxInactive+"&wait="+2); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); //do another request using the cookie to ensure the session is still there request= client.newRequest("http://localhost:" + port + "/mod/test?action=test&val="+newMaxInactive); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -372,13 +352,10 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //do another request that will sleep long enough for the session expiry time to have passed //before trying to access the session and ensure it is still there Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=sleep&val="+sleep); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -426,12 +403,9 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //do another request to change the maxinactive interval Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=change&val="+newMaxInactive); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -441,7 +415,6 @@ public abstract class AbstractModifyMaxInactiveIntervalTest extends AbstractTest //do another request using the cookie to ensure the session is still there request= client.newRequest("http://localhost:" + port + "/mod/test?action=test&val="+newMaxInactive); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java index c4695b8aec9..c96237b6faa 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractNonClusteredSessionScavengingTest.java @@ -96,8 +96,6 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); // Let's wait for the scavenger to run pause(maxInactivePeriod + scavengePeriod); @@ -107,7 +105,6 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract // The session should not be there anymore, but we present an old cookie // The server should create a new session. Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=old-create"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); } @@ -154,8 +151,6 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); // Let's wait for the scavenger to run pause(2*scavengePeriod); @@ -164,7 +159,6 @@ public abstract class AbstractNonClusteredSessionScavengingTest extends Abstract // Test that the session is still there Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=old-test"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); } diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java index 431b17b3805..f40132a25c6 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractProxySerializationTest.java @@ -108,8 +108,6 @@ public abstract class AbstractProxySerializationTest extends AbstractTestBase assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //stop the context to be sure the sesssion will be passivated context.stop(); @@ -119,7 +117,6 @@ public abstract class AbstractProxySerializationTest extends AbstractTestBase // Make another request using the session id from before Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping.substring(1) + "?action=test"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); } diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java index fa2c153b73f..523867b63fb 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionExpiryTest.java @@ -141,8 +141,6 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); String sessionId = TestServer.extractSessionId(sessionCookie); @@ -197,8 +195,6 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //now stop the server server1.stop(); @@ -211,7 +207,6 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase //make another request, the session should not have expired Request request = client.newRequest(url + "?action=notexpired"); - request.getHeaders().add("Cookie", sessionCookie); ContentResponse response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); @@ -268,8 +263,6 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); String sessionId = TestServer.extractSessionId(sessionCookie); @@ -292,7 +285,6 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase //make another request, the session should have expired Request request = client.newRequest(url + "?action=test"); - request.getHeaders().add("Cookie", sessionCookie); ContentResponse response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); @@ -343,15 +335,11 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase ContentResponse response = client.GET(url + "?action=init"); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); - assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); - + assertTrue(sessionCookie != null); //make another request to change the session timeout to a larger value int newInactivePeriod = 100; Request request = client.newRequest(url + "?action=change&val="+newInactivePeriod); - request.getHeaders().add("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -364,7 +352,6 @@ public abstract class AbstractSessionExpiryTest extends AbstractTestBase pause(inactivePeriod); request = client.newRequest(url + "?action=check"); - request.getHeaders().add("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie2 = response.getHeaders().get("Set-Cookie"); diff --git a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java index 88edd817e55..e348ab0a1b6 100644 --- a/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java +++ b/tests/test-sessions/test-sessions-common/src/main/java/org/eclipse/jetty/server/session/AbstractSessionInvalidateCreateScavengeTest.java @@ -123,12 +123,9 @@ public abstract class AbstractSessionInvalidateCreateScavengeTest extends Abstra assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); // Make a request which will invalidate the existing session and create a new one Request request2 = client.newRequest(url + "?action=test"); - request2.header("Cookie", sessionCookie); ContentResponse response2 = request2.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/CreationTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/CreationTest.java index 2273b14ab09..c10733a1042 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/CreationTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/CreationTest.java @@ -107,8 +107,6 @@ public class CreationTest String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //session should now be evicted from the cache String id = TestServer.extractSessionId(sessionCookie); @@ -118,7 +116,6 @@ public class CreationTest //make another request for the same session Request request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping + "?action=test"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/DirtyAttributeTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/DirtyAttributeTest.java index 7fd488d078b..6790ca15749 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/DirtyAttributeTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/DirtyAttributeTest.java @@ -112,12 +112,9 @@ public class DirtyAttributeTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); - + //do another request to change the session attribute Request request = client.newRequest("http://localhost:" + port + "/mod/test?action=setA"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); @@ -128,7 +125,6 @@ public class DirtyAttributeTest //do another request using the cookie to try changing the session attribute to the same value again request= client.newRequest("http://localhost:" + port + "/mod/test?action=setA"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); A_VALUE.assertPassivatesEquals(2); @@ -138,7 +134,6 @@ public class DirtyAttributeTest //do another request using the cookie and change to a different value request= client.newRequest("http://localhost:" + port + "/mod/test?action=setB"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); B_VALUE.assertPassivatesEquals(1); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/IdleSessionTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/IdleSessionTest.java index ec110cac542..b3f52588fc2 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/IdleSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/IdleSessionTest.java @@ -105,8 +105,6 @@ public class IdleSessionTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //and wait until the session should be idled out pause(evictionSec*3); @@ -118,7 +116,6 @@ public class IdleSessionTest //make another request to de-idle the session Request request = client.newRequest(url + "?action=test"); - request.getHeaders().add("Cookie", sessionCookie); ContentResponse response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); @@ -140,7 +137,6 @@ public class IdleSessionTest //make a request request = client.newRequest(url + "?action=testfail"); - request.getHeaders().add("Cookie", sessionCookie); response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); @@ -150,8 +146,6 @@ public class IdleSessionTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); id = TestServer.extractSessionId(sessionCookie); //and wait until the session should be idled out @@ -170,7 +164,6 @@ public class IdleSessionTest //make another request to de-idle the session request = client.newRequest(url + "?action=testfail"); - request.getHeaders().add("Cookie", sessionCookie); response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ImmortalSessionTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ImmortalSessionTest.java index 374de0aa68c..fcf9dd7cf3e 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ImmortalSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ImmortalSessionTest.java @@ -96,8 +96,6 @@ public class ImmortalSessionTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); String resp = response.getContentAsString(); assertEquals(resp.trim(),String.valueOf(value)); @@ -107,7 +105,6 @@ public class ImmortalSessionTest // Be sure the session is still there Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=get"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ReentrantRequestSessionTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ReentrantRequestSessionTest.java index 43707c6b7c3..fa5011e33be 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ReentrantRequestSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/ReentrantRequestSessionTest.java @@ -72,8 +72,6 @@ public class ReentrantRequestSessionTest String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //make a request that will make a simultaneous request for the same session Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=reenter&port=" + port + "&path=" + contextPath + servletMapping); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/RemoveSessionTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/RemoveSessionTest.java index 12e37961973..c22c2b4a79b 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/RemoveSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/RemoveSessionTest.java @@ -80,8 +80,7 @@ public class RemoveSessionTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); + //ensure sessionCreated listener is called assertTrue (testListener.isCreated()); assertEquals(1, m.getSessionsCreated()); @@ -90,7 +89,6 @@ public class RemoveSessionTest //now delete the session Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=delete"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); //ensure sessionDestroyed listener is called @@ -104,7 +102,6 @@ public class RemoveSessionTest // The session is not there anymore, even if we present an old cookie request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=check"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); assertEquals(0, ((DefaultSessionCache)m.getSessionCache()).getSessionsCurrent()); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameContextForwardedSessionTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameContextForwardedSessionTest.java index 8040f11e7e3..f63c7a35b75 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameContextForwardedSessionTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameContextForwardedSessionTest.java @@ -93,8 +93,6 @@ public class SameContextForwardedSessionTest assertEquals(HttpServletResponse.SC_OK, response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //wait until all of the request handling has finished _synchronizer.await(); @@ -105,7 +103,6 @@ public class SameContextForwardedSessionTest //Make a fresh request Request request = client.newRequest("http://localhost:" + serverPort + "/context/four"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK, response.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameNodeLoadTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameNodeLoadTest.java index bbbea552ee2..3720f75ea76 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameNodeLoadTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SameNodeLoadTest.java @@ -83,8 +83,6 @@ public class SameNodeLoadTest assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); //simulate 10 clients making 100 requests each ExecutorService executor = Executors.newCachedThreadPool(); @@ -110,7 +108,6 @@ public class SameNodeLoadTest // Perform one request to get the result Request request = client.newRequest( url + "?action=result" ); - request.header("Cookie", sessionCookie); ContentResponse response2 = request.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); String response = response2.getContentAsString(); @@ -174,7 +171,6 @@ public class SameNodeLoadTest Thread.currentThread().sleep(pauseMsec); } Request request = client.newRequest(url + "?action=increment"); - request.header("Cookie", sessionCookie); ContentResponse response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); } diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SaveOptimizeTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SaveOptimizeTest.java index 3c9e6549fa1..3b1f47dac95 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SaveOptimizeTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SaveOptimizeTest.java @@ -159,11 +159,8 @@ public class SaveOptimizeTest //make a few requests to access the session but not change it for (int i=0;i<5; i++) { - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); - // Perform a request to contextB with the same session cookie Request request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping+"?action=noop"); - request.header("Cookie", sessionCookie); response = request.send(); //check session is unchanged @@ -237,9 +234,7 @@ public class SaveOptimizeTest // Perform a request to do nothing with the same session cookie - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); Request request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping+"?action=noop"); - request.header("Cookie", sessionCookie); response = request.send(); //check session not saved @@ -249,7 +244,6 @@ public class SaveOptimizeTest // Perform a request to mutate the session request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping+"?action=mutate"); - request.header("Cookie", sessionCookie); response = request.send(); //check session is saved @@ -316,11 +310,9 @@ public class SaveOptimizeTest long lastSaved = data.getLastSaved(); //make another request, session should not change - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); // Perform a request to do nothing with the same session cookie Request request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping+"?action=noop"); - request.header("Cookie", sessionCookie); response = request.send(); //check session not saved @@ -333,7 +325,6 @@ public class SaveOptimizeTest // Perform a request to do nothing with the same session cookie request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping+"?action=noop"); - request.header("Cookie", sessionCookie); response = request.send(); //check session is saved @@ -401,12 +392,8 @@ public class SaveOptimizeTest long lastSaved = data.getLastSaved(); assertTrue(lastSaved > 0); //check session created was saved - - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); - // Perform a request to do nothing with the same session cookie, check the session object is different Request request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping+"?action=noop&check=diff"); - request.header("Cookie", sessionCookie); response = request.send(); //check session not saved @@ -476,12 +463,8 @@ public class SaveOptimizeTest long lastSaved = data.getLastSaved(); assertTrue(lastSaved > 0); //check session created was saved - - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); - // Perform a request to change maxInactive on session Request request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping+"?action=max&value=60"); - request.header("Cookie", sessionCookie); response = request.send(); //check session is saved, even though the save optimisation interval has not passed diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java index d21b9493af2..fba4a6cdc36 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java @@ -237,9 +237,7 @@ public class SessionEvictionFailureTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); String sessionCookie = response.getHeaders().get("Set-Cookie"); assertNotNull(sessionCookie); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); - + //Wait for the eviction period to expire - save on evict should fail but session //should remain in the cache pause(evictionPeriod+(int)(evictionPeriod*0.5)); @@ -248,7 +246,6 @@ public class SessionEvictionFailureTest // Make another request to see if the session is still in the cache and can be used, //allow it to be saved this time Request request = client.newRequest(url + "?action=test"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); assertNull(response.getHeaders().get("Set-Cookie")); //check that the cookie wasn't reset @@ -259,7 +256,6 @@ public class SessionEvictionFailureTest request = client.newRequest(url + "?action=test"); - request.header("Cookie", sessionCookie); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); } diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionListenerTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionListenerTest.java index 9baaea02fdc..b94f8d5cd51 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionListenerTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionListenerTest.java @@ -109,15 +109,11 @@ public class SessionListenerTest assertEquals(HttpServletResponse.SC_OK,response1.getStatus()); String sessionCookie = response1.getHeaders().get("Set-Cookie"); assertTrue(sessionCookie != null); - // Mangle the cookie, replacing Path with $Path, etc. - sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path="); - assertTrue (servlet.listener.bound); // Make a request which will invalidate the existing session Request request2 = client.newRequest(url + "?action=test"); - request2.header("Cookie", sessionCookie); ContentResponse response2 = request2.send(); assertEquals(HttpServletResponse.SC_OK,response2.getStatus()); diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionRenewTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionRenewTest.java index ed2909130f2..3b663083aee 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionRenewTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionRenewTest.java @@ -135,7 +135,6 @@ public class SessionRenewTest //make a request to change the sessionid Request request = client.newRequest("http://localhost:" + port + contextPath + servletMapping + "?action=renew"); - request.header("Cookie", sessionCookie); ContentResponse renewResponse = request.send(); assertEquals(HttpServletResponse.SC_OK,renewResponse.getStatus()); From c417a18cc8f7e6d444408600c87492e90811af6a Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 20 Jul 2017 11:22:54 -0700 Subject: [PATCH 113/147] Fixed #1679 - moving JMX specific behavior to jmx.DeploymentManagerMBean --- .../jetty/deploy/DeploymentManager.java | 34 +-------- .../deploy/jmx/DeploymentManagerMBean.java | 74 ++++++++++++------- 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java index a2357f14596..6f631f44848 100644 --- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java +++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java @@ -28,7 +28,6 @@ import java.util.List; import java.util.Map; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.stream.Collectors; import org.eclipse.jetty.deploy.bindings.StandardDeployer; import org.eclipse.jetty.deploy.bindings.StandardStarter; @@ -289,13 +288,13 @@ public class DeploymentManager extends ContainerLifeCycle public Collection getAppEntries() { - return _apps; + return Collections.unmodifiableCollection(_apps); } @ManagedAttribute("Deployed Apps") public Collection getApps() { - List ret = new ArrayList(); + List ret = new ArrayList< >(); for (AppEntry entry : _apps) { ret.add(entry.app); @@ -594,38 +593,11 @@ public class DeploymentManager extends ContainerLifeCycle return _lifecycle.getNodes(); } - @SuppressWarnings("unused") - @ManagedOperation(value="list nodes that are tracked by DeploymentManager", impact="INFO") - public Collection getNodeNames() - { - return _lifecycle.getNodes().stream().map(Node::getName).collect(Collectors.toList()); - } - - public Collection getApps(@Name("nodeName") String nodeName) + public Collection getApps(String nodeName) { return getApps(_lifecycle.getNodeByName(nodeName)); } - @SuppressWarnings("unused") - @ManagedOperation(value="list apps that are located at specified App LifeCycle nodes", impact="ACTION") - public Collection getAppNames(@Name("nodeName") String nodeName) - { - Node node = _lifecycle.getNodeByName(nodeName); - if(node == null) - { - throw new IllegalArgumentException("Unable to find node [" + nodeName + "]"); - } - - List ret = new ArrayList<>(); - for (AppEntry entry : _apps) - { - if (entry.lifecyleNode == node) - { - ret.add(String.format("contextPath=%s,originId=%s,appProvider=%s", entry.app.getContextPath(), entry.app.getOriginId(), entry.app.getAppProvider().getClass().getName())); - } - } - return ret; - } public void scope(XmlConfiguration xmlc, Resource webapp) throws IOException diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/jmx/DeploymentManagerMBean.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/jmx/DeploymentManagerMBean.java index 74753452ce5..6abc620b4f9 100644 --- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/jmx/DeploymentManagerMBean.java +++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/jmx/DeploymentManagerMBean.java @@ -21,6 +21,7 @@ package org.eclipse.jetty.deploy.jmx; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.stream.Collectors; import org.eclipse.jetty.deploy.App; import org.eclipse.jetty.deploy.AppProvider; @@ -28,54 +29,77 @@ import org.eclipse.jetty.deploy.DeploymentManager; import org.eclipse.jetty.deploy.graph.Node; import org.eclipse.jetty.jmx.ObjectMBean; import org.eclipse.jetty.server.handler.ContextHandler; +import org.eclipse.jetty.util.annotation.ManagedObject; +import org.eclipse.jetty.util.annotation.ManagedOperation; +import org.eclipse.jetty.util.annotation.Name; +@SuppressWarnings("unused") +@ManagedObject("MBean Wrapper for DeploymentManager") public class DeploymentManagerMBean extends ObjectMBean { private final DeploymentManager _manager; - + public DeploymentManagerMBean(Object managedObject) { super(managedObject); - _manager=(DeploymentManager)managedObject; - } - - public Collection getNodes() - { - List nodes = new ArrayList(); - for (Node node: _manager.getNodes()) - nodes.add(node.getName()); - return nodes; + _manager = (DeploymentManager) managedObject; } + @ManagedOperation(value = "list apps being tracked", impact = "INFO") public Collection getApps() { - List apps=new ArrayList(); - for (App app: _manager.getApps()) - apps.add(app.getOriginId()); - return apps; + List ret = new ArrayList<>(); + for (DeploymentManager.AppEntry entry : _manager.getAppEntries()) + { + ret.add(toRef(entry.getApp())); + } + return ret; } - - public Collection getApps(String nodeName) + + @ManagedOperation(value = "list nodes that are tracked by DeploymentManager", impact = "INFO") + public Collection getNodes() { - List apps=new ArrayList(); - for (App app: _manager.getApps(nodeName)) - apps.add(app.getOriginId()); - return apps; + return _manager.getNodes().stream().map(Node::getName).collect(Collectors.toList()); } - + + @ManagedOperation(value = "list apps that are located at specified App LifeCycle nodes", impact = "ACTION") + public Collection getApps(@Name("nodeName") String nodeName) + { + Node node = _manager.getLifeCycle().getNodeByName(nodeName); + if (node == null) + { + throw new IllegalArgumentException("Unable to find node [" + nodeName + "]"); + } + + List ret = new ArrayList<>(); + for (DeploymentManager.AppEntry entry : _manager.getAppEntries()) + { + if (entry.getLifecyleNode() == node) + { + ret.add(toRef(entry.getApp())); + } + } + return ret; + } + + private String toRef(App app) + { + return String.format("originId=%s,contextPath=%s,appProvider=%s", app.getContextPath(), app.getOriginId(), app.getAppProvider().getClass().getName()); + } + public Collection getContexts() throws Exception { - List apps=new ArrayList(); - for (App app: _manager.getApps()) + List apps = new ArrayList(); + for (App app : _manager.getApps()) apps.add(app.getContextHandler()); return apps; } - + public Collection getAppProviders() { return _manager.getAppProviders(); } - + public void requestAppGoal(String appId, String nodeName) { _manager.requestAppGoal(appId, nodeName); From 489f68c7080638c54eeab2a396a81025a46cb87a Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 24 Jul 2017 10:08:10 +0200 Subject: [PATCH 114/147] Fixes #1685 - Update ALPN support for Java 8u141. --- .../config/modules/protonego-impl/alpn-1.8.0_141.mod | 8 ++++++++ .../modules/protonego-impl/alpn-1.8.0_141.mod | 8 ++++++++ pom.xml | 12 ++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_141.mod create mode 100644 jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_141.mod diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_141.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_141.mod new file mode 100644 index 00000000000..fdd3868701d --- /dev/null +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_141.mod @@ -0,0 +1,8 @@ +[name] +protonego-boot + +[files] +http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar + +[exec] +-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_141.mod b/jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_141.mod new file mode 100644 index 00000000000..fdd3868701d --- /dev/null +++ b/jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_141.mod @@ -0,0 +1,8 @@ +[name] +protonego-boot + +[files] +http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar + +[exec] +-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/pom.xml b/pom.xml index 4bf8f67c652..f060d64f768 100644 --- a/pom.xml +++ b/pom.xml @@ -1552,6 +1552,18 @@ 8.1.11.v20170118 + + 8u141 + + + java.version + 1.8.0_141 + + + + 8.1.11.v20170118 + + From 8cfd971f926abae48ae0e5793db4905b78de7ff1 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 6 Jul 2017 13:09:03 +0200 Subject: [PATCH 115/147] JavaDoc clarification. --- .../src/main/java/org/eclipse/jetty/client/ConnectionPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java b/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java index effaa0da802..ed344731e1c 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java @@ -58,7 +58,7 @@ public interface ConnectionPool extends Closeable * * @param connection the connection to release * @return true if the connection has been released, false if the connection - * was not obtained from the this ConnectionPool + * should be closed */ boolean release(Connection connection); From a2d63141e95782c0c37db85f8f627b6b7ab717d3 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 24 Jul 2017 10:50:48 +0200 Subject: [PATCH 116/147] Fixed location of ALPN files for JDK 8u141. --- .../modules/{protonego-impl => alpn-impl}/alpn-1.8.0_141.mod | 0 .../modules/{protonego-impl => alpn-impl}/alpn-1.8.0_141.mod | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename jetty-alpn/jetty-alpn-server/src/main/config/modules/{protonego-impl => alpn-impl}/alpn-1.8.0_141.mod (100%) rename jetty-start/src/test/resources/dist-home/modules/{protonego-impl => alpn-impl}/alpn-1.8.0_141.mod (100%) diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_141.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_141.mod similarity index 100% rename from jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_141.mod rename to jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_141.mod diff --git a/jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_141.mod b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_141.mod similarity index 100% rename from jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_141.mod rename to jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_141.mod From 95bf957b4fee54a453666916dc2b16c5cf63ca79 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 24 Jul 2017 11:22:49 +0200 Subject: [PATCH 117/147] Updated ALPN documentation for JDK 8u141. --- .../src/main/asciidoc/administration/alpn/alpn.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/jetty-documentation/src/main/asciidoc/administration/alpn/alpn.adoc b/jetty-documentation/src/main/asciidoc/administration/alpn/alpn.adoc index 0a65b98403b..f09765a8d8a 100644 --- a/jetty-documentation/src/main/asciidoc/administration/alpn/alpn.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/alpn/alpn.adoc @@ -245,6 +245,7 @@ The ALPN implementation, relying on modifications of OpenJDK classes, updates ev |1.8.0u112 |8.1.10.v20161026 |1.8.0u121 |8.1.11.v20170118 |1.8.0u131 |8.1.11.v20170118 +|1.8.0u141 |8.1.11.v20170118 |============================= [[alpn-build]] From f04f486f94a6f46bafc15c0bf696b6bba40dae6d Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 24 Jul 2017 11:35:41 +0200 Subject: [PATCH 118/147] Fixes #1687 - Missing callback notification when channel not found. --- .../eclipse/jetty/http2/server/HTTP2ServerConnection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java index a1f9ed0d394..1d674882c4a 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java @@ -18,7 +18,7 @@ package org.eclipse.jetty.http2.server; -import java.io.Closeable; +import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayDeque; import java.util.ArrayList; @@ -177,6 +177,10 @@ public class HTTP2ServerConnection extends HTTP2Connection implements Connection if (task != null) offerTask(task, false); } + else + { + callback.failed(new IOException("channel_not_found")); + } } public void onTrailers(IStream stream, HeadersFrame frame) From be1eb26670f1195f0d34fa7766838ac850770205 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 25 Jul 2017 12:58:54 +0200 Subject: [PATCH 119/147] Fixes #1671 - Asymmetric usage of trailers in MetaData.Request. Reviewed with code cleanups. --- .../java/org/eclipse/jetty/server/HttpChannel.java | 14 ++++---------- .../java/org/eclipse/jetty/server/Request.java | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 251082166e8..ba184350f28 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -61,7 +61,6 @@ import org.eclipse.jetty.util.thread.Scheduler; * The HttpChannel signals the switch from passive mode to active mode by returning true to one of the * HttpParser.RequestHandler callbacks. The completion of the active phase is signalled by a call to * HttpTransport.completed(). - * */ public class HttpChannel implements Runnable, HttpOutput.Interceptor { @@ -76,18 +75,11 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor private final HttpChannelState _state; private final Request _request; private final Response _response; - private final Supplier _trailerSupplier = new Supplier() - { - @Override - public HttpFields get() - { - return _trailers; - } - }; + private HttpFields _trailers; + private final Supplier _trailerSupplier = () -> _trailers; private MetaData.Response _committedMetaData; private RequestLog _requestLog; private long _oldIdleTimeout; - private HttpFields _trailers; /** Bytes written after interception (eg after compression) */ private long _written; @@ -262,6 +254,8 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor _committedMetaData=null; _requestLog=_connector==null?null:_connector.getServer().getRequestLog(); _written=0; + _trailers=null; + _oldIdleTimeout=0; } public void asyncReadFillInterested() diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 0a7f16b7c40..c5d533be171 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -219,7 +219,7 @@ public class Request implements HttpServletRequest public HttpFields getTrailers() { MetaData.Request metadata=_metaData; - Supplier trailers = metadata==null?null:metadata.getTrailerSupplier(); + Supplier trailers = metadata==null?null:metadata.getTrailerSupplier(); return trailers==null?null:trailers.get(); } From 98eb354c46bf26277fe3f125f195c6da055e8595 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 26 Jul 2017 16:45:01 +1000 Subject: [PATCH 120/147] use invoker plugin 3.0.1 released version (#1683) Signed-off-by: olivier lamy --- jetty-maven-plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index b17414749bd..9449376b43d 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -196,7 +196,7 @@ org.apache.maven.plugins maven-invoker-plugin - 3.0.1-SNAPSHOT + 3.0.1 integration-test From e81e17d348da3b1a4a4494b7ef32c6ffa977f8e6 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 26 Jul 2017 09:38:49 +0200 Subject: [PATCH 121/147] Issue #1692 --- .../eclipse/jetty/annotations/AnnotationParser.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java index 4f076cd6284..2ec5516e77d 100644 --- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java +++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java @@ -978,11 +978,18 @@ public class AnnotationParser return false; //skip anything that is not a class file - if (!name.toLowerCase(Locale.ENGLISH).endsWith(".class")) + String lc = name.toLowerCase(Locale.ENGLISH); + if (!lc.endsWith(".class")) { if (LOG.isDebugEnabled()) LOG.debug("Not a class: {}",name); return false; } + + if (lc.equals("module-info.class")) + { + if (LOG.isDebugEnabled()) LOG.debug("Skipping module-info.class"); + return false; + } //skip any classfiles that are not a valid java identifier int c0 = 0; @@ -990,7 +997,7 @@ public class AnnotationParser c0 = (ldir > -1 ? ldir+1 : c0); if (!Character.isJavaIdentifierStart(name.charAt(c0))) { - if (LOG.isDebugEnabled()) LOG.debug("Not a java identifier: {}"+name); + if (LOG.isDebugEnabled()) LOG.debug("Not a java identifier: {}",name); return false; } From 3eeeb8ec7e0ec76a2bd6d332e2eb167aeed97567 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Wed, 26 Jul 2017 11:08:19 +0200 Subject: [PATCH 122/147] Improved error reporting. --- .../main/java/org/eclipse/jetty/server/HttpInput.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java index b2efc08d1fe..ad47630d187 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java @@ -793,9 +793,16 @@ public class HttpInput extends ServletInputStream implements Runnable synchronized (_inputQ) { if (_state instanceof ErrorState) - LOG.warn(x); + { + Throwable failure = new Throwable(_state.getError()); + failure.addSuppressed(new Throwable(x)); + LOG.warn(failure); + } else - _state = new ErrorState(x); + { + // Retain the current stack trace by wrapping the failure. + _state = new ErrorState(new Throwable(x)); + } if (_listener == null) _inputQ.notify(); From dfd9e43b2df9556557d48662c980c3be78170e46 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Wed, 26 Jul 2017 11:58:49 -0400 Subject: [PATCH 123/147] Updated web-default.xml documentation. Resolves #1462. --- .../reference/jetty-xml/webdefault-xml.adoc | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/reference/jetty-xml/webdefault-xml.adoc b/jetty-documentation/src/main/asciidoc/reference/jetty-xml/webdefault-xml.adoc index d20f29c6f08..5c99225b09c 100644 --- a/jetty-documentation/src/main/asciidoc/reference/jetty-xml/webdefault-xml.adoc +++ b/jetty-documentation/src/main/asciidoc/reference/jetty-xml/webdefault-xml.adoc @@ -18,8 +18,8 @@ === webdefault.xml The `webdefault.xml` file saves web applications from having to define a lot of house-keeping and container-specific elements in their own `web.xml` files. -For example, you can use it to set up mime-type mappings and JSP servlet-mappings. -Jetty applies `webdefault.xml` to a web application _before_ the application's own `WEB-INF/web.xml`, which means that it cannot override values inside the webapp's `web.xml`. +For example, you can use it to set up MIME-type mappings and JSP servlet-mappings. +Jetty applies `webdefault.xml` to a web application _before_ the application's own `WEB-INF/web.xml`, which means that it *cannot* override values inside the webapp's `web.xml`. It uses the xref:jetty-xml-config[] syntax. Generally, it is convenient for all webapps in a Jetty instance to share the same `webdefault.xml` file. However, it is certainly possible to provide differentiated ` webdefault.xml` files for individual web applications. @@ -36,6 +36,22 @@ ____ To ensure your `webdefault.xml` files are validated, you will need to set the `validateXml` attribute to true as described link:#jetty-xml-dtd[here.] ____ +The `webdefault.xml` link:{GITBROWSURL}/jetty-webapp/src/main/config/etc/webdefault.xml[included with the Jetty Distribution] contains several configuration options, such as init params and servlet mappings, and is separated into sections for easy navigation. +Some of the more common options include, but are not limited to: + +dirAllowed:: +If true, directory listings are returned if no welcome file is found. +Otherwise 403 Forbidden displays. +precompressed:: +If set to a comma separated list of file extensions, these indicate compressed formats that are known to map to a MIME-type that may be listed in a requests Accept-Encoding header. +If set to a boolean True, then a default set of compressed formats will be used, otherwise no pre-compressed formats. +maxCacheSize:: +Maximum total size of the cache or 0 for no cache. +maxCachedFileSize:: +Maximum size of a file to cache. +maxCachedFiles:: +Maximum number of files to cache. + [[creating-custom-webdefault-xml-one-webapp]] ===== Creating a Custom webdefault.xml for One WebApp From 7c4f7b13f7b634e098fab2c341253e41d4eeaf0f Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Fri, 28 Jul 2017 11:55:57 +0200 Subject: [PATCH 124/147] Issue #1682 --- .../boot/utils/internal/DefaultFileLocatorHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java index a2ad48bded7..7230ca1d5b7 100644 --- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java +++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/internal/DefaultFileLocatorHelper.java @@ -100,7 +100,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper // some osgi frameworks do use the file protocol directly in some // situations. Do use the FileResource to transform the URL into a // File: URL#toURI is broken - return new PathResource(url).getFile().getParentFile().getParentFile(); + return new PathResource(url).getFile().getParentFile().getParentFile().getCanonicalFile(); } else if (url.getProtocol().equals("bundleentry")) { @@ -131,7 +131,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper FILE_FIELD.setAccessible(true); } File f = (File) FILE_FIELD.get(bundleEntry); - return f.getParentFile().getParentFile(); + return f.getParentFile().getParentFile().getCanonicalFile(); } else if (match(bundleEntry.getClass().getName(), ZIP_BUNDLE_ENTRY_CLASSES)) { @@ -173,7 +173,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper if (location.startsWith("file:/")) { URI uri = new URI(URIUtil.encodePath(location)); - return new File(uri); + return new File(uri).getCanonicalFile(); } else if (location.startsWith("file:")) { @@ -199,7 +199,7 @@ public class DefaultFileLocatorHelper implements BundleFileLocatorHelper else if (location.startsWith("reference:file:")) { location = URLDecoder.decode(location.substring("reference:".length()), "UTF-8"); - File file = new File(location.substring("file:".length())); + File file = new File(location.substring("file:".length())).getCanonicalFile(); return file; } } From d12cde9cfd3e29899379063345c000a3be311d61 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 1 Aug 2017 11:24:56 +1000 Subject: [PATCH 125/147] Fix commit 2e13208758b6cf0036f3e18406e61683b41a0e14 use suppressed exceptions to hold local stacktrace rather than wrapping exception, which hides the exception type. --- .../main/java/org/eclipse/jetty/server/HttpInput.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java index ad47630d187..3654f23cd93 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java @@ -794,14 +794,15 @@ public class HttpInput extends ServletInputStream implements Runnable { if (_state instanceof ErrorState) { - Throwable failure = new Throwable(_state.getError()); - failure.addSuppressed(new Throwable(x)); + IOException failure = new IOException(x); LOG.warn(failure); + _state.getError().addSuppressed(failure); } else { - // Retain the current stack trace by wrapping the failure. - _state = new ErrorState(new Throwable(x)); + // Add a suppressed throwable to capture this stack trace + x.addSuppressed(new IOException("HttpInput failed")); + _state = new ErrorState(x); } if (_listener == null) From a8ca4d23c6f55657514f194ce3a450b658400a93 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 1 Aug 2017 11:05:30 +0200 Subject: [PATCH 126/147] Fixes #1702 - Update ALPN for JDK 8u144. --- .../config/modules/protonego-impl/alpn-1.8.0_144.mod | 8 ++++++++ .../modules/protonego-impl/alpn-1.8.0_144.mod | 8 ++++++++ pom.xml | 12 ++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_144.mod create mode 100644 jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_144.mod diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_144.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_144.mod new file mode 100644 index 00000000000..fdd3868701d --- /dev/null +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/protonego-impl/alpn-1.8.0_144.mod @@ -0,0 +1,8 @@ +[name] +protonego-boot + +[files] +http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar + +[exec] +-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_144.mod b/jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_144.mod new file mode 100644 index 00000000000..fdd3868701d --- /dev/null +++ b/jetty-start/src/test/resources/dist-home/modules/protonego-impl/alpn-1.8.0_144.mod @@ -0,0 +1,8 @@ +[name] +protonego-boot + +[files] +http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar + +[exec] +-Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/pom.xml b/pom.xml index f060d64f768..6e5f18030ea 100644 --- a/pom.xml +++ b/pom.xml @@ -1564,6 +1564,18 @@ 8.1.11.v20170118 + + 8u144 + + + java.version + 1.8.0_144 + + + + 8.1.11.v20170118 + + From a705f9a2ca4c7b36ee7dfa631282ee561bc6d019 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 1 Aug 2017 14:21:49 +0200 Subject: [PATCH 127/147] Fixes #1703 - Improve HttpInput failure logging. --- .../main/java/org/eclipse/jetty/server/HttpInput.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java index 3654f23cd93..dcaae2593f5 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInput.java @@ -794,14 +794,17 @@ public class HttpInput extends ServletInputStream implements Runnable { if (_state instanceof ErrorState) { - IOException failure = new IOException(x); + // Log both the original and current failure + // without modifying the original failure. + Throwable failure = new Throwable(((ErrorState)_state).getError()); + failure.addSuppressed(x); LOG.warn(failure); - _state.getError().addSuppressed(failure); } else { - // Add a suppressed throwable to capture this stack trace - x.addSuppressed(new IOException("HttpInput failed")); + // Add a suppressed throwable to capture this stack + // trace without wrapping/hiding the original failure. + x.addSuppressed(new Throwable("HttpInput failure")); _state = new ErrorState(x); } From 1a07ddd787b1ad1500e835f47958bd31b4d6d62e Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 2 Aug 2017 11:52:31 +1000 Subject: [PATCH 128/147] Issue #215 Conscrypt SSL provider Added module to install Conscrupt SSL provider --- .../src/main/resources/modules/conscrypt.mod | 27 +++++++++++++++++++ .../resources/modules/conscrypt/conscrypt.xml | 7 +++++ .../src/main/config/etc/jetty-ssl-context.xml | 1 + jetty-server/src/main/config/modules/ssl.mod | 3 +++ 4 files changed, 38 insertions(+) create mode 100644 jetty-home/src/main/resources/modules/conscrypt.mod create mode 100644 jetty-home/src/main/resources/modules/conscrypt/conscrypt.xml diff --git a/jetty-home/src/main/resources/modules/conscrypt.mod b/jetty-home/src/main/resources/modules/conscrypt.mod new file mode 100644 index 00000000000..f34ccaf452c --- /dev/null +++ b/jetty-home/src/main/resources/modules/conscrypt.mod @@ -0,0 +1,27 @@ +[description] +Installs the Conscrypt JSSE provider + +[tags] +3rdparty + +[depend] +ssl + +[files] +maven://org.conscrypt/conscrypt-openjdk-uber/${conscrypt.version}|lib/conscrypt/conscrypt-uber-${conscrypt.version}.jar +basehome:modules/conscrypt/conscrypt.xml|etc/conscrypt.xml + +[lib] +lib/conscrypt/**.jar + +[xml] +etc/conscrypt.xml + +[license] +Conscrypt is distributed under the Apache Licence 2.0 +https://github.com/google/conscrypt/blob/master/LICENSE + +[ini] +conscrypt.version?=1.0.0.RC8 +jetty.sslContext.provider?=AndroidOpenSSL + diff --git a/jetty-home/src/main/resources/modules/conscrypt/conscrypt.xml b/jetty-home/src/main/resources/modules/conscrypt/conscrypt.xml new file mode 100644 index 00000000000..f3c69bd0953 --- /dev/null +++ b/jetty-home/src/main/resources/modules/conscrypt/conscrypt.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/jetty-server/src/main/config/etc/jetty-ssl-context.xml b/jetty-server/src/main/config/etc/jetty-ssl-context.xml index 87414a3c58c..e5ed517dee2 100644 --- a/jetty-server/src/main/config/etc/jetty-ssl-context.xml +++ b/jetty-server/src/main/config/etc/jetty-ssl-context.xml @@ -11,6 +11,7 @@ --> + / diff --git a/jetty-server/src/main/config/modules/ssl.mod b/jetty-server/src/main/config/modules/ssl.mod index cac38448246..109aaba460b 100644 --- a/jetty-server/src/main/config/modules/ssl.mod +++ b/jetty-server/src/main/config/modules/ssl.mod @@ -63,6 +63,9 @@ basehome:modules/ssl/keystore|etc/keystore ## Note that OBF passwords are not secure, just protected from casual observation ## See http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html +## SSL JSSE Provider +# jetty.sslContext.provider= + ## Keystore file path (relative to $jetty.base) # jetty.sslContext.keyStorePath=etc/keystore From 1fd3e4ad1b8903bc9033dd24c86a0207996097b1 Mon Sep 17 00:00:00 2001 From: Josh Elser Date: Tue, 1 Aug 2017 22:18:04 -0400 Subject: [PATCH 129/147] =?UTF-8?q?Sends=20the=20WWW-Authenticate=20header?= =?UTF-8?q?=20if=20a=20non-Negotiate=20authorization=20he=E2=80=A6=20(#170?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Sends the WWW-Authenticate header if a non-Negotiate authorization header was given Fixes #1698 Signed-off-by: Josh Elser * Dumb compilation error Signed-off-by: Josh Elser * Adds a test to show the challenge is sent. Signed-off-by: Josh Elser * Refactor the conditionals per Greg's suggestion Signed-off-by: Josh Elser * Add the expected license header Signed-off-by: Josh Elser --- .../authentication/SpnegoAuthenticator.java | 43 ++++--- .../SpnegoAuthenticatorTest.java | 113 ++++++++++++++++++ 2 files changed, 134 insertions(+), 22 deletions(-) create mode 100644 jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java index 93e0592eed2..aad1da02967 100644 --- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java +++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java @@ -72,27 +72,8 @@ public class SpnegoAuthenticator extends LoginAuthenticator return new DeferredAuthentication(this); } - // check to see if we have authorization headers required to continue - if ( header == null ) - { - try - { - if (DeferredAuthentication.isDeferred(res)) - { - return Authentication.UNAUTHENTICATED; - } - - LOG.debug("SpengoAuthenticator: sending challenge"); - res.setHeader(HttpHeader.WWW_AUTHENTICATE.asString(), HttpHeader.NEGOTIATE.asString()); - res.sendError(HttpServletResponse.SC_UNAUTHORIZED); - return Authentication.SEND_CONTINUE; - } - catch (IOException ioe) - { - throw new ServerAuthException(ioe); - } - } - else if (header != null && header.startsWith(HttpHeader.NEGOTIATE.asString())) + // The client has responded to the challenge we sent previously + if (header != null && header.startsWith(HttpHeader.NEGOTIATE.asString().toLowerCase())) { String spnegoToken = header.substring(10); @@ -104,7 +85,25 @@ public class SpnegoAuthenticator extends LoginAuthenticator } } - return Authentication.UNAUTHENTICATED; + // A challenge should be sent if any of the following cases are true: + // 1. There was no Authorization header provided + // 2. There was an Authorization header for a type other than Negotiate + try + { + if (DeferredAuthentication.isDeferred(res)) + { + return Authentication.UNAUTHENTICATED; + } + + LOG.debug("SpengoAuthenticator: sending challenge"); + res.setHeader(HttpHeader.WWW_AUTHENTICATE.asString(), HttpHeader.NEGOTIATE.asString()); + res.sendError(HttpServletResponse.SC_UNAUTHORIZED); + return Authentication.SEND_CONTINUE; + } + catch (IOException ioe) + { + throw new ServerAuthException(ioe); + } } @Override diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java new file mode 100644 index 00000000000..8e968b8cb60 --- /dev/null +++ b/jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java @@ -0,0 +1,113 @@ +// +// ======================================================================== +// Copyright (c) 1995-2017 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.authentication; + +import static org.junit.Assert.assertEquals; + +import javax.servlet.http.HttpServletResponse; + +import org.eclipse.jetty.http.HttpFields; +import org.eclipse.jetty.http.HttpHeader; +import org.eclipse.jetty.http.HttpURI; +import org.eclipse.jetty.http.MetaData; +import org.eclipse.jetty.server.Authentication; +import org.eclipse.jetty.server.HttpChannel; +import org.eclipse.jetty.server.HttpConfiguration; +import org.eclipse.jetty.server.HttpOutput; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Response; +import org.eclipse.jetty.server.Server; +import org.junit.Before; +import org.junit.Test; + +/** + * Test class for {@link SpnegoAuthenticator}. + */ +public class SpnegoAuthenticatorTest { + private SpnegoAuthenticator _authenticator; + + @Before + public void setup() throws Exception + { + _authenticator = new SpnegoAuthenticator(); + } + + @Test + public void testChallengeSentWithNoAuthorization() throws Exception + { + HttpChannel channel = new HttpChannel(null, new HttpConfiguration(), null, null) + { + @Override + public Server getServer() + { + return null; + } + }; + Request req = new Request(channel, null); + HttpOutput out = new HttpOutput(channel) + { + @Override + public void close() + { + return; + } + }; + Response res = new Response(channel, out); + MetaData.Request metadata = new MetaData.Request(new HttpFields()); + metadata.setURI(new HttpURI("http://localhost")); + req.setMetaData(metadata); + + assertEquals(Authentication.SEND_CONTINUE, _authenticator.validateRequest(req, res, true)); + assertEquals(HttpHeader.NEGOTIATE.asString(), res.getHeader(HttpHeader.WWW_AUTHENTICATE.asString())); + assertEquals(HttpServletResponse.SC_UNAUTHORIZED, res.getStatus()); + } + + @Test + public void testChallengeSentWithUnhandledAuthorization() throws Exception + { + HttpChannel channel = new HttpChannel(null, new HttpConfiguration(), null, null) + { + @Override + public Server getServer() + { + return null; + } + }; + Request req = new Request(channel, null); + HttpOutput out = new HttpOutput(channel) + { + @Override + public void close() + { + return; + } + }; + Response res = new Response(channel, out); + HttpFields http_fields = new HttpFields(); + // Create a bogus Authorization header. We don't care about the actual credentials. + http_fields.add(HttpHeader.AUTHORIZATION, "Basic asdf"); + MetaData.Request metadata = new MetaData.Request(http_fields); + metadata.setURI(new HttpURI("http://localhost")); + req.setMetaData(metadata); + + assertEquals(Authentication.SEND_CONTINUE, _authenticator.validateRequest(req, res, true)); + assertEquals(HttpHeader.NEGOTIATE.asString(), res.getHeader(HttpHeader.WWW_AUTHENTICATE.asString())); + assertEquals(HttpServletResponse.SC_UNAUTHORIZED, res.getStatus()); + } +} From 19e539a87d70c3f6bf3ddf81531d7f0c449d48e4 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 2 Aug 2017 15:37:39 +1000 Subject: [PATCH 130/147] Issue #1623 Remove projects.classes.dirs, using only lib.jars property. --- .../jetty/maven/plugin/JettyRunForkedMojo.java | 13 ------------- .../org/eclipse/jetty/maven/plugin/Starter.java | 10 ---------- 2 files changed, 23 deletions(-) diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java index 4de7f20ae53..f39394bfcfd 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java @@ -517,19 +517,6 @@ public class JettyRunForkedMojo extends JettyRunMojo props.put("testClasses.dir", webApp.getTestClasses().getAbsolutePath()); } - if ( !webApp.getClassPathFiles().isEmpty() ) - { - StringBuilder stringBuilder = new StringBuilder(); - for ( File dependency : webApp.getClassPathFiles() ) - { - if (dependency.isDirectory()) - { - stringBuilder.append( dependency.getCanonicalPath() ).append( '|' ); - } - } - props.put( "projects.classes.dir", stringBuilder.toString() ); - } - //web-inf lib List deps = webApp.getWebInfLib(); StringBuffer strbuff = new StringBuffer(); diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java index 88f542db616..4d13967ad90 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java @@ -314,16 +314,6 @@ public class Starter jars.add(new File(names[j].trim())); webApp.setWebInfLib(jars); } - - str = props.getProperty( "projects.classes.dir" ); - if (str != null && !"".equals(str.trim())) - { - List classesDirectories = // - Arrays.stream(str.split( Pattern.quote("|") )) // - .map( s -> Paths.get( s).toFile() ).collect( Collectors.toList() ); - webApp.getWebInfLib().addAll( classesDirectories ); - } - } public void getConfiguration (String[] args) From b1b569bd231e5d9c379e6970a1a1b585b0daeb8b Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 25 Aug 2015 15:07:50 +0200 Subject: [PATCH 131/147] 475546 - ClosedChannelException when connecting to HTTPS over HTTP proxy with CONNECT. Not closing the connection if the request method is CONNECT. --- .../client/http/HttpChannelOverHTTP.java | 10 +- .../eclipse/jetty/client/HttpClientTest.java | 129 +++++++----------- 2 files changed, 54 insertions(+), 85 deletions(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java index d4d14dc3f7d..3153a20ba5e 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java @@ -31,7 +31,6 @@ import org.eclipse.jetty.http.HttpFields; import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.http.HttpHeaderValue; import org.eclipse.jetty.http.HttpMethod; -import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpVersion; public class HttpChannelOverHTTP extends HttpChannel @@ -143,8 +142,6 @@ public class HttpChannelOverHTTP extends HttpChannel closeReason = "failure"; else if (receiver.isShutdown()) closeReason = "server close"; - else if (sender.isShutdown()) - closeReason = "client close"; if (closeReason == null) { @@ -159,7 +156,7 @@ public class HttpChannelOverHTTP extends HttpChannel } else { - // HTTP 1.1 closes only if it has an explicit close. + // HTTP 1.1 or greater closes only if it has an explicit close. if (responseHeaders.contains(HttpHeader.CONNECTION, HttpHeaderValue.CLOSE.asString())) closeReason = "http/1.1"; } @@ -173,10 +170,7 @@ public class HttpChannelOverHTTP extends HttpChannel } else { - if (response.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101) - connection.remove(); - else - release(); + release(); } } diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java index b2c7751a537..0a993756633 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java @@ -24,7 +24,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpCookie; -import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.URI; @@ -1582,86 +1581,62 @@ public class HttpClientTest extends AbstractHttpClientServerTest } @Test - public void testCopyRequest() throws Exception + public void testCONNECTWithHTTP10() throws Exception { - startClient(); - - assertCopyRequest(client.newRequest("http://example.com/some/url") - .method(HttpMethod.HEAD) - .version(HttpVersion.HTTP_2) - .content(new StringContentProvider("some string")) - .timeout(321, TimeUnit.SECONDS) - .idleTimeout(2221, TimeUnit.SECONDS) - .followRedirects(true) - .header(HttpHeader.CONTENT_TYPE, "application/json") - .header("X-Some-Custom-Header", "some-value")); - - assertCopyRequest(client.newRequest("https://example.com") - .method(HttpMethod.POST) - .version(HttpVersion.HTTP_1_0) - .content(new StringContentProvider("some other string")) - .timeout(123231, TimeUnit.SECONDS) - .idleTimeout(232342, TimeUnit.SECONDS) - .followRedirects(false) - .header(HttpHeader.ACCEPT, "application/json") - .header("X-Some-Other-Custom-Header", "some-other-value")); - - assertCopyRequest(client.newRequest("https://example.com") - .header(HttpHeader.ACCEPT, "application/json") - .header(HttpHeader.ACCEPT, "application/xml") - .header("x-same-name", "value1") - .header("x-same-name", "value2")); - - assertCopyRequest(client.newRequest("https://example.com") - .header(HttpHeader.ACCEPT, "application/json") - .header(HttpHeader.CONTENT_TYPE, "application/json")); - - assertCopyRequest(client.newRequest("https://example.com") - .header("Accept", "application/json") - .header("Content-Type", "application/json")); - - assertCopyRequest(client.newRequest("https://example.com") - .header("X-Custom-Header-1", "value1") - .header("X-Custom-Header-2", "value2")); - - assertCopyRequest(client.newRequest("https://example.com") - .header("X-Custom-Header-1", "value") - .header("X-Custom-Header-2", "value")); - } - - @Test - public void testHostWithHTTP10() throws Exception - { - start(new AbstractHandler() + try (ServerSocket server = new ServerSocket(0)) { - @Override - public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException + startClient(); + + String host = "localhost"; + int port = server.getLocalPort(); + + Request request = client.newRequest(host, port) + .method(HttpMethod.CONNECT) + .version(HttpVersion.HTTP_1_0); + FuturePromise promise = new FuturePromise<>(); + client.getDestination("http", host, port).newConnection(promise); + Connection connection = promise.get(5, TimeUnit.SECONDS); + FutureResponseListener listener = new FutureResponseListener(request); + connection.send(request, listener); + + try (Socket socket = server.accept()) { - baseRequest.setHandled(true); - Assert.assertThat(request.getHeader("Host"), Matchers.notNullValue()); + InputStream input = socket.getInputStream(); + consume(input, false); + + // HTTP/1.0 response, the client must not close the connection. + String httpResponse = "" + + "HTTP/1.0 200 OK\r\n" + + "\r\n"; + OutputStream output = socket.getOutputStream(); + output.write(httpResponse.getBytes(StandardCharsets.UTF_8)); + output.flush(); + + ContentResponse response = listener.get(5, TimeUnit.SECONDS); + Assert.assertEquals(200, response.getStatus()); + + // Because the tunnel was successful, this connection will be + // upgraded to an SslConnection, so it will not be fill interested. + // This test doesn't upgrade, so it needs to restore the fill interest. + ((AbstractConnection)connection).fillInterested(); + + // Test that I can send another request on the same connection. + request = client.newRequest(host, port); + listener = new FutureResponseListener(request); + connection.send(request, listener); + + consume(input, false); + + httpResponse = "" + + "HTTP/1.1 200 OK\r\n" + + "Content-Length: 0\r\n" + + "\r\n"; + output.write(httpResponse.getBytes(StandardCharsets.UTF_8)); + output.flush(); + + listener.get(5, TimeUnit.SECONDS); } - }); - - ContentResponse response = client.newRequest("localhost", connector.getLocalPort()) - .scheme(scheme) - .version(HttpVersion.HTTP_1_0) - .timeout(5, TimeUnit.SECONDS) - .send(); - - Assert.assertEquals(200, response.getStatus()); - } - - private void assertCopyRequest(Request original) - { - Request copy = client.copyRequest((HttpRequest) original, original.getURI()); - Assert.assertEquals(original.getURI(), copy.getURI()); - Assert.assertEquals(original.getMethod(), copy.getMethod()); - Assert.assertEquals(original.getVersion(), copy.getVersion()); - Assert.assertEquals(original.getContent(), copy.getContent()); - Assert.assertEquals(original.getIdleTimeout(), copy.getIdleTimeout()); - Assert.assertEquals(original.getTimeout(), copy.getTimeout()); - Assert.assertEquals(original.isFollowRedirects(), copy.isFollowRedirects()); - Assert.assertEquals(original.getHeaders(), copy.getHeaders()); + } } private void consume(InputStream input, boolean eof) throws IOException From cfeb2a33250025d92874eb7c00b6e0903453fcd9 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 3 Aug 2017 15:57:28 +1000 Subject: [PATCH 132/147] Issue #215 Conscrypt SSL provider upgraded to 1.0.0.RC9 --- jetty-home/src/main/resources/modules/conscrypt.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-home/src/main/resources/modules/conscrypt.mod b/jetty-home/src/main/resources/modules/conscrypt.mod index f34ccaf452c..9d2158ea66e 100644 --- a/jetty-home/src/main/resources/modules/conscrypt.mod +++ b/jetty-home/src/main/resources/modules/conscrypt.mod @@ -22,6 +22,6 @@ Conscrypt is distributed under the Apache Licence 2.0 https://github.com/google/conscrypt/blob/master/LICENSE [ini] -conscrypt.version?=1.0.0.RC8 +conscrypt.version?=1.0.0.RC9 jetty.sslContext.provider?=AndroidOpenSSL From 10bf0e5edb3c6ba01d1d09a775ea6c3ca782c182 Mon Sep 17 00:00:00 2001 From: Igal Date: Sun, 6 Aug 2017 17:01:53 -0700 Subject: [PATCH 133/147] fixed typo (#1668) * fixed typo * improved text * corrected typo in readme --- jetty-distribution/src/main/resources/webapps/README.TXT | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jetty-distribution/src/main/resources/webapps/README.TXT b/jetty-distribution/src/main/resources/webapps/README.TXT index e6536844384..eaaa954f2cf 100644 --- a/jetty-distribution/src/main/resources/webapps/README.TXT +++ b/jetty-distribution/src/main/resources/webapps/README.TXT @@ -5,12 +5,12 @@ applications to deploy using the following conventions: + A directory called example/ will be deployed as a standard web application if it contains a WEB-INF/ subdirectory, otherwise it will be deployed as context of static content. The context path will be /example -(eg http://localhost:8080/example/) unless the base name is root, in -which case the context path is /. If the directory name ends with ".d" -it is ignored (by may be used by explicit configuration). +(eg http://localhost:8080/example/) unless the base name is "root" (not +case sensitive), in which case the context path is /. If the directory name +ends with ".d" it is ignored (but may still be used by explicit configuration). + A file called example.war will be deployed as a standard web application -with the context path /example (eg http://localhost:8080/example/). If the +with the context path /example (eg http://localhost:8080/example/). If the base name is root, then the context path is /. If example.war and example/ exist, then only the WAR is deployed (which may use the directory as an unpack location). From 3b297a2557b1b0d37b404c7d891d418a83e26948 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 7 Aug 2017 10:07:16 +1000 Subject: [PATCH 134/147] Apply #1649 --- .../main/java/org/eclipse/jetty/http/ResourceHttpContent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/ResourceHttpContent.java b/jetty-http/src/main/java/org/eclipse/jetty/http/ResourceHttpContent.java index 0b3ce289276..1379a92b000 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/ResourceHttpContent.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/ResourceHttpContent.java @@ -185,7 +185,7 @@ public class ResourceHttpContent implements HttpContent public HttpField getContentLength() { long l=_resource.length(); - return l==-1?null:new HttpField.LongValueHttpField(HttpHeader.CONTENT_LENGTH,_resource.length()); + return l==-1?null:new HttpField.LongValueHttpField(HttpHeader.CONTENT_LENGTH,l); } /* ------------------------------------------------------------ */ From 9f285d92e71cc7bf3d1109fc266594e515b232bd Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 7 Aug 2017 10:30:12 +1000 Subject: [PATCH 135/147] Issue #1637 Limit reserved threads if threadpool is of small size --- .../util/thread/ReservedThreadExecutor.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java index 95045b29386..0d62fac9954 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java @@ -50,12 +50,29 @@ public class ReservedThreadExecutor extends AbstractLifeCycle implements Executo /** * @param executor The executor to use to obtain threads - * @param capacity The number of threads to preallocate. If less than 0 then the number of available processors is used. + * @param capacity The number of threads to preallocate. If less than 0 then capacity + * is calculated based on a heuristic from the number of available processors and + * thread pool size. */ public ReservedThreadExecutor(Executor executor,int capacity) { _executor = executor; - _queue = new ReservedThread[capacity>=0?capacity:Runtime.getRuntime().availableProcessors()]; + + if (capacity < 0) + { + if (executor instanceof ThreadPool) + { + int threads = ((ThreadPool)executor).getThreads(); + int cpus = Runtime.getRuntime().availableProcessors(); + capacity = Math.max(1,Math.min(cpus,threads/8)); + } + else + { + capacity = Runtime.getRuntime().availableProcessors(); + } + } + + _queue = new ReservedThread[capacity]; } public Executor getExecutor() From c6d86122dbd737f2247b01653da0af938075370d Mon Sep 17 00:00:00 2001 From: Josh Elser Date: Mon, 7 Aug 2017 21:02:44 -0400 Subject: [PATCH 136/147] =?UTF-8?q?Fix=20a=20bug=20around=20handling=20"Ne?= =?UTF-8?q?gotiate"=20case-insensitively=20in=20SpnegoAut=E2=80=A6=20(#171?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix a bug around handling "Negotiate" case-insensitively in SpnegoAuthenticator Closes #1709 Signed-off-by: Josh Elser * Clean up isAuthSchemeNegotiate(String) since we don't need to use startsWith() Signed-off-by: Josh Elser --- .../authentication/SpnegoAuthenticator.java | 44 ++++++++++++++++++- .../SpnegoAuthenticatorTest.java | 35 +++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java index aad1da02967..f82e55eadd0 100644 --- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java +++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticator.java @@ -66,6 +66,7 @@ public class SpnegoAuthenticator extends LoginAuthenticator HttpServletResponse res = (HttpServletResponse)response; String header = req.getHeader(HttpHeader.AUTHORIZATION.asString()); + String authScheme = getAuthSchemeFromHeader(header); if (!mandatory) { @@ -73,7 +74,7 @@ public class SpnegoAuthenticator extends LoginAuthenticator } // The client has responded to the challenge we sent previously - if (header != null && header.startsWith(HttpHeader.NEGOTIATE.asString().toLowerCase())) + if (header != null && isAuthSchemeNegotiate(authScheme)) { String spnegoToken = header.substring(10); @@ -106,6 +107,47 @@ public class SpnegoAuthenticator extends LoginAuthenticator } } + /** + * Extracts the auth_scheme from the HTTP Authorization header, {@code Authorization: }. + * + * @param header The HTTP Authorization header or null. + * @return The parsed auth scheme from the header, or the empty string. + */ + String getAuthSchemeFromHeader(String header) + { + // No header provided, return the empty string + if (header == null || header.isEmpty()) + { + return ""; + } + // Trim any leading whitespace + String trimmed_header = header.trim(); + // Find the first space, all characters prior should be the auth_scheme + int index = trimmed_header.indexOf(' '); + if (index > 0) { + return trimmed_header.substring(0, index); + } + // If we don't find a space, this is likely malformed, just return the entire value + return trimmed_header; + } + + /** + * Determines if provided auth scheme text from the Authorization header is case-insensitively + * equal to {@code negotiate}. + * + * @param authScheme The auth scheme component of the Authorization header + * @return True if the auth scheme component is case-insensitively equal to {@code negotiate}, False otherwise. + */ + boolean isAuthSchemeNegotiate(String authScheme) + { + if (authScheme == null || authScheme.length() != HttpHeader.NEGOTIATE.asString().length()) + { + return false; + } + // Headers should be treated case-insensitively, so we have to jump through some extra hoops. + return authScheme.equalsIgnoreCase(HttpHeader.NEGOTIATE.asString()); + } + @Override public boolean secureResponse(ServletRequest request, ServletResponse response, boolean mandatory, User validatedUser) throws ServerAuthException { diff --git a/jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java b/jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java index 8e968b8cb60..d90519aa3da 100644 --- a/jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java +++ b/jetty-security/src/test/java/org/eclipse/jetty/security/authentication/SpnegoAuthenticatorTest.java @@ -19,6 +19,8 @@ package org.eclipse.jetty.security.authentication; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import javax.servlet.http.HttpServletResponse; @@ -110,4 +112,37 @@ public class SpnegoAuthenticatorTest { assertEquals(HttpHeader.NEGOTIATE.asString(), res.getHeader(HttpHeader.WWW_AUTHENTICATE.asString())); assertEquals(HttpServletResponse.SC_UNAUTHORIZED, res.getStatus()); } + + @Test + public void testCaseInsensitiveHeaderParsing() + { + assertFalse(_authenticator.isAuthSchemeNegotiate(null)); + assertFalse(_authenticator.isAuthSchemeNegotiate("")); + assertFalse(_authenticator.isAuthSchemeNegotiate("Basic")); + assertFalse(_authenticator.isAuthSchemeNegotiate("basic")); + assertFalse(_authenticator.isAuthSchemeNegotiate("Digest")); + assertFalse(_authenticator.isAuthSchemeNegotiate("LotsandLotsandLots of nonsense")); + assertFalse(_authenticator.isAuthSchemeNegotiate("Negotiat asdfasdf")); + assertFalse(_authenticator.isAuthSchemeNegotiate("Negotiated")); + assertFalse(_authenticator.isAuthSchemeNegotiate("Negotiate-and-more")); + + assertTrue(_authenticator.isAuthSchemeNegotiate("Negotiate")); + assertTrue(_authenticator.isAuthSchemeNegotiate("negotiate")); + assertTrue(_authenticator.isAuthSchemeNegotiate("negOtiAte")); + } + + @Test + public void testExtractAuthScheme() + { + assertEquals("", _authenticator.getAuthSchemeFromHeader(null)); + assertEquals("", _authenticator.getAuthSchemeFromHeader("")); + assertEquals("", _authenticator.getAuthSchemeFromHeader(" ")); + assertEquals("Basic", _authenticator.getAuthSchemeFromHeader(" Basic asdfasdf")); + assertEquals("Basicasdf", _authenticator.getAuthSchemeFromHeader("Basicasdf asdfasdf")); + assertEquals("basic", _authenticator.getAuthSchemeFromHeader(" basic asdfasdf ")); + assertEquals("Negotiate", _authenticator.getAuthSchemeFromHeader("Negotiate asdfasdf")); + assertEquals("negotiate", _authenticator.getAuthSchemeFromHeader("negotiate asdfasdf")); + assertEquals("negotiate", _authenticator.getAuthSchemeFromHeader(" negotiate asdfasdf")); + assertEquals("negotiated", _authenticator.getAuthSchemeFromHeader(" negotiated asdfasdf")); + } } From 4c2c0add76d67925792cbef6a1e6d29ed0f0646e Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 8 Aug 2017 11:10:42 +1000 Subject: [PATCH 137/147] Fixed #1713 limit selectors for small thread pool --- .../org/eclipse/jetty/io/SelectorManager.java | 23 +++++++++++++++++-- .../eclipse/jetty/server/ServerConnector.java | 3 +-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java index 5b86b80c09c..97af8a1394e 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java @@ -37,6 +37,7 @@ import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.thread.ReservedThreadExecutor; import org.eclipse.jetty.util.thread.Scheduler; +import org.eclipse.jetty.util.thread.ThreadPool; import org.eclipse.jetty.util.thread.strategy.EatWhatYouKill; /** @@ -59,15 +60,33 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump private long _selectorIndex; private int _reservedThreads = -2; + public static int defaultSchedulers(Executor executor) + { + if (executor instanceof ThreadPool) + { + int threads = ((ThreadPool)executor).getThreads(); + int cpus = Runtime.getRuntime().availableProcessors(); + return Math.max(1,Math.min(cpus/2,threads/16)); + } + + return Math.max(1,Runtime.getRuntime().availableProcessors()/2); + } + protected SelectorManager(Executor executor, Scheduler scheduler) { - this(executor, scheduler, (Runtime.getRuntime().availableProcessors() + 1) / 2); + this(executor, scheduler, -1); } + /** + * @param executor The executor to use for handling selected {@link EndPoint}s + * @param scheduler The scheduler to use for timing events + * @param selectors The number of selectors to use, or -1 for a default derived + * from a heuristic over available CPUs and thread pool size. + */ protected SelectorManager(Executor executor, Scheduler scheduler, int selectors) { if (selectors <= 0) - throw new IllegalArgumentException("No selectors"); + selectors = defaultSchedulers(executor); this.executor = executor; this.scheduler = scheduler; _selectors = new ManagedSelector[selectors]; diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java index 1d296fb82f9..6258e171589 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ServerConnector.java @@ -219,8 +219,7 @@ public class ServerConnector extends AbstractNetworkConnector @Name("factories") ConnectionFactory... factories) { super(server,executor,scheduler,bufferPool,acceptors,factories); - _manager = newSelectorManager(getExecutor(), getScheduler(), - selectors>0?selectors:Math.max(1,Math.min(4,Runtime.getRuntime().availableProcessors()/2))); + _manager = newSelectorManager(getExecutor(), getScheduler(),selectors); addBean(_manager, true); setAcceptorPriorityDelta(-2); } From c917d9e72b236b4f23954cafa4c0162a2812d101 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 8 Aug 2017 11:31:42 +1000 Subject: [PATCH 138/147] Issue #1714 --- .../server/session/SessionEvictionFailureTest.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java index fba4a6cdc36..e962c6a997e 100644 --- a/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java +++ b/tests/test-sessions/test-sessions-common/src/test/java/org/eclipse/jetty/server/session/SessionEvictionFailureTest.java @@ -23,14 +23,13 @@ package org.eclipse.jetty.server.session; -import java.io.IOException; -import java.util.Set; - import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import java.io.IOException; +import java.util.Set; + import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -215,7 +214,8 @@ public class SessionEvictionFailureTest TestServer server = new TestServer (0, inactivePeriod, scavengePeriod, cacheFactory, storeFactory); ServletContextHandler context = server.addContext(contextPath); context.getSessionHandler().getSessionCache().setSaveOnInactiveEviction(true); - MockSessionDataStore ds = new MockSessionDataStore(new boolean[] {true, false, true, false, true}); + //test values: allow first save, fail evict save, allow save, fail evict save, allow save, allow save on shutdown + MockSessionDataStore ds = new MockSessionDataStore(new boolean[] {true, false, true, false, true, true}); context.getSessionHandler().getSessionCache().setSessionDataStore(ds); TestServlet servlet = new TestServlet(); @@ -242,7 +242,6 @@ public class SessionEvictionFailureTest //should remain in the cache pause(evictionPeriod+(int)(evictionPeriod*0.5)); - // Make another request to see if the session is still in the cache and can be used, //allow it to be saved this time Request request = client.newRequest(url + "?action=test"); @@ -250,11 +249,9 @@ public class SessionEvictionFailureTest assertEquals(HttpServletResponse.SC_OK,response.getStatus()); assertNull(response.getHeaders().get("Set-Cookie")); //check that the cookie wasn't reset - //Wait for the eviction period to expire again pause(evictionPeriod+(int)(evictionPeriod*0.5)); - request = client.newRequest(url + "?action=test"); response = request.send(); assertEquals(HttpServletResponse.SC_OK,response.getStatus()); From 76981a0a15633ad22a7d41f2ea8b8a1a5f79245d Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 8 Aug 2017 11:55:47 +1000 Subject: [PATCH 139/147] Fixed #1715 standardise XML properties and IDs --- .../jetty/deploy/DeploymentManager.java | 20 +------- .../webapp/JettyWebXmlConfiguration.java | 14 +++--- .../eclipse/jetty/xml/XmlConfiguration.java | 49 +++++++++++++++++++ 3 files changed, 57 insertions(+), 26 deletions(-) diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java index 6f631f44848..6c69f52ac6b 100644 --- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java +++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java @@ -598,27 +598,9 @@ public class DeploymentManager extends ContainerLifeCycle return getApps(_lifecycle.getNodeByName(nodeName)); } - public void scope(XmlConfiguration xmlc, Resource webapp) throws IOException { - xmlc.getIdMap().put("Server", getServer()); - Resource home = Resource.newResource(System.getProperty("jetty.home",".")); - xmlc.getProperties().put("jetty.home",home.toString()); - xmlc.getProperties().put("jetty.home.uri",normalizeURI(home.getURI().toString())); - - Resource base = Resource.newResource(System.getProperty("jetty.base",home.toString())); - xmlc.getProperties().put("jetty.base",base.toString()); - xmlc.getProperties().put("jetty.base.uri",normalizeURI(base.getURI().toString())); - - xmlc.getProperties().put("jetty.webapp",webapp.toString()); - xmlc.getProperties().put("jetty.webapps",webapp.getFile().toPath().getParent().toString()); - } - - private String normalizeURI(String uri) - { - if (uri.endsWith("/")) - return uri.substring(0,uri.length()-1); - return uri; + xmlc.setJettyStandardIdsAndProperties(getServer(),webapp); } } diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java index 8908797769c..774f15fed92 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java @@ -86,11 +86,10 @@ public class JettyWebXmlConfiguration extends AbstractConfiguration Object xml_attr=context.getAttribute(XML_CONFIGURATION); context.removeAttribute(XML_CONFIGURATION); - final XmlConfiguration jetty_config = xml_attr instanceof XmlConfiguration - ?(XmlConfiguration)xml_attr - :new XmlConfiguration(jetty.getURI().toURL()); - setupXmlConfiguration(jetty_config, web_inf); - + final XmlConfiguration jetty_config = xml_attr instanceof XmlConfiguration?(XmlConfiguration)xml_attr:new XmlConfiguration(jetty.getURI().toURL()); + + setupXmlConfiguration(context, jetty_config, web_inf); + try { WebAppClassLoader.runWithServerClassAccess(()->{jetty_config.configure(context);return null;}); @@ -110,11 +109,12 @@ public class JettyWebXmlConfiguration extends AbstractConfiguration * @param jetty_config The configuration object. * @param web_inf the WEB-INF location */ - private void setupXmlConfiguration(XmlConfiguration jetty_config, Resource web_inf) throws IOException + private void setupXmlConfiguration(WebAppContext context, XmlConfiguration jetty_config, Resource web_inf) throws IOException { + jetty_config.setJettyStandardIdsAndProperties(context.getServer(),null); Map props = jetty_config.getProperties(); props.put(PROPERTY_THIS_WEB_INF_URL, web_inf.getURI().toString()); - props.put(PROPERTY_WEB_INF_URI, web_inf.getURI().toString()); + props.put(PROPERTY_WEB_INF_URI, XmlConfiguration.normalizeURI(web_inf.getURI().toString())); props.put(PROPERTY_WEB_INF, web_inf.toString()); } } diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java index 742007ba214..db12d70f446 100644 --- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java +++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java @@ -115,6 +115,55 @@ public class XmlConfiguration return parser; } + /** + * Set the standard IDs and properties expected in a jetty XML file: + *
      + *
    • RefId Server
    • + *
    • Property jetty.home
    • + *
    • Property jetty.home.uri
    • + *
    • Property jetty.base
    • + *
    • Property jetty.base.uri
    • + *
    • Property jetty.webapps
    • + *
    • Property jetty.webapps.uri
    • + *
    + * @param server The Server object to set + * @param webapp The webapps Resource + */ + public void setJettyStandardIdsAndProperties(Object server, Resource webapp) + { + try + { + if (server!=null) + getIdMap().put("Server", server); + + Resource home = Resource.newResource(System.getProperty("jetty.home",".")); + getProperties().put("jetty.home",home.toString()); + getProperties().put("jetty.home.uri",normalizeURI(home.getURI().toString())); + + Resource base = Resource.newResource(System.getProperty("jetty.base",home.toString())); + getProperties().put("jetty.base",base.toString()); + getProperties().put("jetty.base.uri",normalizeURI(base.getURI().toString())); + + if (webapp!=null) + { + getProperties().put("jetty.webapp",webapp.toString()); + getProperties().put("jetty.webapps",webapp.getFile().toPath().getParent().toString()); + getProperties().put("jetty.webapps.uri",normalizeURI(webapp.getURI().toString())); + } + } + catch(Exception e) + { + LOG.warn(e); + } + } + + public static String normalizeURI(String uri) + { + if (uri.endsWith("/")) + return uri.substring(0,uri.length()-1); + return uri; + } + private final Map _idMap = new HashMap<>(); private final Map _propertyMap = new HashMap<>(); private final URL _url; From 94322f7290ef79f5d718424c4eec7db988a4cdbc Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 8 Aug 2017 16:43:47 +1000 Subject: [PATCH 140/147] simplify reserved thread configuration --- .../org/eclipse/jetty/io/SelectorManager.java | 21 ++++++++++++------- jetty-server/src/main/config/modules/http.mod | 4 ++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java index 97af8a1394e..afaf27dc0b7 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java @@ -58,7 +58,7 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump private final ManagedSelector[] _selectors; private long _connectTimeout = DEFAULT_CONNECT_TIMEOUT; private long _selectorIndex; - private int _reservedThreads = -2; + private int _reservedThreads = -1; public static int defaultSchedulers(Executor executor) { @@ -129,20 +129,27 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump * Get the number of preallocated producing threads * @see EatWhatYouKill * @see ReservedThreadExecutor - * @return The number of threads preallocated to producing (default 1). + * @return The number of threads preallocated to producing (default -1). */ - @ManagedAttribute("The number of preallocated producer threads") + @ManagedAttribute("The number of reserved producer threads") public int getReservedThreads() { return _reservedThreads; } /** - * Set the number of preallocated threads for high priority tasks + * Set the number of reserved threads for high priority tasks. + *

    Reserved threads are used to take over producing duties, so that a + * producer thread may immediately consume a task it has produced (EatWhatYouKill + * scheduling). If a reserved thread is not available, then produced tasks must + * be submitted to an executor to be executed by a different thread. * @see EatWhatYouKill * @see ReservedThreadExecutor - * @param threads The number of producing threads to preallocate (default 1). - * The EatWhatYouKill scheduler will be disabled with a value of 0. + * @param threads The number of producing threads to preallocate. If + * less that 0 (the default), then a heuristic based on the number of CPUs and + * the thread pool size is used to select the number of threads. If 0, no + * threads are preallocated and the EatWhatYouKill scheduler will be + * disabled and all produced tasks will be executed in a separate thread. */ public void setReservedThreads(int threads) { @@ -284,7 +291,7 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump @Override protected void doStart() throws Exception { - addBean(new ReservedThreadExecutor(getExecutor(),_reservedThreads==-2?_selectors.length:_reservedThreads),true); + addBean(new ReservedThreadExecutor(getExecutor(),_reservedThreads),true); for (int i = 0; i < _selectors.length; i++) { ManagedSelector selector = newSelector(i); diff --git a/jetty-server/src/main/config/modules/http.mod b/jetty-server/src/main/config/modules/http.mod index d833a6da297..86a1ab96a4f 100644 --- a/jetty-server/src/main/config/modules/http.mod +++ b/jetty-server/src/main/config/modules/http.mod @@ -40,8 +40,8 @@ etc/jetty-http.xml ## Thread priority delta to give to acceptor threads # jetty.http.acceptorPriorityDelta=0 -## Reserve threads for high priority tasks (-2 use number of selectors,-1 use number of CPUs, 0 no reserved threads) -# jetty.http.reservedThreads=-2 +## Reserve threads for high priority tasks (-1 use a heuristic, 0 no reserved threads) +# jetty.http.reservedThreads=-1 ## Connect Timeout in milliseconds # jetty.http.connectTimeout=15000 From 1311052b1550a91ad71382724dd057ca47573baf Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 8 Aug 2017 09:47:04 -0700 Subject: [PATCH 141/147] Cleaning up state of branch to match the original jetty-9.4.x + Does not include changes to /jetty-cdi/ + Does not include changes to /jetty-websocket/ for javax.websocket-1.1 --- Jenkinsfile | 2 +- VERSION.txt | 524 +++++------ aggregates/jetty-all/pom.xml | 232 ++--- apache-jsp/pom.xml | 77 +- apache-jstl/pom.xml | 53 +- examples/async-rest/async-rest-jar/pom.xml | 5 +- examples/async-rest/async-rest-webapp/pom.xml | 2 +- examples/async-rest/pom.xml | 4 +- examples/embedded/pom.xml | 38 +- examples/pom.xml | 21 +- jetty-alpn/jetty-alpn-client/pom.xml | 15 +- jetty-alpn/jetty-alpn-server/pom.xml | 76 +- .../modules/alpn-impl/alpn-1.8.0_144.mod | 3 - jetty-alpn/pom.xml | 20 +- jetty-annotations/pom.xml | 40 +- jetty-ant/pom.xml | 9 +- jetty-bom/pom.xml | 5 - jetty-client/pom.xml | 83 +- .../client/http/HttpChannelOverHTTP.java | 10 +- .../eclipse/jetty/client/HttpClientTest.java | 129 +-- jetty-continuation/pom.xml | 31 +- jetty-deploy/pom.xml | 49 +- jetty-distribution/pom.xml | 607 ++----------- .../administration/sessions/chapter.adoc | 26 +- .../session-configuration-hazelcast.adoc | 86 +- .../connectors/configuring-ssl.adoc | 14 +- .../src/main/asciidoc/index-docinfo.xml | 184 ++-- jetty-fcgi/fcgi-client/pom.xml | 2 +- jetty-fcgi/fcgi-server/pom.xml | 126 ++- jetty-fcgi/pom.xml | 2 +- jetty-hazelcast/pom.xml | 86 +- .../config/etc/sessions/hazelcast/default.xml | 28 +- .../config/etc/sessions/hazelcast/remote.xml | 26 +- .../session-store-hazelcast-embedded.mod | 34 + .../session-store-hazelcast-remote.mod | 36 + jetty-home/pom.xml | 12 - jetty-http-spi/pom.xml | 44 +- .../jetty/http/spi/HttpSpiContextHandler.java | 324 +++---- .../jetty/http/spi/JettyHttpContext.java | 222 ++--- .../http/spi/JettyHttpExchangeDelegate.java | 466 +++++----- .../http/spi/JettyHttpServerProvider.java | 158 ++-- jetty-http/pom.xml | 32 +- .../java/org/eclipse/jetty/http/Syntax.java | 284 +++--- .../jetty/http/pathmap/PathMappings.java | 15 +- .../org/eclipse/jetty/http/SyntaxTest.java | 268 +++--- .../http2/server/HTTP2ServerConnection.java | 1 + jetty-io/pom.xml | 36 +- jetty-jaas/pom.xml | 48 +- jetty-jaspi/pom.xml | 70 +- jetty-jmx/pom.xml | 55 +- jetty-jndi/pom.xml | 2 +- jetty-jspc-maven-plugin/pom.xml | 39 +- jetty-maven-plugin/pom.xml | 26 +- .../jetty/maven/plugin/JettyDeployWar.java | 156 ++-- jetty-monitor/pom.xml | 66 +- jetty-nosql/pom.xml | 55 +- jetty-osgi/jetty-osgi-alpn/pom.xml | 27 +- jetty-osgi/jetty-osgi-boot-jsp/pom.xml | 91 +- jetty-osgi/jetty-osgi-boot-warurl/pom.xml | 38 +- jetty-osgi/jetty-osgi-boot/pom.xml | 43 +- jetty-osgi/jetty-osgi-httpservice/pom.xml | 34 +- jetty-osgi/pom.xml | 27 +- jetty-osgi/test-jetty-osgi-context/pom.xml | 136 ++- jetty-osgi/test-jetty-osgi-webapp/pom.xml | 125 +-- jetty-osgi/test-jetty-osgi/pom.xml | 152 ++-- jetty-plus/pom.xml | 55 +- jetty-proxy/pom.xml | 55 +- jetty-quickstart/pom.xml | 27 +- jetty-rewrite/pom.xml | 48 +- jetty-runner/pom.xml | 86 +- jetty-security/pom.xml | 33 +- .../jetty/security/AliasedConstraintTest.java | 368 ++++---- jetty-server/pom.xml | 71 +- .../eclipse/jetty/server/LocalConnector.java | 12 +- .../jetty/server/ServerConnectorTest.java | 9 - jetty-servlet/pom.xml | 52 +- jetty-servlets/pom.xml | 62 +- .../jetty/servlets/ThreadStarvationTest.java | 814 +++++++++--------- jetty-spring/pom.xml | 20 +- jetty-start/pom.xml | 9 +- .../org/eclipse/jetty/start/BaseHomeTest.java | 428 ++++----- .../jetty/start/ConfigurationAssert.java | 543 ++++++------ .../modules/alpn-impl/alpn-1.8.0_131.mod | 3 - .../modules/alpn-impl/alpn-1.8.0_144.mod | 3 - jetty-util-ajax/pom.xml | 50 +- jetty-util/pom.xml | 61 +- .../jetty/util/RolloverFileOutputStream.java | 67 +- .../jetty/util/SharedBlockingCallback.java | 2 +- .../util/RolloverFileOutputStreamTest.java | 156 ++-- .../jetty/util/URIUtilCanonicalPathTest.java | 270 +++--- jetty-webapp/pom.xml | 61 +- .../jetty/webapp/URLStreamHandlerUtil.java | 156 ++-- jetty-xml/pom.xml | 26 +- pom.xml | 103 +-- tests/pom.xml | 20 +- tests/test-continuation/pom.xml | 28 +- tests/test-integration/pom.xml | 42 +- tests/test-jmx/jmx-webapp-it/pom.xml | 156 +--- tests/test-jmx/jmx-webapp/pom.xml | 25 +- tests/test-jmx/pom.xml | 19 +- tests/test-loginservice/pom.xml | 22 +- tests/test-quickstart/pom.xml | 9 +- tests/test-sessions/pom.xml | 21 +- .../test-sessions/test-hash-sessions/pom.xml | 22 +- .../test-sessions/test-jdbc-sessions/pom.xml | 26 +- .../test-mongodb-sessions/pom.xml | 22 +- .../test-sessions-common/pom.xml | 22 +- tests/test-webapps/pom.xml | 21 +- tests/test-webapps/test-jaas-webapp/pom.xml | 16 +- tests/test-webapps/test-jetty-webapp/pom.xml | 112 +-- tests/test-webapps/test-jndi-webapp/pom.xml | 15 +- .../test-webapps/test-mock-resources/pom.xml | 29 +- tests/test-webapps/test-proxy-webapp/pom.xml | 54 +- tests/test-webapps/test-servlet-spec/pom.xml | 2 +- .../test-container-initializer/pom.xml | 37 +- .../test-spec-webapp/pom.xml | 77 +- .../test-web-fragment/pom.xml | 52 +- .../test-webapps/test-webapp-rfc2616/pom.xml | 22 +- 118 files changed, 4221 insertions(+), 6037 deletions(-) create mode 100644 jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod create mode 100644 jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod diff --git a/Jenkinsfile b/Jenkinsfile index 0016dc734dd..185f2d6ab31 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,7 +53,7 @@ node { withEnv(mvnEnv) { timeout(time: 90, unit: 'MINUTES') { // Run test phase / ignore test failures - sh "mvn -B install -Dmaven.test.failure.ignore=true" + sh "mvn -B install -Dmaven.test.failure.ignore=true -Prun-its" // Report failures in the jenkins UI step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) diff --git a/VERSION.txt b/VERSION.txt index bfc9e8b6d1f..ca16e0daa48 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,25 +1,4 @@ -jetty-9.3.22-SNAPSHOT - -jetty-9.3.21.M0 - 01 August 2017 - + 1357 RolloverFileOutputStream: No rollout performed at midnight - + 1469 RolloverFileOutputStream: IllegalStateException Task already scheduled - + 1507 RolloverFileOutputStream: Negative delay Timer.schedule exception - + 1513 RolloverFileOutputStream: can't handle multiple instances - + 1655 Improve extensibility of ServerConnector - + 1661 AbstractProxyServlet onProxyResponseFailure Error - + 1664 IPAccessHandler CIDR IP range check is incorrect - + 1685 Update ALPN support for Java 8u141 - + 1687 HTTP2: Correcting missing callback notification when channel not found - + 1702 Update ALPN support for Java 8u144 - + 1703 Improve HttpInput failure logging - -jetty-9.3.20.v20170531 - 31 May 2017 - + 523 TLS close behaviour breaking session resumption - + 1108 Please improve logging in SslContextFactory when there are no approved - cipher suites - + 1527 Jetty BOM should not depend on jetty-parent - + 1556 A timing channel in Password.java - + 1567 XmlConfiguration will start the same object multiple times +jetty-9.4.7-SNAPSHOT jetty-9.2.22.v20170606 - 06 June 2017 + 920 no main manifest attribute, in jetty-runner-9.2.19.v20160908.jar @@ -33,10 +12,9 @@ jetty-9.2.22.v20170606 - 06 June 2017 + 1523 Update ALPN support for Java 8u131 + 1556 A timing channel in Password.java + 1590 RolloverFileOutputStream not functioning in Jetty 9.2.21+ -jetty-9.2.23-SNAPSHOT -jetty-9.2.22.v20170606 - 06 June 2017 - + 920 no main manifest attribute, in jetty-runner-9.2.19.v20160908.jar +jetty-9.4.6.v20170531 - 31 May 2017 + + 523 TLS close behaviour breaking session resumption + 1108 Please improve logging in SslContextFactory when there are no approved cipher suites + 1505 Adding jetty.base.uri and jetty.home.uri @@ -63,6 +41,14 @@ jetty-9.2.22.v20170606 - 06 June 2017 + 1569 Allow setting of maxBinaryMessageSize to 0 in WebSocketPolicy + 1579 NPE in Quoted Quality CSV +jetty-9.3.20.v20170531 - 31 May 2017 + + 523 TLS close behaviour breaking session resumption + + 1108 Please improve logging in SslContextFactory when there are no approved + cipher suites + + 1527 Jetty BOM should not depend on jetty-parent + + 1556 A timing channel in Password.java + + 1567 XmlConfiguration will start the same object multiple times + jetty-9.4.5.v20170502 - 02 May 2017 + 304 Review dead code - StringUtil.sidBytesToString + 1235 DNS lookup in newSSLEngine(InetSocketAddress address) @@ -95,6 +81,20 @@ jetty-9.4.5.v20170502 - 02 May 2017 + 1521 Prevent copy of jetty jars to lib/gcloud + 1523 Update ALPN support for Java 8u131 +jetty-9.3.19.v20170502 - 02 May 2017 + + 877 Programmatic servlet mappings cannot override mappings from + webdefault.xml using quickstart + + 1348 Add a BOM artifact + + 1390 HashLoginService and "this.web-inf.url" property are incompatible + + 1463 SSL Renegotiate limit + + 1469 IllegalStateException in RolloverFileOutputStream + + 1486 redirect to welcome file broken for sub directory + + 1487 add decoded paths + + 1507 Negative delay Timer.schedule exception due to mismatched local and + _logTimeZone values + + 1513 RolloverFileOutputStream can't handle multiple instances + + 1523 Update ALPN support for Java 8u131 + jetty-9.4.4.v20170414 - 14 April 2017 + 612 Support HTTP Trailer + 877 Programmatic servlet mappings cannot override mappings from @@ -128,6 +128,13 @@ jetty-9.4.4.v20170414 - 14 April 2017 + 1472 Broken *.gz symlinks cause NPE in DefaultServlet + 1475 SIOOBE in ContextHandler startup +jetty-9.3.18.v20170406 - 06 April 2017 + + 877 Programmatic servlet mappings cannot override mappings from + webdefault.xml using quickstart + + 1201 X-Forwarded-For incorrectly set in jetty-http-forwarded.xml + + 1417 Improve classloader dumping + + 1439 Allow UNC paths to function as Resource bases + jetty-9.4.3.v20170317 - 17 March 2017 + 329 Javadoc for HttpTester and ServletTester needs to reference limited HTTP version scope @@ -156,18 +163,14 @@ jetty-9.4.3.v20170317 - 17 March 2017 + 1403 Move new CookieCompliance class to jetty-http + 1405 Cookie name cannot be blank or null -jetty-9.3.18.v20170406 - 06 April 2017 - + 877 Programmatic servlet mappings cannot override mappings from - webdefault.xml using quickstart - + 1201 X-Forwarded-For incorrectly set in jetty-http-forwarded.xml - + 1417 Improve classloader dumping - + 1439 Allow UNC paths to function as Resource bases - jetty-9.3.17.v20170317 - 17 March 2017 + 329 Javadoc for HttpTester and ServletTester needs to reference limited HTTP version scope + + 609 websocket ClientCloseTest testServerNoCloseHandshake is failing + 1015 Ensure jetty-distribution excludes git / temp files + 1047 ReadPendingException and then thread death + + 1049 test-jetty-osgi test exits/crashes the surefire forked JVM + + 1282 ByteArrayEndPointTest.testIdle() failure + 1296 Introduce HTTP parser "content complete" event + 1326 Jetty shutdown command got NullPointerException (http2 module added to start) @@ -185,7 +188,9 @@ jetty-9.3.17.v20170317 - 17 March 2017 + 1387 Windows and paxexam failure due to "renaming bundle" + 1389 Update to gcloud datastore-0.9.4-beta + 1390 HashLoginService and "this.web-inf.url" property are incompatible + + 1394 Default OS Locale/Encoding/Charset can cause test failures + 1396 Set-Cookie produced by Jetty is invalid for RFC6265 and Chrome + + 1399 SlowClientTest is failing on CI + 1401 HttpOutput.recycle() does not clear the write listener jetty-9.4.2.v20170220 - 20 February 2017 @@ -275,17 +280,6 @@ jetty-9.4.1.v20170120 - 20 January 2017 + 1276 Remove org.eclipse.jetty.websocket.server.WebSocketServerFactory from SPI -jetty-9.4.0.v20161208 - 08 December 2016 - + 1112 How config async support in jsp tag? - + 1124 Allow configuration of WebSocket mappings from Spring - + 1139 Support configuration of properties during --add-to-start - + 1146 jetty.server.HttpInput deadlock - + 1148 Support HTTP/2 HEADERS trailer - + 1151 NPE in ClasspathPattern.match() - + 1153 Make SessionData easier to subclass - + 123 AbstractSessionIdManager can't atomically check for uniqueness of new - session ID - jetty-9.3.16.v20170120 - 20 January 2017 + 486 JDK 9 ALPN implementation + 592 Support no-value Host header in HttpParser @@ -300,6 +294,9 @@ jetty-9.3.16.v20170120 - 20 January 2017 + 1229 ClassLoader constraint issue when using NativeWebSocketConfiguration with WEB-INF/lib/jetty-http.jar present + 1234 onBadMessage called from with handled message + + 1259 HostnameVerificationTest.simpleGetWithHostnameVerificationEnabledTest + is broken + + 1261 Intermittent H2C test failure AsyncIOServletTest.testAsyncReadEarlyEOF + 1262 BufferUtil.isMappedBuffer() uses reflection on private JDK fields + 1265 JAXB not available in JDK 9 + 1267 Request.getRemoteUser can throw undeclared IllegalStateException via @@ -313,6 +310,14 @@ jetty-9.3.16.v20170120 - 20 January 2017 + 1275 Get rid of Mockito + 1276 Remove org.eclipse.jetty.websocket.server.WebSocketServerFactory from SPI + + 1277 http2 alpn test error + +jetty-9.2.21.v20170120 - 20 January 2017 + + 592 Support no-value Host header in HttpParser + + 1229 ClassLoader constraint issue when using NativeWebSocketConfiguration + with WEB-INF/lib/jetty-http.jar present + + 1267 Request.getRemoteUser can throw undeclared IllegalStateException via + DeferredAuthentication & FormAuthenticator jetty-9.3.15.v20161220 - 20 December 2016 + 240 Missing content for multipart request after upgrade to Jetty > 9.2.7 @@ -341,6 +346,7 @@ jetty-9.3.15.v20161220 - 20 December 2016 + 1099 PushCacheFilter pushes POST requests + 1108 Please improve logging in SslContextFactory when there are no approved cipher suites + + 1114 Add testcase for WSUF for stop/start of the Server + 1118 Filter.destroy() conflicts with ContainerLifeCycle.destroy() in WebSocketUpgradeFilter + 1123 Broken lifecycle for WebSocket's mappings @@ -360,12 +366,27 @@ jetty-9.3.15.v20161220 - 20 December 2016 + 1186 Where can i find SocketConnector .java and BlockingChannelConnector.java etc? -jetty-9.2.21.v20170120 - 20 January 2017 - + 592 Support no-value Host header in HttpParser - + 1229 ClassLoader constraint issue when using NativeWebSocketConfiguration - with WEB-INF/lib/jetty-http.jar present - + 1267 Request.getRemoteUser can throw undeclared IllegalStateException via - DeferredAuthentication & FormAuthenticator +jetty-9.2.20.v20161216 - 16 December 2016 + + 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid + memory leak + + Reset Response buffer size + + 1051 NCSARequestLog/RolloverFileOutputStream does not roll day after DST + ends + + 1057 Improve WebSocketUpgradeFilter fast path performance + + 1090 Allow WebSocketUpgradeFilter to be used by WEB-INF/web.xml + + 1124 Allow configuration of WebSocket mappings from Spring + + 1130 PROXY protocol support reports incorrect remote address + +jetty-9.4.0.v20161208 - 08 December 2016 + + 1112 How config async support in jsp tag? + + 1124 Allow configuration of WebSocket mappings from Spring + + 1139 Support configuration of properties during --add-to-start + + 1146 jetty.server.HttpInput deadlock + + 1148 Support HTTP/2 HEADERS trailer + + 1151 NPE in ClasspathPattern.match() + + 1153 Make SessionData easier to subclass + + 123 AbstractSessionIdManager can't atomically check for uniqueness of new + session ID jetty-9.4.0.RC3 - 05 December 2016 + 1051 NCSARequestLog/RolloverFileOutputStream does not roll day after DST @@ -438,6 +459,23 @@ jetty-9.4.0.RC2 - 16 November 2016 + 1099 PushCacheFilter pushes POST requests + 1103 AbstractNCSARequestLog reports too much of the Request URI +jetty-9.3.14.v20161028 - 28 October 2016 + + 292 NPE in SslConnectionFactory newConnection + + 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid + memory leak + + 989 InputStreamResponseListener.get() throws with HTTP/2 following redirect + + 1009 9.3.x] ThreadLimitHandler has no method setBlockForMs + + 1018 Remove dependency on asm types in oej.annotations.Util + + 1029 Restore Request.setHttpVersion() + + 1031 Improve HttpField pre-encoding + + 1032 Remove jetty dependencies in jetty jasper classes + + 1037 Don't execute AsyncListener.onTimeout events in spare Scheduler-Thread + + 1038 AttributeNormalizer does not favor ${WAR} over other attributes, like + ${jetty.base} + + 1039 AttributeNormalizer should not track attributes that are null + + 1046 Improve HTTP2Flusher error report + + 480764 Add extra tests for empty multipart + jetty-9.4.0.RC1 - 21 October 2016 + 277 Proxy servlet does not handle HTTP status 100 correctly + 292 NPE in SslConnectionFactory newConnection @@ -479,6 +517,27 @@ jetty-9.4.0.RC1 - 21 October 2016 + 1017 Output session configuration for dump + 1018 Remove dependency on asm types in oej.annotations.Util +jetty-9.3.13.v20161014 - 14 October 2016 + + 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid + memory leak + + 926 No LSB Tags on jetty.sh script cause warning on Ubuntu 16.04 + + 999 Create a Flight Recorder module + + 1000 Allow legacy behaviour if 2 servlets map to same path + +jetty-9.3.13.M0 - 30 September 2016 + + 277 Proxy servlet does not handle HTTP status 100 correctly + + 870 TLS protocol exclusion broken for SslContextFactory(String) + + 915 The jetty-maven-plugin:stop goal doesn't stop everything completely + + 918 Support certificates hot reload + + 930 Add module instructions to SSL section + + 943 Docs: Error in 'Embedding Jetty' page - example 'FileServer' + + 948 9.4.0.RC0 jetty-distribution invalid config etc/jetty-http2c.xml + + 955 Response listeners not invoked when using Connection.send() + + 959 CompleteListener invoked twice for HTTP/2 transport and response content + + 960 Async I/O spin when reading early EOF + + 965 Link from High Load docs to Garbage Collection Tuning is broken + + 966 Remove usages of ConcurrentArrayQueue + jetty-9.4.0.RC0 - 15 September 2016 + 131 Improve Connector Statistic names and values + 572 Don't reject HTTP/2 requests without body in low threads mode @@ -514,6 +573,54 @@ jetty-9.4.0.RC0 - 15 September 2016 + 922 Implements methods Connection.getBytes[In|Out]() + 931 Update gcloud datastore to 0.3.0 +jetty-9.3.12.v20160915 - 15 September 2016 + + 56 Fix authn issues in LdapLoginModule + + 131 Improve Connector Statistic names and values + + 185 Implement RFC 7239 (Forwarded header) + + 700 Bundle org.eclipse.jetty.http.spi not available via p2 repository + + 725 Provide a private way to report security issues + + 752 Implement support for HTTP2 SETTINGS_MAX_HEADER_LIST_SIZE + + 759 Ensure wrapped Responses will close and commit outputstream or writer + + 780 The moved websocket PathSpec is incompatible with cometd 3.0.x + + 783 Report name of broken jar file + + 784 JSP Session updated before sendRedirect() lose their information + + 786 Buffering Response Handler + + 790 AsyncContentListener semantic broken with HTTP/2 transport + + 792 HTTP/2] Socket seems to be not closed completely + + 797 MimeTypes resource loading incorrect on OSGi + + 798 async IO Write closed race + + 804 setting default Url Encoding broken in Jetty >= 9.3 + + 806 Jetty HttpClient authentication - missing any realm option + + 817 NPE in jndi Resource + + 826 Better default for HTTP/2's max concurrent streams + + 827 HTTPClient fails connecting to HTTPS host through an HTTP proxy + w/authentication + + 830 Test webapp not properly copied to demo-base + + 832 ServerWithJNDI example uses wrong webapp + + 841 support reset in buffering interceptors + + 844 Implement a Thread Limit Handler + + 845 Improve blocking IO for data rate limiting + + 851 MBeanContainer no longer unregisters MBeans when "stopped" + + 854 If container.destroy() is called, calling container.start() again should + throw an IllegalStateException + + 855 JMXify MBeanContainer + + 860 Only TLS 1.2 Supported + + 868 ClassLoader leak with Jetty and Karaf - static instances of + java.lang.Throwable + + 880 Refactor jetty-http's HostPortHttpField logic into new jetty-util class + + 882 Add IPv6 support to IPAddressMap in jetty-util + + 889 ConstantThrowable.name can be removed + + 894 When adding servless class, preserve Class instead of going through + String + + 897 Remove GzipHandler interceptor when out of scope + + 898 GzipHandler adds multiple Vary header + + 902 Expect: 100-Continue does not work with HTTP/2 + + 909 Path and Domain not properly matched in addCookie() + + 911 Request.getRequestURI() gets decoded after startAsync(req, resp) is + invoked + + 913 Unprotected debug in WebAppClassLoader + + 922 Implements methods Connection.getBytes[In|Out]() + jetty-9.4.0.M1 - 15 August 2016 + 185 Implement RFC 7239 (Forwarded header) + 213 jetty.osgi.boot requires Server services registered before @@ -614,6 +721,117 @@ jetty-9.4.0.M1 - 15 August 2016 + 837 Update to support apache jasper 8.5.4 + 841 support reset in buffering interceptors +jetty-9.3.11.v20160721 - 21 July 2016 + + 230 customize Content-Type in ErrorHandler's default error page + + 592 Support no-value Host header in HttpParser + + 631 SLOTH protection + + 643 NPE in passing websocket client test + + 649 LDAPLoginModule should disallow blank username and password + + 658 Add memcached option for gcloud-sessions in jetty-9.3 + + 660 NullPointerException in Request.getParameter: _parameters is null + + 663 Update gcloud datastore to 0.2.3 + + 667 Introduce optional `jetty.deploy.monitoredPath` for jetty-deploy paths + outside of ${jetty.base} + + 668 Introduce optional `jetty.deploy.defaultsDescriptorPath` for + jetty-deploy defaults descriptor outside of ${jetty.home} + + 669 Support UNC paths in PathResource + + 671 Incorrect ALPN default protocol + + 672 Allow logging configuration announcement to be programmatically disabled + + 673 ClasspathPattern needs a match all pattern + + 675 Slf4jLog.ignore() should produce at DEBUG level + + 676 JavaUtilLog.ignore() should produce at DEBUG level + + 677 Logging of .ignore() should indicate that it was an "Ignored Exception" + + 678 Log at less than DEBUG level when annotation scanning takes significant + time + + 682 Quickstart should not scan all container path jars + + 684 HttpClient proxies (HttpProxy and Socks4Proxy) do not support + authentication + + 685 SecureRequestCustomizer SSLSession attribute not set + + 687 AllowSymLinkAliasChecker not normalizing relative symlinks properly + + 690 jetty-maven-plugin does not configure AnnotationConfiguration for + jetty:effective-web-xml goal + + 693 QoSFilterTest failures are not capture by junit + + 694 http2.client.StreamResetTest.testServerExceptionConsumesQueuedData stack + not suppressed in test + + 695 Deprecate LocalConnector.getResponses() in favor of using .getResponse() + + 696 LocalConnector.getResponse() doesn't find close if using HTTP/1.1 + w/Connection: close + + 701 Document CachingWebAppClassLoader + + 706 org.apache.jasper.compiler.disablejsr199 is no longer present in Jetty + 9.3+ + + 708 SslContextFactory: newSslServerSocket/newSslSocket customization + + 717 GzipHandler.minGzipSize still compresses small responses + + 718 Document HttpClient transports + + 720 asciiToLowerCase throws NullPointerException + + 721 HTTP Response header value encoding is invalid for RFC7230 + + 723 Improve bad/missing mime.properties reporting + + 726 Http2 Client parse error + + 730 "Slow" client causes IllegalStateException + + 733 Allow setCharacterEncoding after getOutputStream + + 739 Illegal WindowUpdate frame with delta=0 + + 742 Fixed link to webtide.com + + 745 Removed README.txt + + 747 Update documentation to reflect TLS and SSL support + + 751 Remove usages of ArrayQueue + + 752 Implement support for HTTP2 SETTINGS_MAX_HEADER_LIST_SIZE + + 755 NPE in HttpChannelOverHTTP2.requestContent() + + 756 Filter problematic headers from CGI and FastCGIProxy + +jetty-9.2.19.v20160908 - 08 September 2016 + + 817 NPE in jndi Resource + + 830 Test webapp not properly copied to demo-base + + 832 ServerWithJNDI example uses wrong webapp + + 851 MBeanContainer no longer unregisters MBeans when "stopped" + + 868 ClassLoader leak with Jetty and Karaf - static instances of + java.lang.Throwable + + 880 Refactor jetty-http's HostPortHttpField logic into new jetty-util class + + 882 Add IPv6 support to IPAddressMap in jetty-util + + 894 When adding servless class, preserve Class instead of going through + String + + 899 PathFinderTest fails in jetty-9.2.x + +jetty-9.2.18.v20160721 - 21 July 2016 + + 425 Incorrect @ServerEndpoint Encoder/Decoder lifecycle + + 649 LDAPLoginModule should disallow blank username and password + + 654 Jetty 9.3 ServletContext.getResourceAsStream("/") returns an unusable + stream + + 661 JsrExtension is missing hashCode() and equals() + + 756 Filter problematic headers from CGI and FastCGIProxy + +jetty-9.3.11.M0 - 22 June 2016 + + 425 Incorrect @ServerEndpoint Encoder/Decoder lifecycle + + 624 AsyncContext.onCompleted called twice + + 645 jetty-requestlog.xml default log path + + 654 Jetty 9.3 ServletContext.getResourceAsStream("/") returns an unusable + stream + + 659 CONNECT request fails spuriously + + 660 NullPointerException in Request.getParameter: _parameters is null + + 661 JsrExtension is missing hashCode() and equals() + +jetty-9.3.10.v20160621 - 21 June 2016 + + 388 Add methods to send text frames with pre-encoded strings + + 605 Guard concurrent calls to WebSocketSession.close() + + 608 reset encoding set from content type? + + 609 websocket ClientCloseTest testServerNoCloseHandshake is failing + + 610 HttpClientRedirectTest/testRedirectWithWrongScheme test failing in CI + + 620 Missing call to setPattern in RewritePatternRule constructor + + 622 NoSqlSessionManager test for expired session does not use + session.maxInactiveInterval + + 623 Add --gzip suffix to 304 responses with ETAGs + + 624 AsyncContext.onCompleted called twice + + 628 IOException: Unable to open root Jar file + MetaInfConfiguration.getTlds(MetaInfConfiguration.java:406) with Spring boot + loader + WebAppContext + non-expanded war + + 632 JMX tests rely on fixed port + + 633 If jmx and websocket is enabled, redploying a context produces a + NullPointerException + + 638 ConnectHandler responses should have Content-Length + + 639 ServerContainer stores WebSocket sessions twice + + 640 ClientContainer should store WebSocket sessions as beans + + 641 MongoSessionIdManager uses deprecated ensureIndex + + 647 HTTP/2 CONTINUATION frame parsing throws IllegalStateException + + 648 Problem using InputStreamResponseListener to handle HTTP/2 responses + jetty-9.4.0.M0 - 03 June 2016 + 356 Element error-page/location must start with a '/' + 360 Improve HTTP/2 stream interleaving @@ -687,203 +905,6 @@ jetty-9.4.0.M0 - 03 June 2016 + 605 Guard concurrent calls to WebSocketSession.close() + 608 reset encoding set from content type -jetty-9.2.20.v20161216 - 16 December 2016 - + 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid - memory leak - + Reset Response buffer size - + 1051 NCSARequestLog/RolloverFileOutputStream does not roll day after DST - ends - + 1057 Improve WebSocketUpgradeFilter fast path performance - + 1090 Allow WebSocketUpgradeFilter to be used by WEB-INF/web.xml - + 1124 Allow configuration of WebSocket mappings from Spring - + 1130 PROXY protocol support reports incorrect remote address - -jetty-9.3.14.v20161028 - 28 October 2016 - + 292 NPE in SslConnectionFactory newConnection - + 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid - memory leak - + 989 InputStreamResponseListener.get() throws with HTTP/2 following redirect - + 1009 9.3.x] ThreadLimitHandler has no method setBlockForMs - + 1018 Remove dependency on asm types in oej.annotations.Util - + 1029 Restore Request.setHttpVersion() - + 1031 Improve HttpField pre-encoding - + 1032 Remove jetty dependencies in jetty jasper classes - + 1037 Don't execute AsyncListener.onTimeout events in spare Scheduler-Thread - + 1038 AttributeNormalizer does not favor ${WAR} over other attributes, like - ${jetty.base} - + 1039 AttributeNormalizer should not track attributes that are null - + 1046 Improve HTTP2Flusher error report - -jetty-9.3.13.v20161014 - 14 October 2016 - + 295 Ensure Jetty Client use of Deflater / Inflater calls .end() to avoid - memory leak - + 926 No LSB Tags on jetty.sh script cause warning on Ubuntu 16.04 - + 999 Create a Flight Recorder module - + 1000 Allow legacy behaviour if 2 servlets map to same path - -jetty-9.3.13.M0 - 30 September 2016 - + 277 Proxy servlet does not handle HTTP status 100 correctly - + 870 TLS protocol exclusion broken for SslContextFactory(String) - + 915 The jetty-maven-plugin:stop goal doesn't stop everything completely - + 918 Support certificates hot reload - + 930 Add module instructions to SSL section - + 943 Docs: Error in 'Embedding Jetty' page - example 'FileServer' - + 948 9.4.0.RC0 jetty-distribution invalid config etc/jetty-http2c.xml - + 955 Response listeners not invoked when using Connection.send() - + 959 CompleteListener invoked twice for HTTP/2 transport and response content - + 960 Async I/O spin when reading early EOF - + 965 Link from High Load docs to Garbage Collection Tuning is broken - + 966 Remove usages of ConcurrentArrayQueue - -jetty-9.3.12.v20160915 - 15 September 2016 - + 56 Fix authn issues in LdapLoginModule - + 131 Improve Connector Statistic names and values - + 185 Implement RFC 7239 (Forwarded header) - + 700 Bundle org.eclipse.jetty.http.spi not available via p2 repository - + 725 Provide a private way to report security issues - + 752 Implement support for HTTP2 SETTINGS_MAX_HEADER_LIST_SIZE - + 759 Ensure wrapped Responses will close and commit outputstream or writer - + 780 The moved websocket PathSpec is incompatible with cometd 3.0.x - + 783 Report name of broken jar file - + 784 JSP Session updated before sendRedirect() lose their information - + 786 Buffering Response Handler - + 790 AsyncContentListener semantic broken with HTTP/2 transport - + 792 HTTP/2] Socket seems to be not closed completely - + 797 MimeTypes resource loading incorrect on OSGi - + 798 async IO Write closed race - + 804 setting default Url Encoding broken in Jetty >= 9.3 - + 806 Jetty HttpClient authentication - missing any realm option - + 817 NPE in jndi Resource - + 826 Better default for HTTP/2's max concurrent streams - + 827 HTTPClient fails connecting to HTTPS host through an HTTP proxy - w/authentication - + 830 Test webapp not properly copied to demo-base - + 832 ServerWithJNDI example uses wrong webapp - + 841 support reset in buffering interceptors - + 844 Implement a Thread Limit Handler - + 845 Improve blocking IO for data rate limiting - + 851 MBeanContainer no longer unregisters MBeans when "stopped" - + 854 If container.destroy() is called, calling container.start() again should - throw an IllegalStateException - + 855 JMXify MBeanContainer - + 860 Only TLS 1.2 Supported - + 868 ClassLoader leak with Jetty and Karaf - static instances of - java.lang.Throwable - + 880 Refactor jetty-http's HostPortHttpField logic into new jetty-util class - + 882 Add IPv6 support to IPAddressMap in jetty-util - + 889 ConstantThrowable.name can be removed - + 894 When adding servless class, preserve Class instead of going through - String - + 897 Remove GzipHandler interceptor when out of scope - + 898 GzipHandler adds multiple Vary header - + 902 Expect: 100-Continue does not work with HTTP/2 - + 909 Path and Domain not properly matched in addCookie() - + 911 Request.getRequestURI() gets decoded after startAsync(req, resp) is - invoked - + 913 Unprotected debug in WebAppClassLoader - + 922 Implements methods Connection.getBytes[In|Out]() - -jetty-9.3.11.v20160721 - 21 July 2016 - + 230 customize Content-Type in ErrorHandler's default error page - + 592 Support no-value Host header in HttpParser - + 631 SLOTH protection - + 649 LDAPLoginModule should disallow blank username and password - + 658 Add memcached option for gcloud-sessions in jetty-9.3 - + 660 NullPointerException in Request.getParameter: _parameters is null - + 663 Update gcloud datastore to 0.2.3 - + 667 Introduce optional `jetty.deploy.monitoredPath` for jetty-deploy paths - outside of ${jetty.base} - + 668 Introduce optional `jetty.deploy.defaultsDescriptorPath` for - jetty-deploy defaults descriptor outside of ${jetty.home} - + 669 Support UNC paths in PathResource - + 671 Incorrect ALPN default protocol - + 672 Allow logging configuration announcement to be programmatically disabled - + 673 ClasspathPattern needs a match all pattern - + 675 Slf4jLog.ignore() should produce at DEBUG level - + 676 JavaUtilLog.ignore() should produce at DEBUG level - + 677 Logging of .ignore() should indicate that it was an "Ignored Exception" - + 678 Log at less than DEBUG level when annotation scanning takes significant - time - + 682 Quickstart should not scan all container path jars - + 684 HttpClient proxies (HttpProxy and Socks4Proxy) do not support - authentication - + 685 SecureRequestCustomizer SSLSession attribute not set - + 687 AllowSymLinkAliasChecker not normalizing relative symlinks properly - + 690 jetty-maven-plugin does not configure AnnotationConfiguration for - jetty:effective-web-xml goal - + 695 Deprecate LocalConnector.getResponses() in favor of using .getResponse() - + 696 LocalConnector.getResponse() doesn't find close if using HTTP/1.1 - w/Connection: close - + 701 Document CachingWebAppClassLoader - + 706 org.apache.jasper.compiler.disablejsr199 is no longer present in Jetty - 9.3+ - + 708 SslContextFactory: newSslServerSocket/newSslSocket customization - + 717 GzipHandler.minGzipSize still compresses small responses - + 718 Document HttpClient transports - + 720 asciiToLowerCase throws NullPointerException - + 721 HTTP Response header value encoding is invalid for RFC7230 - + 723 Improve bad/missing mime.properties reporting - + 726 Http2 Client parse error - + 730 "Slow" client causes IllegalStateException - + 733 Allow setCharacterEncoding after getOutputStream - + 739 Illegal WindowUpdate frame with delta=0 - + 742 Fixed link to webtide.com - + 745 Removed README.txt - + 747 Update documentation to reflect TLS and SSL support - + 751 Remove usages of ArrayQueue - + 752 Implement support for HTTP2 SETTINGS_MAX_HEADER_LIST_SIZE - + 755 NPE in HttpChannelOverHTTP2.requestContent() - + 756 Filter problematic headers from CGI and FastCGIProxy - -jetty-9.2.19.v20160908 - 08 September 2016 - + 817 NPE in jndi Resource - + 830 Test webapp not properly copied to demo-base - + 832 ServerWithJNDI example uses wrong webapp - + 851 MBeanContainer no longer unregisters MBeans when "stopped" - + 868 ClassLoader leak with Jetty and Karaf - static instances of - java.lang.Throwable - + 880 Refactor jetty-http's HostPortHttpField logic into new jetty-util class - + 882 Add IPv6 support to IPAddressMap in jetty-util - + 894 When adding servless class, preserve Class instead of going through - String - -jetty-9.2.18.v20160721 - 21 July 2016 - + 425 Incorrect @ServerEndpoint Encoder/Decoder lifecycle - + 649 LDAPLoginModule should disallow blank username and password - + 654 Jetty 9.3 ServletContext.getResourceAsStream("/") returns an unusable - stream - + 661 JsrExtension is missing hashCode() and equals() - + 756 Filter problematic headers from CGI and FastCGIProxy - -jetty-9.3.11.M0 - 22 June 2016 - + 425 Incorrect @ServerEndpoint Encoder/Decoder lifecycle - + 624 AsyncContext.onCompleted called twice - + 645 jetty-requestlog.xml default log path - + 654 Jetty 9.3 ServletContext.getResourceAsStream("/") returns an unusable - stream - + 659 CONNECT request fails spuriously - + 660 NullPointerException in Request.getParameter: _parameters is null - + 661 JsrExtension is missing hashCode() and equals() - -jetty-9.3.10.v20160621 - 21 June 2016 - + 388 Add methods to send text frames with pre-encoded strings - + 605 Guard concurrent calls to WebSocketSession.close() - + 608 reset encoding set from content type? - + 620 Missing call to setPattern in RewritePatternRule constructor - + 623 Add --gzip suffix to 304 responses with ETAGs - + 624 AsyncContext.onCompleted called twice - + 628 IOException: Unable to open root Jar file - MetaInfConfiguration.getTlds(MetaInfConfiguration.java:406) with Spring boot - loader + WebAppContext + non-expanded war - + 633 If jmx and websocket is enabled, redploying a context produces a - NullPointerException - + 638 ConnectHandler responses should have Content-Length - + 639 ServerContainer stores WebSocket sessions twice - + 640 ClientContainer should store WebSocket sessions as beans - + 641 MongoSessionIdManager uses deprecated ensureIndex - + 647 HTTP/2 CONTINUATION frame parsing throws IllegalStateException - + 648 Problem using InputStreamResponseListener to handle HTTP/2 responses - jetty-9.3.10.M0 - 26 May 2016 + 354 Spin loop in case of exception thrown during accept() + 464 Improve reporting of SSLHandshakeException @@ -916,6 +937,7 @@ jetty-9.3.9.v20160517 - 17 May 2016 + 558 HTTP/2 server hangs when thread pool is low on threads + 560 Jetty Client Proxy Authentication does not work with HTTP Proxy tunneling + + 561 Fixed test timer + 567 NPE in ErrorPageErrorHandler debug + 570 URIUtil.encodePath does not always encode utf8 chars + 571 AbstractAuthentication.matchesURI() fails to match scheme @@ -961,6 +983,8 @@ jetty-9.3.9.M1 - 11 April 2016 + 418 Add osgi capability for endpoint configurator + 424 Jetty impl. of Websocket ServerEndpointConfig.Configurator lifecycle out of spec + + 427 Squelch intentional exceptions seen during websocket testing + + 434 RequestTest stack traces + 435 adjust debug log message + 437 Avoid NPE on receiving empty message though MessageHandler.Partial + 438 File and Path Resources with control characters should be rejected @@ -980,6 +1004,7 @@ jetty-9.3.9.M1 - 11 April 2016 + 476 HttpClient should not send absolute-form target with non HttpProxy jetty-9.3.8.v20160314 - 14 March 2016 + + 107 ResourceHandler range support testcase + 124 Don't produce text/html if the request doesn't accept it + 247 improving invalid buffer manipulation exception messages + 258 Http request to origin server over https proxy contains absolute URL @@ -988,6 +1013,8 @@ jetty-9.3.8.v20160314 - 14 March 2016 + 305 NPE when notifying the session listener if the channel is closed before a session has been opened + 316 Add *.chm mimetype mapping + + 343 ensure release deployment of test-jetty-webapp:war and + test-proxy-webapp:war + 346 HttpParser RFC2616 Compliance mode + 353 Jetty Client doesn't forward authentication headers with redirects when using proxy @@ -1006,6 +1033,7 @@ jetty-9.3.8.v20160314 - 14 March 2016 + 386 Explicit Authorization header is dropped when handling 407s + 397 Multipart EOF handling + 402 Don't use Thread.isAlive() in ShutdownMonitor + + 405 adding testcase for problematic HttpURI parsing of path params + 406 GzipHandler: allow to override the Vary response header + 407 JSR356 Server WebSocket Sessions no longer being tracked + 408 Http client does not work on https with proxy @@ -1100,6 +1128,7 @@ jetty-9.3.7.RC0 - 05 January 2016 + 482243 Fixed GzipHandler for Include + 482270 Expose upgrade request locales + 482272 Fixed relative symlink checking + + 482506 HTTP/2 load test with h2load fails + 482670 HttpURI wrongly parser URI paths starting with /@ + 482855 Content-Length omitted for POST requests with empty body + 482959 Local stream count never decrements when closing a stream causing @@ -1420,6 +1449,8 @@ jetty-9.3.0.v20150612 - 12 June 2015 + 452503 Start.jar --add-to-start=jstl results in GraphException: Unable to expand property in name: jsp-impl/${jsp-impl}-jstl + 453487 Recycle HttpChannelOverHTTP2 + + 453627 Fixed FileSystem test for nanosecond filesystems + + 453636 Improved spin detection on test + 453829 Added HeaderRegexRule + 453834 CDI Support for WebSocket + 454152 Remove mux remnants from WebSocketClient @@ -1430,6 +1461,7 @@ jetty-9.3.0.v20150612 - 12 June 2015 + 456956 Reduce ThreadLocal.remove() weak reference garbage + 457130 HTTPS request with IP host and HTTP proxy throws IllegalArgumentException. + + 457309 Add test to ensure GET and HEAD response headers same for gzip + 457508 Add flag to scan exploded jars in jetty-jspc-maven-plugin + 457788 Powered By in o.e.j.util.Jetty conditional on sendServerVersion + 458478 JarFileResource improve performance of exist method diff --git a/aggregates/jetty-all/pom.xml b/aggregates/jetty-all/pom.xml index 665303d7575..d20d594368e 100644 --- a/aggregates/jetty-all/pom.xml +++ b/aggregates/jetty-all/pom.xml @@ -2,108 +2,121 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../../pom.xml 4.0.0 org.eclipse.jetty.aggregate jetty-all Jetty :: Aggregate :: All core Jetty + UberJar for Core Jetty features + pom http://www.eclipse.org/jetty + + ${project.build.directory}/${project.artifactId}-${project.version}-uber.jar + ${project.build.directory}/gen-resources + - ${project.build.directory}/sources org.apache.maven.plugins - maven-dependency-plugin + maven-resources-plugin - unpack-dependencies + massage-manifest + generate-resources - unpack-dependencies + copy-resources - **/MANIFEST.MF,javax/** - javax - javax,org.eclipse.jetty.orbit,org.mortbay.jetty.npn,org.slf4j,org.ow2.asm - ${project.build.directory}/classes - false - true - - - - unpack-source - generate-sources - - unpack-dependencies - - - sources - **/* - META-INF/**,**/Servlet3Continuation*,**/Jetty6Continuation* - org.eclipse.jetty,org.eclipse.jetty.websocket - javax - javax,org.eclipse.jetty.orbit,org.mortbay.jetty.npn,org.slf4j,org.ow2.asm - ${project.build.directory}/sources - true - true - - - - - - org.apache.maven.plugins - - maven-jar-plugin - - - package - package - - jar - - - - - - - development - http://eclipse.org/jetty - ${user.name} - org.eclipse.jetty - http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/NOTICE.txt - Jetty - - + ${gen-resources-dir} + + + src/main/resources + true + + org.apache.maven.plugins - maven-javadoc-plugin + maven-shade-plugin + + + org.eclipse.jetty.toolchain + jetty-build-support + 1.3 + + - javadoc-jar - compile + uberjar + package - jar + shade + + true + uber + ${uber-jar} + + + + ${gen-resources-dir} + + + + + *:* + + META-INF/LICENSE.txt + META-INF/*.MF + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + javax:* + org.eclipse.jetty.orbit:* + org.mortbay.jetty:* + org.mortbay.jetty.alpn:* + org.slf4j:* + org.ow2.asm:* + *:javax + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + package + + attach-artifact + + + + + ${uber-jar} + jar + uber + + + - - - - org.apache.maven.plugins - maven-pmd-plugin - - true - - - - @@ -111,120 +124,109 @@ org.eclipse.jetty jetty-client ${project.version} - provided org.eclipse.jetty jetty-deploy ${project.version} - provided - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - provided - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - provided - - - org.eclipse.jetty.websocket - websocket-client - ${project.version} - provided - - - org.eclipse.jetty.spdy - spdy-http-server - ${project.version} - provided org.eclipse.jetty jetty-jmx ${project.version} - provided org.eclipse.jetty jetty-plus ${project.version} - provided org.eclipse.jetty jetty-annotations ${project.version} - provided org.eclipse.jetty jetty-util ${project.version} - provided org.eclipse.jetty jetty-jaspi ${project.version} - provided org.eclipse.jetty jetty-jndi ${project.version} - provided org.eclipse.jetty jetty-rewrite ${project.version} - provided org.eclipse.jetty jetty-servlets ${project.version} - provided org.eclipse.jetty jetty-quickstart ${project.version} - provided + + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + + + org.eclipse.jetty.websocket + javax-websocket-server-impl + ${project.version} + + + org.eclipse.jetty.websocket + websocket-client + ${project.version} + + + + org.eclipse.jetty + jetty-alpn-client + ${project.version} + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + + + org.eclipse.jetty.http2 + http2-client + ${project.version} javax.websocket javax.websocket-api - compile javax.servlet javax.servlet-api - compile javax.transaction javax.transaction-api - compile - true org.eclipse.jetty.orbit javax.mail.glassfish - compile - true org.slf4j slf4j-api - compile - true diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index 2a4954a901c..d00dde77d83 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 apache-jsp @@ -18,62 +18,32 @@ org.apache.felix maven-bundle-plugin true - - - generate-manifest - - manifest - Jetty-specific ServletContainerInitializer for Jasper - org.eclipse.jetty.apache.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", + org.eclipse.jetty.apache.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", org.eclipse.jetty.jsp.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" - osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer + osgi.serviceloader;osgi.serviceloader=javax.servlet.ServletContainerInitializer,osgi.serviceloader;osgi.serviceloader=org.apache.juli.logging.Log <_nouses>true - - org.apache.maven.plugins maven-jar-plugin - artifact-jar + nolog-jar jar - - - test-jar - - test-jar - - - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - config - + nolog + + META-INF/services/org.apache.juli.logging.Log + @@ -94,12 +64,7 @@ jetty-util ${project.version} - - org.eclipse.jetty - jetty-server - ${project.version} - - + org.eclipse.jetty.toolchain @@ -120,8 +85,28 @@ - org.eclipse.jetty.orbit - org.eclipse.jdt.core + org.eclipse.jdt.core.compiler + ecj + + + + + org.eclipse.jetty + jetty-servlet + ${project.version} + tests + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test diff --git a/apache-jstl/pom.xml b/apache-jstl/pom.xml index 7301e4b853a..2de59430d77 100644 --- a/apache-jstl/pom.xml +++ b/apache-jstl/pom.xml @@ -2,32 +2,25 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 apache-jstl Apache :: JSTL module http://tomcat.apache.org/taglibs/standard/ jar + + ${project.groupId}.apache.jstl + - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - + org.apache.maven.plugins + maven-surefire-plugin + + false + org.jacoco @@ -51,6 +44,34 @@ org.apache.taglibs taglibs-standard-impl + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + + org.eclipse.jetty + apache-jsp + ${project.version} + test + + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + diff --git a/examples/async-rest/async-rest-jar/pom.xml b/examples/async-rest/async-rest-jar/pom.xml index 987b7186c08..66dbe8f7b58 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 org.eclipse.jetty.example-async-rest @@ -10,6 +10,9 @@ jar Example Async Rest :: Jar http://www.eclipse.org/jetty + + ${project.groupId}.examples.asyc.rest + org.eclipse.jetty diff --git a/examples/async-rest/async-rest-webapp/pom.xml b/examples/async-rest/async-rest-webapp/pom.xml index e7dfc982480..ebc71af66d9 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.2.23-SNAPSHOT + 9.4.7-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 8fb25470bee..73ae49e27e9 100644 --- a/examples/async-rest/pom.xml +++ b/examples/async-rest/pom.xml @@ -2,9 +2,9 @@ org.eclipse.jetty.examples examples-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml - + 4.0.0 org.eclipse.jetty example-async-rest diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index a743a3ccafa..adc1b4d984c 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty.examples examples-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 @@ -11,7 +11,17 @@ Example :: Jetty Embedded Jetty Embedded Examples http://www.eclipse.org/jetty + + ${project.groupId}.embedded + + + + com.google.guava + guava + 18.0 + + org.eclipse.jetty jetty-util-ajax @@ -37,6 +47,11 @@ jetty-deploy ${project.version} + + org.eclipse.jetty + jetty-rewrite + ${project.version} + org.eclipse.jetty jetty-jmx @@ -53,8 +68,18 @@ ${project.version} - org.eclipse.jetty.spdy - spdy-http-server + org.eclipse.jetty.http2 + http2-server + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + + + org.eclipse.jetty + jetty-alpn-server ${project.version} @@ -105,5 +130,12 @@ jetty-test-helper + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + diff --git a/examples/pom.xml b/examples/pom.xml index 3045a9ed631..ada149dc692 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -1,27 +1,10 @@ - 4.0.0 org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml org.eclipse.jetty.examples @@ -42,7 +25,7 @@ async-rest diff --git a/jetty-alpn/jetty-alpn-client/pom.xml b/jetty-alpn/jetty-alpn-client/pom.xml index 360fcc813e2..436d7a06aa2 100644 --- a/jetty-alpn/jetty-alpn-client/pom.xml +++ b/jetty-alpn/jetty-alpn-client/pom.xml @@ -2,13 +2,11 @@ org.eclipse.jetty jetty-alpn-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-alpn-client - Jetty :: ALPN Client - Jetty ALPN client services - http://www.eclipse.org/jetty + Jetty :: ALPN :: Client ${project.groupId}.alpn.client @@ -31,15 +29,6 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - diff --git a/jetty-alpn/jetty-alpn-server/pom.xml b/jetty-alpn/jetty-alpn-server/pom.xml index e3942baa3c7..cb0073849a9 100644 --- a/jetty-alpn/jetty-alpn-server/pom.xml +++ b/jetty-alpn/jetty-alpn-server/pom.xml @@ -2,62 +2,16 @@ org.eclipse.jetty jetty-alpn-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-alpn-server - Jetty :: ALPN Server - Jetty ALPN server services - http://www.eclipse.org/jetty + Jetty :: ALPN :: Server ${project.groupId}.alpn.server - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.alpn,* - <_nouses>true - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - @@ -71,6 +25,32 @@ org.eclipse.jetty.alpn.* + + org.codehaus.mojo + build-helper-maven-plugin + + + parse-version + + parse-version + + + alpn + ${alpn.api.version} + + + + + + org.apache.felix + maven-bundle-plugin + + + ${bundle-symbolic-name};singleton:=true + org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}",* + + + diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod index 4eb78ef5fb2..eb50f520252 100644 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod @@ -1,6 +1,3 @@ -[name] -alpn-boot - [files] http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index 64186420ef4..1bba2c7810c 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -1,17 +1,29 @@ - + org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-alpn-parent pom Jetty :: ALPN :: Parent - Jetty ALPN services parent - http://www.eclipse.org/jetty jetty-alpn-server jetty-alpn-client + + + jdk9 + + [1.9,) + + + jetty-alpn-java-client + jetty-alpn-java-server + + + diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index effd2fd02ad..6eae9da4656 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-annotations @@ -14,53 +14,15 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.apache.felix maven-bundle-plugin true - - - generate-manifest - - manifest - - javax.servlet.*;version="[2.6.0,3.2)",org.objectweb.asm.*;version=5,* osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - org.codehaus.mojo diff --git a/jetty-ant/pom.xml b/jetty-ant/pom.xml index bec996c369b..41444181f21 100644 --- a/jetty-ant/pom.xml +++ b/jetty-ant/pom.xml @@ -2,13 +2,16 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-ant jar Jetty :: Ant Plugin + + org.eclipse.jetty.ant + @@ -22,8 +25,8 @@ org.eclipse.jetty - org.eclipse.jetty.orbit,org.eclipse.jetty.spdy,org.eclipse.jetty.websocket,org.eclipse.jetty.drafts - jetty-all,jetty-start,jetty-monitor,jetty-jsp + org.eclipse.jetty.orbit,org.eclipse.jetty.websocket,org.eclipse.jetty.drafts + jetty-all,jetty-start jar ${project.build.directory}/test-lib diff --git a/jetty-bom/pom.xml b/jetty-bom/pom.xml index edcbfcac85e..9b8ad9eafbb 100644 --- a/jetty-bom/pom.xml +++ b/jetty-bom/pom.xml @@ -146,11 +146,6 @@ cdi-servlet ${project.version} - - org.eclipse.jetty.cdi - cdi-websocket - ${project.version} - org.eclipse.jetty jetty-client diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index 968598327c6..c5009680e62 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 @@ -15,50 +15,6 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.net.*,* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin @@ -92,6 +48,43 @@ + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + true + hybrid + + + org.eclipse.jetty:jetty-http + org.eclipse.jetty:jetty-io + org.eclipse.jetty:jetty-util + + + + + org.eclipse.jetty.http + org.eclipse.jetty.client.shaded.http + + + org.eclipse.jetty.io + org.eclipse.jetty.client.shaded.io + + + org.eclipse.jetty.util + org.eclipse.jetty.client.shaded.util + + + + + + diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java index 3153a20ba5e..d4d14dc3f7d 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpChannelOverHTTP.java @@ -31,6 +31,7 @@ import org.eclipse.jetty.http.HttpFields; import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.http.HttpHeaderValue; import org.eclipse.jetty.http.HttpMethod; +import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpVersion; public class HttpChannelOverHTTP extends HttpChannel @@ -142,6 +143,8 @@ public class HttpChannelOverHTTP extends HttpChannel closeReason = "failure"; else if (receiver.isShutdown()) closeReason = "server close"; + else if (sender.isShutdown()) + closeReason = "client close"; if (closeReason == null) { @@ -156,7 +159,7 @@ public class HttpChannelOverHTTP extends HttpChannel } else { - // HTTP 1.1 or greater closes only if it has an explicit close. + // HTTP 1.1 closes only if it has an explicit close. if (responseHeaders.contains(HttpHeader.CONNECTION, HttpHeaderValue.CLOSE.asString())) closeReason = "http/1.1"; } @@ -170,7 +173,10 @@ public class HttpChannelOverHTTP extends HttpChannel } else { - release(); + if (response.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101) + connection.remove(); + else + release(); } } diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java index 0a993756633..b2c7751a537 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java @@ -24,6 +24,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpCookie; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.URI; @@ -1581,62 +1582,86 @@ public class HttpClientTest extends AbstractHttpClientServerTest } @Test - public void testCONNECTWithHTTP10() throws Exception + public void testCopyRequest() throws Exception { - try (ServerSocket server = new ServerSocket(0)) + startClient(); + + assertCopyRequest(client.newRequest("http://example.com/some/url") + .method(HttpMethod.HEAD) + .version(HttpVersion.HTTP_2) + .content(new StringContentProvider("some string")) + .timeout(321, TimeUnit.SECONDS) + .idleTimeout(2221, TimeUnit.SECONDS) + .followRedirects(true) + .header(HttpHeader.CONTENT_TYPE, "application/json") + .header("X-Some-Custom-Header", "some-value")); + + assertCopyRequest(client.newRequest("https://example.com") + .method(HttpMethod.POST) + .version(HttpVersion.HTTP_1_0) + .content(new StringContentProvider("some other string")) + .timeout(123231, TimeUnit.SECONDS) + .idleTimeout(232342, TimeUnit.SECONDS) + .followRedirects(false) + .header(HttpHeader.ACCEPT, "application/json") + .header("X-Some-Other-Custom-Header", "some-other-value")); + + assertCopyRequest(client.newRequest("https://example.com") + .header(HttpHeader.ACCEPT, "application/json") + .header(HttpHeader.ACCEPT, "application/xml") + .header("x-same-name", "value1") + .header("x-same-name", "value2")); + + assertCopyRequest(client.newRequest("https://example.com") + .header(HttpHeader.ACCEPT, "application/json") + .header(HttpHeader.CONTENT_TYPE, "application/json")); + + assertCopyRequest(client.newRequest("https://example.com") + .header("Accept", "application/json") + .header("Content-Type", "application/json")); + + assertCopyRequest(client.newRequest("https://example.com") + .header("X-Custom-Header-1", "value1") + .header("X-Custom-Header-2", "value2")); + + assertCopyRequest(client.newRequest("https://example.com") + .header("X-Custom-Header-1", "value") + .header("X-Custom-Header-2", "value")); + } + + @Test + public void testHostWithHTTP10() throws Exception + { + start(new AbstractHandler() { - startClient(); - - String host = "localhost"; - int port = server.getLocalPort(); - - Request request = client.newRequest(host, port) - .method(HttpMethod.CONNECT) - .version(HttpVersion.HTTP_1_0); - FuturePromise promise = new FuturePromise<>(); - client.getDestination("http", host, port).newConnection(promise); - Connection connection = promise.get(5, TimeUnit.SECONDS); - FutureResponseListener listener = new FutureResponseListener(request); - connection.send(request, listener); - - try (Socket socket = server.accept()) + @Override + public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - InputStream input = socket.getInputStream(); - consume(input, false); - - // HTTP/1.0 response, the client must not close the connection. - String httpResponse = "" + - "HTTP/1.0 200 OK\r\n" + - "\r\n"; - OutputStream output = socket.getOutputStream(); - output.write(httpResponse.getBytes(StandardCharsets.UTF_8)); - output.flush(); - - ContentResponse response = listener.get(5, TimeUnit.SECONDS); - Assert.assertEquals(200, response.getStatus()); - - // Because the tunnel was successful, this connection will be - // upgraded to an SslConnection, so it will not be fill interested. - // This test doesn't upgrade, so it needs to restore the fill interest. - ((AbstractConnection)connection).fillInterested(); - - // Test that I can send another request on the same connection. - request = client.newRequest(host, port); - listener = new FutureResponseListener(request); - connection.send(request, listener); - - consume(input, false); - - httpResponse = "" + - "HTTP/1.1 200 OK\r\n" + - "Content-Length: 0\r\n" + - "\r\n"; - output.write(httpResponse.getBytes(StandardCharsets.UTF_8)); - output.flush(); - - listener.get(5, TimeUnit.SECONDS); + baseRequest.setHandled(true); + Assert.assertThat(request.getHeader("Host"), Matchers.notNullValue()); } - } + }); + + ContentResponse response = client.newRequest("localhost", connector.getLocalPort()) + .scheme(scheme) + .version(HttpVersion.HTTP_1_0) + .timeout(5, TimeUnit.SECONDS) + .send(); + + Assert.assertEquals(200, response.getStatus()); + } + + private void assertCopyRequest(Request original) + { + Request copy = client.copyRequest((HttpRequest) original, original.getURI()); + Assert.assertEquals(original.getURI(), copy.getURI()); + Assert.assertEquals(original.getMethod(), copy.getMethod()); + Assert.assertEquals(original.getVersion(), copy.getVersion()); + Assert.assertEquals(original.getContent(), copy.getContent()); + Assert.assertEquals(original.getIdleTimeout(), copy.getIdleTimeout()); + Assert.assertEquals(original.getTimeout(), copy.getTimeout()); + Assert.assertEquals(original.isFollowRedirects(), copy.isFollowRedirects()); + Assert.assertEquals(original.getHeaders(), copy.getHeaders()); } private void consume(InputStream input, boolean eof) throws IOException diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml index b8feada6f57..134fa182c39 100644 --- a/jetty-continuation/pom.xml +++ b/jetty-continuation/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-continuation @@ -14,35 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index 0b8e780c2c9..a118eb6b171 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-deploy @@ -14,53 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.jmx.*;version="9.1";resolution:=optional,* - <_nouses>true - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 3756b100a0c..3df837a0f44 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -1,27 +1,35 @@ - - 4.0.0 + org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT + 4.0.0 jetty-distribution Jetty :: Distribution Assemblies - http://www.eclipse.org/jetty pom + ${basedir}/target/distribution - 1.0.1 + ${basedir}/target/home + + org.apache.maven.plugins maven-resources-plugin copy-base-assembly-tree - generate-resources + process-resources copy-resources @@ -68,6 +76,18 @@ + + removeKeystore + process-resources + + run + + + + + + + @@ -91,24 +111,39 @@ maven-dependency-plugin + - copy + unpack-jetty-home generate-resources - copy + unpack org.eclipse.jetty - jetty-project + jetty-home ${project.version} - version - txt + zip true - ${assembly-directory}/ - VERSION.txt + ${home-directory} + + META-INF/** + + + + + copy + process-resources + + copy + + + org.eclipse.jetty test-jetty-webapp @@ -169,80 +204,11 @@ ${assembly-directory}/demo-base/webapps async-rest.war - - org.eclipse.jetty - jetty-start - ${project.version} - jar - true - ** - ${assembly-directory} - start.jar - - - - - - copy-setuid-deps - generate-resources - - copy - - - - - org.eclipse.jetty.toolchain.setuid - jetty-setuid-java - ${jetty-setuid-version} - jar - true - ${assembly-directory}/lib/setuid - - - org.eclipse.jetty.toolchain.setuid - libsetuid-linux - ${jetty-setuid-version} - so - true - ${assembly-directory}/lib/setuid - libsetuid-linux.so - - - org.eclipse.jetty.toolchain.setuid - libsetuid-osx - ${jetty-setuid-version} - so - true - ${assembly-directory}/lib/setuid - libsetuid-osx.so - - unpack-setuid-config - process-resources - - unpack - - - - - org.eclipse.jetty.toolchain.setuid - jetty-setuid-java - ${jetty-setuid-version} - config - jar - true - ${assembly-directory} - - - META-INF/** - - - - unpack-test-webapp-config process-resources @@ -329,272 +295,35 @@ META-INF/** - - copy-lib-deps - generate-resources + unpack-documentation + process-resources - copy-dependencies - - - org.eclipse.jetty - org.eclipse.jetty.orbit,org.eclipse.jetty.spdy,org.eclipse.jetty.websocket,org.eclipse.jetty.fcgi,org.eclipse.jetty.toolchain,org.apache.taglibs - jetty-all,jetty-jsp,apache-jsp,apache-jstl,jetty-start,jetty-monitor,jetty-spring - jar - ${assembly-directory}/lib - - - - copy-lib-websocket-deps - generate-resources - - copy-dependencies - - - javax.websocket,org.eclipse.jetty.websocket - javax.websocket-client-api - jar - ${assembly-directory}/lib/websocket - - - - copy-lib-fcgi-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty.fcgi - jar - ${assembly-directory}/lib/fcgi - - - - copy-lib-spring-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty - jetty-spring - jar - ${assembly-directory}/lib/spring - - - - copy-lib-monitor-deps - generate-resources - - copy + unpack org.eclipse.jetty - jetty-monitor + jetty-documentation ${project.version} - jar + html + zip true - ${assembly-directory}/lib/monitor + ${assembly-directory}/demo-base/webapps/doc - - copy-servlet-api-deps - generate-resources - - copy - - - - - javax.servlet - javax.servlet-api - 3.1.0 - true - ${assembly-directory}/lib - servlet-api-3.1.jar - - - org.eclipse.jetty.toolchain - jetty-schemas - 3.1.M0 - true - ${assembly-directory}/lib - jetty-schemas-3.1.jar - - - - - - unpack-spdy - process-resources - - unpack-dependencies - - - org.eclipse.jetty.spdy - config - false - META-INF/** - ${assembly-directory} - - - - copy-lib-spdy-deps - process-resources - - copy-dependencies - - - org.eclipse.jetty.spdy - jar - ${assembly-directory}/lib/spdy - - - - copy-annotations-deps - generate-resources - - copy-dependencies - - - javax.annotation,org.eclipse.jetty.orbit,org.ow2.asm - javax.annotation-api,asm,asm-commons - jar - ${assembly-directory}/lib/annotations - - - - - copy-jta-deps - generate-resources - - copy-dependencies - - - javax.transaction - javax.transaction-api - jar - ${assembly-directory}/lib/jndi - - - - copy-jndi-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty.orbit - javax.mail.glassfish - jar - ${assembly-directory}/lib/jndi - - - - copy-glassfish-jsp-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty.orbit,org.glassfish.web, org.glassfish, javax.el, javax.servlet.jsp, org.eclipse.jetty.toolchain, org.eclipse.jetty - org.eclipse.jdt.core, javax.servlet.jsp-api, javax.servlet.jsp, jetty-jsp-jdt, javax.el-api, javax.el, jetty-jsp - jar - ${assembly-directory}/lib/jsp - - - - copy-apache-jsp-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty,org.eclipse.jetty.toolchain,org.mortbay.jasper,org.eclipse.jetty.orbit - apache-jsp,apache-el,org.eclipse.jdt.core - jar - true - ${assembly-directory}/lib/apache-jsp - - - - copy-jstl-api - generate-resources - - copy-dependencies - - - org.eclipse.jetty.orbit - javax.servlet.jsp.jstl - true - jar - ${assembly-directory}/lib/jsp - - - - copy-jstl-impl - generate-resources - - copy-dependencies - - - org.glassfish.web - javax.servlet.jsp.jstl - jar - ${assembly-directory}/lib/jsp - - - - copy-apache-jstl-deps - generate-resources - - copy-dependencies - - - org.glassfish.web - taglibs-standard-spec,taglibs-standard-impl - true - jar - ${assembly-directory}/lib/apache-jstl - - - - copy-jaspi-deps - generate-resources - - copy-dependencies - - - org.eclipse.jetty.orbit - javax.security.auth.message - jar - ${assembly-directory}/lib/jaspi - - - - unpack-config-deps - generate-resources - - unpack-dependencies - - - org.eclipse.jetty,org.eclipse.jetty.websocket - config - false - META-INF/** - ${assembly-directory} - - org.codehaus.mojo exec-maven-plugin + setup home process-classes @@ -610,16 +339,18 @@ java + - setup demo-base + setup demo-base-startd process-classes org.eclipse.jetty.start.Main jetty.home=${assembly-directory} jetty.base=${assembly-directory}/demo-base - --add-to-start=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets - --add-to-startd=jsp,jstl,http,https + --add-to-startd=server,continuation,deploy,websocket,ext,resources,client,annotations,jndi,servlets,jsp,jstl,http,https @@ -665,62 +396,13 @@ + - - - org.eclipse.jetty.orbit - javax.mail.glassfish - - - org.eclipse.jetty.orbit - javax.security.auth.message - - - - javax.annotation - javax.annotation-api - - - javax.transaction - javax.transaction-api - - - - org.glassfish.web - javax.servlet.jsp.jstl - - - - org.glassfish.web - javax.servlet.jsp - - - org.eclipse.jetty.toolchain - jetty-jsp-jdt - - - javax.servlet.jsp - javax.servlet.jsp-api - - - org.glassfish - javax.el - - - - org.ow2.asm - asm - - - org.ow2.asm - asm-commons - - - org.eclipse.jetty - jetty-deploy + jetty-home ${project.version} + pom org.eclipse.jetty @@ -734,159 +416,6 @@ war ${project.version} - - org.eclipse.jetty - jetty-jmx - ${project.version} - - - org.eclipse.jetty - jetty-monitor - ${project.version} - - - org.eclipse.jetty - jetty-quickstart - ${project.version} - - - org.eclipse.jetty - jetty-start - ${project.version} - - - org.eclipse.jetty - jetty-servlets - ${project.version} - - - org.eclipse.jetty.websocket - websocket-servlet - ${project.version} - - - org.eclipse.jetty.websocket - websocket-server - ${project.version} - - - org.eclipse.jetty.websocket - javax-websocket-server-impl - ${project.version} - - - org.eclipse.jetty - jetty-jsp - ${project.version} - - - org.eclipse.jetty - apache-jsp - ${project.version} - - - org.eclipse.jetty - apache-jstl - ${project.version} - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-client - ${project.version} - - - org.eclipse.jetty - jetty-continuation - ${project.version} - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - org.eclipse.jetty.fcgi - fcgi-server - ${project.version} - - - org.eclipse.jetty - jetty-spring - ${project.version} - - - - org.eclipse.jetty - jetty-cdi - ${project.version} - - - org.eclipse.jetty - jetty-jaas - ${project.version} - - - org.eclipse.jetty - jetty-annotations - ${project.version} - - - org.eclipse.jetty - jetty-rewrite - ${project.version} - - - org.eclipse.jetty.spdy - spdy-core - ${project.version} - - - org.eclipse.jetty.spdy - spdy-server - ${project.version} - - - org.eclipse.jetty.spdy - spdy-http-server - ${project.version} - - - org.eclipse.jetty.spdy - spdy-example-webapp - ${project.version} - war - - - org.eclipse.jetty - jetty-infinispan - ${project.version} - - - org.eclipse.jetty - jetty-hazelcast - ${project.version} - - - org.eclipse.jetty.gcloud - jetty-gcloud-session-manager - ${project.version} - - - org.eclipse.jetty.gcloud - jetty-gcloud-memcached-session-manager - ${project.version} - org.eclipse.jetty.example-async-rest example-async-rest-webapp @@ -895,8 +424,10 @@ org.eclipse.jetty - jetty-jaspi + jetty-documentation ${project.version} + html + zip diff --git a/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc b/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc index ddd13a71721..6f36fb4d379 100644 --- a/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/sessions/chapter.adoc @@ -17,10 +17,24 @@ [[session-management]] == Session Management -include::setting-session-characteristics.adoc[] -include::using-persistent-sessions.adoc[] -include::session-clustering-jdbc.adoc[] -include::session-clustering-mongodb.adoc[] -include::session-clustering-infinispan.adoc[] +Sessions are a concept within the Servlet api which allow requests to store and retrieve information across the time a user spends in an application. +Choosing the correct session manager implementation is an important consideration for every application as each can fit and perform optimally in different situations. +If you need a simple in-memory session manager that can persist to disk then session management using the local file system can be a good place to start. +If you need a session manager that can work in a clustered scenario with multiple instances of Jetty, then the JDBC session manager can be an excellent option. +Jetty also offers more niche session managers that leverage backends such as MongoDB, Inifinispan, or even Google's Cloud Data Store. + +include::session-hierarchy.adoc[] +include::sessions-details.adoc[] +include::session-configuration-memory.adoc[] +include::session-configuration-file-system.adoc[] +include::session-configuration-jdbc.adoc[] +include::session-configuration-mongodb.adoc[] +include::session-configuration-infinispan.adoc[] include::session-configuration-hazelcast.adoc[] -include::session-clustering-gcloud-datastore.adoc[] \ No newline at end of file +include::session-configuration-gcloud.adoc[] +//include::setting-session-characteristics.adoc[] +//include::using-persistent-sessions.adoc[] +//include::session-clustering-jdbc.adoc[] +//include::session-clustering-mongodb.adoc[] +//include::session-clustering-infinispan.adoc[] +//include::session-clustering-gcloud-datastore.adoc[] diff --git a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc index e95a91a58c8..a424404e149 100644 --- a/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/sessions/session-configuration-hazelcast.adoc @@ -27,7 +27,7 @@ When using the Jetty distribution, you will first need to enable the `session-st mb-olamy:tmp-base olamy$ java -jar ../start.jar --create-startd MKDIR : ${jetty.base}/start.d INFO : Base directory was modified -mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=hazelcast-remote-sessions +mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=session-store-hazelcast-remote ALERT: There are enabled module(s) with licenses. The following 1 module(s): @@ -35,17 +35,21 @@ The following 1 module(s): + contains software not covered by the Eclipse Public License! + has not been audited for compliance with its license - Module: hazelcast-remote-sessions + Module: session-store-hazelcast-remote + Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license. + https://hazelcast.org/ + http://www.apache.org/licenses/LICENSE-2.0.html Proceed (y/N)? y -INFO: hazelcast-remote-sessions initialised in ${jetty.base}/start.ini -COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar -COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar -COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar -INFO: Base directory was modified +INFO : server transitively enabled, ini template available with --add-to-start=server +INFO : sessions transitively enabled, ini template available with --add-to-start=sessions +INFO : session-store-hazelcast-remote initialized in ${jetty.base}/start.d/session-store-hazelcast-remote.ini +MKDIR : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2 +DOWNLD: http://central.maven.org/maven2/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar +MKDIR : ${jetty.base}/lib/hazelcast +COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-3.8.2.jar +COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast-client/3.8.2/hazelcast-client-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-client-3.8.2.jar +INFO : Base directory was modified ---- Doing this enables the remote Hazelcast Session module and any dependent modules or files needed for it to run on the server. @@ -64,19 +68,42 @@ ____ ==== Configuring Hazelcast Remote Properties -Opening the `start.ini` will show a list of all the configurable options for the Hazelcast module: +Opening the `start.d/session-store-hazelcast-remote.ini` will show a list of all the configurable options for the Hazelcast module: [source, screen, subs="{sub-order}"] ---- # --------------------------------------- # Module: session-store-hazelcast-remote +# Enables session data store in a remote Hazelcast Map +# --------------------------------------- --module=session-store-hazelcast-remote +#jetty.session.hazelcast.mapName=jetty_sessions +#jetty.session.hazelcast.onlyClient=true #jetty.session.hazelcast.configurationLocation= +#jetty.session.gracePeriod.seconds=3600 +#jetty.session.savePeriod.seconds=0 ---- +jetty.session.hazelcast.mapName:: +Name of the Map in Hazelcast where sessions will be stored. +jetty.session.hazelcast.onlyClient:: +Hazelcast instance will be configured in client mode jetty.session.hazelcast.configurationLocation:: Path to an an Hazelcast xml configuration file +jetty.session.gracePeriod.seconds:: +Amount of time, in seconds, to wait for other nodes to be checked to verify an expired session is in fact expired throughout the cluster before closing it. +jetty.session.savePeriod.seconds=0:: +By default whenever the last concurrent request leaves a session, that session is always persisted via the `SessionDataStore`, even if the only thing that changed on the session is its updated last access time. +A non-zero value means that the `SessionDataStore` will skip persisting the session if only the access time changed, and it has been less than `savePeriod` seconds since the last time the session was written. ++ +____ +[NOTE] +Configuring `savePeriod` is useful if your persistence technology is very slow/costly for writes. +In a clustered environment, there is a risk of the last access time of the session being out-of-date in the shared store for up to `savePeriod` seconds. +This allows the possibility that a node may prematurely expire the session, even though it is in use by another node. +Thorough consideration of the `maxIdleTime` of the session when setting the `savePeriod` is imperative - there is no point in setting a `savePeriod` that is larger than the `maxIdleTime`. +____ ==== Configuring Embedded Hazelcast Clustering @@ -88,7 +115,7 @@ To enable this you will first need to enable the `session-store-hazelcast-embedd mb-olamy:tmp-base olamy$ java -jar ../start.jar --create-startd MKDIR : ${jetty.base}/start.d INFO : Base directory was modified -mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=hazelcast-embedded-sessions +mb-olamy:tmp-base olamy$ java -jar ../start.jar --add-to-start=session-store-hazelcast-embedded ALERT: There are enabled module(s) with licenses. The following 1 module(s): @@ -96,17 +123,20 @@ The following 1 module(s): + contains software not covered by the Eclipse Public License! + has not been audited for compliance with its license - Module: hazelcast-embedded-sessions + Module: session-store-hazelcast-embedded + Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license. + https://hazelcast.org/ + http://www.apache.org/licenses/LICENSE-2.0.html Proceed (y/N)? y -INFO: hazelcast-embedded-sessions initialised in ${jetty.base}/start.ini -COPY: /Users/olamy/repository/com/hazelcast/hazelcast-all/3.8.2/hazelcast-all-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-all-3.8.2.jar -COPY: /Users/olamy/repository/com/hazelcast/hazelcast-jetty9-sessionmanager/1.0.2/hazelcast-jetty9-sessionmanager-1.0.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-jetty9-sessionmanager-1.0.2.jar -COPY: /Users/olamy/repository/org/eclipse/jetty/jetty-nosql/9.3.21-SNAPSHOT/jetty-nosql-9.3.21-SNAPSHOT.jar to ${jetty.base}/lib/hazelcast/jetty-nosql-9.3.21-SNAPSHOT.jar -INFO: Base directory was modified +INFO : server transitively enabled, ini template available with --add-to-start=server +INFO : sessions transitively enabled, ini template available with --add-to-start=sessions +INFO : session-store-hazelcast-embedded initialized in ${jetty.base}/start.d/session-store-hazelcast-embedded.ini +MKDIR : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2 +DOWNLD: http://central.maven.org/maven2/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar +MKDIR : ${jetty.base}/lib/hazelcast +COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast/3.8.2/hazelcast-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-3.8.2.jar +COPY : /Users/olamy/mvn-repo/com/hazelcast/hazelcast-client/3.8.2/hazelcast-client-3.8.2.jar to ${jetty.base}/lib/hazelcast/hazelcast-client-3.8.2.jar ---- Doing this enables the embedded Hazelcast Session module and any dependent modules or files needed for it to run on the server. @@ -120,15 +150,35 @@ In addition to adding these modules to the classpath of the server it also added ==== Configuring Hazelcast Embedded Properties -Opening the `start.ini` will show a list of all the configurable options for the Hazelcast module: +Opening the `start.d/start.d/session-store-hazelcast-embedded.ini` will show a list of all the configurable options for the Hazelcast module: [source, screen, subs="{sub-order}"] ---- # --------------------------------------- -# Module: hazelcast-embedded-sessions ---module=hazelcast-embedded-sessions +# Module: session-store-hazelcast-embedded +# Enables session data store in an embedded Hazelcast Map +# --------------------------------------- +--module=session-store-hazelcast-embedded +#jetty.session.hazelcast.mapName=jetty_sessions #jetty.session.hazelcast.configurationLocation= +#jetty.session.gracePeriod.seconds=3600 +#jetty.session.savePeriod.seconds=0 ---- +jetty.session.hazelcast.mapName:: +Name of the Map in Hazelcast where sessions will be stored. +jetty.session.gracePeriod.seconds:: +Amount of time, in seconds, to wait for other nodes to be checked to verify an expired session is in fact expired throughout the cluster before closing it. jetty.session.hazelcast.configurationLocation:: Path to an an Hazelcast xml configuration file +jetty.session.savePeriod.seconds=0:: +By default whenever the last concurrent request leaves a session, that session is always persisted via the `SessionDataStore`, even if the only thing that changed on the session is its updated last access time. +A non-zero value means that the `SessionDataStore` will skip persisting the session if only the access time changed, and it has been less than `savePeriod` seconds since the last time the session was written. ++ +____ +[NOTE] +Configuring `savePeriod` is useful if your persistence technology is very slow/costly for writes. +In a clustered environment, there is a risk of the last access time of the session being out-of-date in the shared store for up to `savePeriod` seconds. +This allows the possibility that a node may prematurely expire the session, even though it is in use by another node. +Thorough consideration of the `maxIdleTime` of the session when setting the `savePeriod` is imperative - there is no point in setting a `savePeriod` that is larger than the `maxIdleTime`. +____ diff --git a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc index bace232bf7d..fd749015d61 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc @@ -637,10 +637,9 @@ KeyIdentifier [ ******************************************* ---- -Additionally, you can split `$JETTY/etc/keystore` into two files. -One being `$JETTY/etc/keystore` which only contains the server’s private key and certificate, while the other would be `$JETTY/etc/truststore` which contains intermediary CA and root CA. - -An example of this would look like the following: +In addition, you can split `$JETTY/etc/keystore` as two files. +One is `$JETTY/etc/keystore` which only contains the server’s private key and certificate, +the other is `$JETTY/etc/truststore` which contains intermediary CA and root CA. [literal] .The structure of `$JETTY/etc/keystore` @@ -688,7 +687,7 @@ setKeyStorePath:: The configured keystore to use for all SSL/TLS in configured Jetty Connector (or Client). ____ [NOTE] -As the keystore is vital security information, it recommended the file is located in a directory with *very* restricted access. +As a keystore is vital security information, it can be desirable to locate the file in a directory with *very* restricted access. ____ setKeyStorePassword:: @@ -713,7 +712,7 @@ ____ ____ [CAUTION] -The keystore and truststore passwords may also be set using the system properties: `org.eclipse.jetty.ssl.keypassword` and `org.eclipse.jetty.ssl.password`. +The keystore and truststore passwords may also be set using the system properties: `org.eclipse.jetty.ssl.keypassword` `org.eclipse.jetty.ssl.password`. This is _not_ a recommended usage. ____ @@ -802,8 +801,7 @@ jetty.sslContext.needClientAuth=true [[configuring-sslcontextfactory-cipherSuites]] ==== Disabling/Enabling Specific Cipher Suites -To avoid specific attacks it is often necessary to configure a specific set of cipher suites to include or exclude. -This can either be done via link:{JDURL}/org/eclipse/jetty/util/ssl/SslContextFactory.html#setIncludeCipherSuites(java.lang.String...)[SslContext.setIncludeCipherSuites(java.lang.String...)] or vialink:{JDURL}/org/eclipse/jetty/util/ssl/SslContextFactory.html#setExcludeCipherSuites(java.lang.String...)[SslContext.setExcludeCipherSuites(java.lang.String...)]. +As an example, to avoid the BEAST attack it is necessary to configure a specific set of cipher suites. This can either be done via link:{JDURL}/org/eclipse/jetty/util/ssl/SslContextFactory.html#setIncludeCipherSuites(java.lang.String...)[SslContext.setIncludeCipherSuites(java.lang.String...)] or vialink:{JDURL}/org/eclipse/jetty/util/ssl/SslContextFactory.html#setExcludeCipherSuites(java.lang.String...)[SslContext.setExcludeCipherSuites(java.lang.String...)]. ____ [NOTE] 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-fcgi/fcgi-client/pom.xml b/jetty-fcgi/fcgi-client/pom.xml index 979277db374..7bce605bb2f 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-fcgi/fcgi-server/pom.xml b/jetty-fcgi/fcgi-server/pom.xml index 3f185cbae1c..62b9bc50373 100644 --- a/jetty-fcgi/fcgi-server/pom.xml +++ b/jetty-fcgi/fcgi-server/pom.xml @@ -1,73 +1,67 @@ - - org.eclipse.jetty.fcgi - fcgi-parent - 9.2.23-SNAPSHOT - + + org.eclipse.jetty.fcgi + fcgi-parent + 9.4.7-SNAPSHOT + - 4.0.0 - fcgi-server - Jetty :: FastCGI :: Server + 4.0.0 + fcgi-server + Jetty :: FastCGI :: Server - - ${project.groupId}.server - + + ${project.groupId}.server + - - - - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - - - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty.fcgi - fcgi-client - ${project.version} - - - org.eclipse.jetty - jetty-proxy - ${project.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - - - org.eclipse.jetty - jetty-servlet - ${project.version} - test - - - org.eclipse.jetty.spdy - spdy-http-server - ${project.version} - test - - + + + + + + + javax.servlet + javax.servlet-api + + + org.eclipse.jetty.fcgi + fcgi-client + ${project.version} + + + org.eclipse.jetty + jetty-proxy + ${project.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-servlet + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + + diff --git a/jetty-fcgi/pom.xml b/jetty-fcgi/pom.xml index 4823bb33b55..590026f17e6 100644 --- a/jetty-fcgi/pom.xml +++ b/jetty-fcgi/pom.xml @@ -3,7 +3,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-hazelcast/pom.xml b/jetty-hazelcast/pom.xml index 163f40e24bd..3732b0a9b6e 100644 --- a/jetty-hazelcast/pom.xml +++ b/jetty-hazelcast/pom.xml @@ -1,19 +1,68 @@ + org.eclipse.jetty jetty-project - 9.3.21-SNAPSHOT + 9.4.7-SNAPSHOT + 4.0.0 jetty-hazelcast - Jetty :: Hazelcast Session Managers - http://www.eclipse.org/jetty + Jetty :: Hazelcast Session Manager + - ${project.groupId}.hazelcast - 1.0.2 3.8.2 + ${project.groupId}.hazelcast + + + + com.hazelcast + hazelcast + ${hazelcast.version} + test-jar + + + com.hazelcast + hazelcast-client + ${hazelcast.version} + + + com.hazelcast + hazelcast + ${hazelcast.version} + + + org.eclipse.jetty + jetty-server + ${project.version} + + + org.eclipse.jetty + jetty-webapp + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-servlet + ${project.version} + test + + + org.eclipse.jetty.websocket + websocket-server + ${project.version} + test + + + org.eclipse.jetty.toolchain + jetty-test-helper + test + + + @@ -33,32 +82,7 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - - com.hazelcast - hazelcast-jetty9-sessionmanager - ${hazelcast.sessionManager.version} - - - com.hazelcast - hazelcast-all - ${hazelcast.version} - - - org.eclipse.jetty - jetty-server - ${project.version} - - + diff --git a/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/default.xml b/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/default.xml index 3c666c3d3fd..680e6f07d3f 100644 --- a/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/default.xml +++ b/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/default.xml @@ -3,17 +3,19 @@ - - - - - - - - - - false - - - \ No newline at end of file + + + + + + + + + + + + + + + diff --git a/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/remote.xml b/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/remote.xml index 47aa62e1b69..ca32fcff21d 100644 --- a/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/remote.xml +++ b/jetty-hazelcast/src/main/config/etc/sessions/hazelcast/remote.xml @@ -4,16 +4,18 @@ - + + - - - - - - - true - - - - \ No newline at end of file + + + + + + + + + + + + diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod new file mode 100644 index 00000000000..daa55012162 --- /dev/null +++ b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod @@ -0,0 +1,34 @@ +[description] +Enables session data store in an embedded Hazelcast Map + +[tags] +session + +[provides] +session-store + +[depend] +sessions + +[files] +maven://com.hazelcast/hazelcast/3.8.2|lib/hazelcast/hazelcast-3.8.2.jar + +[xml] +etc/sessions/hazelcast/default.xml + +[lib] +lib/jetty-hazelcast-${jetty.version}.jar +lib/hazelcast/*.jar + +[license] +Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license. +https://hazelcast.org/ +http://www.apache.org/licenses/LICENSE-2.0.html + + +[ini-template] +jetty.session.hazelcast.mapName=jetty-distributed-session-map +jetty.session.hazelcast.hazelcastInstanceName=JETTY_DISTRIBUTED_SESSION_INSTANCE +#jetty.session.hazelcast.configurationLocation= +jetty.session.gracePeriod.seconds=3600 +jetty.session.savePeriod.seconds=0 \ No newline at end of file diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod new file mode 100644 index 00000000000..55baa0e3d68 --- /dev/null +++ b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod @@ -0,0 +1,36 @@ +[description] +Enables session data store in a remote Hazelcast Map + +[tags] +session + +[provides] +session-store + +[depend] +sessions + +[files] +maven://com.hazelcast/hazelcast/3.8.2|lib/hazelcast/hazelcast-3.8.2.jar +maven://com.hazelcast/hazelcast-client/3.8.2|lib/hazelcast/hazelcast-client-3.8.2.jar + +[xml] +etc/sessions/hazelcast/remote.xml + +[lib] +lib/jetty-hazelcast-${jetty.version}.jar +lib/hazelcast/*.jar + +[license] +Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license. + https://hazelcast.org/ +http://www.apache.org/licenses/LICENSE-2.0.html + + +[ini-template] +jetty.session.hazelcast.mapName=jetty-distributed-session-map +jetty.session.hazelcast.hazelcastInstanceName=JETTY_DISTRIBUTED_SESSION_INSTANCE +jetty.session.hazelcast.onlyClient=true +#jetty.session.hazelcast.configurationLocation= +jetty.session.gracePeriod.seconds=3600 +jetty.session.savePeriod.seconds=0 \ No newline at end of file diff --git a/jetty-home/pom.xml b/jetty-home/pom.xml index e9a654f98f2..2379629a38f 100644 --- a/jetty-home/pom.xml +++ b/jetty-home/pom.xml @@ -483,23 +483,11 @@ jetty-spring ${project.version} - org.eclipse.jetty.cdi cdi-servlet ${project.version} - - org.eclipse.jetty.cdi - cdi-websocket - ${project.version} - org.eclipse.jetty jetty-jaas diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index e283cd587be..9b7a447e6fa 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-http-spi @@ -32,35 +32,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin @@ -68,6 +39,19 @@ org.eclipse.jetty.http.spi.* + + org.apache.felix + maven-bundle-plugin + true + + + Jetty Http SPI + osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" + osgi.serviceloader; osgi.serviceloader=com.sun.net.httpserver.spi.HttpServerProvider + <_nouses>true + + + org.jacoco jacoco-maven-plugin 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 1c3d5c3ff15..878e3b752ca 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-2017 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-2017 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 717c4d4b586..23ece00fba1 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-2017 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-2017 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 732f97f94a7..dc9f9cfc122 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-2017 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-2017 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 2acf634d45d..60f3032600f 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,79 +1,79 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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); - jettyHttpServer.bind(addr, backlog); - return jettyHttpServer; - } - - @Override - public HttpsServer createHttpsServer(InetSocketAddress addr, int backlog) throws IOException - { - throw new UnsupportedOperationException(); - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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); + jettyHttpServer.bind(addr, backlog); + return jettyHttpServer; + } + + @Override + public HttpsServer createHttpsServer(InetSocketAddress addr, int backlog) throws IOException + { + throw new UnsupportedOperationException(); + } + +} diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml index efb7fc9b4d8..6f40141cfe6 100644 --- a/jetty-http/pom.xml +++ b/jetty-http/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-http @@ -18,6 +18,11 @@ jetty-util ${project.version}
    + + org.eclipse.jetty + jetty-io + ${project.version} + org.eclipse.jetty.toolchain jetty-test-helper @@ -30,29 +35,20 @@ org.apache.felix maven-bundle-plugin true - - - - manifest - - javax.servlet.*;version="[2.6.0,3.2)",javax.net.*,* + osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional + + osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.http.HttpFieldPreEncoder - - org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar @@ -60,11 +56,6 @@ - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - org.codehaus.mojo @@ -73,6 +64,7 @@ org.eclipse.jetty.http.* + diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java b/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java index 3a001eb8f7d..ab9aaa1a20a 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/Syntax.java @@ -1,142 +1,142 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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; - -import java.util.Objects; - -/** - * Collection of Syntax validation methods. - *

    - * Use in a similar way as you would {@link java.util.Objects#requireNonNull(Object)} - *

    - */ -public final class Syntax -{ - - /** - * Per RFC2616: Section 2.2, a token follows these syntax rules - *
    -     *  token          = 1*<any CHAR except CTLs or separators>
    -     *  CHAR           = <any US-ASCII character (octets 0 - 127)>
    -     *  CTL            = <any US-ASCII control character
    -     *                   (octets 0 - 31) and DEL (127)>
    -     *  separators     = "(" | ")" | "<" | ">" | "@"
    -     *                 | "," | ";" | ":" | "\" | <">
    -     *                 | "/" | "[" | "]" | "?" | "="
    -     *                 | "{" | "}" | SP | HT
    -     * 
    - * - * @param value the value to test - * @param msg the message to be prefixed if an {@link IllegalArgumentException} is thrown. - * @throws IllegalArgumentException if the value is invalid per spec - */ - public static void requireValidRFC2616Token(String value, String msg) - { - Objects.requireNonNull(msg, "msg cannot be null"); - - if (value == null) - { - return; - } - - int valueLen = value.length(); - if (valueLen == 0) - { - return; - } - - for (int i = 0; i < valueLen; i++) - { - char c = value.charAt(i); - - // 0x00 - 0x1F are low order control characters - // 0x7F is the DEL control character - if ((c <= 0x1F) || (c == 0x7F)) - throw new IllegalArgumentException(msg + ": RFC2616 tokens may not contain control characters"); - if (c == '(' || c == ')' || c == '<' || c == '>' || c == '@' - || c == ',' || c == ';' || c == ':' || c == '\\' || c == '"' - || c == '/' || c == '[' || c == ']' || c == '?' || c == '=' - || c == '{' || c == '}' || c == ' ') - { - throw new IllegalArgumentException(msg + ": RFC2616 tokens may not contain separator character: [" + c + "]"); - } - if (c >= 0x80) - throw new IllegalArgumentException(msg + ": RFC2616 tokens characters restricted to US-ASCII: 0x" + Integer.toHexString(c)); - } - } - - /** - * Per RFC6265, Cookie.value follows these syntax rules - *
    -     *  cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
    -     *  cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
    -     *                      ; US-ASCII characters excluding CTLs,
    -     *                      ; whitespace DQUOTE, comma, semicolon,
    -     *                      ; and backslash
    -     * 
    - * - * @param value the value to test - * @throws IllegalArgumentException if the value is invalid per spec - */ - public static void requireValidRFC6265CookieValue(String value) - { - if (value == null) - { - return; - } - - int valueLen = value.length(); - if (valueLen == 0) - { - return; - } - - int i = 0; - if (value.charAt(0) == '"') - { - // Has starting DQUOTE - if (valueLen <= 1 || (value.charAt(valueLen - 1) != '"')) - { - throw new IllegalArgumentException("RFC6265 Cookie values must have balanced DQUOTES (if used)"); - } - - // adjust search range to exclude DQUOTES - i++; - valueLen--; - } - for (; i < valueLen; i++) - { - char c = value.charAt(i); - - // 0x00 - 0x1F are low order control characters - // 0x7F is the DEL control character - if ((c <= 0x1F) || (c == 0x7F)) - throw new IllegalArgumentException("RFC6265 Cookie values may not contain control characters"); - if ((c == ' ' /* 0x20 */) || - (c == '"' /* 0x2C */) || - (c == ';' /* 0x3B */) || - (c == '\\' /* 0x5C */)) - { - throw new IllegalArgumentException("RFC6265 Cookie values may not contain character: [" + c + "]"); - } - if (c >= 0x80) - throw new IllegalArgumentException("RFC6265 Cookie values characters restricted to US-ASCII: 0x" + Integer.toHexString(c)); - } - } -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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; + +import java.util.Objects; + +/** + * Collection of Syntax validation methods. + *

    + * Use in a similar way as you would {@link java.util.Objects#requireNonNull(Object)} + *

    + */ +public final class Syntax +{ + + /** + * Per RFC2616: Section 2.2, a token follows these syntax rules + *
    +     *  token          = 1*<any CHAR except CTLs or separators>
    +     *  CHAR           = <any US-ASCII character (octets 0 - 127)>
    +     *  CTL            = <any US-ASCII control character
    +     *                   (octets 0 - 31) and DEL (127)>
    +     *  separators     = "(" | ")" | "<" | ">" | "@"
    +     *                 | "," | ";" | ":" | "\" | <">
    +     *                 | "/" | "[" | "]" | "?" | "="
    +     *                 | "{" | "}" | SP | HT
    +     * 
    + * + * @param value the value to test + * @param msg the message to be prefixed if an {@link IllegalArgumentException} is thrown. + * @throws IllegalArgumentException if the value is invalid per spec + */ + public static void requireValidRFC2616Token(String value, String msg) + { + Objects.requireNonNull(msg, "msg cannot be null"); + + if (value == null) + { + return; + } + + int valueLen = value.length(); + if (valueLen == 0) + { + return; + } + + for (int i = 0; i < valueLen; i++) + { + char c = value.charAt(i); + + // 0x00 - 0x1F are low order control characters + // 0x7F is the DEL control character + if ((c <= 0x1F) || (c == 0x7F)) + throw new IllegalArgumentException(msg + ": RFC2616 tokens may not contain control characters"); + if (c == '(' || c == ')' || c == '<' || c == '>' || c == '@' + || c == ',' || c == ';' || c == ':' || c == '\\' || c == '"' + || c == '/' || c == '[' || c == ']' || c == '?' || c == '=' + || c == '{' || c == '}' || c == ' ') + { + throw new IllegalArgumentException(msg + ": RFC2616 tokens may not contain separator character: [" + c + "]"); + } + if (c >= 0x80) + throw new IllegalArgumentException(msg + ": RFC2616 tokens characters restricted to US-ASCII: 0x" + Integer.toHexString(c)); + } + } + + /** + * Per RFC6265, Cookie.value follows these syntax rules + *
    +     *  cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
    +     *  cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
    +     *                      ; US-ASCII characters excluding CTLs,
    +     *                      ; whitespace DQUOTE, comma, semicolon,
    +     *                      ; and backslash
    +     * 
    + * + * @param value the value to test + * @throws IllegalArgumentException if the value is invalid per spec + */ + public static void requireValidRFC6265CookieValue(String value) + { + if (value == null) + { + return; + } + + int valueLen = value.length(); + if (valueLen == 0) + { + return; + } + + int i = 0; + if (value.charAt(0) == '"') + { + // Has starting DQUOTE + if (valueLen <= 1 || (value.charAt(valueLen - 1) != '"')) + { + throw new IllegalArgumentException("RFC6265 Cookie values must have balanced DQUOTES (if used)"); + } + + // adjust search range to exclude DQUOTES + i++; + valueLen--; + } + for (; i < valueLen; i++) + { + char c = value.charAt(i); + + // 0x00 - 0x1F are low order control characters + // 0x7F is the DEL control character + if ((c <= 0x1F) || (c == 0x7F)) + throw new IllegalArgumentException("RFC6265 Cookie values may not contain control characters"); + if ((c == ' ' /* 0x20 */) || + (c == '"' /* 0x2C */) || + (c == ';' /* 0x3B */) || + (c == '\\' /* 0x5C */)) + { + throw new IllegalArgumentException("RFC6265 Cookie values may not contain character: [" + c + "]"); + } + if (c >= 0x80) + throw new IllegalArgumentException("RFC6265 Cookie values characters restricted to US-ASCII: 0x" + Integer.toHexString(c)); + } + } +} diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java b/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java index cfa020f4ba7..3b085274203 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Optional; import java.util.Set; import java.util.TreeSet; import java.util.function.Predicate; @@ -64,7 +65,7 @@ public class PathMappings implements Iterable>, Dumpable out.append("PathMappings[size=").append(Integer.toString(_mappings.size())).append("]\n"); ContainerLifeCycle.dump(out, indent, _mappings); } - + @ManagedAttribute(value = "mappings", readonly = true) public List> getMappings() { @@ -206,6 +207,18 @@ public class PathMappings implements Iterable>, Dumpable return pathSpecString.charAt(0) == '^' ? new RegexPathSpec(pathSpecString):new ServletPathSpec(pathSpecString); } + public E get(PathSpec spec) + { + Optional optionalResource = _mappings.stream() + .filter(mappedResource -> mappedResource.getPathSpec().equals(spec)) + .map(mappedResource -> mappedResource.getResource()) + .findFirst(); + if(!optionalResource.isPresent()) + return null; + + return optionalResource.get(); + } + public boolean put(String pathSpecString, E resource) { return put(asPathSpec(pathSpecString),resource); diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/SyntaxTest.java b/jetty-http/src/test/java/org/eclipse/jetty/http/SyntaxTest.java index eece45c1060..d174c3efee4 100644 --- a/jetty-http/src/test/java/org/eclipse/jetty/http/SyntaxTest.java +++ b/jetty-http/src/test/java/org/eclipse/jetty/http/SyntaxTest.java @@ -1,134 +1,134 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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; - -import static org.hamcrest.CoreMatchers.allOf; -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - -import org.junit.Test; - -public class SyntaxTest -{ - @Test - public void testRequireValidRFC2616Token_Good() - { - String tokens[] = { - "name", - "", - null, - "n.a.m.e", - "na-me", - "+name", - "na*me", - "na$me", - "#name" - }; - - for (String token : tokens) - { - Syntax.requireValidRFC2616Token(token, "Test Based"); - // No exception should occur here - } - } - - @Test - public void testRequireValidRFC2616Token_Bad() - { - String tokens[] = { - "\"name\"", - "name\t", - "na me", - "name\u0082", - "na\tme", - "na;me", - "{name}", - "[name]", - "\"" - }; - - for (String token : tokens) - { - try - { - Syntax.requireValidRFC2616Token(token, "Test Based"); - fail("RFC2616 Token [" + token + "] Should have thrown " + IllegalArgumentException.class.getName()); - } - catch (IllegalArgumentException e) - { - assertThat("Testing Bad RFC2616 Token [" + token + "]", e.getMessage(), - allOf(containsString("Test Based"), - containsString("RFC2616"))); - } - } - } - - @Test - public void testRequireValidRFC6265CookieValue_Good() - { - String values[] = { - "value", - "", - null, - "val=ue", - "val-ue", - "\"value\"", - "val/ue", - "v.a.l.u.e" - }; - - for (String value : values) - { - Syntax.requireValidRFC6265CookieValue(value); - // No exception should occur here - } - } - - @Test - public void testRequireValidRFC6265CookieValue_Bad() - { - String values[] = { - "va\tlue", - "\t", - "value\u0000", - "val\u0082ue", - "va lue", - "va;lue", - "\"value", - "value\"", - "val\\ue", - "val\"ue", - "\"" - }; - - for (String value : values) - { - try - { - Syntax.requireValidRFC6265CookieValue(value); - fail("RFC6265 Cookie Value [" + value + "] Should have thrown " + IllegalArgumentException.class.getName()); - } - catch (IllegalArgumentException e) - { - assertThat("Testing Bad RFC6265 Cookie Value [" + value + "]", e.getMessage(), containsString("RFC6265")); - } - } - } -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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; + +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; + +import org.junit.Test; + +public class SyntaxTest +{ + @Test + public void testRequireValidRFC2616Token_Good() + { + String tokens[] = { + "name", + "", + null, + "n.a.m.e", + "na-me", + "+name", + "na*me", + "na$me", + "#name" + }; + + for (String token : tokens) + { + Syntax.requireValidRFC2616Token(token, "Test Based"); + // No exception should occur here + } + } + + @Test + public void testRequireValidRFC2616Token_Bad() + { + String tokens[] = { + "\"name\"", + "name\t", + "na me", + "name\u0082", + "na\tme", + "na;me", + "{name}", + "[name]", + "\"" + }; + + for (String token : tokens) + { + try + { + Syntax.requireValidRFC2616Token(token, "Test Based"); + fail("RFC2616 Token [" + token + "] Should have thrown " + IllegalArgumentException.class.getName()); + } + catch (IllegalArgumentException e) + { + assertThat("Testing Bad RFC2616 Token [" + token + "]", e.getMessage(), + allOf(containsString("Test Based"), + containsString("RFC2616"))); + } + } + } + + @Test + public void testRequireValidRFC6265CookieValue_Good() + { + String values[] = { + "value", + "", + null, + "val=ue", + "val-ue", + "\"value\"", + "val/ue", + "v.a.l.u.e" + }; + + for (String value : values) + { + Syntax.requireValidRFC6265CookieValue(value); + // No exception should occur here + } + } + + @Test + public void testRequireValidRFC6265CookieValue_Bad() + { + String values[] = { + "va\tlue", + "\t", + "value\u0000", + "val\u0082ue", + "va lue", + "va;lue", + "\"value", + "value\"", + "val\\ue", + "val\"ue", + "\"" + }; + + for (String value : values) + { + try + { + Syntax.requireValidRFC6265CookieValue(value); + fail("RFC6265 Cookie Value [" + value + "] Should have thrown " + IllegalArgumentException.class.getName()); + } + catch (IllegalArgumentException e) + { + assertThat("Testing Bad RFC6265 Cookie Value [" + value + "]", e.getMessage(), containsString("RFC6265")); + } + } + } +} diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java index 1d674882c4a..e3092db044d 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HTTP2ServerConnection.java @@ -18,6 +18,7 @@ package org.eclipse.jetty.http2.server; +import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayDeque; diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml index 6a859cbf87e..d3dc774481b 100644 --- a/jetty-io/pom.xml +++ b/jetty-io/pom.xml @@ -2,7 +2,7 @@ jetty-project org.eclipse.jetty - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-io @@ -22,43 +22,9 @@ jetty-test-helper test
    - - org.mockito - mockito-core - test -
    - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index 0b210336b89..641a05935df 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-jaas @@ -13,52 +13,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - <_versionpolicy> - javax.sql.*,javax.security.*,javax.naming.*, - javax.servlet.*;version="[2.6.0,3.2)", - * - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml index 706d8759e2e..870a97c6a2a 100644 --- a/jetty-jaspi/pom.xml +++ b/jetty-jaspi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-jaspi @@ -10,57 +10,10 @@ Jetty security infrastructure http://www.eclipse.org/jetty - ${project.groupId}.jaspi + ${project.groupId}.security.jaspi - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",* - org.eclipse.jetty.security.jaspi.*;version="${parsedVersion.osgiVersion}" - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin @@ -70,6 +23,24 @@ + + + jdk9 + + [1.9,) + + + + + maven-surefire-plugin + + @{argLine} --add-modules java.se.ee + + + + + + org.eclipse.jetty @@ -85,7 +56,6 @@ org.eclipse.jetty.orbit javax.security.auth.message - org.apache.geronimo.components geronimo-jaspi diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index 7eb977a442d..18109574118 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-jmx @@ -14,52 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.management.*,* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.codehaus.mojo findbugs-maven-plugin @@ -80,6 +34,13 @@ jetty-util ${project.version} + + + com.openpojo + openpojo + 0.8.1 + test + diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml index 2b650f9af20..baf973f1c79 100644 --- a/jetty-jndi/pom.xml +++ b/jetty-jndi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-jndi diff --git a/jetty-jspc-maven-plugin/pom.xml b/jetty-jspc-maven-plugin/pom.xml index 06347d05d98..c10ff62f89d 100644 --- a/jetty-jspc-maven-plugin/pom.xml +++ b/jetty-jspc-maven-plugin/pom.xml @@ -2,31 +2,33 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-jspc-maven-plugin maven-plugin Jetty :: Jetty JSPC Maven Plugin + ${project.groupId}.jspc.plugin + org.apache.maven.plugins maven-surefire-plugin true + org.apache.maven.plugins maven-plugin-plugin - 2.9 exec-plugin-doc generate-sources - xdoc + descriptor helpmojo @@ -90,21 +92,20 @@ 1.8.4 - org.eclipse.jetty - apache-jstl - ${project.version} - -
    + org.eclipse.jetty + apache-jstl + ${project.version} + +
    - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.1 - - false - - + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + false + + project-team @@ -116,7 +117,7 @@ - - + + diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index 9449376b43d..d79f1c00fd1 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -2,12 +2,13 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-maven-plugin maven-plugin Jetty :: Jetty Maven Plugin + Jetty maven plugins 3.0.3 3.4 @@ -27,13 +28,11 @@ org.apache.maven.plugins maven-plugin-plugin - ${pluginToolsVersion} exec-plugin-doc generate-sources - xdoc helpmojo @@ -165,15 +164,14 @@
    - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.1 - - false - - + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + false + + project-team @@ -185,8 +183,8 @@ - - + + 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 8a20299896e..d713cb878b2 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-2017 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-2017 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-monitor/pom.xml b/jetty-monitor/pom.xml index baaa930e174..3374ec2e9e0 100644 --- a/jetty-monitor/pom.xml +++ b/jetty-monitor/pom.xml @@ -1,25 +1,9 @@ - + org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.0-SNAPSHOT 4.0.0 jetty-monitor @@ -31,52 +15,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.management.*,* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.apache.maven.plugins maven-surefire-plugin diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml index c45726f7dba..1adc155c95a 100644 --- a/jetty-nosql/pom.xml +++ b/jetty-nosql/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-nosql @@ -14,57 +14,6 @@ install - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - org.apache.felix - maven-bundle-plugin - - - javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.server.session.jmx;version="9.1";resolution:=optional,,org.eclipse.jetty.*;version="9.1",* - - - true - - - - manifest - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - @@ -87,7 +36,7 @@ org.mongodb mongo-java-driver - 2.6.1 + 2.13.2 jar compile diff --git a/jetty-osgi/jetty-osgi-alpn/pom.xml b/jetty-osgi/jetty-osgi-alpn/pom.xml index 1b453522d67..0287a75982b 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-osgi-alpn @@ -16,7 +16,6 @@ org.codehaus.mojo build-helper-maven-plugin - 1.7 parse-version @@ -25,26 +24,32 @@ ${alpn.api.version} + alpn - org.apache.maven.plugins - maven-jar-plugin + org.apache.felix + maven-bundle-plugin - - - 2 + ${bundle-symbolic-name};singleton:=true Jetty OSGi ALPN Fragment - ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} - org.eclipse.jetty.alpn;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + !javax.*;!org.eclipse.jetty.* + org.eclipse.jetty.alpn;version="${alpn.majorVersion}.${alpn.minorVersion}.${alpn.incrementalVersion}" system.bundle;extension:=framework - - + + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml index a91841f36ad..aaddee1b547 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-osgi-boot-jsp @@ -42,67 +42,14 @@ apache-jsp ${project.version} - - org.eclipse.jetty.orbit - javax.servlet.jsp.jstl - - - org.glassfish.web - javax.servlet.jsp.jstl - - - org.mortbay.jasper - apache-el - 8.0.9.M3 -
    - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - test-jar - - test-jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - org.apache.felix maven-bundle-plugin true - - - bundle-manifest - process-classes - - manifest - - - Jetty-OSGi-Jasper Integration @@ -110,6 +57,7 @@ org.eclipse.jetty.osgi.boot !org.eclipse.jetty.osgi.boot.* org.eclipse.jdt.*;resolution:=optional, + org.eclipse.jdt.core.compiler.*;resolution:=optional, com.sun.el;resolution:=optional, com.sun.el.lang;resolution:=optional, com.sun.el.parser;resolution:=optional, @@ -125,20 +73,20 @@ javax.servlet.jsp.jstl.fmt;version="1.2";resolution:=optional, javax.servlet.jsp.jstl.sql;version="1.2";resolution:=optional, javax.servlet.jsp.jstl.tlv;version="1.2";resolution:=optional, - org.apache.el;version="[8.0.9,9)";resolution:=optional, - org.apache.el.lang;version="[8.0.9,9)";resolution:=optional, - org.apache.el.stream;version="[8.0.9,9)";resolution:=optional, - org.apache.el.util;version="[8.0.9,9)";resolution:=optional, - org.apache.el.parser;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.compiler;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.compiler.tagplugin;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.runtime;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.security;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.servlet;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.tagplugins.jstl;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.util;version="[8.0.9,9)";resolution:=optional, - org.apache.jasper.xmlparser;version="[8.0.9,9)";resolution:=optional, + org.apache.el;version="[8.0.23,9)";resolution:=optional, + org.apache.el.lang;version="[8.0.23,9)";resolution:=optional, + org.apache.el.stream;version="[8.0.23,9)";resolution:=optional, + org.apache.el.util;version="[8.0.23,9)";resolution:=optional, + org.apache.el.parser;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.compiler;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.compiler.tagplugin;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.runtime;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.security;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.servlet;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.tagplugins.jstl;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.util;version="[8.0.23,9)";resolution:=optional, + org.apache.jasper.xmlparser;version="[8.0.23,9)";resolution:=optional, org.apache.taglibs.standard;version="1.2";resolution:=optional, org.apache.taglibs.standard.extra.spath;version="1.2";resolution:=optional, org.apache.taglibs.standard.functions;version="1.2";resolution:=optional, @@ -162,8 +110,8 @@ org.apache.taglibs.standard.tag.rt.xml;version="1.2";resolution:=optional, org.apache.taglibs.standard.tei;version="1.2";resolution:=optional, org.apache.taglibs.standard.tlv;version="1.2";resolution:=optional, - org.apache.tomcat;version="[8.0.9,9)";resolution:=optional, - org.eclipse.jetty.jsp;version="[9.2,10)";resolution:=optional, + org.apache.tomcat;version="[8.0.23,9)";resolution:=optional, + org.eclipse.jetty.jsp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:=optional, org.osgi.*, org.xml.*;resolution:=optional, org.xml.sax.*;resolution:=optional, @@ -172,8 +120,7 @@ org.w3c.dom.ls;resolution:=optional, javax.xml.parser;resolution:=optional - <_nouses>true - org.eclipse.jetty.jsp.*;version="9.2.6",org.apache.jasper.*;version="8.0.9",org.apache.el.*;version="8.0.9" + org.eclipse.jetty.jsp.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",org.apache.jasper.*;version="8.0.23",org.apache.el.*;version="8.0.23" diff --git a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml index f77a88299f0..1acf13b628f 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 @@ -19,49 +19,17 @@ jetty-util - org.eclipse.osgi - org.eclipse.osgi + org.eclipse.osgi + org.eclipse.osgi
    - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - test-jar - - test-jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - org.apache.felix maven-bundle-plugin true - - - bundle-manifest - process-classes - - manifest - - - RFC66 War URL diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index e74110a8e3a..d5e0c154496 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-osgi-boot @@ -30,8 +30,8 @@ jetty-jmx - org.eclipse.osgi - org.eclipse.osgi + org.eclipse.osgi + org.eclipse.osgi org.eclipse.osgi @@ -62,47 +62,15 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - test-jar - - test-jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - org.apache.felix maven-bundle-plugin true - - - bundle-manifest - process-classes - - manifest - - - org.eclipse.jetty.osgi.boot;singleton:=true org.eclipse.jetty.osgi.boot.JettyBootstrapActivator - org.eclipse.jetty.*;version="[9.1,10.0)" + org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" javax.mail;version="1.4.0";resolution:=optional, javax.mail.event;version="1.4.0";resolution:=optional, javax.mail.internet;version="1.4.0";resolution:=optional, @@ -112,8 +80,6 @@ javax.servlet.http;version="[3.1,3.2)", javax.transaction;version="1.1.0";resolution:=optional, javax.transaction.xa;version="1.1.0";resolution:=optional, - org.eclipse.jetty.annotations;version="9.1";resolution:=optional, - org.eclipse.jetty.plus.webapp;version="9.1";resolution:=optional, org.objectweb.asm;version=4;resolution:=optional, org.osgi.framework, org.osgi.service.cm;version="1.2.0", @@ -126,6 +92,7 @@ org.slf4j.helpers;resolution:=optional, org.xml.sax, org.xml.sax.helpers, + org.eclipse.jetty.annotations;resolution:=optional, * <_nouses>true diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml index 5910a343edf..27f78a15073 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-httpservice @@ -56,42 +56,10 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - test-jar - - test-jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - org.apache.felix maven-bundle-plugin true - - - bundle-manifest - process-classes - - manifest - - - org.eclipse.jetty.osgi.httpservice diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 3db092a3ed9..29a46dd3466 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -1,15 +1,19 @@ - - 4.0.0 + org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT + + 4.0.0 org.eclipse.jetty.osgi jetty-osgi-project Jetty :: OSGi http://www.eclipse.org/jetty pom + 3.6.0.v20100517 3.2.100.v20100503 @@ -18,6 +22,7 @@ 0.9.29 1.6.1 + jetty-osgi-boot jetty-osgi-boot-jsp @@ -25,22 +30,23 @@ jetty-osgi-httpservice test-jetty-osgi-webapp test-jetty-osgi-context - test-jetty-osgi + test-jetty-osgi-fragment + test-jetty-osgi-server jetty-osgi-alpn + - npn + jdk8 - 1.7 + [1.8,1.9) - + test-jetty-osgi + @@ -72,7 +78,6 @@ org.apache.maven.plugins maven-eclipse-plugin - 2.8 prevent/overwriting/by/pointing/to/nonexisting/MANIFEST.MF true @@ -91,6 +96,7 @@ + @@ -192,4 +198,5 @@ + diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml index 926d7595201..f26d0d126eb 100644 --- a/jetty-osgi/test-jetty-osgi-context/pom.xml +++ b/jetty-osgi/test-jetty-osgi-context/pom.xml @@ -2,11 +2,11 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 test-jetty-osgi-context - Jetty :: OSGi :: Context + Jetty :: OSGi :: Test Context Test Jetty OSGi bundle with a ContextHandler http://www.eclipse.org/jetty @@ -19,87 +19,55 @@ ${project.version} - org.eclipse.osgi - org.eclipse.osgi - provided + org.eclipse.osgi + org.eclipse.osgi + provided - org.eclipse.osgi - org.eclipse.osgi.services - provided + org.eclipse.osgi + org.eclipse.osgi.services + provided - org.eclipse.jetty.toolchain - jetty-schemas + org.eclipse.jetty.toolchain + jetty-schemas
    - - - - src/main/resources - - - src/main/context - - + + + + src/main/resources + + + src/main/context + + - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - test-jar - - test-jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - org.eclipse.jetty.osgi.testcontext;singleton:=true - Jetty OSGi Test Context - com.acme.osgi.Activator - J2SE-1.5 - - <_nouses>true - + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.felix + maven-bundle-plugin + true + + + org.eclipse.jetty.osgi.testcontext;singleton:=true + Jetty OSGi Test Context + com.acme.osgi.Activator + J2SE-1.5 + + <_nouses>true + javax.servlet;version="[3.1,3.2)", javax.servlet.resources;version="[3.1,3.2)", org.osgi.framework, @@ -109,17 +77,17 @@ org.osgi.service.url;version="1.0.0", org.osgi.util.tracker;version="1.3.0", org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, + org.slf4j.spi;resolution:=optional, org.slf4j.helpers;resolution:=optional, org.xml.sax, org.xml.sax.helpers, * - - org.eclipse.jetty.*;version="[9.1,10.0)" - - - - - - + + org.eclipse.jetty.*;version="[9.1,10.0)" + + + + + + diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml index 4a5b18702c9..e990fb5edb2 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml +++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml @@ -2,12 +2,12 @@ org.eclipse.jetty.osgi jetty-osgi-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 test-jetty-osgi-webapp - Jetty :: OSGi :: WebApp + Jetty :: OSGi :: Test WebApp Test Jetty OSGi Webapp bundle http://www.eclipse.org/jetty @@ -19,80 +19,47 @@ jetty-webapp - org.eclipse.osgi - org.eclipse.osgi - provided + org.eclipse.osgi + org.eclipse.osgi + provided - org.eclipse.osgi - org.eclipse.osgi.services - provided + org.eclipse.osgi + org.eclipse.osgi.services + provided
    - - - - src/main/resources - - + + + + src/main/resources + + - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - test-jar - - test-jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - org.eclipse.jetty.osgi.testapp;singleton:=true - Jetty OSGi Test WebApp - com.acme.osgi.Activator - J2SE-1.5 - - <_nouses>true - + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + + org.apache.felix + maven-bundle-plugin + true + + + org.eclipse.jetty.osgi.testapp;singleton:=true + Jetty OSGi Test WebApp + com.acme.osgi.Activator + J2SE-1.5 + + org.osgi.framework, org.osgi.service.cm;version="1.2.0", org.osgi.service.packageadmin, @@ -100,17 +67,17 @@ org.osgi.service.url;version="1.0.0", org.osgi.util.tracker;version="1.3.0", org.slf4j;resolution:=optional, - org.slf4j.spi;resolution:=optional, + org.slf4j.spi;resolution:=optional, org.slf4j.helpers;resolution:=optional, org.xml.sax, org.xml.sax.helpers, * - - org.eclipse.jetty.*;version="[9.1,10.0)" - - - - - - + + com.acme.osgi + org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" + + + + + diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 9517cb5d81b..ea65b0740af 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 @@ -11,16 +11,15 @@ Jetty OSGi Integration test http://www.eclipse.org/jetty - ${project.groupId}.boot.test.spdy + ${project.groupId}.boot.test.osgi http://download.eclipse.org/jetty/orbit/ target/distribution - 3.5.0 - 1.5.2 + 4.10.0 + 2.5.2 1.0 - org.ops4j.pax.exam pax-exam @@ -33,16 +32,13 @@ ${exam.version} test - - - + org.ops4j.pax.exam pax-exam-container-forked ${exam.version} test - org.ops4j.pax.exam pax-exam-junit4 @@ -68,34 +64,19 @@ test - - - - org.eclipse - osgi - 3.10.0-v20140606-1445 - test - - - org.eclipse.osgi + org.eclipse.platform org.eclipse.osgi.services + 3.5.100 test - org.eclipse.jetty.osgi @@ -129,7 +110,6 @@ - org.eclipse.jetty.osgi jetty-httpservice @@ -142,14 +122,12 @@ jetty-osgi-servlet-api 3.1.0.M3 - org.apache.geronimo.specs geronimo-jta_1.1_spec 1.1.1 test - org.apache.geronimo.specs geronimo-atinject_1.0_spec @@ -162,14 +140,44 @@ 1.0.1 test - - org.mortbay.jasper - apache-el - 8.0.33 - test + org.glassfish.web + javax.servlet.jsp.jstl + 1.2.2 + + + javax.servlet.jsp.jstl + jstl-api + + + javax.servlet + servlet-api + + + javax.servlet.jsp + jsp-api + + + javax.el + el-api + + + + + org.eclipse.jetty.orbit + javax.servlet.jsp.jstl + 1.2.0.v201105211821 + + + org.eclipse.jetty.orbit + javax.servlet + + + org.eclipse.jetty.orbit + javax.servlet.jsp + + - @@ -223,6 +231,7 @@ org.eclipse.jetty jetty-util + ${project.version} runtime @@ -279,34 +288,14 @@ runtime - org.eclipse.jetty.spdy - spdy-core + org.eclipse.jetty.http2 + http2-server ${project.version} - test - org.eclipse.jetty.spdy - spdy-server + org.eclipse.jetty.http2 + http2-hpack ${project.version} - test - - - org.eclipse.jetty.spdy - spdy-http-server - ${project.version} - test - - - org.eclipse.jetty.spdy - spdy-client - ${project.version} - test - - - org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} - test org.eclipse.jetty.osgi @@ -325,8 +314,6 @@ jetty-schemas runtime - - org.eclipse.jetty jetty-plus @@ -342,7 +329,6 @@ webbundle test - org.eclipse.jetty.tests test-spec-webapp @@ -350,21 +336,29 @@ war test - org.eclipse.jetty.tests test-container-initializer ${project.version} test - - + + org.eclipse.jetty.osgi + test-jetty-osgi-fragment + ${project.version} + test + + + org.eclipse.jetty.osgi + test-jetty-osgi-server + ${project.version} + test + org.eclipse.jetty.tests test-mock-resources ${project.version} - org.eclipse.jetty.osgi test-jetty-osgi-context @@ -382,30 +376,28 @@ jetty-test-helper test + + org.slf4j + slf4j-log4j12 + ${slf4j-version} + test + maven-surefire-plugin + + 2.18.1 - + -Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar - - org.apache.maven.plugins - maven-compiler-plugin - 2.5.1 - - 1.7 - 1.7 - - org.apache.servicemix.tooling depends-maven-plugin - 1.2 generate-depends-file diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index 80badafa981..a38401861ac 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-plus @@ -14,59 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - <_nouses>true - - javax.sql.*,javax.security.*,javax.naming.*, - javax.servlet.*;version="[2.6.0,3.2)",javax.transaction.*;version="[1.1,1.3)", - * - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - diff --git a/jetty-proxy/pom.xml b/jetty-proxy/pom.xml index 8649f2fdb0e..e8da166ed0d 100644 --- a/jetty-proxy/pom.xml +++ b/jetty-proxy/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-proxy @@ -14,52 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.codehaus.mojo findbugs-maven-plugin @@ -97,6 +51,13 @@ ${project.version} test + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + org.eclipse.jetty.toolchain jetty-test-helper diff --git a/jetty-quickstart/pom.xml b/jetty-quickstart/pom.xml index e073299b9a1..a5db7eaa094 100644 --- a/jetty-quickstart/pom.xml +++ b/jetty-quickstart/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 org.eclipse.jetty @@ -10,6 +10,9 @@ Jetty :: Quick Start Jetty Quick Start http://www.eclipse.org/jetty + + ${project.groupId}.quickstart + org.eclipse.jetty @@ -79,26 +82,14 @@ ${project.version} test + + org.eclipse.jetty.toolchain + jetty-test-helper + test + - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml index 2010c7eb23f..0d1964f4d40 100644 --- a/jetty-rewrite/pom.xml +++ b/jetty-rewrite/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-rewrite @@ -14,52 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-runner/pom.xml b/jetty-runner/pom.xml index db123b2d10e..29be2959a66 100644 --- a/jetty-runner/pom.xml +++ b/jetty-runner/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-runner @@ -10,6 +10,7 @@ target/distribution + ${project.groupId}.runner http://www.eclipse.org/jetty @@ -20,7 +21,7 @@ unpack-dependencies - package + prepare-package unpack-dependencies @@ -35,42 +36,46 @@ - org.apache.maven.plugins - maven-jar-plugin - - - package - package - - jar - - - - - org.eclipse.jetty.runner.Runner - - - development - http://eclipse.org/jetty - ${user.name} - org.eclipse.jetty.runner - Jetty Runner - Mort Bay Consulting - - - - - - + org.apache.felix + maven-bundle-plugin + true + + + + manifest + + + + + + org.eclipse.jetty.runner.Runner + !* + + + + - org.apache.felix - maven-bundle-plugin - true + org.apache.maven.plugins + maven-jar-plugin - true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + org.neo4j.build.plugins + clirr-maven-plugin + + + true + + + + @@ -99,10 +104,15 @@ jetty-jndi ${project.version} - - org.eclipse.jetty - jetty-jsp - ${project.version} - + + org.eclipse.jetty + apache-jsp + ${project.version} + + + org.eclipse.jetty + apache-jstl + ${project.version} + diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index 46314705c18..6d710c82a4a 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-security @@ -25,42 +25,13 @@ - javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,* + javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin 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 b14d0232172..5237cc3e2b6 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,184 +1,184 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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(); - - TestLoginService loginService = new TestLoginService(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.getResponse(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-2017 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(); + + TestLoginService loginService = new TestLoginService(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.getResponse(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-server/pom.xml b/jetty-server/pom.xml index 233ca5c06de..ccbf03688a3 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-server @@ -14,35 +14,10 @@ - - org.apache.felix - maven-bundle-plugin - true - - - generate-manifest - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;version="9.1";resolution:=optional,* - <_nouses>true - - - - - org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar @@ -50,28 +25,6 @@ - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - org.codehaus.mojo @@ -83,18 +36,9 @@ - - org.eclipse.jetty.toolchain - jetty-test-helper - test - javax.servlet javax.servlet-api - org.eclipse.jetty @@ -119,9 +63,16 @@ true - org.mockito - mockito-core + org.eclipse.jetty.toolchain + jetty-test-helper test - + + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java b/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java index f5524572669..9259a3fbb48 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java @@ -378,6 +378,16 @@ public class LocalConnector extends AbstractConnector } } } + + /** + * Remaining output ByteBuffer after calls to {@link #getResponse()} or {@link #waitForResponse(boolean, long, TimeUnit)} + * + * @return the remaining response data buffer + */ + public ByteBuffer getResponseData() + { + return _responseData; + } /** * Wait for a response using a parser to detect the end of message @@ -515,7 +525,7 @@ public class LocalConnector extends AbstractConnector } } } - + if (bout.getCount()==0 && isOutputShutdown()) return null; return ByteBuffer.wrap(bout.getBuf(),0,bout.getCount()); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java index d89088a6634..10370b20d08 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorTest.java @@ -57,17 +57,8 @@ import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test; -import static org.hamcrest.Matchers.anyOf; -import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; - public class ServerConnectorTest { public static class ReuseInfoHandler extends AbstractHandler diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index 7d4d1698d2f..2ff8909c825 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-servlet @@ -16,34 +16,8 @@ - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;version="9.1";resolution:=optional,* - <_nouses>true - - - - - - - org.apache.maven.plugins maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - tests @@ -53,23 +27,6 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.codehaus.mojo findbugs-maven-plugin @@ -96,5 +53,12 @@ jetty-test-helper test + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml index 6b9e284b022..254631b857f 100644 --- a/jetty-servlets/pom.xml +++ b/jetty-servlets/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-servlets @@ -15,52 +15,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.codehaus.mojo findbugs-maven-plugin @@ -108,6 +62,20 @@ ${project.version} test + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + + + org.eclipse.jetty + jetty-servlet + ${project.version} + tests + test + org.eclipse.jetty.toolchain jetty-test-helper 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 9df5e0c79e0..c0a138112ec 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,407 +1,407 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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.ChannelEndPoint; -import org.eclipse.jetty.io.ManagedSelector; -import org.eclipse.jetty.io.SocketChannelEndPoint; -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 ChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException - { - return new SocketChannelEndPoint(channel, selectSet, key, getScheduler()) - { - @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*2; - 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 ChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException - { - return new SocketChannelEndPoint(channel, selectSet, key, getScheduler()) - { - @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-2017 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.ChannelEndPoint; +import org.eclipse.jetty.io.ManagedSelector; +import org.eclipse.jetty.io.SocketChannelEndPoint; +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 ChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException + { + return new SocketChannelEndPoint(channel, selectSet, key, getScheduler()) + { + @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*2; + 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 ChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key) throws IOException + { + return new SocketChannelEndPoint(channel, selectSet, key, getScheduler()) + { + @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-spring/pom.xml b/jetty-spring/pom.xml index e01b95eba34..274d6e67152 100644 --- a/jetty-spring/pom.xml +++ b/jetty-spring/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-spring @@ -11,28 +11,12 @@ 3.2.8.RELEASE target/dependencies + ${project.groupId}.spring install - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.jacoco jacoco-maven-plugin diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml index 5c0b6f5cb89..3500bbbe750 100644 --- a/jetty-start/pom.xml +++ b/jetty-start/pom.xml @@ -2,13 +2,17 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-start Jetty :: Start The start utility http://www.eclipse.org/jetty + + ${project.groupId}.start + start.jar + @@ -30,9 +34,6 @@ - - start.jar - org.eclipse.jetty.toolchain 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 cd110dc6b20..e955a57691b 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-2017 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-2017 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 70b4da00e95..8a1cd189e57 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,271 +1,272 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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 static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -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 java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import org.eclipse.jetty.start.Props.Prop; -import org.eclipse.jetty.toolchain.test.MavenTestingUtils; -import org.eclipse.jetty.toolchain.test.PathAssert; -import org.hamcrest.Matchers; -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 - { - assertConfiguration(baseHome, args, null, MavenTestingUtils.getTestResourceFile(filename)); - } - - /** - * 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 output the captured output that you want to assert against - * @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 output, String filename) throws FileNotFoundException, IOException - { - assertConfiguration(baseHome, args, output, MavenTestingUtils.getTestResourceFile(filename)); - } - - /** - * 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 file the file 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 output, File file) throws FileNotFoundException, IOException - { - if(output != null) - { - System.err.println(output); - } - Path testResourcesDir = MavenTestingUtils.getTestResourcesDir().toPath().toRealPath(); - 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|") || line.startsWith("SYS|")) - { - 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) || - "jetty.home.uri".equals(name) || - "jetty.base.uri".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 PROPERTIES (order is not important) - for (String line : textFile) - { - if (line.startsWith("SYS|")) - { - String[] expected = getValue(line).split("=",2); - String actual = System.getProperty(expected[0]); - assertThat("System property "+expected[0],actual,Matchers.equalTo(expected[1])); - } - } - - // 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); - - // File / Path Existence Checks - streamOf(textFile, "EXISTS").forEach(f -> - { - Path path = baseHome.getPath(f); - if (f.endsWith("/")) - { - PathAssert.assertDirExists("Required Directory", path); - } - else - { - PathAssert.assertFileExists("Required File", path); - } - }); - - // Output Validation - streamOf(textFile, "OUTPUT").forEach(regex -> - { - Pattern pat = Pattern.compile(regex); - Matcher mat = pat.matcher(output); - assertTrue("Output [\n" + output + "]\nContains Regex Match: " + pat.pattern(), mat.find()); - }); - } - - 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) - { - try - { - Assert.assertEquals(msg, expectedSet.size(), actualSet.size()); - if (!expectedSet.isEmpty()) - assertThat(msg, actualSet, Matchers.containsInAnyOrder(expectedSet.toArray())); - } - catch (AssertionError e) - { - System.err.println("Expected: " + expectedSet.stream().sorted().collect(Collectors.toList())); - System.err.println("Actual : " + actualSet.stream().sorted().collect(Collectors.toList())); - throw e; - } - - } - - public static void assertOrdered(String msg, List expectedList, List actualList) - { - try - { - Assert.assertEquals(msg, expectedList.size(), actualList.size()); - if (!expectedList.isEmpty()) - assertThat(msg, actualList, Matchers.contains(expectedList.toArray())); - } - catch (AssertionError e) - { - System.err.println("Expected: " + expectedList); - System.err.println("Actual : " + actualList); - throw e; - } - } - - private static Stream streamOf(TextFile textFile, String key) - { - return textFile.stream() - .filter(s -> s.startsWith(key + "|")).map(f -> getValue(f)); - } - - private static String getValue(String arg) - { - int idx = arg.indexOf('|'); - assertThat("Expecting '|' sign in [" + arg + "]", idx, greaterThanOrEqualTo(0)); - String value = arg.substring(idx + 1).trim(); - assertThat("Expecting Value after '|' in [" + arg + "]", value.length(), greaterThan(0)); - return value; - } -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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 static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +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 java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.eclipse.jetty.start.Props.Prop; +import org.eclipse.jetty.toolchain.test.MavenTestingUtils; +import org.eclipse.jetty.toolchain.test.PathAssert; +import org.hamcrest.Matchers; +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 + { + assertConfiguration(baseHome, args, null, MavenTestingUtils.getTestResourceFile(filename)); + } + + /** + * 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 output the captured output that you want to assert against + * @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 output, String filename) throws FileNotFoundException, IOException + { + assertConfiguration(baseHome, args, output, MavenTestingUtils.getTestResourceFile(filename)); + } + + /** + * 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 file the file 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 output, File file) throws FileNotFoundException, IOException + { + if(output != null) + { + System.err.println(output); + } + Path testResourcesDir = MavenTestingUtils.getTestResourcesDir().toPath().toRealPath(); + 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|") || line.startsWith("SYS|")) + { + 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) || + "jetty.home.uri".equals(name) || + "jetty.base.uri".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 PROPERTIES (order is not important) + for (String line : textFile) + { + if (line.startsWith("SYS|")) + { + String[] expected = getValue(line).split("=",2); + String actual = System.getProperty(expected[0]); + assertThat("System property "+expected[0],actual,Matchers.equalTo(expected[1])); + } + } + + // 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); + + // File / Path Existence Checks + streamOf(textFile, "EXISTS").forEach(f -> + { + Path path = baseHome.getPath(f); + if (f.endsWith("/")) + { + PathAssert.assertDirExists("Required Directory", path); + } + else + { + PathAssert.assertFileExists("Required File", path); + } + }); + + // Output Validation + streamOf(textFile, "OUTPUT").forEach(regex -> + { + Pattern pat = Pattern.compile(regex); + Matcher mat = pat.matcher(output); + assertTrue("Output [\n" + output + "]\nContains Regex Match: " + pat.pattern(), mat.find()); + }); + } + + 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) + { + try + { + Assert.assertEquals(msg, expectedSet.size(), actualSet.size()); + if (!expectedSet.isEmpty()) + assertThat(msg, actualSet, Matchers.containsInAnyOrder(expectedSet.toArray())); + } + catch (AssertionError e) + { + System.err.println("Expected: " + expectedSet.stream().sorted().collect(Collectors.toList())); + System.err.println("Actual : " + actualSet.stream().sorted().collect(Collectors.toList())); + throw e; + } + + } + + @SuppressWarnings("Duplicates") + public static void assertOrdered(String msg, List expectedList, List actualList) + { + try + { + Assert.assertEquals(msg, expectedList.size(), actualList.size()); + if (!expectedList.isEmpty()) + assertThat(msg, actualList, Matchers.contains(expectedList.toArray())); + } + catch (AssertionError e) + { + System.err.println("Expected: " + expectedList); + System.err.println("Actual : " + actualList); + throw e; + } + } + + private static Stream streamOf(TextFile textFile, String key) + { + return textFile.stream() + .filter(s -> s.startsWith(key + "|")).map(f -> getValue(f)); + } + + private static String getValue(String arg) + { + int idx = arg.indexOf('|'); + assertThat("Expecting '|' sign in [" + arg + "]", idx, greaterThanOrEqualTo(0)); + String value = arg.substring(idx + 1).trim(); + assertThat("Expecting Value after '|' in [" + arg + "]", value.length(), greaterThan(0)); + return value; + } +} diff --git a/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_131.mod b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_131.mod index 4eb78ef5fb2..eb50f520252 100644 --- a/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_131.mod +++ b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_131.mod @@ -1,6 +1,3 @@ -[name] -alpn-boot - [files] http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_144.mod b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_144.mod index 4eb78ef5fb2..eb50f520252 100644 --- a/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_144.mod +++ b/jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_144.mod @@ -1,6 +1,3 @@ -[name] -alpn-boot - [files] http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar|lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-util-ajax/pom.xml b/jetty-util-ajax/pom.xml index 0f155a2773d..8b0b7c19fdd 100644 --- a/jetty-util-ajax/pom.xml +++ b/jetty-util-ajax/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-util-ajax @@ -14,54 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",org.slf4j;version="[1.5,2.0)";resolution:=optional,org.slf4j.impl;version="[1.5,2.0)";resolution:=optional,* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 174e2d33cc3..bf31ba5db57 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-util @@ -14,52 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",org.slf4j;version="[1.6,2.0)";resolution:=optional,org.slf4j.impl;version="[1.6,2.0)";resolution:=optional,* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - org.codehaus.mojo findbugs-maven-plugin @@ -68,6 +22,19 @@ + + + + org.apache.maven.plugins + maven-surefire-plugin + + + ${settings.localRepository} + + + + + diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java index f90be361b39..98b3ef261ac 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java @@ -24,7 +24,9 @@ import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.SimpleDateFormat; -import java.util.Calendar; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; +import java.util.Date; import java.util.Locale; import java.util.TimeZone; import java.util.Timer; @@ -50,13 +52,12 @@ public class RolloverFileOutputStream extends FilterOutputStream final static String ROLLOVER_FILE_DATE_FORMAT = "yyyy_MM_dd"; final static String ROLLOVER_FILE_BACKUP_FORMAT = "HHmmssSSS"; final static int ROLLOVER_FILE_RETAIN_DAYS = 31; - + private RollTask _rollTask; private SimpleDateFormat _fileBackupFormat; private SimpleDateFormat _fileDateFormat; - - private final TimeZone _timeZone; - private final String _filename; + + private String _filename; private File _file; private boolean _append; private int _retainDays; @@ -117,7 +118,7 @@ public class RolloverFileOutputStream extends FilterOutputStream TimeZone zone) throws IOException { - this(filename,append,retainDays,zone,null,null); + this(filename,append,retainDays,zone,null,null,ZonedDateTime.now(zone.toZoneId())); } /* ------------------------------------------------------------ */ @@ -139,21 +140,20 @@ public class RolloverFileOutputStream extends FilterOutputStream String backupFormat) throws IOException { - this(filename,append,retainDays,zone,dateFormat,backupFormat,Calendar.getInstance(zone)); + this(filename,append,retainDays,zone,dateFormat,backupFormat,ZonedDateTime.now(zone.toZoneId())); } + RolloverFileOutputStream(String filename, boolean append, int retainDays, TimeZone zone, String dateFormat, String backupFormat, - Calendar now) + ZonedDateTime now) throws IOException { super(null); - - _timeZone = zone; if (dateFormat==null) dateFormat=ROLLOVER_FILE_DATE_FORMAT; @@ -174,9 +174,8 @@ public class RolloverFileOutputStream extends FilterOutputStream } if (filename==null) throw new IllegalArgumentException("Invalid filename"); - - File testfile = new File(filename); - _filename=testfile.getCanonicalPath(); + + _filename=filename; _append=append; _retainDays=retainDays; @@ -186,7 +185,7 @@ public class RolloverFileOutputStream extends FilterOutputStream __rollover=new Timer(RolloverFileOutputStream.class.getName(),true); // Calculate Today's Midnight, based on Configured TimeZone (will be in past, even if by a few milliseconds) - setFile(now); + setFile(now); // This will schedule the rollover event to the next midnight scheduleNextRollover(now); } @@ -196,32 +195,23 @@ public class RolloverFileOutputStream extends FilterOutputStream /** * Get the "start of day" for the provided DateTime at the zone specified. * - * @param cal the date time to calculate from + * @param now the date time to calculate from * @return start of the day of the date provided */ - public static Calendar toMidnight(Calendar cal) + public static ZonedDateTime toMidnight(ZonedDateTime now) { - Calendar ret = Calendar.getInstance(); - ret.setTimeZone(cal.getTimeZone()); - ret.setTime(cal.getTime()); - ret.set(Calendar.HOUR_OF_DAY, 0); - ret.set(Calendar.MINUTE, 0); - ret.set(Calendar.SECOND, 0); - ret.set(Calendar.MILLISECOND, 0); - // next days midnight - ret.add(Calendar.DAY_OF_MONTH, 1); - return ret; + return now.toLocalDate().atStartOfDay(now.getZone()).plus(1, ChronoUnit.DAYS); } /* ------------------------------------------------------------ */ - private void scheduleNextRollover(Calendar now) + private void scheduleNextRollover(ZonedDateTime now) { _rollTask = new RollTask(); - // Establish next day's midnight of provided calendar - Calendar midnight = toMidnight(now); + // Get tomorrow's midnight based on Configured TimeZone + ZonedDateTime midnight = toMidnight(now); // Schedule next rollover event to occur, based on local machine's Unix Epoch milliseconds - long delay = midnight.getTimeInMillis() - now.getTimeInMillis(); + long delay = midnight.toInstant().toEpochMilli() - now.toInstant().toEpochMilli(); __rollover.schedule(_rollTask,delay); } @@ -246,11 +236,13 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - synchronized void setFile(Calendar now) + synchronized void setFile(ZonedDateTime now) throws IOException { // Check directory - File file=new File(_filename); + File file = new File(_filename); + _filename=file.getCanonicalPath(); + file=new File(_filename); File dir= new File(file.getParent()); if (!dir.isDirectory() || !dir.canWrite()) throw new IOException("Cannot write log directory "+dir); @@ -262,7 +254,7 @@ public class RolloverFileOutputStream extends FilterOutputStream { file=new File(dir, filename.substring(0,i)+ - _fileDateFormat.format(now.getTime()) + + _fileDateFormat.format(new Date(now.toInstant().toEpochMilli()))+ filename.substring(i+YYYY_MM_DD.length())); } @@ -275,7 +267,7 @@ public class RolloverFileOutputStream extends FilterOutputStream // Yep _file=file; if (!_append && file.exists()) - file.renameTo(new File(file.toString()+"."+_fileBackupFormat.format(now.getTime()))); + file.renameTo(new File(file.toString()+"."+_fileBackupFormat.format(new Date(now.toInstant().toEpochMilli())))); OutputStream oldOut=out; out=new FileOutputStream(file.toString(),_append); if (oldOut!=null) @@ -285,13 +277,12 @@ public class RolloverFileOutputStream extends FilterOutputStream } /* ------------------------------------------------------------ */ - void removeOldFiles(Calendar now) + void removeOldFiles(ZonedDateTime now) { if (_retainDays>0) { // Establish expiration time, based on configured TimeZone - now.add(Calendar.DAY_OF_MONTH, (-1)*_retainDays); - long expired = now.getTimeInMillis(); + long expired = now.minus(_retainDays, ChronoUnit.DAYS).toInstant().toEpochMilli(); File file= new File(_filename); File dir = new File(file.getParent()); @@ -365,7 +356,7 @@ public class RolloverFileOutputStream extends FilterOutputStream { synchronized(RolloverFileOutputStream.class) { - Calendar now = Calendar.getInstance(_timeZone); + ZonedDateTime now = ZonedDateTime.now(_fileDateFormat.getTimeZone().toZoneId()); RolloverFileOutputStream.this.setFile(now); RolloverFileOutputStream.this.scheduleNextRollover(now); RolloverFileOutputStream.this.removeOldFiles(now); diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java b/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java index bb7b504b9aa..d839ad50667 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/SharedBlockingCallback.java @@ -29,7 +29,6 @@ import java.util.concurrent.locks.ReentrantLock; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; -import org.eclipse.jetty.util.thread.Invocable.InvocationType; /** * Provides a reusable {@link Callback} that can block the thread @@ -168,6 +167,7 @@ public class SharedBlockingCallback } else { + cause.printStackTrace(System.err); throw new IllegalStateException(_state); } } diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java index 2b6aeaa5493..56947e9e3fb 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/RolloverFileOutputStreamTest.java @@ -26,70 +26,87 @@ import java.io.FileReader; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.attribute.FileTime; -import java.text.ParseException; -import java.text.SimpleDateFormat; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalAccessor; import java.util.Arrays; -import java.util.Calendar; -import java.util.Date; import java.util.TimeZone; import java.util.concurrent.TimeUnit; import org.eclipse.jetty.toolchain.test.FS; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.hamcrest.Matchers; -import org.junit.Rule; import org.junit.Test; public class RolloverFileOutputStreamTest { - @Rule - public TestingDir testingDir = new TestingDir(); - - private static TimeZone toZoneId(String timezoneId) + private static ZoneId toZoneId(String timezoneId) { - TimeZone zone = TimeZone.getTimeZone(timezoneId); - // System.err.printf("toZoneId('%s'): displayName=%s, id=%s%n", timezoneId, zone.getDisplayName(), zone.getID()); + ZoneId zone = TimeZone.getTimeZone(timezoneId).toZoneId(); + // System.out.printf(".toZoneId(\"%s\") = [id=%s,normalized=%s]%n", timezoneId, zone.getId(), zone.normalized()); return zone; } - private static Calendar toDateTime(String timendate, TimeZone zone) throws ParseException + private static ZonedDateTime toDateTime(String timendate, ZoneId zone) { - SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd-hh:mm:ss.S a z"); - formatter.setTimeZone(zone); - Date parsed = formatter.parse(timendate); - Calendar cal = Calendar.getInstance(zone); - cal.setTime(parsed); - return cal; + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd-hh:mm:ss.S a z") + .withZone(zone); + return ZonedDateTime.parse(timendate, formatter); } - private static String toString(Calendar date) + private static String toString(TemporalAccessor date) { - SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd-hh:mm:ss.S a z"); - formatter.setTimeZone(date.getTimeZone()); - return formatter.format(date.getTime()); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd-hh:mm:ss.S a z"); + return formatter.format(date); } - private void assertSequence(Calendar midnight, Object[][] expected) + private void assertSequence(ZonedDateTime midnight, Object[][] expected) { - Calendar nextEvent = midnight; + ZonedDateTime nextEvent = midnight; for (int i = 0; i < expected.length; i++) { - long lastMs = nextEvent.getTimeInMillis(); - nextEvent = RolloverFileOutputStream.toMidnight(nextEvent); + long currentMillis = nextEvent.toInstant().toEpochMilli(); + nextEvent = nextEvent.toLocalDate().plus(1, ChronoUnit.DAYS).atStartOfDay(nextEvent.getZone()); assertThat("Next Event", toString(nextEvent), is(expected[i][0])); - long duration = (nextEvent.getTimeInMillis() - lastMs); + long duration = (nextEvent.toInstant().toEpochMilli() - currentMillis); assertThat("Duration to next event", duration, is((long) expected[i][1])); } } + /** + * https://github.com/eclipse/jetty.project/issues/1507 + */ @Test - public void testMidnightRolloverCalc_PST_DST_Start() throws ParseException + public void testMidnightRolloverCalc_PDT_Issue1507() { - TimeZone zone = toZoneId("PST"); - Calendar initialDate = toDateTime("2016.03.10-01:23:45.0 PM PST", zone); + ZoneId zone = toZoneId("PST"); + ZonedDateTime initialDate = toDateTime("2017.04.26-08:00:00.0 PM PDT", zone); - Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); + assertThat("Midnight", toString(midnight), is("2017.04.27-12:00:00.0 AM PDT")); + + Object expected[][] = { + {"2017.04.27-12:00:00.0 AM PDT", 14_400_000L}, + {"2017.04.28-12:00:00.0 AM PDT", 86_400_000L}, + {"2017.04.29-12:00:00.0 AM PDT", 86_400_000L}, + {"2017.04.30-12:00:00.0 AM PDT", 86_400_000L}, + {"2017.05.01-12:00:00.0 AM PDT", 86_400_000L}, + {"2017.05.02-12:00:00.0 AM PDT", 86_400_000L}, + }; + + assertSequence(initialDate, expected); + } + + @Test + public void testMidnightRolloverCalc_PST_DST_Start() + { + ZoneId zone = toZoneId("PST"); + ZonedDateTime initialDate = toDateTime("2016.03.10-01:23:45.0 PM PST", zone); + + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.03.11-12:00:00.0 AM PST")); Object expected[][] = { @@ -104,12 +121,12 @@ public class RolloverFileOutputStreamTest } @Test - public void testMidnightRolloverCalc_PST_DST_End() throws ParseException + public void testMidnightRolloverCalc_PST_DST_End() { - TimeZone zone = toZoneId("PST"); - Calendar initialDate = toDateTime("2016.11.03-11:22:33.0 AM PDT", zone); + ZoneId zone = toZoneId("PST"); + ZonedDateTime initialDate = toDateTime("2016.11.03-11:22:33.0 AM PDT", zone); - Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.11.04-12:00:00.0 AM PDT")); Object expected[][] = { @@ -124,12 +141,12 @@ public class RolloverFileOutputStreamTest } @Test - public void testMidnightRolloverCalc_Sydney_DST_Start() throws ParseException + public void testMidnightRolloverCalc_Sydney_DST_Start() { - TimeZone zone = toZoneId("Australia/Sydney"); - Calendar initialDate = toDateTime("2016.09.30-01:23:45.0 PM AEST", zone); + ZoneId zone = toZoneId("Australia/Sydney"); + ZonedDateTime initialDate = toDateTime("2016.09.31-01:23:45.0 PM AEST", zone); - Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.10.01-12:00:00.0 AM AEST")); Object expected[][] = { @@ -144,12 +161,12 @@ public class RolloverFileOutputStreamTest } @Test - public void testMidnightRolloverCalc_Sydney_DST_End() throws ParseException + public void testMidnightRolloverCalc_Sydney_DST_End() { - TimeZone zone = toZoneId("Australia/Sydney"); - Calendar initialDate = toDateTime("2016.04.01-11:22:33.0 AM AEDT", zone); + ZoneId zone = toZoneId("Australia/Sydney"); + ZonedDateTime initialDate = toDateTime("2016.04.01-11:22:33.0 AM AEDT", zone); - Calendar midnight = RolloverFileOutputStream.toMidnight(initialDate); + ZonedDateTime midnight = RolloverFileOutputStream.toMidnight(initialDate); assertThat("Midnight", toString(midnight), is("2016.04.02-12:00:00.0 AM AEDT")); Object expected[][] = { @@ -169,23 +186,23 @@ public class RolloverFileOutputStreamTest File testDir = MavenTestingUtils.getTargetTestingDir(RolloverFileOutputStreamTest.class.getName() + "_testFileHandling"); Path testPath = testDir.toPath(); FS.ensureEmpty(testDir); - - TimeZone zone = toZoneId("Australia/Sydney"); - Calendar now = toDateTime("2016.04.10-08:30:12.3 AM AEST", zone); + + ZoneId zone = toZoneId("Australia/Sydney"); + ZonedDateTime now = toDateTime("2016.04.10-08:30:12.3 AM AEDT", zone); File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,3,zone,null,null,now)) + new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) { rofos.write("TICK".getBytes()); rofos.flush(); } - now.add(Calendar.MINUTE, 5); + now = now.plus(5,ChronoUnit.MINUTES); try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,3,zone,null,null,now)) + new RolloverFileOutputStream(template.getAbsolutePath(),false,3,TimeZone.getTimeZone(zone),null,null,now)) { rofos.write("TOCK".getBytes()); rofos.flush(); @@ -200,37 +217,32 @@ public class RolloverFileOutputStreamTest assertThat(Arrays.asList(ls),Matchers.containsInAnyOrder(backup,"test-rofos-2016_04_10.log")); - Files.setLastModifiedTime(testPath.resolve(backup),FileTime.fromMillis(now.getTimeInMillis())); - Files.setLastModifiedTime(testPath.resolve("test-rofos-2016_04_10.log"),FileTime.fromMillis(now.getTimeInMillis())); + Files.setLastModifiedTime(testPath.resolve(backup),FileTime.from(now.toInstant())); + Files.setLastModifiedTime(testPath.resolve("test-rofos-2016_04_10.log"),FileTime.from(now.toInstant())); - // Copy calendar (don't want to change "now") - Calendar time = Calendar.getInstance(); - time.setTimeZone(now.getTimeZone()); - time.setTime(now.getTime()); - time.add(Calendar.DAY_OF_MONTH, -1); - + ZonedDateTime time = now.minus(1,ChronoUnit.DAYS); for (int i=10;i-->5;) { String file = "test-rofos-2016_04_0"+i+".log"; Path path = testPath.resolve(file); FS.touch(path); - Files.setLastModifiedTime(path,FileTime.fromMillis(time.getTimeInMillis())); + Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); if (i%2==0) { file = "test-rofos-2016_04_0"+i+".log.083512300"; path = testPath.resolve(file); FS.touch(path); - Files.setLastModifiedTime(path,FileTime.fromMillis(time.getTimeInMillis())); - time.add(Calendar.DAY_OF_MONTH, -1); + Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); + time = time.minus(1,ChronoUnit.DAYS); } file = "unrelated-"+i; path = testPath.resolve(file); FS.touch(path); - Files.setLastModifiedTime(path,FileTime.fromMillis(time.getTimeInMillis())); - - time.add(Calendar.DAY_OF_MONTH, -1); + Files.setLastModifiedTime(path,FileTime.from(time.toInstant())); + + time = time.minus(1,ChronoUnit.DAYS); } ls = testDir.list(); @@ -242,9 +254,9 @@ public class RolloverFileOutputStreamTest "test-rofos-2016_04_08.log", "test-rofos-2016_04_09.log", "test-rofos-2016_04_10.log", - "test-rofos-2016_04_06.log.083512300", - "test-rofos-2016_04_08.log.083512300", - "test-rofos-2016_04_10.log.083512003", + "test-rofos-2016_04_06.log.083512300", + "test-rofos-2016_04_08.log.083512300", + "test-rofos-2016_04_10.log.083512300", "unrelated-9", "unrelated-8", "unrelated-7", @@ -260,7 +272,7 @@ public class RolloverFileOutputStreamTest "test-rofos-2016_04_09.log", "test-rofos-2016_04_10.log", "test-rofos-2016_04_08.log.083512300", - "test-rofos-2016_04_10.log.083512003", + "test-rofos-2016_04_10.log.083512300", "unrelated-9", "unrelated-8", "unrelated-7", @@ -279,14 +291,14 @@ public class RolloverFileOutputStreamTest { File testDir = MavenTestingUtils.getTargetTestingDir(RolloverFileOutputStreamTest.class.getName() + "_testRollover"); FS.ensureEmpty(testDir); - - TimeZone zone = toZoneId("Australia/Sydney"); - Calendar now = toDateTime("2016.04.10-11:59:58.0 PM AEST", zone); + + ZoneId zone = toZoneId("Australia/Sydney"); + ZonedDateTime now = toDateTime("2016.04.10-11:59:55.0 PM AEDT", zone); File template = new File(testDir,"test-rofos-yyyy_mm_dd.log"); try (RolloverFileOutputStream rofos = - new RolloverFileOutputStream(template.getAbsolutePath(),false,0,zone,null,null,now)) + new RolloverFileOutputStream(template.getAbsolutePath(),false,0,TimeZone.getTimeZone(zone),null,null,now)) { rofos.write("BEFORE".getBytes()); rofos.flush(); @@ -294,7 +306,7 @@ public class RolloverFileOutputStreamTest assertThat(ls.length,is(1)); assertThat(ls[0],is("test-rofos-2016_04_10.log")); - TimeUnit.SECONDS.sleep(5); + TimeUnit.SECONDS.sleep(10); rofos.write("AFTER".getBytes()); ls = testDir.list(); assertThat(ls.length,is(2)); diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/URIUtilCanonicalPathTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/URIUtilCanonicalPathTest.java index dd260b9d013..f29a394fc0c 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/URIUtilCanonicalPathTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/URIUtilCanonicalPathTest.java @@ -1,135 +1,135 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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.util; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import java.util.Arrays; -import java.util.List; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -@RunWith(Parameterized.class) -public class URIUtilCanonicalPathTest -{ - @Parameterized.Parameters(name = "{0}") - public static List data() - { - String[][] canonical = - { - // Basic examples (no changes expected) - {"/hello.html", "/hello.html"}, - {"/css/main.css", "/css/main.css"}, - {"/", "/"}, - {"", ""}, - {"/aaa/bbb/", "/aaa/bbb/"}, - {"/aaa/bbb", "/aaa/bbb"}, - {"aaa/bbb", "aaa/bbb"}, - {"aaa/", "aaa/"}, - {"aaa", "aaa"}, - {"a", "a"}, - {"a/", "a/"}, - - // Extra slashes - {"/aaa//bbb/", "/aaa//bbb/"}, - {"/aaa//bbb", "/aaa//bbb"}, - {"/aaa///bbb/", "/aaa///bbb/"}, - - // Path traversal with current references "./" - {"/aaa/./bbb/", "/aaa/bbb/"}, - {"/aaa/./bbb", "/aaa/bbb"}, - {"./bbb/", "bbb/"}, - {"./aaa/../bbb/", "bbb/"}, - {"/foo/.", "/foo/"}, - {"./", ""}, - {".", ""}, - {".//", "/"}, - {".///", "//"}, - {"/.", "/"}, - {"//.", "//"}, - {"///.", "///"}, - - // Path traversal directory (but not past root) - {"/aaa/../bbb/", "/bbb/"}, - {"/aaa/../bbb", "/bbb"}, - {"/aaa..bbb/", "/aaa..bbb/"}, - {"/aaa..bbb", "/aaa..bbb"}, - {"/aaa/..bbb/", "/aaa/..bbb/"}, - {"/aaa/..bbb", "/aaa/..bbb"}, - {"/aaa/./../bbb/", "/bbb/"}, - {"/aaa/./../bbb", "/bbb"}, - {"/aaa/bbb/ccc/../../ddd/", "/aaa/ddd/"}, - {"/aaa/bbb/ccc/../../ddd", "/aaa/ddd"}, - {"/foo/../bar//", "/bar//"}, - {"/ctx/../bar/../ctx/all/index.txt", "/ctx/all/index.txt"}, - {"/down/.././index.html", "/index.html"}, - - // Path traversal up past root - {"..", null}, - {"./..", null}, - {"aaa/../..", null}, - {"/foo/bar/../../..", null}, - {"/../foo", null}, - {"a/.", "a/"}, - {"a/..", ""}, - {"a/../..", null}, - {"/foo/../../bar", null}, - - // Query parameter specifics - {"/ctx/dir?/../index.html", "/ctx/index.html"}, - {"/get-files?file=/etc/passwd", "/get-files?file=/etc/passwd"}, - {"/get-files?file=../../../../../passwd", null}, - - // Known windows shell quirks - {"file.txt ", "file.txt "}, // with spaces - {"file.txt...", "file.txt..."}, // extra dots ignored by windows - // BREAKS Jenkins: {"file.txt\u0000", "file.txt\u0000"}, // null terminated is ignored by windows - {"file.txt\r", "file.txt\r"}, // CR terminated is ignored by windows - {"file.txt\n", "file.txt\n"}, // LF terminated is ignored by windows - {"file.txt\"\"\"\"", "file.txt\"\"\"\""}, // extra quotes ignored by windows - {"file.txt<<<>>><", "file.txt<<<>>><"}, // angle brackets at end of path ignored by windows - {"././././././file.txt", "file.txt"}, - - // Oddball requests that look like path traversal, but are not - {"/....", "/...."}, - {"/..../ctx/..../blah/logo.jpg", "/..../ctx/..../blah/logo.jpg"}, - - // paths with encoded segments should remain encoded - // canonicalPath() is not responsible for decoding characters - {"%2e%2e/", "%2e%2e/"}, - }; - return Arrays.asList(canonical); - } - - @Parameterized.Parameter(0) - public String input; - - @Parameterized.Parameter(1) - public String expectedResult; - - @Test - public void testCanonicalPath() - { - assertThat("Canonical", URIUtil.canonicalPath(input), is(expectedResult)); - } - -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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.util; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +import java.util.Arrays; +import java.util.List; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +@RunWith(Parameterized.class) +public class URIUtilCanonicalPathTest +{ + @Parameterized.Parameters(name = "{0}") + public static List data() + { + String[][] canonical = + { + // Basic examples (no changes expected) + {"/hello.html", "/hello.html"}, + {"/css/main.css", "/css/main.css"}, + {"/", "/"}, + {"", ""}, + {"/aaa/bbb/", "/aaa/bbb/"}, + {"/aaa/bbb", "/aaa/bbb"}, + {"aaa/bbb", "aaa/bbb"}, + {"aaa/", "aaa/"}, + {"aaa", "aaa"}, + {"a", "a"}, + {"a/", "a/"}, + + // Extra slashes + {"/aaa//bbb/", "/aaa//bbb/"}, + {"/aaa//bbb", "/aaa//bbb"}, + {"/aaa///bbb/", "/aaa///bbb/"}, + + // Path traversal with current references "./" + {"/aaa/./bbb/", "/aaa/bbb/"}, + {"/aaa/./bbb", "/aaa/bbb"}, + {"./bbb/", "bbb/"}, + {"./aaa/../bbb/", "bbb/"}, + {"/foo/.", "/foo/"}, + {"./", ""}, + {".", ""}, + {".//", "/"}, + {".///", "//"}, + {"/.", "/"}, + {"//.", "//"}, + {"///.", "///"}, + + // Path traversal directory (but not past root) + {"/aaa/../bbb/", "/bbb/"}, + {"/aaa/../bbb", "/bbb"}, + {"/aaa..bbb/", "/aaa..bbb/"}, + {"/aaa..bbb", "/aaa..bbb"}, + {"/aaa/..bbb/", "/aaa/..bbb/"}, + {"/aaa/..bbb", "/aaa/..bbb"}, + {"/aaa/./../bbb/", "/bbb/"}, + {"/aaa/./../bbb", "/bbb"}, + {"/aaa/bbb/ccc/../../ddd/", "/aaa/ddd/"}, + {"/aaa/bbb/ccc/../../ddd", "/aaa/ddd"}, + {"/foo/../bar//", "/bar//"}, + {"/ctx/../bar/../ctx/all/index.txt", "/ctx/all/index.txt"}, + {"/down/.././index.html", "/index.html"}, + + // Path traversal up past root + {"..", null}, + {"./..", null}, + {"aaa/../..", null}, + {"/foo/bar/../../..", null}, + {"/../foo", null}, + {"a/.", "a/"}, + {"a/..", ""}, + {"a/../..", null}, + {"/foo/../../bar", null}, + + // Query parameter specifics + {"/ctx/dir?/../index.html", "/ctx/index.html"}, + {"/get-files?file=/etc/passwd", "/get-files?file=/etc/passwd"}, + {"/get-files?file=../../../../../passwd", null}, + + // Known windows shell quirks + {"file.txt ", "file.txt "}, // with spaces + {"file.txt...", "file.txt..."}, // extra dots ignored by windows + // BREAKS Jenkins: {"file.txt\u0000", "file.txt\u0000"}, // null terminated is ignored by windows + {"file.txt\r", "file.txt\r"}, // CR terminated is ignored by windows + {"file.txt\n", "file.txt\n"}, // LF terminated is ignored by windows + {"file.txt\"\"\"\"", "file.txt\"\"\"\""}, // extra quotes ignored by windows + {"file.txt<<<>>><", "file.txt<<<>>><"}, // angle brackets at end of path ignored by windows + {"././././././file.txt", "file.txt"}, + + // Oddball requests that look like path traversal, but are not + {"/....", "/...."}, + {"/..../ctx/..../blah/logo.jpg", "/..../ctx/..../blah/logo.jpg"}, + + // paths with encoded segments should remain encoded + // canonicalPath() is not responsible for decoding characters + {"%2e%2e/", "%2e%2e/"}, + }; + return Arrays.asList(canonical); + } + + @Parameterized.Parameter(0) + public String input; + + @Parameterized.Parameter(1) + public String expectedResult; + + @Test + public void testCanonicalPath() + { + assertThat("Canonical", URIUtil.canonicalPath(input), is(expectedResult)); + } + +} diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml index 1c3dfe2e58c..e5777924d80 100644 --- a/jetty-webapp/pom.xml +++ b/jetty-webapp/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-webapp @@ -27,54 +27,6 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2]",* - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - - org.codehaus.mojo findbugs-maven-plugin @@ -82,6 +34,17 @@ org.eclipse.jetty.webapp.* + + org.apache.maven.plugins + maven-surefire-plugin + + + org.eclipse.jetty.webapp.WebAppClassLoaderUrlStreamTest + + 1 + false + + diff --git a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/URLStreamHandlerUtil.java b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/URLStreamHandlerUtil.java index aae6de59eed..2e6addb4684 100644 --- a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/URLStreamHandlerUtil.java +++ b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/URLStreamHandlerUtil.java @@ -1,78 +1,78 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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.webapp; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.net.URL; -import java.net.URLStreamHandlerFactory; -import java.util.Arrays; -import java.util.Optional; - -public final class URLStreamHandlerUtil -{ - public static void setFactory(URLStreamHandlerFactory factory) - { - try - { - // First, reset the factory field - Field factoryField = getURLStreamHandlerFactoryField(); - factoryField.setAccessible(true); - factoryField.set(null, null); - - if(factory != null) - { - // Next, set the factory - URL.setURLStreamHandlerFactory(factory); - } - } - catch(Throwable ignore) - { - // ignore.printStackTrace(System.err); - } - } - - public static URLStreamHandlerFactory getFactory() - { - try - { - // First, reset the factory field - Field factoryField = getURLStreamHandlerFactoryField(); - factoryField.setAccessible(true); - return (URLStreamHandlerFactory) factoryField.get(null); - } - catch(Throwable ignore) - { - return null; - } - } - - private static Field getURLStreamHandlerFactoryField() - { - Optional optFactoryField = Arrays.stream(URL.class.getDeclaredFields()) - .filter((f) -> Modifier.isStatic(f.getModifiers()) && - f.getType().equals(URLStreamHandlerFactory.class)) - .findFirst(); - - if(optFactoryField.isPresent()) - return optFactoryField.get(); - - throw new RuntimeException( "Cannot find URLStreamHandlerFactory field in " + URL.class.getName() ); - } -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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.webapp; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.net.URL; +import java.net.URLStreamHandlerFactory; +import java.util.Arrays; +import java.util.Optional; + +public final class URLStreamHandlerUtil +{ + public static void setFactory(URLStreamHandlerFactory factory) + { + try + { + // First, reset the factory field + Field factoryField = getURLStreamHandlerFactoryField(); + factoryField.setAccessible(true); + factoryField.set(null, null); + + if(factory != null) + { + // Next, set the factory + URL.setURLStreamHandlerFactory(factory); + } + } + catch(Throwable ignore) + { + // ignore.printStackTrace(System.err); + } + } + + public static URLStreamHandlerFactory getFactory() + { + try + { + // First, reset the factory field + Field factoryField = getURLStreamHandlerFactoryField(); + factoryField.setAccessible(true); + return (URLStreamHandlerFactory) factoryField.get(null); + } + catch(Throwable ignore) + { + return null; + } + } + + private static Field getURLStreamHandlerFactoryField() + { + Optional optFactoryField = Arrays.stream(URL.class.getDeclaredFields()) + .filter((f) -> Modifier.isStatic(f.getModifiers()) && + f.getType().equals(URLStreamHandlerFactory.class)) + .findFirst(); + + if(optFactoryField.isPresent()) + return optFactoryField.get(); + + throw new RuntimeException( "Cannot find URLStreamHandlerFactory field in " + URL.class.getName() ); + } +} diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml index 7f722aec9a8..35eaeb44849 100644 --- a/jetty-xml/pom.xml +++ b/jetty-xml/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-xml @@ -14,30 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/pom.xml b/pom.xml index 9b662be2dce..e53667acd88 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 org.eclipse.jetty jetty-project - 9.3.20-SNAPSHOT + 9.4.7-SNAPSHOT Jetty :: Project The Eclipse Jetty Project pom @@ -861,92 +861,6 @@ - - - - org.apache.maven.plugins - maven-jxr-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - 512m - true - true - true - - - - org.apache.maven.plugins - maven-pmd-plugin - - 1.7 - - jetty/pmd_ruleset.xml - - - - - org.codehaus.mojo - findbugs-maven-plugin - - - - - - jetty-ant - jetty-util - jetty-jmx - jetty-io - jetty-http - jetty-http2 - jetty-continuation - jetty-server - jetty-xml - jetty-security - jetty-servlet - jetty-webapp - jetty-fcgi - jetty-websocket - jetty-servlets - jetty-util-ajax - apache-jsp - apache-jstl - jetty-maven-plugin - jetty-jspc-maven-plugin - jetty-deploy - jetty-start - jetty-plus - jetty-annotations - jetty-jndi - jetty-jaas - jetty-cdi - jetty-spring - jetty-client - jetty-proxy - jetty-jaspi - jetty-rewrite - jetty-nosql - jetty-infinispan - jetty-hazelcast - jetty-gcloud - tests - examples - jetty-quickstart - jetty-distribution - jetty-runner - jetty-monitor - jetty-http-spi - jetty-osgi - jetty-alpn - jetty-bom - jetty-documentation - - - - - @@ -957,7 +871,7 @@ javax.websocket javax.websocket-api - 1.0 + 1.1 javax.annotation @@ -1033,7 +947,7 @@ org.eclipse.jetty.toolchain jetty-test-helper - 4.0 + 4.1 org.eclipse.jetty.toolchain @@ -1665,6 +1579,17 @@ https://webtide.com + + + jetty-snapshots + jetty-snapshots + http://oss.sonatype.org/content/repositories/jetty-snapshots + + true + + + + oss.sonatype.org diff --git a/tests/pom.xml b/tests/pom.xml index ea58838cf0e..40115df2764 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -1,27 +1,10 @@ - 4.0.0 org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml org.eclipse.jetty.tests @@ -75,5 +58,6 @@ test-integration test-quickstart test-jmx + test-http-client-transport diff --git a/tests/test-continuation/pom.xml b/tests/test-continuation/pom.xml index 883694e88b0..0cc371b0dc2 100644 --- a/tests/test-continuation/pom.xml +++ b/tests/test-continuation/pom.xml @@ -1,26 +1,9 @@ - org.eclipse.jetty.tests tests-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 @@ -28,6 +11,9 @@ jar Test :: Continuation Asynchronous API + + ${project.groupId}.continuation + @@ -42,11 +28,11 @@ - org.eclipse.jetty + org.eclipse.jetty jetty-servlet ${project.version} provided - + org.eclipse.jetty jetty-continuation @@ -57,6 +43,6 @@ jetty-test-helper compile - + diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml index c6ba1f95946..8910c3f7934 100644 --- a/tests/test-integration/pom.xml +++ b/tests/test-integration/pom.xml @@ -1,26 +1,9 @@ - org.eclipse.jetty.tests tests-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 test-integration @@ -31,6 +14,8 @@ ${project.build.directory}/test-wars ${project.build.directory}/test-libs ${project.build.directory}/test-dist + ${project.groupId}.integrations + @@ -116,6 +101,13 @@ ${project.version} pom + + org.eclipse.jetty + jetty-http + ${project.version} + tests + test + org.eclipse.jetty.toolchain jetty-test-helper @@ -123,7 +115,7 @@ org.eclipse.jetty - jetty-jsp + apache-jsp ${project.version} @@ -133,5 +125,17 @@ war test + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + diff --git a/tests/test-jmx/jmx-webapp-it/pom.xml b/tests/test-jmx/jmx-webapp-it/pom.xml index 5401ae8e540..92d843ba518 100644 --- a/tests/test-jmx/jmx-webapp-it/pom.xml +++ b/tests/test-jmx/jmx-webapp-it/pom.xml @@ -1,26 +1,9 @@ - org.eclipse.jetty.tests test-jmx-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jmx-webapp-it @@ -31,17 +14,18 @@ UTF-8 UTF-8 ${project.groupId}.jmx.webapp.it - ${project.basedir}/src/test/scripts ${project.build.directory}/test-base - ${project.build.directory}/test-home org.eclipse.jetty - jetty-distribution + jetty-annotations + ${project.version} + + + org.eclipse.jetty + jetty-jmx ${project.version} - zip - runtime org.eclipse.jetty.tests @@ -72,136 +56,14 @@ jmx-webapp runtime war - true - true + true + true true ${test-base-dir}/webapps - - unpack-jetty-distro - process-test-resources - - unpack-dependencies - - - jetty-distribution - runtime - zip - true - ${test-home-dir} - true - true - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.17 - - - - integration-test - verify - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.7 - - - start-jetty - pre-integration-test - - run - - - - - - Integration Test : Setup Jetty - - - - - - - - - Integration Test : Starting Jetty ... - - - - - - - - - - - Integration Test : Jetty is now available - - - - - stop-jetty - post-integration-test - - run - - - - - - Integration Test : Stop Jetty - - - - - - - - - - - - - it-windows - - - Windows - - - - cmd - /c - start-jetty.bat - stop-jetty.bat - - - - it-unix - - - unix - - - - sh - -- - setup-jetty.sh - start-jetty.sh - stop-jetty.sh - - - diff --git a/tests/test-jmx/jmx-webapp/pom.xml b/tests/test-jmx/jmx-webapp/pom.xml index 0e81a58516e..d742b4c7c93 100644 --- a/tests/test-jmx/jmx-webapp/pom.xml +++ b/tests/test-jmx/jmx-webapp/pom.xml @@ -1,27 +1,10 @@ - 4.0.0 org.eclipse.jetty.tests test-jmx-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT jmx-webapp war @@ -54,12 +37,6 @@ true - - org.apache.maven.plugins - maven-war-plugin - - - diff --git a/tests/test-jmx/pom.xml b/tests/test-jmx/pom.xml index 895efd6c865..4698c64f29d 100644 --- a/tests/test-jmx/pom.xml +++ b/tests/test-jmx/pom.xml @@ -1,26 +1,9 @@ - org.eclipse.jetty.tests tests-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 test-jmx-parent diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml index c81bfae9e94..48701d05068 100644 --- a/tests/test-loginservice/pom.xml +++ b/tests/test-loginservice/pom.xml @@ -1,31 +1,17 @@ - 4.0.0 org.eclipse.jetty.tests tests-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-loginservice Jetty Tests :: Login Service http://www.eclipse.org/jetty + + ${project.groupId}.loginservice + org.eclipse.jetty diff --git a/tests/test-quickstart/pom.xml b/tests/test-quickstart/pom.xml index 2d746a1a3d8..1e9b2b46451 100644 --- a/tests/test-quickstart/pom.xml +++ b/tests/test-quickstart/pom.xml @@ -1,8 +1,9 @@ + org.eclipse.jetty.tests tests-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 @@ -11,6 +12,9 @@ Test :: Jetty Quick Start Jetty Quick Start Test http://www.eclipse.org/jetty + + ${project.groupId}.tests.quickstart + org.eclipse.jetty @@ -99,14 +103,13 @@ org.eclipse.jetty.toolchain jetty-test-helper - + org.codehaus.mojo appassembler-maven-plugin - 1.7 unix diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml index e8f71588145..962172f91c5 100644 --- a/tests/test-sessions/pom.xml +++ b/tests/test-sessions/pom.xml @@ -1,27 +1,10 @@ - 4.0.0 org.eclipse.jetty.tests tests-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-sessions-parent Jetty Tests :: Sessions :: Parent @@ -32,8 +15,8 @@ test-sessions-common test-hash-sessions + test-file-sessions test-jdbc-sessions - test-mongodb-sessions test-infinispan-sessions test-gcloud-sessions diff --git a/tests/test-sessions/test-hash-sessions/pom.xml b/tests/test-sessions/test-hash-sessions/pom.xml index 428c9bee4b1..b30d3270bb8 100644 --- a/tests/test-sessions/test-hash-sessions/pom.xml +++ b/tests/test-sessions/test-hash-sessions/pom.xml @@ -1,31 +1,17 @@ - 4.0.0 org.eclipse.jetty.tests test-sessions-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-hash-sessions Jetty Tests :: Sessions :: Hash http://www.eclipse.org/jetty + + ${project.groupId}.sessions.hash + diff --git a/tests/test-sessions/test-jdbc-sessions/pom.xml b/tests/test-sessions/test-jdbc-sessions/pom.xml index 1381813408f..3d7814d0140 100644 --- a/tests/test-sessions/test-jdbc-sessions/pom.xml +++ b/tests/test-sessions/test-jdbc-sessions/pom.xml @@ -1,31 +1,17 @@ - 4.0.0 org.eclipse.jetty.tests test-sessions-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-jdbc-sessions Jetty Tests :: Sessions :: JDBC http://www.eclipse.org/jetty + + ${project.groupId}.sessions.jdbc + @@ -62,13 +48,13 @@ org.apache.derby derby - 10.4.1.3 + 10.12.1.1 test org.apache.derby derbytools - 10.4.1.3 + 10.12.1.1 test diff --git a/tests/test-sessions/test-mongodb-sessions/pom.xml b/tests/test-sessions/test-mongodb-sessions/pom.xml index 5ab37303be2..ef3f46f605e 100644 --- a/tests/test-sessions/test-mongodb-sessions/pom.xml +++ b/tests/test-sessions/test-mongodb-sessions/pom.xml @@ -1,31 +1,17 @@ - 4.0.0 org.eclipse.jetty.tests test-sessions-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-mongodb-sessions Jetty Tests :: Sessions :: Mongo http://www.eclipse.org/jetty + + ${project.groupId}.sessions.mongo + diff --git a/tests/test-sessions/test-sessions-common/pom.xml b/tests/test-sessions/test-sessions-common/pom.xml index f490464eb28..c4f625724fe 100644 --- a/tests/test-sessions/test-sessions-common/pom.xml +++ b/tests/test-sessions/test-sessions-common/pom.xml @@ -1,31 +1,17 @@ - 4.0.0 org.eclipse.jetty.tests test-sessions-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-sessions-common Jetty Tests :: Sessions :: Common http://www.eclipse.org/jetty + + ${project.groupId}.sessions.common + diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml index 0d5ff864c45..ab77e4db250 100644 --- a/tests/test-webapps/pom.xml +++ b/tests/test-webapps/pom.xml @@ -1,27 +1,10 @@ - 4.0.0 org.eclipse.jetty.tests tests-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml test-webapps-parent @@ -37,7 +20,7 @@ true - + org.jacoco jacoco-maven-plugin diff --git a/tests/test-webapps/test-jaas-webapp/pom.xml b/tests/test-webapps/test-jaas-webapp/pom.xml index 9f054e9d6c7..02541c39cd3 100644 --- a/tests/test-webapps/test-jaas-webapp/pom.xml +++ b/tests/test-webapps/test-jaas-webapp/pom.xml @@ -4,11 +4,14 @@ org.eclipse.jetty.tests test-webapps-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-jaas-webapp Jetty Tests :: WebApp :: JAAS war + + ${project.groupId}.jaas + @@ -28,8 +31,8 @@ - jetty.home - ${basedir}/src/main/config + jetty.base + ${basedir}/src/main/config/demo-base @@ -47,6 +50,13 @@ + + + mysql + mysql-connector-java + 5.1.19 + + org.apache.maven.plugins diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml index 5ea2acb91aa..d9309abff25 100644 --- a/tests/test-webapps/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -1,26 +1,9 @@ - org.eclipse.jetty.tests test-webapps-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 @@ -29,6 +12,9 @@ Test :: Jetty Test Webapp http://www.eclipse.org/jetty war + + ${project.groupId}.tests.webapp + @@ -70,15 +56,6 @@ - - - maven-war-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - org.apache.felix maven-bundle-plugin @@ -87,32 +64,29 @@ war + + javax.servlet.jsp.*;version="[2.2.0,3.0)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* + !com.acme* + + / + + .,WEB-INF/classes + + + + + + maven-war-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + - - - bundle-manifest - process-classes - - manifest - - - - org.eclipse.jetty.test-jetty-webapp - javax.servlet.jsp.*;version="[2.2.0, 3.0)",javax.servlet.*;version="[2.6,3.2)",org.eclipse.jetty.*;version="9.1",* - !com.acme* - - / - - .,WEB-INF/classes - - - - org.eclipse.jetty @@ -143,11 +117,6 @@ /test ${project.build.directory}/work - - - ${basedir}/target/sessions - - @@ -157,6 +126,14 @@ + + org.apache.maven.plugins + maven-deploy-plugin + + + false + + @@ -198,6 +175,13 @@ ${project.version} test + + org.eclipse.jetty + jetty-servlet + ${project.version} + tests + test + org.eclipse.jetty.toolchain jetty-test-helper @@ -215,12 +199,6 @@ 2.1 provided - - org.eclipse.jetty.spdy - spdy-http-server - ${project.version} - test - javax.servlet jstl @@ -249,10 +227,14 @@ jspc + diff --git a/tests/test-webapps/test-jndi-webapp/pom.xml b/tests/test-webapps/test-jndi-webapp/pom.xml index 9b004407398..ecfb628637d 100644 --- a/tests/test-webapps/test-jndi-webapp/pom.xml +++ b/tests/test-webapps/test-jndi-webapp/pom.xml @@ -4,11 +4,14 @@ org.eclipse.jetty.tests test-webapps-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-jndi-webapp Jetty Tests :: WebApp :: JNDI war + + ${project.groupId}.jndi + @@ -69,7 +72,6 @@ org.apache.maven.plugins maven-assembly-plugin - 2.2-beta-3 package @@ -80,18 +82,11 @@ src/main/assembly/config.xml - + - - org.apache.maven.plugins - maven-war-plugin - - - org.eclipse.jetty jetty-maven-plugin diff --git a/tests/test-webapps/test-mock-resources/pom.xml b/tests/test-webapps/test-mock-resources/pom.xml index 600b95e7afa..9aa5f62922e 100644 --- a/tests/test-webapps/test-mock-resources/pom.xml +++ b/tests/test-webapps/test-mock-resources/pom.xml @@ -3,11 +3,14 @@ org.eclipse.jetty.tests test-webapps-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT Jetty Tests :: WebApp :: Mock Resources test-mock-resources jar + + ${project.groupId}.mocks + @@ -22,7 +25,6 @@ true - generate-manifest manifest @@ -44,23 +46,6 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - - @@ -73,12 +58,6 @@ javax.servlet javax.servlet-api - org.eclipse.jetty.orbit javax.mail.glassfish diff --git a/tests/test-webapps/test-proxy-webapp/pom.xml b/tests/test-webapps/test-proxy-webapp/pom.xml index eda969b6085..86fffafd9bf 100644 --- a/tests/test-webapps/test-proxy-webapp/pom.xml +++ b/tests/test-webapps/test-proxy-webapp/pom.xml @@ -1,26 +1,9 @@ - org.eclipse.jetty.tests test-webapps-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT ../pom.xml 4.0.0 @@ -28,6 +11,9 @@ test-proxy-webapp Test :: Jetty Proxy Webapp war + + ${project.groupId}.proxy + @@ -38,6 +24,14 @@ + + org.apache.maven.plugins + maven-deploy-plugin + + + false + + @@ -82,18 +76,30 @@ ${project.version} provided + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty + jetty-annotations + ${project.version} + test + javax.servlet.jsp jsp-api 2.1 provided - - org.eclipse.jetty.spdy - spdy-http-server - ${project.version} - test - javax.servlet jstl diff --git a/tests/test-webapps/test-servlet-spec/pom.xml b/tests/test-webapps/test-servlet-spec/pom.xml index 03af8117aa7..7e412ae69ed 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.2.23-SNAPSHOT + 9.4.7-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 8cb75bbd495..6b1fa7d3eb7 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,49 +3,20 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-container-initializer jar Jetty Tests :: WebApp :: Servlet Spec :: ServletContainerInitializer Test Jar + + ${project.groupId}.sci + - - maven-compiler-plugin - - false - - - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - org.apache.felix maven-bundle-plugin true - - - bundle-manifest - process-classes - - manifest - - - org.eclipse.jetty.tests.test-servlet-container-initializer;singleton:=true 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 2a9186175c3..81d9032b4ec 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,11 +4,14 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT Jetty Tests :: Webapps :: Spec Webapp test-spec-webapp war + + ${project.groupId}.spec + @@ -18,7 +21,7 @@ true - + org.apache.maven.plugins maven-assembly-plugin @@ -59,7 +62,6 @@ - org.apache.felix maven-bundle-plugin @@ -68,40 +70,28 @@ war + + org.eclipse.jetty.tests.test-spec-webapp + Test Webapp for Servlet 3.1 Features + + javax.servlet.jsp.*;version="[2.2.0, 3.0)", + javax.transaction*;version="[1.1,1.3)", + javax.servlet*;version="[2.6,3.2)", + org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))", + org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", + org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", + com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", + * + + <_nouses /> + com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true + / + .,WEB-INF/classes,WEB-INF/lib + /META-INF/plugin-context.xml + - - - bundle-manifest - process-classes - - manifest - - - - org.eclipse.jetty.tests.test-spec-webapp - Test Webapp for Servlet 3.1 Features - - javax.servlet.jsp.*;version="[2.2.0, 3.0)", - javax.transaction.*;version="[1.1, 2.0)", - javax.servlet.*;version="3.0", - javax.sql, - org.eclipse.jetty.webapp;version="9.2",org.eclipse.jetty.plus.jndi;version="9.2", - org.eclipse.jetty.security;version="9.2", - com.acme;version="9.2", - * - - com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - / - .,WEB-INF/classes,WEB-INF/lib - ./META-INF/plugin-context.xml - <_nouses>true - - - - - maven-antrun-plugin @@ -149,24 +139,6 @@ - org.eclipse.jetty jetty-maven-plugin @@ -200,6 +172,7 @@ + javax.transaction 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 39e96fc4152..21722e8cdbb 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,12 +3,15 @@ org.eclipse.jetty.tests test-servlet-spec-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT Jetty Tests :: WebApp :: Servlet Spec :: Fragment Jar org.eclipse.jetty.tests test-web-fragment jar + + ${project.groupId}.fragment + @@ -17,46 +20,6 @@ false - - org.apache.maven.plugins - maven-jar-plugin - - - artifact-jar - - jar - - - - - - target/classes/META-INF/MANIFEST.MF - - - - - org.apache.felix - maven-bundle-plugin - true - - - bundle-manifest - process-classes - - manifest - - - - - - org.eclipse.jetty.tests.test-web-fragment;singleton:=true - A bundle containing web fragment for testing - com.acme.fragment;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - <_nouses>true - - - - @@ -64,5 +27,12 @@ javax.servlet javax.servlet-api + + diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml index a3e0aecc037..7f6f901ee26 100644 --- a/tests/test-webapps/test-webapp-rfc2616/pom.xml +++ b/tests/test-webapps/test-webapp-rfc2616/pom.xml @@ -1,32 +1,18 @@ - 4.0.0 org.eclipse.jetty.tests test-webapps-parent - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT test-webapp-rfc2616 Jetty Tests :: WebApp :: RFC2616 http://www.eclipse.org/jetty war + + ${project.groupId}.rfc2616 + From 54367621e49b7f1dd52f1f024187ad2424194908 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 8 Aug 2017 09:54:09 -0700 Subject: [PATCH 142/147] Fixing cdi/websocket pom versions --- jetty-cdi/pom.xml | 2 +- jetty-cdi/test-cdi-it/pom.xml | 2 +- jetty-websocket/javax-websocket-client-impl/pom.xml | 2 +- jetty-websocket/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 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index cdf18865148..ed7ef746315 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -2,7 +2,7 @@ org.eclipse.jetty jetty-project - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 jetty-cdi diff --git a/jetty-cdi/test-cdi-it/pom.xml b/jetty-cdi/test-cdi-it/pom.xml index fb6b0ea619d..2ab623e0b39 100644 --- a/jetty-cdi/test-cdi-it/pom.xml +++ b/jetty-cdi/test-cdi-it/pom.xml @@ -4,7 +4,7 @@ org.eclipse.jetty.cdi jetty-cdi-parent - 9.3.0-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 cdi-webapp-it diff --git a/jetty-websocket/javax-websocket-client-impl/pom.xml b/jetty-websocket/javax-websocket-client-impl/pom.xml index 8c966e24fc1..26683ee8690 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.2.23-SNAPSHOT + 9.4.7-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 d43af2cdf20..bb7337e7e32 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index a9c46d13bee..d34e6db1e65 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -3,7 +3,7 @@ jetty-project org.eclipse.jetty - 9.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-api/pom.xml b/jetty-websocket/websocket-api/pom.xml index d9ebbaddfe9..c208b331a6d 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index 0467b4834b6..f9a38542e31 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index a1340125c08..4db16311421 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index d9f270511ed..01134399a2d 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index c99b953a5ae..c0717076a0e 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.2.23-SNAPSHOT + 9.4.7-SNAPSHOT 4.0.0 From 952bb8dfddf48c9ddc89e4d824d1d67525930460 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 8 Aug 2017 10:40:58 -0700 Subject: [PATCH 143/147] Fixing compilation --- jetty-cdi/pom.xml | 52 ++++++------------- .../javax-websocket-client-impl/pom.xml | 2 +- jetty-websocket/pom.xml | 18 ------- jetty-websocket/websocket-client/pom.xml | 10 ++++ jetty-websocket/websocket-common/pom.xml | 1 - jetty-websocket/websocket-server/pom.xml | 1 - jetty-websocket/websocket-servlet/pom.xml | 8 --- pom.xml | 7 ++- 8 files changed, 32 insertions(+), 67 deletions(-) diff --git a/jetty-cdi/pom.xml b/jetty-cdi/pom.xml index ed7ef746315..02a9f449415 100644 --- a/jetty-cdi/pom.xml +++ b/jetty-cdi/pom.xml @@ -5,45 +5,23 @@ 9.4.7-SNAPSHOT 4.0.0 - jetty-cdi - Jetty :: CDI Configurations + org.eclipse.jetty.cdi + jetty-cdi-parent + Jetty :: CDI :: Parent http://www.eclipse.org/jetty - jar + pom - ${project.groupId}.${project.artifactId} + 2.4.3.Final - - - - org.apache.maven.plugins - maven-assembly-plugin - - - package - - single - - - - config - - - - - - - - - - org.eclipse.jetty - jetty-plus - ${project.version} - - - org.eclipse.jetty - jetty-deploy - ${project.version} - - + + cdi-core + cdi-servlet + cdi-full-servlet + cdi-websocket + test-cdi-webapp + + diff --git a/jetty-websocket/javax-websocket-client-impl/pom.xml b/jetty-websocket/javax-websocket-client-impl/pom.xml index 26683ee8690..e68b449cccb 100644 --- a/jetty-websocket/javax-websocket-client-impl/pom.xml +++ b/jetty-websocket/javax-websocket-client-impl/pom.xml @@ -22,7 +22,7 @@ javax.websocket - javax.websocket-api + javax.websocket-client-api org.eclipse.jetty diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index d34e6db1e65..d387e3248f8 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -60,24 +60,6 @@ - - org.codehaus.mojo - clirr-maven-plugin - 2.5 - - - compare-api - package - - clirr - - - - - info - 9.1.0.v20131115 - - diff --git a/jetty-websocket/websocket-client/pom.xml b/jetty-websocket/websocket-client/pom.xml index f9a38542e31..6022bf9d43b 100644 --- a/jetty-websocket/websocket-client/pom.xml +++ b/jetty-websocket/websocket-client/pom.xml @@ -15,6 +15,16 @@ + + org.eclipse.jetty + jetty-client + ${project.version} + + + org.eclipse.jetty + jetty-xml + ${project.version} + org.eclipse.jetty jetty-util diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index 4db16311421..f1a4ab31d92 100644 --- a/jetty-websocket/websocket-common/pom.xml +++ b/jetty-websocket/websocket-common/pom.xml @@ -71,7 +71,6 @@ artifact-jars - jar test-jar diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index 01134399a2d..ad4fc70c9c1 100644 --- a/jetty-websocket/websocket-server/pom.xml +++ b/jetty-websocket/websocket-server/pom.xml @@ -43,7 +43,6 @@ artifact-jars - jar test-jar diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index c0717076a0e..2b2c297750a 100644 --- a/jetty-websocket/websocket-servlet/pom.xml +++ b/jetty-websocket/websocket-servlet/pom.xml @@ -18,14 +18,6 @@ org.apache.maven.plugins maven-jar-plugin - - - artifact-jar - - jar - - - target/classes/META-INF/MANIFEST.MF diff --git a/pom.xml b/pom.xml index e53667acd88..06dec7aacf7 100644 --- a/pom.xml +++ b/pom.xml @@ -871,7 +871,12 @@ javax.websocket javax.websocket-api - 1.1 + 1.0 + + + javax.websocket + javax.websocket-client-api + 1.0 javax.annotation From 71d5fcf246034dce91cd642d35cdbaace9806329 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 8 Aug 2017 11:09:25 -0700 Subject: [PATCH 144/147] Fixing javadoc errors --- .../websocket/jsr356/JettyClientContainerProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java index 251d214abf0..65056797bed 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java +++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JettyClientContainerProvider.java @@ -82,7 +82,7 @@ public class JettyClientContainerProvider extends ContainerProvider /** * Add ability of calls to {@link ContainerProvider#getWebSocketContainer()} to - * find and return the {@link javax.websocket.server.ServerContainer} from the + * find and return the {@code javax.websocket.server.ServerContainer} from the * active {@code javax.servlet.ServletContext}. *

    *

    @@ -90,7 +90,7 @@ public class JettyClientContainerProvider extends ContainerProvider * occurs within a thread being processed by the Servlet container. *

    * - * @param flag true to to use return the {@link javax.websocket.server.ServerContainer} + * @param flag true to to use return the {@code javax.websocket.server.ServerContainer} * from the active {@code javax.servlet.ServletContext} for all calls to * {@link ContainerProvider#getWebSocketContainer()} from within a Servlet thread. */ @@ -102,13 +102,13 @@ public class JettyClientContainerProvider extends ContainerProvider /** * Test if {@link ContainerProvider#getWebSocketContainer()} has the ability to - * find and return the {@link javax.websocket.server.ServerContainer} from the + * find and return the {@code javax.websocket.server.ServerContainer} from the * active {@code javax.servlet.ServletContext}, before creating a new client based * {@link WebSocketContainer}. * * @return true if {@link WebSocketContainer} returned from * calls to {@link ContainerProvider#getWebSocketContainer()} could be the - * {@link javax.websocket.server.ServerContainer} + * {@code javax.websocket.server.ServerContainer} * from the active {@code javax.servlet.ServletContext} */ @SuppressWarnings("unused") From b0fd444a1bd17e65047a38ca564a05868d20fe67 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 9 Aug 2017 14:31:06 -0700 Subject: [PATCH 145/147] File EOL issue, post-hard reset --- .../DelayedStartClientOnServerTest.java | 788 +++++++++--------- .../scopes/DelegatedContainerScope.java | 174 ++-- .../test/resources/jetty-logging.properties | 56 +- 3 files changed, 509 insertions(+), 509 deletions(-) diff --git a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java index ac43e595d7d..9da6b911cb1 100644 --- a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java +++ b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java @@ -1,394 +1,394 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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.websocket.jsr356.server; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.CoreMatchers.startsWith; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.StringWriter; -import java.net.HttpURLConnection; -import java.net.URI; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.Executor; -import java.util.stream.Collectors; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.websocket.ContainerProvider; -import javax.websocket.Endpoint; -import javax.websocket.EndpointConfig; -import javax.websocket.OnMessage; -import javax.websocket.Session; -import javax.websocket.WebSocketContainer; -import javax.websocket.server.ServerEndpoint; - -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.util.IO; -import org.eclipse.jetty.util.component.ContainerLifeCycle; -import org.eclipse.jetty.util.thread.QueuedThreadPool; -import org.eclipse.jetty.websocket.api.util.WSURI; -import org.eclipse.jetty.websocket.jsr356.ClientContainer; -import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer; -import org.junit.Test; - -public class DelayedStartClientOnServerTest -{ - @ServerEndpoint("/echo") - public static class EchoSocket - { - @OnMessage - public String echo(String msg) - { - return msg; - } - } - - /** - * Using the Client specific techniques of JSR356, connect to the echo socket - * and perform an echo request. - */ - public static class ClientConnectServlet extends HttpServlet - { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException - { - // Client specific technique - WebSocketContainer container = ContainerProvider.getWebSocketContainer(); - try - { - URI wsURI = WSURI.toWebsocket(req.getRequestURL()).resolve("/echo"); - Session session = container.connectToServer(new Endpoint() - { - @Override - public void onOpen(Session session, EndpointConfig config) - { - /* do nothing */ - } - }, wsURI); - // don't care about the data sent, just the connect itself. - session.getBasicRemote().sendText("Hello"); - session.close(); - resp.setContentType("text/plain"); - resp.getWriter().println("Connected to " + wsURI); - } - catch (Throwable t) - { - throw new ServletException(t); - } - } - } - - /** - * Using the Server specific techniques of JSR356, connect to the echo socket - * and perform an echo request. - */ - public static class ServerConnectServlet extends HttpServlet - { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException - { - // Server specific technique - javax.websocket.server.ServerContainer container = - (javax.websocket.server.ServerContainer) - req.getServletContext().getAttribute("javax.websocket.server.ServerContainer"); - try - { - URI wsURI = WSURI.toWebsocket(req.getRequestURL()).resolve("/echo"); - Session session = container.connectToServer(new Endpoint() - { - @Override - public void onOpen(Session session, EndpointConfig config) - { - /* do nothing */ - } - }, wsURI); - // don't care about the data sent, just the connect itself. - session.getBasicRemote().sendText("Hello"); - session.close(); - resp.setContentType("text/plain"); - resp.getWriter().println("Connected to " + wsURI); - } - catch (Throwable t) - { - throw new ServletException(t); - } - } - } - - /** - * Using the Client specific techniques of JSR356, configure the WebSocketContainer. - */ - public static class ClientConfigureServlet extends HttpServlet - { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException - { - // Client specific technique - WebSocketContainer container = ContainerProvider.getWebSocketContainer(); - - try - { - container.setAsyncSendTimeout(5000); - container.setDefaultMaxTextMessageBufferSize(1000); - resp.setContentType("text/plain"); - resp.getWriter().printf("Configured %s - %s%n", container.getClass().getName(), container); - } - catch (Throwable t) - { - throw new ServletException(t); - } - } - } - - private void assertNoHttpClientPoolThreads(List threadNames) - { - for (String threadName : threadNames) - { - if (threadName.startsWith("HttpClient@") && !threadName.endsWith("-scheduler")) - { - throw new AssertionError("Found non-scheduler HttpClient thread in <" + - threadNames.stream().collect(Collectors.joining("[", ", ", "]")) - + ">"); - } - } - } - - /** - * Using the Server specific techniques of JSR356, configure the WebSocketContainer. - */ - public static class ServerConfigureServlet extends HttpServlet - { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException - { - // Server specific technique - javax.websocket.server.ServerContainer container = - (javax.websocket.server.ServerContainer) - req.getServletContext().getAttribute("javax.websocket.server.ServerContainer"); - try - { - container.setAsyncSendTimeout(5000); - container.setDefaultMaxTextMessageBufferSize(1000); - resp.setContentType("text/plain"); - resp.getWriter().printf("Configured %s - %s%n", container.getClass().getName(), container); - } - catch (Throwable t) - { - throw new ServletException(t); - } - } - } - - @Test - public void testNoExtraHttpClientThreads() throws Exception - { - Server server = new Server(0); - ServletContextHandler contextHandler = new ServletContextHandler(); - server.setHandler(contextHandler); - try - { - server.start(); - List threadNames = getThreadNames(server); - assertNoHttpClientPoolThreads(threadNames); - assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); - assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketClient@")))); - } - finally - { - server.stop(); - } - } - - @Test - public void testHttpClientThreads_AfterClientConnectTo() throws Exception - { - Server server = new Server(0); - ServletContextHandler contextHandler = new ServletContextHandler(); - server.setHandler(contextHandler); - // Using JSR356 Client Techniques to connectToServer() - contextHandler.addServlet(ClientConnectServlet.class, "/connect"); - javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); - container.addEndpoint(EchoSocket.class); - try - { - server.start(); - String response = GET(server.getURI().resolve("/connect")); - assertThat("Response", response, startsWith("Connected to ws://")); - List threadNames = getThreadNames(server); - assertNoHttpClientPoolThreads(threadNames); - assertThat("Threads", threadNames, hasItem(containsString("Jsr356Client@"))); - } - finally - { - server.stop(); - } - } - - @Test - public void testHttpClientThreads_AfterServerConnectTo() throws Exception - { - Server server = new Server(0); - ServletContextHandler contextHandler = new ServletContextHandler(); - server.setHandler(contextHandler); - // Using JSR356 Server Techniques to connectToServer() - contextHandler.addServlet(ServerConnectServlet.class, "/connect"); - javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); - container.addEndpoint(EchoSocket.class); - try - { - server.start(); - String response = GET(server.getURI().resolve("/connect")); - assertThat("Response", response, startsWith("Connected to ws://")); - List threadNames = getThreadNames((ContainerLifeCycle)container, server); - assertNoHttpClientPoolThreads(threadNames); - assertThat("Threads", threadNames, hasItem(containsString("WebSocketClient@"))); - } - finally - { - server.stop(); - } - } - - @Test - public void testHttpClientThreads_AfterClientConfigure() throws Exception - { - Server server = new Server(0); - ServletContextHandler contextHandler = new ServletContextHandler(); - server.setHandler(contextHandler); - // Using JSR356 Client Techniques to configure WebSocketContainer - contextHandler.addServlet(ClientConfigureServlet.class, "/configure"); - javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); - container.addEndpoint(EchoSocket.class); - try - { - server.start(); - String response = GET(server.getURI().resolve("/configure")); - assertThat("Response", response, startsWith("Configured " + ClientContainer.class.getName())); - List threadNames = getThreadNames((ContainerLifeCycle)container, server); - assertNoHttpClientPoolThreads(threadNames); - assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); - assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketClient@")))); - } - finally - { - server.stop(); - } - } - - @Test - public void testHttpClientThreads_AfterServerConfigure() throws Exception - { - Server server = new Server(0); - ServletContextHandler contextHandler = new ServletContextHandler(); - server.setHandler(contextHandler); - // Using JSR356 Server Techniques to configure WebSocketContainer - contextHandler.addServlet(ServerConfigureServlet.class, "/configure"); - javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); - container.addEndpoint(EchoSocket.class); - try - { - server.start(); - String response = GET(server.getURI().resolve("/configure")); - assertThat("Response", response, startsWith("Configured " + ServerContainer.class.getName())); - List threadNames = getThreadNames((ContainerLifeCycle)container, server); - assertNoHttpClientPoolThreads(threadNames); - assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); - } - finally - { - server.stop(); - } - } - - private String GET(URI destURI) throws IOException - { - HttpURLConnection http = (HttpURLConnection) destURI.toURL().openConnection(); - assertThat("HTTP GET (" + destURI + ") Response Code", http.getResponseCode(), is(200)); - try (InputStream in = http.getInputStream(); - InputStreamReader reader = new InputStreamReader(in, StandardCharsets.UTF_8); - StringWriter writer = new StringWriter()) - { - IO.copy(reader, writer); - return writer.toString(); - } - } - - public static List getThreadNames(ContainerLifeCycle... containers) - { - List threadNames = new ArrayList<>(); - Set seen = new HashSet<>(); - for (ContainerLifeCycle container : containers) - { - if (container == null) - { - continue; - } - - findConfiguredThreadNames(seen, threadNames, container); - } - seen.clear(); - // System.out.println("Threads: " + threadNames.stream().collect(Collectors.joining(", ", "[", "]"))); - return threadNames; - } - - private static void findConfiguredThreadNames(Set seen, List threadNames, ContainerLifeCycle container) - { - if (seen.contains(container)) - { - // skip - return; - } - - seen.add(container); - - Collection executors = container.getBeans(Executor.class); - for (Executor executor : executors) - { - if (executor instanceof QueuedThreadPool) - { - QueuedThreadPool qtp = (QueuedThreadPool) executor; - threadNames.add(qtp.getName()); - } - else - { - System.err.println("### Executor: " + executor); - } - } - - for (ContainerLifeCycle child : container.getBeans(ContainerLifeCycle.class)) - { - findConfiguredThreadNames(seen, threadNames, child); - } - } -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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.websocket.jsr356.server; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.CoreMatchers.startsWith; +import static org.junit.Assert.assertThat; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringWriter; +import java.net.HttpURLConnection; +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.Executor; +import java.util.stream.Collectors; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.websocket.ContainerProvider; +import javax.websocket.Endpoint; +import javax.websocket.EndpointConfig; +import javax.websocket.OnMessage; +import javax.websocket.Session; +import javax.websocket.WebSocketContainer; +import javax.websocket.server.ServerEndpoint; + +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.util.IO; +import org.eclipse.jetty.util.component.ContainerLifeCycle; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.eclipse.jetty.websocket.api.util.WSURI; +import org.eclipse.jetty.websocket.jsr356.ClientContainer; +import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer; +import org.junit.Test; + +public class DelayedStartClientOnServerTest +{ + @ServerEndpoint("/echo") + public static class EchoSocket + { + @OnMessage + public String echo(String msg) + { + return msg; + } + } + + /** + * Using the Client specific techniques of JSR356, connect to the echo socket + * and perform an echo request. + */ + public static class ClientConnectServlet extends HttpServlet + { + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException + { + // Client specific technique + WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + try + { + URI wsURI = WSURI.toWebsocket(req.getRequestURL()).resolve("/echo"); + Session session = container.connectToServer(new Endpoint() + { + @Override + public void onOpen(Session session, EndpointConfig config) + { + /* do nothing */ + } + }, wsURI); + // don't care about the data sent, just the connect itself. + session.getBasicRemote().sendText("Hello"); + session.close(); + resp.setContentType("text/plain"); + resp.getWriter().println("Connected to " + wsURI); + } + catch (Throwable t) + { + throw new ServletException(t); + } + } + } + + /** + * Using the Server specific techniques of JSR356, connect to the echo socket + * and perform an echo request. + */ + public static class ServerConnectServlet extends HttpServlet + { + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException + { + // Server specific technique + javax.websocket.server.ServerContainer container = + (javax.websocket.server.ServerContainer) + req.getServletContext().getAttribute("javax.websocket.server.ServerContainer"); + try + { + URI wsURI = WSURI.toWebsocket(req.getRequestURL()).resolve("/echo"); + Session session = container.connectToServer(new Endpoint() + { + @Override + public void onOpen(Session session, EndpointConfig config) + { + /* do nothing */ + } + }, wsURI); + // don't care about the data sent, just the connect itself. + session.getBasicRemote().sendText("Hello"); + session.close(); + resp.setContentType("text/plain"); + resp.getWriter().println("Connected to " + wsURI); + } + catch (Throwable t) + { + throw new ServletException(t); + } + } + } + + /** + * Using the Client specific techniques of JSR356, configure the WebSocketContainer. + */ + public static class ClientConfigureServlet extends HttpServlet + { + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException + { + // Client specific technique + WebSocketContainer container = ContainerProvider.getWebSocketContainer(); + + try + { + container.setAsyncSendTimeout(5000); + container.setDefaultMaxTextMessageBufferSize(1000); + resp.setContentType("text/plain"); + resp.getWriter().printf("Configured %s - %s%n", container.getClass().getName(), container); + } + catch (Throwable t) + { + throw new ServletException(t); + } + } + } + + private void assertNoHttpClientPoolThreads(List threadNames) + { + for (String threadName : threadNames) + { + if (threadName.startsWith("HttpClient@") && !threadName.endsWith("-scheduler")) + { + throw new AssertionError("Found non-scheduler HttpClient thread in <" + + threadNames.stream().collect(Collectors.joining("[", ", ", "]")) + + ">"); + } + } + } + + /** + * Using the Server specific techniques of JSR356, configure the WebSocketContainer. + */ + public static class ServerConfigureServlet extends HttpServlet + { + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException + { + // Server specific technique + javax.websocket.server.ServerContainer container = + (javax.websocket.server.ServerContainer) + req.getServletContext().getAttribute("javax.websocket.server.ServerContainer"); + try + { + container.setAsyncSendTimeout(5000); + container.setDefaultMaxTextMessageBufferSize(1000); + resp.setContentType("text/plain"); + resp.getWriter().printf("Configured %s - %s%n", container.getClass().getName(), container); + } + catch (Throwable t) + { + throw new ServletException(t); + } + } + } + + @Test + public void testNoExtraHttpClientThreads() throws Exception + { + Server server = new Server(0); + ServletContextHandler contextHandler = new ServletContextHandler(); + server.setHandler(contextHandler); + try + { + server.start(); + List threadNames = getThreadNames(server); + assertNoHttpClientPoolThreads(threadNames); + assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); + assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketClient@")))); + } + finally + { + server.stop(); + } + } + + @Test + public void testHttpClientThreads_AfterClientConnectTo() throws Exception + { + Server server = new Server(0); + ServletContextHandler contextHandler = new ServletContextHandler(); + server.setHandler(contextHandler); + // Using JSR356 Client Techniques to connectToServer() + contextHandler.addServlet(ClientConnectServlet.class, "/connect"); + javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); + container.addEndpoint(EchoSocket.class); + try + { + server.start(); + String response = GET(server.getURI().resolve("/connect")); + assertThat("Response", response, startsWith("Connected to ws://")); + List threadNames = getThreadNames(server); + assertNoHttpClientPoolThreads(threadNames); + assertThat("Threads", threadNames, hasItem(containsString("Jsr356Client@"))); + } + finally + { + server.stop(); + } + } + + @Test + public void testHttpClientThreads_AfterServerConnectTo() throws Exception + { + Server server = new Server(0); + ServletContextHandler contextHandler = new ServletContextHandler(); + server.setHandler(contextHandler); + // Using JSR356 Server Techniques to connectToServer() + contextHandler.addServlet(ServerConnectServlet.class, "/connect"); + javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); + container.addEndpoint(EchoSocket.class); + try + { + server.start(); + String response = GET(server.getURI().resolve("/connect")); + assertThat("Response", response, startsWith("Connected to ws://")); + List threadNames = getThreadNames((ContainerLifeCycle)container, server); + assertNoHttpClientPoolThreads(threadNames); + assertThat("Threads", threadNames, hasItem(containsString("WebSocketClient@"))); + } + finally + { + server.stop(); + } + } + + @Test + public void testHttpClientThreads_AfterClientConfigure() throws Exception + { + Server server = new Server(0); + ServletContextHandler contextHandler = new ServletContextHandler(); + server.setHandler(contextHandler); + // Using JSR356 Client Techniques to configure WebSocketContainer + contextHandler.addServlet(ClientConfigureServlet.class, "/configure"); + javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); + container.addEndpoint(EchoSocket.class); + try + { + server.start(); + String response = GET(server.getURI().resolve("/configure")); + assertThat("Response", response, startsWith("Configured " + ClientContainer.class.getName())); + List threadNames = getThreadNames((ContainerLifeCycle)container, server); + assertNoHttpClientPoolThreads(threadNames); + assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); + assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketClient@")))); + } + finally + { + server.stop(); + } + } + + @Test + public void testHttpClientThreads_AfterServerConfigure() throws Exception + { + Server server = new Server(0); + ServletContextHandler contextHandler = new ServletContextHandler(); + server.setHandler(contextHandler); + // Using JSR356 Server Techniques to configure WebSocketContainer + contextHandler.addServlet(ServerConfigureServlet.class, "/configure"); + javax.websocket.server.ServerContainer container = WebSocketServerContainerInitializer.configureContext(contextHandler); + container.addEndpoint(EchoSocket.class); + try + { + server.start(); + String response = GET(server.getURI().resolve("/configure")); + assertThat("Response", response, startsWith("Configured " + ServerContainer.class.getName())); + List threadNames = getThreadNames((ContainerLifeCycle)container, server); + assertNoHttpClientPoolThreads(threadNames); + assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); + } + finally + { + server.stop(); + } + } + + private String GET(URI destURI) throws IOException + { + HttpURLConnection http = (HttpURLConnection) destURI.toURL().openConnection(); + assertThat("HTTP GET (" + destURI + ") Response Code", http.getResponseCode(), is(200)); + try (InputStream in = http.getInputStream(); + InputStreamReader reader = new InputStreamReader(in, StandardCharsets.UTF_8); + StringWriter writer = new StringWriter()) + { + IO.copy(reader, writer); + return writer.toString(); + } + } + + public static List getThreadNames(ContainerLifeCycle... containers) + { + List threadNames = new ArrayList<>(); + Set seen = new HashSet<>(); + for (ContainerLifeCycle container : containers) + { + if (container == null) + { + continue; + } + + findConfiguredThreadNames(seen, threadNames, container); + } + seen.clear(); + // System.out.println("Threads: " + threadNames.stream().collect(Collectors.joining(", ", "[", "]"))); + return threadNames; + } + + private static void findConfiguredThreadNames(Set seen, List threadNames, ContainerLifeCycle container) + { + if (seen.contains(container)) + { + // skip + return; + } + + seen.add(container); + + Collection executors = container.getBeans(Executor.class); + for (Executor executor : executors) + { + if (executor instanceof QueuedThreadPool) + { + QueuedThreadPool qtp = (QueuedThreadPool) executor; + threadNames.add(qtp.getName()); + } + else + { + System.err.println("### Executor: " + executor); + } + } + + for (ContainerLifeCycle child : container.getBeans(ContainerLifeCycle.class)) + { + findConfiguredThreadNames(seen, threadNames, child); + } + } +} diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/DelegatedContainerScope.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/DelegatedContainerScope.java index 87bd1152462..789fcf81705 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/DelegatedContainerScope.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/scopes/DelegatedContainerScope.java @@ -1,87 +1,87 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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.websocket.common.scopes; - -import java.util.concurrent.Executor; - -import org.eclipse.jetty.io.ByteBufferPool; -import org.eclipse.jetty.util.DecoratedObjectFactory; -import org.eclipse.jetty.util.ssl.SslContextFactory; -import org.eclipse.jetty.websocket.api.WebSocketPolicy; -import org.eclipse.jetty.websocket.common.WebSocketSession; - -public class DelegatedContainerScope implements WebSocketContainerScope -{ - private final WebSocketPolicy policy; - private final WebSocketContainerScope delegate; - - public DelegatedContainerScope(WebSocketPolicy policy, WebSocketContainerScope parentScope) - { - this.policy = policy; - this.delegate = parentScope; - } - - @Override - public ByteBufferPool getBufferPool() - { - return this.delegate.getBufferPool(); - } - - @Override - public Executor getExecutor() - { - return this.delegate.getExecutor(); - } - - @Override - public DecoratedObjectFactory getObjectFactory() - { - return this.delegate.getObjectFactory(); - } - - @Override - public WebSocketPolicy getPolicy() - { - return this.policy; - } - - @Override - public SslContextFactory getSslContextFactory() - { - return this.delegate.getSslContextFactory(); - } - - @Override - public boolean isRunning() - { - return this.delegate.isRunning(); - } - - @Override - public void onSessionOpened(WebSocketSession session) - { - this.delegate.onSessionOpened(session); - } - - @Override - public void onSessionClosed(WebSocketSession session) - { - this.delegate.onSessionClosed(session); - } -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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.websocket.common.scopes; + +import java.util.concurrent.Executor; + +import org.eclipse.jetty.io.ByteBufferPool; +import org.eclipse.jetty.util.DecoratedObjectFactory; +import org.eclipse.jetty.util.ssl.SslContextFactory; +import org.eclipse.jetty.websocket.api.WebSocketPolicy; +import org.eclipse.jetty.websocket.common.WebSocketSession; + +public class DelegatedContainerScope implements WebSocketContainerScope +{ + private final WebSocketPolicy policy; + private final WebSocketContainerScope delegate; + + public DelegatedContainerScope(WebSocketPolicy policy, WebSocketContainerScope parentScope) + { + this.policy = policy; + this.delegate = parentScope; + } + + @Override + public ByteBufferPool getBufferPool() + { + return this.delegate.getBufferPool(); + } + + @Override + public Executor getExecutor() + { + return this.delegate.getExecutor(); + } + + @Override + public DecoratedObjectFactory getObjectFactory() + { + return this.delegate.getObjectFactory(); + } + + @Override + public WebSocketPolicy getPolicy() + { + return this.policy; + } + + @Override + public SslContextFactory getSslContextFactory() + { + return this.delegate.getSslContextFactory(); + } + + @Override + public boolean isRunning() + { + return this.delegate.isRunning(); + } + + @Override + public void onSessionOpened(WebSocketSession session) + { + this.delegate.onSessionOpened(session); + } + + @Override + public void onSessionClosed(WebSocketSession session) + { + this.delegate.onSessionClosed(session); + } +} diff --git a/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties b/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties index 2a711f20999..924d0006cbb 100644 --- a/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties +++ b/jetty-websocket/websocket-server/src/test/resources/jetty-logging.properties @@ -1,29 +1,29 @@ -org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -org.eclipse.jetty.LEVEL=WARN - -# org.eclipse.jetty.io.WriteFlusher.LEVEL=DEBUG -# org.eclipse.jetty.websocket.LEVEL=DEBUG -# org.eclipse.jetty.websocket.LEVEL=INFO -# org.eclipse.jetty.websocket.common.io.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.ab.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.Parser.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.Generator.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.ab.Fuzzer.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.blockhead.LEVEL=DEBUG -# org.eclipse.jetty.websocket.server.helper.LEVEL=DEBUG - -# org.eclipse.jetty.websocket.client.io.ConnectPromise.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.WebSocketSession_OPEN.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.io.IOState.LEVEL=DEBUG -# org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection_OPEN.LEVEL=DEBUG - -### Show state changes on BrowserDebugTool -# -- LEAVE THIS AT DEBUG LEVEL -- -org.eclipse.jetty.websocket.server.browser.LEVEL=DEBUG - -### Disabling intentional error out of RFCSocket -org.eclipse.jetty.websocket.server.helper.RFCSocket.LEVEL=OFF - -### Hiding Stack Traces from various test cases -org.eclipse.jetty.websocket.server.ab.ABSocket.STACKS=OFF +org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog +org.eclipse.jetty.LEVEL=WARN + +# org.eclipse.jetty.io.WriteFlusher.LEVEL=DEBUG +# org.eclipse.jetty.websocket.LEVEL=DEBUG +# org.eclipse.jetty.websocket.LEVEL=INFO +# org.eclipse.jetty.websocket.common.io.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.ab.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.Parser.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.Generator.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.ab.Fuzzer.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.blockhead.LEVEL=DEBUG +# org.eclipse.jetty.websocket.server.helper.LEVEL=DEBUG + +# org.eclipse.jetty.websocket.client.io.ConnectPromise.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.WebSocketSession_OPEN.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.io.IOState.LEVEL=DEBUG +# org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection_OPEN.LEVEL=DEBUG + +### Show state changes on BrowserDebugTool +# -- LEAVE THIS AT DEBUG LEVEL -- +org.eclipse.jetty.websocket.server.browser.LEVEL=DEBUG + +### Disabling intentional error out of RFCSocket +org.eclipse.jetty.websocket.server.helper.RFCSocket.LEVEL=OFF + +### Hiding Stack Traces from various test cases +org.eclipse.jetty.websocket.server.ab.ABSocket.STACKS=OFF org.eclipse.jetty.websocket.server.WebSocketCloseTest$FastFailSocket.STACKS=OFF \ No newline at end of file From 438c0a81597119ac5e791fb02dd6f390d0bc11ef Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 9 Aug 2017 14:41:25 -0700 Subject: [PATCH 146/147] Minor update to README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1fc5636acf7..2793de75d63 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Eclipse Jetty Canonical Repository ================================== -This is the canonical repository for the Jetty project, feel free to fork and contribute now! +This is the canonical repository for the Jetty project, feel free to fork and contribute now! Submitting a patch or pull request? @@ -13,7 +13,7 @@ Project description ------------------- Jetty is a lightweight highly scalable java based web server and servlet engine. -Our goal is to support web protocols like HTTP, HTTP/2 and WebSocket in a high volume low latency way that provides maximum performance while retaining the ease of use and compatibility with years of servlet development. +Our goal is to support web protocols like HTTP, HTTP/2 and WebSocket in a high volume low latency way that provides maximum performance while retaining the ease of use and compatibility with years of servlet development. Jetty is a modern fully async web server that has a long history as a component oriented technology easily embedded into applications while still offering a solid traditional distribution for webapp deployment. - [https://projects.eclipse.org/projects/rt.jetty](https://projects.eclipse.org/projects/rt.jetty) From d5a9f0e0e54d705f217231888388c8a5ad3c3ffa Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Wed, 9 Aug 2017 17:42:15 -0400 Subject: [PATCH 147/147] EOL Fix --- .../jsr356/DelayedStartClientTest.java | 222 +++++++++--------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java index af004bf2b07..a62b1841a04 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java +++ b/jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/DelayedStartClientTest.java @@ -1,111 +1,111 @@ -// -// ======================================================================== -// Copyright (c) 1995-2017 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.websocket.jsr356; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.junit.Assert.assertThat; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.Executor; - -import javax.websocket.ContainerProvider; -import javax.websocket.WebSocketContainer; - -import org.eclipse.jetty.util.component.ContainerLifeCycle; -import org.eclipse.jetty.util.component.LifeCycle; -import org.eclipse.jetty.util.thread.QueuedThreadPool; -import org.junit.After; -import org.junit.Test; - -public class DelayedStartClientTest -{ - WebSocketContainer container; - - @After - public void stopContainer() throws Exception - { - ((LifeCycle)container).stop(); - } - - @Test - public void testNoExtraHttpClientThreads() - { - container = ContainerProvider.getWebSocketContainer(); - assertThat("Container", container, notNullValue()); - - List threadNames = getThreadNames((ContainerLifeCycle)container); - assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); - assertThat("Threads", threadNames, not(hasItem(containsString("HttpClient@")))); - } - - public static List getThreadNames(ContainerLifeCycle... containers) - { - List threadNames = new ArrayList<>(); - Set seen = new HashSet<>(); - for (ContainerLifeCycle container : containers) - { - if (container == null) - { - continue; - } - - findConfiguredThreadNames(seen, threadNames, container); - } - seen.clear(); - // System.out.println("Threads: " + threadNames.stream().collect(Collectors.joining(", ", "[", "]"))); - return threadNames; - } - - private static void findConfiguredThreadNames(Set seen, List threadNames, ContainerLifeCycle container) - { - if (seen.contains(container)) - { - // skip - return; - } - - seen.add(container); - - Collection executors = container.getBeans(Executor.class); - for (Executor executor : executors) - { - if (executor instanceof QueuedThreadPool) - { - QueuedThreadPool qtp = (QueuedThreadPool) executor; - threadNames.add(qtp.getName()); - } - else - { - System.err.println("### Executor: " + executor); - } - } - - for (ContainerLifeCycle child : container.getBeans(ContainerLifeCycle.class)) - { - findConfiguredThreadNames(seen, threadNames, child); - } - } -} +// +// ======================================================================== +// Copyright (c) 1995-2017 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.websocket.jsr356; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.junit.Assert.assertThat; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.Executor; + +import javax.websocket.ContainerProvider; +import javax.websocket.WebSocketContainer; + +import org.eclipse.jetty.util.component.ContainerLifeCycle; +import org.eclipse.jetty.util.component.LifeCycle; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.junit.After; +import org.junit.Test; + +public class DelayedStartClientTest +{ + WebSocketContainer container; + + @After + public void stopContainer() throws Exception + { + ((LifeCycle)container).stop(); + } + + @Test + public void testNoExtraHttpClientThreads() + { + container = ContainerProvider.getWebSocketContainer(); + assertThat("Container", container, notNullValue()); + + List threadNames = getThreadNames((ContainerLifeCycle)container); + assertThat("Threads", threadNames, not(hasItem(containsString("WebSocketContainer@")))); + assertThat("Threads", threadNames, not(hasItem(containsString("HttpClient@")))); + } + + public static List getThreadNames(ContainerLifeCycle... containers) + { + List threadNames = new ArrayList<>(); + Set seen = new HashSet<>(); + for (ContainerLifeCycle container : containers) + { + if (container == null) + { + continue; + } + + findConfiguredThreadNames(seen, threadNames, container); + } + seen.clear(); + // System.out.println("Threads: " + threadNames.stream().collect(Collectors.joining(", ", "[", "]"))); + return threadNames; + } + + private static void findConfiguredThreadNames(Set seen, List threadNames, ContainerLifeCycle container) + { + if (seen.contains(container)) + { + // skip + return; + } + + seen.add(container); + + Collection executors = container.getBeans(Executor.class); + for (Executor executor : executors) + { + if (executor instanceof QueuedThreadPool) + { + QueuedThreadPool qtp = (QueuedThreadPool) executor; + threadNames.add(qtp.getName()); + } + else + { + System.err.println("### Executor: " + executor); + } + } + + for (ContainerLifeCycle child : container.getBeans(ContainerLifeCycle.class)) + { + findConfiguredThreadNames(seen, threadNames, child); + } + } +}