diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java index d6d5de592a5..40406894c58 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java @@ -535,7 +535,7 @@ public class Modules implements Iterable StartLog.warn("** Unable to continue, required dependency missing. [%s]",missing); StartLog.warn("** As configured, Jetty is unable to start due to a missing enabled module dependency."); StartLog.warn("** This may be due to a transitive dependency akin to spdy on npn, which resolves based on the JDK in use."); - return Collections.emptyList(); + throw new UsageException(UsageException.ERR_BAD_ARG, "Missing referenced dependency: " + missing); } } } diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java b/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java index 37532672640..b7c0468442c 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java @@ -19,7 +19,6 @@ package org.eclipse.jetty.start; import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.is; import java.io.File; import java.io.IOException; diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java b/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java index aef3da70691..3cfa5445ac6 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java @@ -73,6 +73,30 @@ public class TestUseCases assertUseCase("home","base.with.include.jetty.dirs","assert-include-jetty-dir-logging.txt"); } + @Test + public void testWithJspDefault() throws Exception + { + assertUseCase("home","base.with.jsp.default","assert-jsp-apache.txt"); + } + + @Test + public void testWithJspApache() throws Exception + { + assertUseCase("home","base.with.jsp.apache","assert-jsp-apache.txt"); + } + + @Test + public void testWithJspGlassfish() throws Exception + { + assertUseCase("home","base.with.jsp.glassfish","assert-jsp-glassfish.txt"); + } + + @Test + public void testWithJspGlassfishCmdLine() throws Exception + { + assertUseCase("home","base.with.jsp.default","assert-jsp-glassfish.txt","jsp-impl=glassfish"); + } + @Test public void testWithMissingNpnVersion() throws Exception { @@ -85,12 +109,6 @@ public class TestUseCases assertUseCase("home","base.enable.spdy","assert-enable-spdy.txt","java.version=1.7.0_21"); } - @Test - public void testWithSpdyBadNpnVersion() throws Exception - { - assertUseCase("home","base.enable.spdy.bad.npn.version","assert-enable-spdy-bad-npn-version.txt","java.version=1.7.0_01"); - } - @Test public void testWithDatabase() throws Exception { diff --git a/jetty-start/src/test/resources/usecases/assert-jsp-apache.txt b/jetty-start/src/test/resources/usecases/assert-jsp-apache.txt new file mode 100644 index 00000000000..fe3d51ce8aa --- /dev/null +++ b/jetty-start/src/test/resources/usecases/assert-jsp-apache.txt @@ -0,0 +1,26 @@ +# The XMLs we expect (order is important) +XML|${jetty.home}/etc/jetty.xml +XML|${jetty.home}/etc/jetty-http.xml + +# The LIBs we expect (order is irrelevant) +LIB|${jetty.home}/lib/jetty-continuation-TEST.jar +LIB|${jetty.home}/lib/jetty-http-TEST.jar +LIB|${jetty.home}/lib/jetty-io-TEST.jar +LIB|${jetty.home}/lib/jetty-schemas-3.1.jar +LIB|${jetty.home}/lib/jetty-server-TEST.jar +LIB|${jetty.home}/lib/jetty-servlet-TEST.jar +LIB|${jetty.home}/lib/jetty-util-TEST.jar +LIB|${jetty.home}/lib/jetty-xml-TEST.jar +LIB|${jetty.home}/lib/servlet-api-3.1.jar +LIB|${jetty.home}/lib/apache-jsp/javax.servlet.jsp.javax.servlet.jsp-api-TEST.jar +LIB|${jetty.home}/lib/apache-jsp/org.eclipse.jetty.apache-jsp-TEST.jar +LIB|${jetty.home}/lib/apache-jsp/org.eclipse.jetty.orbit.org.eclipse.jdt.core-TEST.jar +LIB|${jetty.home}/lib/apache-jsp/org.mortbay.jasper.apache-el-TEST.jar +LIB|${jetty.home}/lib/apache-jsp/org.mortbay.jasper.apache-jsp-TEST.jar + +# The Properties we expect (order is irrelevant) +PROP|jetty.port=9090 +PROP|jsp-impl=apache + +# Files / Directories to create +# FILE|lib/ diff --git a/jetty-start/src/test/resources/usecases/assert-jsp-glassfish.txt b/jetty-start/src/test/resources/usecases/assert-jsp-glassfish.txt new file mode 100644 index 00000000000..9c17c56fb27 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/assert-jsp-glassfish.txt @@ -0,0 +1,28 @@ +# The XMLs we expect (order is important) +XML|${jetty.home}/etc/jetty.xml +XML|${jetty.home}/etc/jetty-http.xml + +# The LIBs we expect (order is irrelevant) +LIB|${jetty.home}/lib/jetty-continuation-TEST.jar +LIB|${jetty.home}/lib/jetty-http-TEST.jar +LIB|${jetty.home}/lib/jetty-io-TEST.jar +LIB|${jetty.home}/lib/jetty-schemas-3.1.jar +LIB|${jetty.home}/lib/jetty-server-TEST.jar +LIB|${jetty.home}/lib/jetty-servlet-TEST.jar +LIB|${jetty.home}/lib/jetty-util-TEST.jar +LIB|${jetty.home}/lib/jetty-xml-TEST.jar +LIB|${jetty.home}/lib/servlet-api-3.1.jar +LIB|${jetty.home}/lib/jsp/javax.el-TEST.jar +LIB|${jetty.home}/lib/jsp/javax.servlet.jsp.jstl-TEST.jar +LIB|${jetty.home}/lib/jsp/javax.servlet.jsp-api-TEST.jar +LIB|${jetty.home}/lib/jsp/javax.servlet.jsp-TEST.jar +LIB|${jetty.home}/lib/jsp/jetty-jsp-jdt-TEST.jar +LIB|${jetty.home}/lib/jsp/org.eclipse.jdt.core-TEST.jar +LIB|${jetty.home}/lib/jsp/org.eclipse.jetty.orbit.javax.servlet.jsp.jstl-TEST.jar + +# The Properties we expect (order is irrelevant) +PROP|jetty.port=9090 +PROP|jsp-impl=glassfish + +# Files / Directories to create +# FILE|lib/ diff --git a/jetty-start/src/test/resources/usecases/base.with.jsp.apache/start.ini b/jetty-start/src/test/resources/usecases/base.with.jsp.apache/start.ini new file mode 100644 index 00000000000..fcdea021bd8 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.with.jsp.apache/start.ini @@ -0,0 +1,7 @@ + +--module=server +--module=http +--module=jsp +jsp-impl=apache + +jetty.port=9090 diff --git a/jetty-start/src/test/resources/usecases/base.with.jsp.bad/start.ini b/jetty-start/src/test/resources/usecases/base.with.jsp.bad/start.ini new file mode 100644 index 00000000000..96e495acaff --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.with.jsp.bad/start.ini @@ -0,0 +1,7 @@ + +--module=server +--module=http +--module=jsp +jsp-impl=bogus + +jetty.port=9090 diff --git a/jetty-start/src/test/resources/usecases/base.with.jsp.default/start.ini b/jetty-start/src/test/resources/usecases/base.with.jsp.default/start.ini new file mode 100644 index 00000000000..bf58fa82d77 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.with.jsp.default/start.ini @@ -0,0 +1,6 @@ + +--module=server +--module=http +--module=jsp + +jetty.port=9090 diff --git a/jetty-start/src/test/resources/usecases/base.with.jsp.glassfish/start.ini b/jetty-start/src/test/resources/usecases/base.with.jsp.glassfish/start.ini new file mode 100644 index 00000000000..7107adec968 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.with.jsp.glassfish/start.ini @@ -0,0 +1,7 @@ + +--module=server +--module=http +--module=jsp +jsp-impl=glassfish + +jetty.port=9090 diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-3.0.0.jar b/jetty-start/src/test/resources/usecases/home/lib/apache-jsp/javax.servlet.jsp.javax.servlet.jsp-api-TEST.jar similarity index 100% rename from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-3.0.0.jar rename to jetty-start/src/test/resources/usecases/home/lib/apache-jsp/javax.servlet.jsp.javax.servlet.jsp-api-TEST.jar diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-2.3.2.jar b/jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.eclipse.jetty.apache-jsp-TEST.jar similarity index 100% rename from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-2.3.2.jar rename to jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.eclipse.jetty.apache-jsp-TEST.jar diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-2.3.1.jar b/jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.eclipse.jetty.orbit.org.eclipse.jdt.core-TEST.jar similarity index 100% rename from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-2.3.1.jar rename to jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.eclipse.jetty.orbit.org.eclipse.jdt.core-TEST.jar diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-1.2.0.jar b/jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.mortbay.jasper.apache-el-TEST.jar similarity index 100% rename from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-1.2.0.jar rename to jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.mortbay.jasper.apache-el-TEST.jar diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.jar b/jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.mortbay.jasper.apache-jsp-TEST.jar similarity index 100% rename from jetty-start/src/test/resources/usecases/home/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.jar rename to jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.mortbay.jasper.apache-jsp-TEST.jar diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-3.8.2.jar b/jetty-start/src/test/resources/usecases/home/lib/apache-jstl/org.apache.taglibs.taglibs-standard-impl-TEST.jar similarity index 100% rename from jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-3.8.2.jar rename to jetty-start/src/test/resources/usecases/home/lib/apache-jstl/org.apache.taglibs.taglibs-standard-impl-TEST.jar diff --git a/jetty-start/src/test/resources/usecases/home/lib/apache-jstl/org.apache.taglibs.taglibs-standard-spec-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/apache-jstl/org.apache.taglibs.taglibs-standard-spec-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/jetty-jsp-jdt-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/jsp/jetty-jsp-jdt-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jetty.orbit.javax.servlet.jsp.jstl-TEST.jar b/jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jetty.orbit.javax.servlet.jsp.jstl-TEST.jar new file mode 100644 index 00000000000..e69de29bb2d