parent
bd6e888be4
commit
7dc61365e4
|
@ -14,8 +14,8 @@
|
||||||
<bundle-symbolic-name>${project.groupId}.boot.test.osgi</bundle-symbolic-name>
|
<bundle-symbolic-name>${project.groupId}.boot.test.osgi</bundle-symbolic-name>
|
||||||
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
|
<jetty-orbit-url>http://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
|
||||||
<assembly-directory>target/distribution</assembly-directory>
|
<assembly-directory>target/distribution</assembly-directory>
|
||||||
<exam.version>4.9.2</exam.version>
|
<exam.version>4.10.0</exam.version>
|
||||||
<url.version>1.5.2</url.version>
|
<url.version>2.5.2</url.version>
|
||||||
<injection.bundle.version>1.0</injection.bundle.version>
|
<injection.bundle.version>1.0</injection.bundle.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -64,30 +64,16 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- OSGi R4 frameworks -->
|
|
||||||
<!--
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.felix</groupId>
|
<groupId>org.eclipse.platform</groupId>
|
||||||
<artifactId>org.apache.felix.framework</artifactId>
|
<artifactId>org.eclipse.osgi</artifactId>
|
||||||
<version>4.4.0</version>
|
<version>3.11.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.osgi</groupId>
|
<groupId>org.eclipse.platform</groupId>
|
||||||
<artifactId>org.osgi.enterprise</artifactId>
|
|
||||||
<version>5.0.0</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse</groupId>
|
|
||||||
<artifactId>osgi</artifactId>
|
|
||||||
<version>3.10.0-v20140606-1445</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.osgi</groupId>
|
|
||||||
<artifactId>org.eclipse.osgi.services</artifactId>
|
<artifactId>org.eclipse.osgi.services</artifactId>
|
||||||
|
<version>3.5.100</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
@ -76,10 +76,8 @@ public class TestJettyOSGiBootContextAsService
|
||||||
// a bundle that registers a webapp as a service for the jetty osgi core
|
// a bundle that registers a webapp as a service for the jetty osgi core
|
||||||
// to pick up and deploy
|
// to pick up and deploy
|
||||||
options.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("test-jetty-osgi-context").versionAsInProject().start());
|
options.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("test-jetty-osgi-context").versionAsInProject().start());
|
||||||
|
options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("pax.exam.logging").value("none"))));
|
options.add(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL))));
|
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL))));
|
|
||||||
|
|
||||||
return options.toArray(new Option[options.size()]);
|
return options.toArray(new Option[options.size()]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class TestJettyOSGiBootCore
|
||||||
public static List<Option> coreJettyDependencies()
|
public static List<Option> coreJettyDependencies()
|
||||||
{
|
{
|
||||||
List<Option> res = new ArrayList<Option>();
|
List<Option> res = new ArrayList<Option>();
|
||||||
|
|
||||||
res.add(mavenBundle().groupId( "org.ow2.asm" ).artifactId( "asm" ).versionAsInProject().start());
|
res.add(mavenBundle().groupId( "org.ow2.asm" ).artifactId( "asm" ).versionAsInProject().start());
|
||||||
res.add(mavenBundle().groupId( "org.ow2.asm" ).artifactId( "asm-commons" ).versionAsInProject().start());
|
res.add(mavenBundle().groupId( "org.ow2.asm" ).artifactId( "asm-commons" ).versionAsInProject().start());
|
||||||
res.add(mavenBundle().groupId( "org.ow2.asm" ).artifactId( "asm-tree" ).versionAsInProject().start());
|
res.add(mavenBundle().groupId( "org.ow2.asm" ).artifactId( "asm-tree" ).versionAsInProject().start());
|
||||||
|
|
|
@ -32,6 +32,8 @@ import org.ops4j.pax.exam.Configuration;
|
||||||
import org.ops4j.pax.exam.CoreOptions;
|
import org.ops4j.pax.exam.CoreOptions;
|
||||||
import org.ops4j.pax.exam.Option;
|
import org.ops4j.pax.exam.Option;
|
||||||
import org.ops4j.pax.exam.junit.PaxExam;
|
import org.ops4j.pax.exam.junit.PaxExam;
|
||||||
|
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
|
||||||
|
import org.ops4j.pax.exam.spi.reactors.PerClass;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
|
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
|
||||||
|
@ -42,6 +44,7 @@ import static org.ops4j.pax.exam.CoreOptions.systemProperty;
|
||||||
* HTTP2 setup.
|
* HTTP2 setup.
|
||||||
*/
|
*/
|
||||||
@RunWith(PaxExam.class)
|
@RunWith(PaxExam.class)
|
||||||
|
@ExamReactorStrategy(PerClass.class)
|
||||||
public class TestJettyOSGiBootHTTP2
|
public class TestJettyOSGiBootHTTP2
|
||||||
{
|
{
|
||||||
private static final String LOG_LEVEL = "WARN";
|
private static final String LOG_LEVEL = "WARN";
|
||||||
|
@ -59,9 +62,8 @@ public class TestJettyOSGiBootHTTP2
|
||||||
options.addAll(http2JettyDependencies());
|
options.addAll(http2JettyDependencies());
|
||||||
options.add(CoreOptions.junitBundles());
|
options.add(CoreOptions.junitBundles());
|
||||||
options.addAll(TestJettyOSGiBootCore.httpServiceJetty());
|
options.addAll(TestJettyOSGiBootCore.httpServiceJetty());
|
||||||
options.addAll(Arrays.asList(options(systemProperty("pax.exam.logging").value("none"))));
|
options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL))));
|
options.add(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.osgi.LEVEL").value(LOG_LEVEL))));
|
|
||||||
return options.toArray(new Option[options.size()]);
|
return options.toArray(new Option[options.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,9 +78,8 @@ public class TestJettyOSGiBootWebAppAsService
|
||||||
"com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects"));
|
"com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects"));
|
||||||
|
|
||||||
options.addAll(TestJettyOSGiBootCore.coreJettyDependencies());
|
options.addAll(TestJettyOSGiBootCore.coreJettyDependencies());
|
||||||
options.addAll(Arrays.asList(options(systemProperty("pax.exam.logging").value("none"))));
|
options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL))));
|
options.add(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL))));
|
|
||||||
|
|
||||||
options.addAll(jspDependencies());
|
options.addAll(jspDependencies());
|
||||||
return options.toArray(new Option[options.size()]);
|
return options.toArray(new Option[options.size()]);
|
||||||
|
|
|
@ -71,9 +71,8 @@ public class TestJettyOSGiBootWithAnnotations
|
||||||
"com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects"));
|
"com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects"));
|
||||||
|
|
||||||
options.addAll(TestJettyOSGiBootCore.coreJettyDependencies());
|
options.addAll(TestJettyOSGiBootCore.coreJettyDependencies());
|
||||||
options.addAll(Arrays.asList(options(systemProperty("pax.exam.logging").value("none"))));
|
options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL))));
|
options.add(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.annotations.LEVEL").value(LOG_LEVEL))));
|
|
||||||
// options.addAll(TestJettyOSGiBootCore.consoleDependencies());
|
// options.addAll(TestJettyOSGiBootCore.consoleDependencies());
|
||||||
options.addAll(jspDependencies());
|
options.addAll(jspDependencies());
|
||||||
options.addAll(annotationDependencies());
|
options.addAll(annotationDependencies());
|
||||||
|
@ -103,7 +102,9 @@ public class TestJettyOSGiBootWithAnnotations
|
||||||
options.add(systemProperty(OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS).value(xmlConfigs));
|
options.add(systemProperty(OSGiServerConstants.MANAGED_JETTY_XML_CONFIG_URLS).value(xmlConfigs));
|
||||||
options.add(systemProperty("jetty.http.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_HTTP_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.ssl.port").value(String.valueOf(TestJettyOSGiBootCore.DEFAULT_SSL_PORT)));
|
||||||
options.add(systemProperty("jetty.home").value(etcFolder.getParentFile().getAbsolutePath()));
|
options.add(systemProperty("jetty.home").value(etc.getParentFile().getAbsolutePath()));
|
||||||
|
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,13 +122,14 @@ public class TestJettyOSGiBootWithAnnotations
|
||||||
res.add(mavenBundle().groupId("org.eclipse.jetty.tests").artifactId("test-spec-webapp").classifier("webbundle").versionAsInProject());
|
res.add(mavenBundle().groupId("org.eclipse.jetty.tests").artifactId("test-spec-webapp").classifier("webbundle").versionAsInProject());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
@Test
|
@Test
|
||||||
public void assertAllBundlesActiveOrResolved()
|
public void assertAllBundlesActiveOrResolved()
|
||||||
{
|
{
|
||||||
TestOSGiUtil.assertAllBundlesActiveOrResolved(bundleContext);
|
TestOSGiUtil.assertAllBundlesActiveOrResolved(bundleContext);
|
||||||
|
TestOSGiUtil.debugBundles(bundleContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
// at the moment can't run httpservice with jsp at the same time.
|
// at the moment can't run httpservice with jsp at the same time.
|
||||||
|
|
|
@ -68,10 +68,8 @@ public class TestJettyOSGiBootWithJsp
|
||||||
"com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects"));
|
"com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects"));
|
||||||
|
|
||||||
options.addAll(TestJettyOSGiBootCore.coreJettyDependencies());
|
options.addAll(TestJettyOSGiBootCore.coreJettyDependencies());
|
||||||
options.addAll(Arrays.asList(options(systemProperty("pax.exam.logging").value("none"))));
|
options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL))));
|
options.add(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL));
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL))));
|
|
||||||
options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.osgi.LEVEL").value(LOG_LEVEL))));
|
|
||||||
options.addAll(jspDependencies());
|
options.addAll(jspDependencies());
|
||||||
return options.toArray(new Option[options.size()]);
|
return options.toArray(new Option[options.size()]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# LOG4J levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL
|
# LOG4J levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL
|
||||||
#
|
#
|
||||||
log4j.rootLogger=ALL,CONSOLE
|
log4j.rootLogger=WARN,CONSOLE
|
||||||
|
|
||||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||||
#log4j.appender.CONSOLE.threshold=INFO
|
#log4j.appender.CONSOLE.threshold=INFO
|
||||||
|
@ -9,5 +9,5 @@ log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||||
log4j.appender.CONSOLE.layout.ConversionPattern=%d [%5p][%c] %m%n
|
log4j.appender.CONSOLE.layout.ConversionPattern=%d [%5p][%c] %m%n
|
||||||
|
|
||||||
# Level tuning
|
# Level tuning
|
||||||
log4j.logger.org.eclipse.jetty=INFO
|
log4j.logger.org.eclipse.jetty=DEBUG
|
||||||
log4j.logger.org.ops4j=WARN
|
#log4j.logger.org.ops4j=INFO
|
||||||
|
|
Loading…
Reference in New Issue