diff options
Diffstat (limited to 'jetty-osgi')
16 files changed, 91 insertions, 100 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-selector.xml b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-selector.xml index 67cd87c2a7..0613a1ab05 100644 --- a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-selector.xml +++ b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-selector.xml @@ -21,8 +21,8 @@ </Item> </Array> </Arg> - <Set name="host"><Property name="jetty.host" /></Set> - <Set name="port"><Property name="jetty.port" default="8080"/></Set> + <Set name="host"><Property name="jetty.http.host" /></Set> + <Set name="port"><Property name="jetty.http.port" default="8080"/></Set> <Set name="idleTimeout">300000</Set> </New> </Arg> diff --git a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml index 5c882b0514..881e69cafc 100644 --- a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml +++ b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty.xml @@ -43,7 +43,7 @@ <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration"> <Set name="secureScheme">https</Set> - <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set> + <Set name="securePort"><Property name="jetty.httpConfig.securePort" default="8443" /></Set> <Set name="outputBufferSize">32768</Set> <Set name="requestHeaderSize">8192</Set> <Set name="responseHeaderSize">8192</Set> diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java index a91af45a83..6b846a7e5d 100644 --- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java +++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiServerConstants.java @@ -43,21 +43,20 @@ public class OSGiServerConstants * Usual system property used as the hostname for a typical jetty * configuration. */ - public static final String JETTY_HOST = "jetty.host"; + public static final String JETTY_HOST = "jetty.http.host"; /** * Usual system property used as the port for http for a typical jetty * configuration. */ - public static final String JETTY_PORT = "jetty.port"; + public static final String JETTY_PORT = "jetty.http.port"; /** * Usual system property used as the port for https for a typical jetty * configuration. */ - public static final String JETTY_PORT_SSL = "ssl.port"; - - + public static final String JETTY_PORT_SSL = "jetty.ssl.port"; + //for managed jetty instances, name of the configuration parameters /** * PID of the jetty servers's ManagedFactory @@ -86,5 +85,4 @@ public class OSGiServerConstants * List of URLs to the folders where the legacy J2EE shared libraries are stored aka lib/ext, lib/jsp etc. */ public static final String MANAGED_JETTY_SHARED_LIB_FOLDER_URLS = "managedJettySharedLibFolderUrls"; - } diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java index 48fc6ebb9b..2377f54117 100644 --- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java +++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/serverfactory/DefaultJettyAtJettyHomeHelper.java @@ -88,8 +88,8 @@ public class DefaultJettyAtJettyHomeHelper * files. * </p> * <p> - * In both cases the system properties jetty.host, jetty.port and - * jetty.port.ssl are passed to the configuration files that might use them + * In both cases the system properties jetty.http.host, jetty.http.port and + * jetty.ssl.port are passed to the configuration files that might use them * as part of their properties. * </p> */ @@ -158,7 +158,7 @@ public class DefaultJettyAtJettyHomeHelper String home=properties.get(OSGiServerConstants.JETTY_HOME); String base=properties.get(OSGiServerConstants.JETTY_BASE); if (base==null) - base=home; + base=home; LOG.info("JETTY.HOME="+home); LOG.info("JETTY.BASE="+base); ClassLoader contextCl = Thread.currentThread().getContextClassLoader(); @@ -169,9 +169,9 @@ public class DefaultJettyAtJettyHomeHelper // these properties usually are the ones passed to this type of // configuration. properties.put(OSGiServerConstants.MANAGED_JETTY_SERVER_NAME, OSGiServerConstants.MANAGED_JETTY_SERVER_DEFAULT_NAME); - Util.setProperty(properties, OSGiServerConstants.JETTY_HOST, System.getProperty(OSGiServerConstants.JETTY_HOST)); - Util.setProperty(properties, OSGiServerConstants.JETTY_PORT, System.getProperty(OSGiServerConstants.JETTY_PORT)); - Util.setProperty(properties, OSGiServerConstants.JETTY_PORT_SSL, System.getProperty(OSGiServerConstants.JETTY_PORT_SSL)); + Util.setProperty(properties, OSGiServerConstants.JETTY_HOST, System.getProperty(OSGiServerConstants.JETTY_HOST, System.getProperty("jetty.host"))); + Util.setProperty(properties, OSGiServerConstants.JETTY_PORT, System.getProperty(OSGiServerConstants.JETTY_PORT, System.getProperty("jetty.port"))); + Util.setProperty(properties, OSGiServerConstants.JETTY_PORT_SSL, System.getProperty(OSGiServerConstants.JETTY_PORT_SSL, System.getProperty("ssl.port"))); Util.setProperty(properties, OSGiServerConstants.JETTY_HOME, home); Util.setProperty(properties, OSGiServerConstants.JETTY_BASE, base); Server server = ServerInstanceWrapper.configure(null, configURLs, properties); @@ -185,8 +185,8 @@ public class DefaultJettyAtJettyHomeHelper } catch (Exception e) { - LOG.warn(e); - throw e; + LOG.warn(e); + throw e; } finally { diff --git a/jetty-osgi/test-jetty-osgi-context/src/main/context/acme.xml b/jetty-osgi/test-jetty-osgi-context/src/main/context/acme.xml index 1ff97a49fc..ef5122d24b 100644 --- a/jetty-osgi/test-jetty-osgi-context/src/main/context/acme.xml +++ b/jetty-osgi/test-jetty-osgi-context/src/main/context/acme.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> +<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"> <Configure class="org.eclipse.jetty.server.handler.ContextHandler"> diff --git a/jetty-osgi/test-jetty-osgi-webapp/src/main/java/com/acme/osgi/Activator.java b/jetty-osgi/test-jetty-osgi-webapp/src/main/java/com/acme/osgi/Activator.java index 0863fe918b..8ad84d8c8b 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/src/main/java/com/acme/osgi/Activator.java +++ b/jetty-osgi/test-jetty-osgi-webapp/src/main/java/com/acme/osgi/Activator.java @@ -51,7 +51,7 @@ public class Activator implements BundleActivator Dictionary serverProps = new Hashtable(); //define the unique name of the server instance serverProps.put("managedServerName", serverName); - serverProps.put("jetty.port", "9999"); + serverProps.put("jetty.http.port", "9999"); //let Jetty apply some configuration files to the Server instance serverProps.put("jetty.etc.config.urls", "file:/opt/jetty/etc/jetty.xml,file:/opt/jetty/etc/jetty-selector.xml,file:/opt/jetty/etc/jetty-deployer.xml"); //register as an OSGi Service for Jetty to find diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml index c3f74f3e66..dd35c6f374 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml @@ -31,10 +31,9 @@ </Item> </Array> </Arg> - <Set name="host"><Property name="jetty.host" /></Set> - <Set name="port"><Property name="jetty.port" default="80" /></Set> - <Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set> - <Set name="soLingerTime"><Property name="http.soLingerTime" default="-1"/></Set> + <Set name="host"><Property name="jetty.http.host" /></Set> + <Set name="port"><Property name="jetty.http.port" default="80" /></Set> + <Set name="idleTimeout"><Property name="jetty.http.idleTimeout" default="30000"/></Set> </New> </Arg> </Call> diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml index b0ad6581e1..13258ae68f 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml @@ -9,7 +9,7 @@ <Arg> <New class="org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory"> <Arg name="config"><Ref refid="sslHttpConfig"/></Arg> - <Set name="maxConcurrentStreams"><Property name="http2.maxConcurrentStreams" default="1024"/></Set> + <Set name="maxConcurrentStreams"><Property name="jetty.http2.maxConcurrentStreams" default="1024"/></Set> </New> </Arg> </Call> diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-ssl.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-ssl.xml index ef65019001..d80cf81b3e 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-ssl.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-ssl.xml @@ -19,10 +19,10 @@ <Array type="org.eclipse.jetty.server.ConnectionFactory"> </Array> </Arg> - <Set name="host"><Property name="jetty.host" /></Set> - <Set name="port"><Property name="ssl.port" default="443" /></Set> - <Set name="idleTimeout"><Property name="ssl.timeout" default="30000"/></Set> - <Set name="soLingerTime"><Property name="ssl.soLingerTime" default="-1"/></Set> + <Set name="host"><Property name="jetty.ssl.host" /></Set> + <Set name="port"><Property name="jetty.ssl.port" default="443" /></Set> + <Set name="idleTimeout"><Property name="jetty.ssl.idleTimeout" default="30000"/></Set> + <Set name="soLingerTime"><Property name="jetty.ssl.soLingerTime" default="-1"/></Set> </New> </Arg> </Call> @@ -31,14 +31,14 @@ <!-- Create a TLS (SSL) Context Factory for later reuse --> <!-- ============================================================= --> <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory"> - <Set name="KeyStorePath"><Property name="jetty.base" default="." />/<Property name="jetty.keystore" default="etc/keystore"/></Set> - <Set name="KeyStorePassword"><Property name="jetty.keystore.password" default="OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"/></Set> - <Set name="KeyManagerPassword"><Property name="jetty.keymanager.password" default="OBF:1u2u1wml1z7s1z7a1wnl1u2g"/></Set> - <Set name="TrustStorePath"><Property name="jetty.base" default="." />/<Property name="jetty.truststore" default="etc/keystore"/></Set> - <Set name="TrustStorePassword"><Property name="jetty.truststore.password" default="OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"/></Set> + <Set name="KeyStorePath"><Property name="jetty.base" default="." />/<Property name="jetty.sslConfig.keyStorePath" default="etc/keystore"/></Set> + <Set name="KeyStorePassword"><Property name="jetty.sslConfig.keyStorePassword" default="OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"/></Set> + <Set name="KeyManagerPassword"><Property name="jetty.sslConfig.keyManagerPassword" default="OBF:1u2u1wml1z7s1z7a1wnl1u2g"/></Set> + <Set name="TrustStorePath"><Property name="jetty.base" default="." />/<Property name="jetty.sslConfig.trustStorePath" default="etc/keystore"/></Set> + <Set name="TrustStorePassword"><Property name="jetty.sslConfig.trustStorePassword" default="OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"/></Set> <Set name="EndpointIdentificationAlgorithm"></Set> - <Set name="NeedClientAuth"><Property name="jetty.ssl.needClientAuth" default="false"/></Set> - <Set name="WantClientAuth"><Property name="jetty.ssl.wantClientAuth" default="false"/></Set> + <Set name="NeedClientAuth"><Property name="jetty.sslConfig.needClientAuth" default="false"/></Set> + <Set name="WantClientAuth"><Property name="jetty.sslConfig.wantClientAuth" default="false"/></Set> <Set name="ExcludeCipherSuites"> <Array type="String"> <Item>SSL_RSA_WITH_DES_CBC_SHA</Item> diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml index 170530b80e..bf96e21807 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml @@ -43,7 +43,7 @@ <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration"> <Set name="secureScheme">https</Set> - <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set> + <Set name="securePort"><Property name="jetty.httpConfig.securePort" default="8443" /></Set> <Set name="outputBufferSize">32768</Set> <Set name="requestHeaderSize">8192</Set> <Set name="responseHeaderSize">8192</Set> 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 b448cd7369..a53846572d 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,18 +18,10 @@ 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; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.inject.Inject; import org.eclipse.jetty.client.HttpClient; @@ -48,6 +40,13 @@ import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; +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; + /** * TestJettyOSGiBootContextAsService * @@ -99,8 +98,8 @@ public class TestJettyOSGiBootContextAsService + "/jetty-deployer.xml;" + etc + "/jetty-testrealm.xml")); - options.add(systemProperty("jetty.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); - options.add(systemProperty("ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); + options.add(systemProperty("jetty.http.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); + options.add(systemProperty("jetty.ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); options.add(systemProperty("jetty.home").value(etcFolder.getParentFile().getAbsolutePath())); return options; } 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 94190c0035..19db6154cc 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 @@ -18,14 +18,9 @@ package org.eclipse.jetty.osgi.test; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.inject.Inject; import org.junit.Ignore; @@ -39,6 +34,10 @@ import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.options.MavenUrlReference.VersionResolver; import org.osgi.framework.BundleContext; +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemProperty; + /** * Default OSGi setup integration test @@ -74,8 +73,8 @@ public class TestJettyOSGiBootCore { List<Option> res = new ArrayList<Option>(); // get the jetty home config from the osgi boot bundle. - res.add(CoreOptions.systemProperty("jetty.port").value(String.valueOf(DEFAULT_HTTP_PORT))); - res.add(CoreOptions.systemProperty("ssl.port").value(String.valueOf(DEFAULT_SSL_PORT))); + res.add(CoreOptions.systemProperty("jetty.http.port").value(String.valueOf(DEFAULT_HTTP_PORT))); + res.add(CoreOptions.systemProperty("jetty.ssl.port").value(String.valueOf(DEFAULT_SSL_PORT))); res.add(CoreOptions.systemProperty("jetty.home.bundle").value("org.eclipse.jetty.osgi.boot")); res.addAll(coreJettyDependencies()); return res; diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java index 7a181203b7..8d3b10a018 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java +++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java @@ -18,15 +18,10 @@ package org.eclipse.jetty.osgi.test; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.inject.Inject; import org.junit.Assert; @@ -39,6 +34,10 @@ import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.BundleContext; +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemProperty; + /** * HTTP2 setup. */ @@ -73,8 +72,8 @@ public class TestJettyOSGiBootHTTP2 public static List<Option> http2JettyDependencies() { List<Option> res = new ArrayList<Option>(); - res.add(CoreOptions.systemProperty("jetty.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); - res.add(CoreOptions.systemProperty("ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); + res.add(CoreOptions.systemProperty("jetty.http.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); + res.add(CoreOptions.systemProperty("jetty.ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); String alpnBoot = System.getProperty("mortbay-alpn-boot"); if (alpnBoot == null) { throw new IllegalStateException("Define path to alpn boot jar as system property -Dmortbay-alpn-boot"); } 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 99ee07d248..b725b7d860 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,18 +18,10 @@ 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; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.inject.Inject; import org.eclipse.jetty.client.HttpClient; @@ -48,6 +40,13 @@ import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; +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; + /** * TestJettyOSGiBootWebAppAsService * @@ -102,8 +101,8 @@ public class TestJettyOSGiBootWebAppAsService + "/jetty-deployer.xml;" + etc + "/jetty-testrealm.xml")); - options.add(systemProperty("jetty.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); - options.add(systemProperty("ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); + options.add(systemProperty("jetty.http.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); + options.add(systemProperty("jetty.ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); options.add(systemProperty("jetty.home").value(etcFolder.getParentFile().getAbsolutePath())); return options; } 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 014b66ef68..a41c633438 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 @@ -18,17 +18,10 @@ 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; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.inject.Inject; import org.eclipse.jetty.client.HttpClient; @@ -45,6 +38,12 @@ import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.BundleContext; +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; + /** * Pax-Exam to make sure the jetty-osgi-boot can be started along with the * httpservice web-bundle. Then make sure we can deploy an OSGi service on the @@ -100,8 +99,8 @@ public class TestJettyOSGiBootWithAnnotations + "/jetty-testrealm.xml"; options.add(systemProperty(OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS).value(xmlConfigs)); - options.add(systemProperty("jetty.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); - options.add(systemProperty("ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); + options.add(systemProperty("jetty.http.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); + options.add(systemProperty("jetty.ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); options.add(systemProperty("jetty.home").value(etcFolder.getParentFile().getAbsolutePath())); return options; } 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 1d6e02a744..39d47c46aa 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,17 +18,10 @@ 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; - import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.inject.Inject; import org.eclipse.jetty.client.HttpClient; @@ -44,6 +37,12 @@ import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.BundleContext; +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; + /** * Pax-Exam to make sure the jetty-osgi-boot can be started along with the * httpservice web-bundle. Then make sure we can deploy an OSGi service on the @@ -84,24 +83,24 @@ public class TestJettyOSGiBootWithJsp List<Option> options = new ArrayList<Option>(); String xmlConfigs = etc + "/jetty.xml"; if (ssl) - xmlConfigs += ";" - + etc - + "/jetty-ssl.xml;" - + etc - + "/jetty-https.xml;"; + xmlConfigs += ";" + + etc + + "/jetty-ssl.xml;" + + etc + + "/jetty-https.xml;"; xmlConfigs+= ";" - + etc - + "/" - + jettySelectorFileName - + ";" - + etc - + "/jetty-deployer.xml;" - + etc + + etc + + "/" + + jettySelectorFileName + + ";" + + etc + + "/jetty-deployer.xml;" + + etc + "/jetty-testrealm.xml"; options.add(systemProperty(OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS).value(xmlConfigs)); - options.add(systemProperty("jetty.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); - options.add(systemProperty("ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); + options.add(systemProperty("jetty.http.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_PORT))); + options.add(systemProperty("jetty.ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT))); options.add(systemProperty("jetty.home").value(etcFolder.getParentFile().getAbsolutePath())); options.add(systemProperty("jetty.base").value(etcFolder.getParentFile().getAbsolutePath())); return options; |