Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2014-06-17 17:41:32 +0000
committerJoakim Erdfelt2014-06-17 17:42:04 +0000
commit4ba530b5ad64bcf239195b3f4fcf597901ba8c38 (patch)
treebe23fd602b9c7189acc6dc0b0cbfa17b698ead7c /jetty-start
parent5fa564efa8bce42ab726de93b1c3ffc317ab4f74 (diff)
downloadorg.eclipse.jetty.project-4ba530b5ad64bcf239195b3f4fcf597901ba8c38.tar.gz
org.eclipse.jetty.project-4ba530b5ad64bcf239195b3f4fcf597901ba8c38.tar.xz
org.eclipse.jetty.project-4ba530b5ad64bcf239195b3f4fcf597901ba8c38.zip
437395 - Start / Properties in template sections should be default applied for enabled modules
+ Adding test cases for jsp-impl usecase that triggered this bug.
Diffstat (limited to 'jetty-start')
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java2
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/ModulesTest.java1
-rw-r--r--jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java30
-rw-r--r--jetty-start/src/test/resources/usecases/assert-jsp-apache.txt26
-rw-r--r--jetty-start/src/test/resources/usecases/assert-jsp-glassfish.txt28
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.jsp.apache/start.ini7
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.jsp.bad/start.ini7
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.jsp.default/start.ini6
-rw-r--r--jetty-start/src/test/resources/usecases/base.with.jsp.glassfish/start.ini7
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/apache-jsp/javax.servlet.jsp.javax.servlet.jsp-api-TEST.jar (renamed from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-3.0.0.jar)0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.eclipse.jetty.apache-jsp-TEST.jar (renamed from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-2.3.2.jar)0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.eclipse.jetty.orbit.org.eclipse.jdt.core-TEST.jar (renamed from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-2.3.1.jar)0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.mortbay.jasper.apache-el-TEST.jar (renamed from jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-1.2.0.jar)0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/apache-jsp/org.mortbay.jasper.apache-jsp-TEST.jar (renamed from jetty-start/src/test/resources/usecases/home/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.jar)0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/apache-jstl/org.apache.taglibs.taglibs-standard-impl-TEST.jar (renamed from jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-3.8.2.jar)0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/apache-jstl/org.apache.taglibs.taglibs-standard-spec-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/jetty-jsp-jdt-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-TEST.jar0
-rw-r--r--jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jetty.orbit.javax.servlet.jsp.jstl-TEST.jar0
23 files changed, 106 insertions, 8 deletions
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 d6d5de592a..40406894c5 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<Module>
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 3753267264..b7c0468442 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 aef3da7069..3cfa5445ac 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
@@ -74,6 +74,30 @@ public class TestUseCases
}
@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
{
assertUseCase("home","base.missing.npn.version","assert-missing-npn-version.txt","java.version=1.7.0_01");
@@ -86,12 +110,6 @@ public class TestUseCases
}
@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
{
assertUseCase("home","base.with.db","assert-with-db.txt");
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 0000000000..fe3d51ce8a
--- /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 0000000000..9c17c56fb2
--- /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 0000000000..fcdea021bd
--- /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 0000000000..96e495acaf
--- /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 0000000000..bf58fa82d7
--- /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 0000000000..7107adec96
--- /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
index e69de29bb2..e69de29bb2 100644
--- 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
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
index e69de29bb2..e69de29bb2 100644
--- 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
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
index e69de29bb2..e69de29bb2 100644
--- 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
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
index e69de29bb2..e69de29bb2 100644
--- 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
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
index e69de29bb2..e69de29bb2 100644
--- 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
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
index e69de29bb2..e69de29bb2 100644
--- 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
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/apache-jstl/org.apache.taglibs.taglibs-standard-spec-TEST.jar
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.el-TEST.jar
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-TEST.jar
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp-api-TEST.jar
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/jsp/javax.servlet.jsp.jstl-TEST.jar
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/jsp/jetty-jsp-jdt-TEST.jar
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jdt.core-TEST.jar
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 0000000000..e69de29bb2
--- /dev/null
+++ b/jetty-start/src/test/resources/usecases/home/lib/jsp/org.eclipse.jetty.orbit.javax.servlet.jsp.jstl-TEST.jar

Back to the top