Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-osgi')
-rw-r--r--jetty-osgi/jetty-osgi-boot-jsp/pom.xml37
-rw-r--r--jetty-osgi/jetty-osgi-boot/pom.xml6
-rw-r--r--jetty-osgi/jetty-osgi-httpservice/pom.xml8
-rw-r--r--jetty-osgi/pom.xml2
-rw-r--r--jetty-osgi/test-jetty-osgi-context/pom.xml10
-rw-r--r--jetty-osgi/test-jetty-osgi-webapp/pom.xml2
-rw-r--r--jetty-osgi/test-jetty-osgi/pom.xml17
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootContextAsService.java20
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java5
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootSpdy.java1
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWebAppAsService.java32
-rw-r--r--jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java26
12 files changed, 92 insertions, 74 deletions
diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml
index 6d80844447..d4bc575a19 100644
--- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml
+++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml
@@ -88,31 +88,32 @@
<Bundle-Classpath />
<Fragment-Host>org.eclipse.jetty.osgi.boot</Fragment-Host>
<Export-Package>!org.eclipse.jetty.osgi.boot.*</Export-Package>
- <Import-Package>com.sun.el;resolution:=optional,
+ <Import-Package>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)";resolution:=optional,
- javax.servlet;version="[2.6.0,3.2)",
- javax.servlet.jsp;version="2.3",
- javax.servlet.jsp.el;version="2.3",
+ 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="[3.1,3.2)",
+ 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.0";resolution:=optional,
javax.servlet.jsp.jstl.fmt;version="1.2.0";resolution:=optional,
javax.servlet.jsp.jstl.sql;version="1.2.0";resolution:=optional,
javax.servlet.jsp.jstl.tlv;version="1.2.0";resolution:=optional,
- javax.servlet.jsp.resources;version="2.3",
- javax.servlet.jsp.tagext;version="2.3",
- javax.servlet.resources;version="(2.6.0,3.2)",
- org.apache.jasper;version="2.3.2";resolution:=optional,
- org.apache.jasper.compiler;version="2.3.2";resolution:=optional,
- org.apache.jasper.compiler.tagplugin;version="2.3.2";resolution:=optional,
- org.apache.jasper.runtime;version="2.3.2";resolution:=optional,
- org.apache.jasper.security;version="2.3.2";resolution:=optional,
- org.apache.jasper.servlet;version="2.3.2";resolution:=optional,
- org.apache.jasper.tagplugins.jstl;version="2.3.2";resolution:=optional,
- org.apache.jasper.util;version="2.3.2";resolution:=optional,
- org.apache.jasper.xmlparser;version="2.3.2";resolution:=optional,
- org.glassfish.jsp.api;version="2.3.2";resolution:=optional,
+ org.apache.jasper;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.compiler;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.compiler.tagplugin;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.runtime;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.security;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.servlet;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.tagplugins.jstl;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.util;version="[2.3.2,2.4)";resolution:=optional,
+ org.apache.jasper.xmlparser;version="[2.3.2,2.4)";resolution:=optional,
+ org.glassfish.jsp.api;version="[2.3.2,2.4)";resolution:=optional,
org.apache.taglibs.standard;version="1.2.0";resolution:=optional,
org.apache.taglibs.standard.extra.spath;version="1.2.0";resolution:=optional,
org.apache.taglibs.standard.functions;version="1.2.0";resolution:=optional,
diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml
index 7e0608a51b..8928798ecb 100644
--- a/jetty-osgi/jetty-osgi-boot/pom.xml
+++ b/jetty-osgi/jetty-osgi-boot/pom.xml
@@ -102,14 +102,14 @@
<instructions>
<Bundle-SymbolicName>org.eclipse.jetty.osgi.boot;singleton:=true</Bundle-SymbolicName>
<Bundle-Activator>org.eclipse.jetty.osgi.boot.JettyBootstrapActivator</Bundle-Activator>
- <DynamicImport-Package>org.eclipse.jetty.*;version="[9.0,10.0)"</DynamicImport-Package>
+ <DynamicImport-Package>org.eclipse.jetty.*;version="[9.1,10.0)"</DynamicImport-Package>
<Import-Package>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="[2.6,3.2)",
- javax.servlet.http;version="[2.6,3.2)",
+ 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.0.0";resolution:=optional,
diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml
index b7ec57fdb5..8a68dd5350 100644
--- a/jetty-osgi/jetty-osgi-httpservice/pom.xml
+++ b/jetty-osgi/jetty-osgi-httpservice/pom.xml
@@ -96,10 +96,10 @@
<Bundle-SymbolicName>org.eclipse.jetty.osgi.httpservice</Bundle-SymbolicName>
<Bundle-Name>OSGi HttpService</Bundle-Name>
<Jetty-ContextFilePath>contexts/httpservice.xml</Jetty-ContextFilePath>
- <Import-Package>org.eclipse.jetty.server.handler;version="[9.0,10.0)",
-org.eclipse.jetty.util.component;version="[9.0,10.0)",
-org.eclipse.jetty.server.session;version="[9.0,10.0)",
-org.eclipse.jetty.servlet;version="[9.0,10.0)",
+ <Import-Package>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,
*
</Import-Package>
diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml
index 48675f8655..3bd94088d7 100644
--- a/jetty-osgi/pom.xml
+++ b/jetty-osgi/pom.xml
@@ -26,9 +26,7 @@
<module>jetty-osgi-httpservice</module>
<module>test-jetty-osgi-webapp</module>
<module>test-jetty-osgi-context</module>
-<!--
<module>test-jetty-osgi</module>
--->
</modules>
<build>
<resources>
diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml
index c72a109ba8..48d69e6a3f 100644
--- a/jetty-osgi/test-jetty-osgi-context/pom.xml
+++ b/jetty-osgi/test-jetty-osgi-context/pom.xml
@@ -26,6 +26,10 @@
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.toolchain</groupId>
+ <artifactId>jetty-schemas</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -94,8 +98,8 @@
compilation time. -->
<_nouses>true</_nouses>
<Import-Package>
- javax.servlet;version="[2.6.0,3.2)",
- javax.servlet.resources;version="[2.6.0,3.2)",
+ 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,
@@ -109,7 +113,7 @@
org.xml.sax.helpers,
*
</Import-Package>
- <DynamicImport-Package>org.eclipse.jetty.*;version="[9.0,10.0)"</DynamicImport-Package>
+ <DynamicImport-Package>org.eclipse.jetty.*;version="[9.1,10.0)"</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml
index 3ac4048445..b41c51405a 100644
--- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml
+++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml
@@ -104,7 +104,7 @@
org.xml.sax.helpers,
*
</Import-Package>
- <DynamicImport-Package>org.eclipse.jetty.*;version="[9.0,10.0)"</DynamicImport-Package>
+ <DynamicImport-Package>org.eclipse.jetty.*;version="[9.1,10.0)"</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml
index d4cec62ba3..6496b4110c 100644
--- a/jetty-osgi/test-jetty-osgi/pom.xml
+++ b/jetty-osgi/test-jetty-osgi/pom.xml
@@ -171,6 +171,12 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.eclipse.jetty.toolchain</groupId>
+ <artifactId>jetty-jsp-fragment</artifactId>
+ <version>2.3.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty.osgi</groupId>
<artifactId>jetty-httpservice</artifactId>
<version>${project.version}</version>
@@ -261,6 +267,12 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>javax.websocket</groupId>
+ <artifactId>javax.websocket-api</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>org.eclipse.jetty.spdy</groupId>
@@ -298,6 +310,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.toolchain</groupId>
+ <artifactId>jetty-schemas</artifactId>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootContextAsService.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootContextAsService.java
index b15e002f0c..d3e980d755 100644
--- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootContextAsService.java
+++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootContextAsService.java
@@ -18,6 +18,9 @@
package org.eclipse.jetty.osgi.test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
@@ -29,8 +32,6 @@ import java.util.List;
import javax.inject.Inject;
-import junit.framework.Assert;
-
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.http.HttpStatus;
@@ -122,6 +123,7 @@ public class TestJettyOSGiBootContextAsService
TestOSGiUtil.assertAllBundlesActiveOrResolved(bundleContext);
}
+
/**
*/
@Test
@@ -133,10 +135,10 @@ public class TestJettyOSGiBootContextAsService
{
client.start();
ContentResponse response = client.GET("http://127.0.0.1:" + TestJettyOSGiBootCore.DEFAULT_JETTY_HTTP_PORT + "/acme/index.html");
- Assert.assertEquals(HttpStatus.OK_200, response.getStatus());
+ assertEquals(HttpStatus.OK_200, response.getStatus());
String content = new String(response.getContent());
- Assert.assertTrue(content.indexOf("<h1>Test OSGi Context</h1>") != -1);
+ assertTrue(content.indexOf("<h1>Test OSGi Context</h1>") != -1);
}
finally
{
@@ -144,8 +146,8 @@ public class TestJettyOSGiBootContextAsService
}
ServiceReference[] refs = bundleContext.getServiceReferences(ContextHandler.class.getName(), null);
- Assert.assertNotNull(refs);
- Assert.assertEquals(1, refs.length);
+ assertNotNull(refs);
+ assertEquals(1, refs.length);
//uncomment for debugging
/*
String[] keys = refs[0].getPropertyKeys();
@@ -155,15 +157,15 @@ public class TestJettyOSGiBootContextAsService
System.err.println("service property: " + k + ", " + refs[0].getProperty(k));
}*/
ContextHandler ch = (ContextHandler) bundleContext.getService(refs[0]);
- Assert.assertEquals("/acme", ch.getContextPath());
+ assertEquals("/acme", ch.getContextPath());
// Stop the bundle with the ContextHandler in it and check the jetty
// Context is destroyed for it.
// TODO: think of a better way to communicate this to the test, other
// than checking stderr output
Bundle testWebBundle = TestOSGiUtil.getBundle(bundleContext, "org.eclipse.jetty.osgi.testcontext");
- Assert.assertNotNull("Could not find the org.eclipse.jetty.test-jetty-osgi-context.jar bundle", testWebBundle);
- Assert.assertTrue("The bundle org.eclipse.jetty.testcontext is not correctly resolved", testWebBundle.getState() == Bundle.ACTIVE);
+ assertNotNull("Could not find the org.eclipse.jetty.test-jetty-osgi-context.jar bundle", testWebBundle);
+ assertTrue("The bundle org.eclipse.jetty.testcontext is not correctly resolved", testWebBundle.getState() == Bundle.ACTIVE);
testWebBundle.stop();
}
}
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 2784b202bc..ca99c64fda 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
@@ -78,8 +78,8 @@ public class TestJettyOSGiBootCore
res.add(mavenBundle().groupId( "org.eclipse.jetty.osgi" ).artifactId( "jetty-osgi-boot" ).versionAsInProject().start());
- //res.add(mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.servlet" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "javax.servlet" ).artifactId( "javax.servlet-api" ).versionAsInProject().noStart());
+ res.add(mavenBundle().groupId( "org.eclipse.jetty.toolchain" ).artifactId( "jetty-schemas" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-deploy" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-server" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-servlet" ).versionAsInProject().noStart());
@@ -96,6 +96,7 @@ public class TestJettyOSGiBootCore
res.add(mavenBundle().groupId( "org.eclipse.jetty.websocket" ).artifactId( "websocket-common" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty.websocket" ).artifactId( "websocket-servlet" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty.websocket" ).artifactId( "websocket-server" ).versionAsInProject().noStart());
+ res.add(mavenBundle().groupId( "javax.websocket" ).artifactId( "javax.websocket-api" ).versionAsInProject().noStart());
return res;
}
@@ -127,6 +128,4 @@ public class TestJettyOSGiBootCore
{
TestOSGiUtil.testHttpServiceGreetings(bundleContext, "http", DEFAULT_JETTY_HTTP_PORT);
}
-
-
}
diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootSpdy.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootSpdy.java
index a99d74452d..c17838a158 100644
--- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootSpdy.java
+++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootSpdy.java
@@ -104,6 +104,7 @@ public class TestJettyOSGiBootSpdy
res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-npn").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-core").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-server").versionAsInProject().noStart());
+ res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-http-common").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-http-server").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.spdy").artifactId("spdy-client").versionAsInProject().noStart());
return res;
diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWebAppAsService.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWebAppAsService.java
index be7cd780b4..9510412e68 100644
--- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWebAppAsService.java
+++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWebAppAsService.java
@@ -18,6 +18,9 @@
package org.eclipse.jetty.osgi.test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
@@ -29,8 +32,6 @@ import java.util.List;
import javax.inject.Inject;
-import junit.framework.Assert;
-
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.http.HttpStatus;
@@ -82,7 +83,6 @@ public class TestJettyOSGiBootWebAppAsService
if (LOGGING_ENABLED)
logLevel = "INFO";
-
options.addAll(Arrays.asList(options(
// install log service using pax runners profile abstraction (there
// are more profiles, like DS)
@@ -94,8 +94,8 @@ public class TestJettyOSGiBootWebAppAsService
options.addAll(jspDependencies());
return options.toArray(new Option[options.size()]);
-
}
+
public static List<Option> configureJettyHomeAndPort(String jettySelectorFileName)
{
@@ -119,16 +119,14 @@ public class TestJettyOSGiBootWebAppAsService
public static List<Option> jspDependencies()
{
List<Option> res = new ArrayList<Option>();
- /* orbit deps */
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("javax.servlet.jsp").versionAsInProject());
+
+ //jsp bundles
+ res.add(mavenBundle().groupId("javax.servlet.jsp").artifactId("javax.servlet.jsp-api").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("javax.servlet.jsp.jstl").versionAsInProject());
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("javax.el").versionAsInProject());
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("com.sun.el").versionAsInProject());
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("org.apache.jasper.glassfish").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("org.apache.taglibs.standard.glassfish").versionAsInProject());
+ res.add(mavenBundle().groupId("org.glassfish").artifactId("javax.el").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("org.eclipse.jdt.core").versionAsInProject());
-
- /* jetty-osgi deps */
+ res.add(mavenBundle().groupId("org.eclipse.jetty.toolchain").artifactId("jetty-jsp-fragment").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-boot-jsp").versionAsInProject().noStart());
// a bundle that registers a webapp as a service for the jetty osgi core
@@ -148,17 +146,17 @@ public class TestJettyOSGiBootWebAppAsService
@Test
public void testBundle() throws Exception
{
- // now test the jsp/dump.jsp
+ // now test getting a static file
HttpClient client = new HttpClient();
try
{
client.start();
ContentResponse response = client.GET("http://127.0.0.1:" + TestJettyOSGiBootCore.DEFAULT_JETTY_HTTP_PORT + "/acme/index.html");
- Assert.assertEquals(HttpStatus.OK_200, response.getStatus());
+ assertEquals(HttpStatus.OK_200, response.getStatus());
String content = new String(response.getContent());
- Assert.assertTrue(content.indexOf("<h1>Test OSGi WebApp</h1>") != -1);
+ assertTrue(content.indexOf("<h1>Test OSGi WebApp</h1>") != -1);
}
finally
{
@@ -166,10 +164,10 @@ public class TestJettyOSGiBootWebAppAsService
}
ServiceReference[] refs = bundleContext.getServiceReferences(ContextHandler.class.getName(), null);
- Assert.assertNotNull(refs);
- Assert.assertEquals(1, refs.length);
+ assertNotNull(refs);
+ assertEquals(1, refs.length);
WebAppContext wac = (WebAppContext) bundleContext.getService(refs[0]);
- Assert.assertEquals("/acme", wac.getContextPath());
+ assertEquals("/acme", wac.getContextPath());
}
}
diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java
index 3c23e22c77..45e80fcb55 100644
--- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java
+++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJsp.java
@@ -18,6 +18,8 @@
package org.eclipse.jetty.osgi.test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
@@ -29,8 +31,6 @@ import java.util.List;
import javax.inject.Inject;
-import junit.framework.Assert;
-
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.http.HttpStatus;
@@ -135,23 +135,23 @@ public class TestJettyOSGiBootWithJsp
public static List<Option> jspDependencies()
{
List<Option> res = new ArrayList<Option>();
- /* orbit deps */
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("javax.servlet.jsp").versionAsInProject());
+
+ //jetty jsp bundles
+ res.add(mavenBundle().groupId("javax.servlet.jsp").artifactId("javax.servlet.jsp-api").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("javax.servlet.jsp.jstl").versionAsInProject());
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("javax.el").versionAsInProject());
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("com.sun.el").versionAsInProject());
- res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("org.apache.jasper.glassfish").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("org.apache.taglibs.standard.glassfish").versionAsInProject());
+ res.add(mavenBundle().groupId("org.glassfish").artifactId("javax.el").versionAsInProject());
res.add(mavenBundle().groupId("org.eclipse.jetty.orbit").artifactId("org.eclipse.jdt.core").versionAsInProject());
-
- /* jetty-osgi deps */
+ res.add(mavenBundle().groupId("org.eclipse.jetty.toolchain").artifactId("jetty-jsp-fragment").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-boot-jsp").versionAsInProject().noStart());
-
+
+ //test webapp bundle
res.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("test-jetty-webapp").classifier("webbundle").versionAsInProject());
return res;
}
+
@Test
public void assertAllBundlesActiveOrResolved()
{
@@ -175,16 +175,14 @@ public class TestJettyOSGiBootWithJsp
{
client.start();
ContentResponse response = client.GET("http://127.0.0.1:" + TestJettyOSGiBootCore.DEFAULT_JETTY_HTTP_PORT + "/jsp/dump.jsp");
- Assert.assertEquals(HttpStatus.OK_200, response.getStatus());
+ assertEquals(HttpStatus.OK_200, response.getStatus());
String content = new String(response.getContent());
- Assert.assertTrue(content.contains("<tr><th>ServletPath:</th><td>/jsp/dump.jsp</td></tr>"));
+ assertTrue(content.contains("<tr><th>ServletPath:</th><td>/jsp/dump.jsp</td></tr>"));
}
finally
{
client.stop();
}
-
}
-
}

Back to the top