>>>>> Steinar Bang <[email protected]>: >>>>> "'Achim Nierbeck' via OPS4J" <[email protected]>:
>> I'm on vacation right now so it's only a small mail with some hints. >> First take a look at the PAX Web integration tests which itself use >> PAX exam for testing. That should already fix all your questions. >> https://github.com/ops4j/org.ops4j.pax.web/tree/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty > It looks like it is the WebContainerIntegrationTest that is closes to > what I would like to achive...? > Is it enough to set up the bundles as done in ITestBase.configureJetty()? Yes. I have successfully fetched a WebContainer service into my plugin using a flattened version of the bundles from ITestBase.configureJetty(). Thanks! :-) - Steinar Here are the flattened setup from ITestBase.configureJetty() that worked for me: String paxSwissboxVersion = "1.8.2"; String paxWebVersion = "4.2.7"; String xbeanVersion = "4.1"; String httpcoreVersion = "4.3.3"; String jettyVersion = "9.2.17.v20160517"; @Configuration public Option[] config() { return options( junitBundles(), systemProperty("logback.configurationFile").value("file:src/test/resources/logback.xml"), systemProperty("org.osgi.service.http.port").value("8081"), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN"), systemProperty("org.osgi.service.http.hostname").value("127.0.0.1"), systemProperty("org.osgi.service.http.port").value("8181"), systemProperty("java.protocol.handler.pkgs").value("org.ops4j.pax.url"), systemProperty("org.ops4j.pax.url.war.importPaxLoggingPackages").value("true"), systemProperty("org.ops4j.pax.web.log.ncsa.enabled").value("true"), systemProperty("org.ops4j.pax.web.log.ncsa.directory").value("target/logs"), systemProperty("org.ops4j.pax.web.jsp.scratch.dir").value("target/paxexam/scratch-dir"), systemProperty("org.ops4j.pax.url.mvn.certificateCheck").value("false"), mavenBundle("org.ops4j.pax.logging", "pax-logging-api", paxSwissboxVersion), mavenBundle("org.ops4j.pax.logging", "pax-logging-service", paxSwissboxVersion), mavenBundle("org.ops4j.pax.url", "pax-url-war", "2.4.7"), mavenBundle("org.ops4j.pax.web", "pax-web-spi", paxWebVersion), mavenBundle("org.ops4j.pax.web", "pax-web-api", paxWebVersion), mavenBundle("org.ops4j.pax.web", "pax-web-extender-war", paxWebVersion), mavenBundle("org.ops4j.pax.web", "pax-web-extender-whiteboard", paxWebVersion), mavenBundle("org.ops4j.pax.web", "pax-web-runtime", paxWebVersion), mavenBundle("org.ops4j.pax.web", "pax-web-jsp", paxWebVersion), mavenBundle("org.eclipse.jdt.core.compiler", "ecj", "4.4"), mavenBundle("org.apache.xbean", "xbean-reflect", xbeanVersion), mavenBundle("org.apache.xbean", "xbean-finder", xbeanVersion), mavenBundle("org.apache.xbean", "xbean-bundleutils", xbeanVersion), mavenBundle("org.ow2.asm", "asm-all", "5.0.2"), mavenBundle("commons-codec", "commons-codec", "1.10"), mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.3.2"), mavenBundle("org.apache.httpcomponents", "httpcore", httpcoreVersion), mavenBundle("org.apache.httpcomponents", "httpmime", httpcoreVersion), mavenBundle("org.apache.httpcomponents", "httpclient", httpcoreVersion), mavenBundle("javax.servlet", "javax.servlet-api", "3.1.0"), mavenBundle("org.ops4j.pax.web", "pax-web-jetty", paxWebVersion), mavenBundle("org.eclipse.jetty", "jetty-util", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-io", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-http", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-continuation", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-server", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-client", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-security", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-xml", jettyVersion), mavenBundle("org.eclipse.jetty", "jetty-servlet", jettyVersion), mavenBundle("no.priv.bang.ukelonn", "ukelonn.bundle", getMavenProjectVersion())); } -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
