From d31811f067da68c9379b339df5ec1d567e0aebdc Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 4 Jun 2014 11:13:17 -0700 Subject: [PATCH] 436520 - Start / Allow https and file urls in jetty-start's module download mechanism + Work to enable this mostly performed in Bug #436524 + Some minor work to add more tests for this new syntax. --- .../jetty/start/ConfigurationAssert.java | 2 +- .../resources/usecases/assert-enable-spdy.txt | 2 +- .../resources/usecases/assert-logging.txt | 10 ++++++++-- .../usecases/base.logging/modules/logging.mod | 20 +++++++++++++++++++ .../resources/jetty-logging.properties | 2 ++ 5 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 jetty-start/src/test/resources/usecases/base.logging/modules/logging.mod create mode 100644 jetty-start/src/test/resources/usecases/base.logging/resources/jetty-logging.properties 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 ced1889b5c8..1d2e8ba1d01 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 @@ -124,7 +124,7 @@ public class ConfigurationAssert { if (darg.uri != null) { - actualDownloads.add(String.format("%s:%s",darg.uri,darg.location)); + actualDownloads.add(String.format("%s|%s",darg.uri,darg.location)); } } assertContainsUnordered("Downloads",expectedDownloads,actualDownloads); diff --git a/jetty-start/src/test/resources/usecases/assert-enable-spdy.txt b/jetty-start/src/test/resources/usecases/assert-enable-spdy.txt index 6b0cc7b5bf5..b097f5d12f4 100644 --- a/jetty-start/src/test/resources/usecases/assert-enable-spdy.txt +++ b/jetty-start/src/test/resources/usecases/assert-enable-spdy.txt @@ -31,7 +31,7 @@ PROP|jetty.truststore.password=sundae PROP|java.version=1.7.0_21 # The Downloads -DOWNLOAD|http://central.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.5.v20130313/npn-boot-1.1.5.v20130313.jar:lib/npn/npn-boot-1.1.5.v20130313.jar +DOWNLOAD|http://central.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.5.v20130313/npn-boot-1.1.5.v20130313.jar|lib/npn/npn-boot-1.1.5.v20130313.jar # The Bootlib BOOTLIB|-Xbootclasspath/p:lib/npn/npn-boot-1.1.5.v20130313.jar diff --git a/jetty-start/src/test/resources/usecases/assert-logging.txt b/jetty-start/src/test/resources/usecases/assert-logging.txt index b566172b271..c83dc2c7b96 100644 --- a/jetty-start/src/test/resources/usecases/assert-logging.txt +++ b/jetty-start/src/test/resources/usecases/assert-logging.txt @@ -1,5 +1,4 @@ # The XMLs we expect (order is important) -XML|${jetty.home}/etc/jetty-logging.xml XML|${jetty.home}/etc/jetty.xml XML|${jetty.home}/etc/jetty-http.xml @@ -23,4 +22,11 @@ PROP|jetty.port=9090 # Other File References FILE|logs/ -FILE|resources/ \ No newline at end of file +FILE|resources/ + +# Downloads +DOWNLOAD|http://central.maven.org/maven2/org/slf4j/slf4j-api/1.6.6/slf4j-api-1.6.6.jar|lib/logging/slf4j-api-1.6.6.jar +DOWNLOAD|http://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.0.7/logback-core-1.0.7.jar|lib/logging/logback-core-1.0.7.jar +DOWNLOAD|http://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.0.7/logback-classic-1.0.7.jar|lib/logging/logback-classic-1.0.7.jar +DOWNLOAD|https://raw.githubusercontent.com/jetty-project/logging-modules/master/logback/logback.xml|resources/logback.xml +DOWNLOAD|https://raw.githubusercontent.com/jetty-project/logging-modules/master/logback/jetty-logging.properties|resources/jetty-logging.properties diff --git a/jetty-start/src/test/resources/usecases/base.logging/modules/logging.mod b/jetty-start/src/test/resources/usecases/base.logging/modules/logging.mod new file mode 100644 index 00000000000..e2d24ce6454 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.logging/modules/logging.mod @@ -0,0 +1,20 @@ +# +# Jetty with logback logging +# + +[depend] +resources + +[files] +logs/ +resources/ +http://central.maven.org/maven2/org/slf4j/slf4j-api/1.6.6/slf4j-api-1.6.6.jar|lib/logging/slf4j-api-1.6.6.jar +http://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.0.7/logback-core-1.0.7.jar|lib/logging/logback-core-1.0.7.jar +http://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.0.7/logback-classic-1.0.7.jar|lib/logging/logback-classic-1.0.7.jar +https://raw.githubusercontent.com/jetty-project/logging-modules/master/logback/logback.xml|resources/logback.xml +https://raw.githubusercontent.com/jetty-project/logging-modules/master/logback/jetty-logging.properties|resources/jetty-logging.properties + +[lib] +lib/logging/**.jar +resources/ + diff --git a/jetty-start/src/test/resources/usecases/base.logging/resources/jetty-logging.properties b/jetty-start/src/test/resources/usecases/base.logging/resources/jetty-logging.properties new file mode 100644 index 00000000000..5cb8291a815 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.logging/resources/jetty-logging.properties @@ -0,0 +1,2 @@ +# Configure Jetty for SLf4j Logging +org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog \ No newline at end of file