From commits-return-12778-apmail-servicemix-commits-archive=servicemix.apache.org@servicemix.apache.org Mon Dec 14 20:46:58 2009 Return-Path: Delivered-To: apmail-servicemix-commits-archive@www.apache.org Received: (qmail 72310 invoked from network); 14 Dec 2009 20:46:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Dec 2009 20:46:58 -0000 Received: (qmail 98729 invoked by uid 500); 14 Dec 2009 20:46:58 -0000 Delivered-To: apmail-servicemix-commits-archive@servicemix.apache.org Received: (qmail 98685 invoked by uid 500); 14 Dec 2009 20:46:58 -0000 Mailing-List: contact commits-help@servicemix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@servicemix.apache.org Delivered-To: mailing list commits@servicemix.apache.org Received: (qmail 98676 invoked by uid 99); 14 Dec 2009 20:46:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2009 20:46:58 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2009 20:46:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E45B9238898A; Mon, 14 Dec 2009 20:46:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r890472 - /servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java Date: Mon, 14 Dec 2009 20:46:26 -0000 To: commits@servicemix.apache.org From: jbonofre@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091214204634.E45B9238898A@eris.apache.org> Author: jbonofre Date: Mon Dec 14 20:46:04 2009 New Revision: 890472 URL: http://svn.apache.org/viewvc?rev=890472&view=rev Log: Add karaf bundles required for unit tests. Modified: servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java Modified: servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java?rev=890472&r1=890471&r2=890472&view=diff ============================================================================== --- servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java (original) +++ servicemix/components/engines/servicemix-exec/trunk/src/test/java/org/apache/servicemix/exec/tests/smx4/ExecTest.java Mon Dec 14 20:46:04 2009 @@ -18,11 +18,15 @@ import static org.ops4j.pax.exam.CoreOptions.felix; import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemProperty; +import static org.ops4j.pax.exam.CoreOptions.systemPackages; +import static org.ops4j.pax.exam.CoreOptions.bootClasspathLibrary; +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; + import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile; import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures; import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repositories; import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.localRepository; -import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.excludeDefaultRepositories; import org.junit.Test; import org.junit.runner.RunWith; @@ -58,20 +62,55 @@ @Configuration public static Option[] configuration() { Option[] options = options( - profile("log").version("1.4"), - org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"), - excludeDefaultRepositories(), + // this is how you set the default log level when using pax logging (logProfile) + systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"), + systemProperty("karaf.name").value("root"), + systemProperty("karaf.home").value("target/karaf.home"), + systemProperty("karaf.base").value("target/karaf.home"), + systemProperty("karaf.startLocalConsole").value("false"), + systemProperty("karaf.startRemoteShell").value("false"), + + // define maven repository repositories( "http://repo1.maven.org/maven2", - "http://repository.apache.org/content/groups/public", "http://repository.apache.org/content/groups/snapshots-group", "http://repository.ops4j.org/maven2", "http://svn.apache.org/repos/asf/servicemix/m2-repo", "http://repository.springsource.com/maven/bundles/release", "http://repository.springsource.com/maven/bundles/external" ), - scanFeatures("mvn:org.apache.felix.karaf/apache-felix-karaf/1.2.0/xml/features", "spring-dm/1.2.0"), - scanFeatures("mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.0.0/xml/features", "jbi/1.0.0"), + + // hack system packages + systemPackages("org.apache.felix.karaf.jaas.boot;version=1.99"), + bootClasspathLibrary(mavenBundle("org.apache.felix.karaf.jaas", "org.apache.felix.karaf.jaas.boot")).afterFramework(), + bootClasspathLibrary(mavenBundle("org.apache.felix.karaf", "org.apache.felix.karaf.main")).afterFramework(), + + // log + mavenBundle("org.ops4j.pax.logging", "pax-logging-api"), + mavenBundle("org.ops4j.pax.logging", "pax-logging-service"), + // felix config admin + mavenBundle("org.apache.felix", "org.apache.felix.configadmin"), + // felix preference service + mavenBundle("org.apache.felix", "org.apache.felix.prefs"), + // blueprint + mavenBundle("org.apache.geronimo.blueprint", "geronimo-blueprint"), + + // bundles + mavenBundle("org.apache.mina", "mina-core"), + mavenBundle("org.apache.sshd", "sshd-core"), + mavenBundle("org.apache.felix.karaf.jaas", "org.apache.felix.karaf.jaas.config"), + mavenBundle("org.apache.felix.karaf.shell", "org.apache.felix.karaf.shell.console"), + mavenBundle("org.apache.felix.gogo", "org.apache.felix.gogo.runtime"), + mavenBundle("org.apache.felix.karaf.shell", "org.apache.felix.karaf.shell.osgi"), + mavenBundle("org.apache.felix.karaf.shell", "org.apache.felix.karaf.shell.log").noStart(), + + // load karaf feature (obr, wrapper) + scanFeatures("mvn:org.apache.felix.karaf/apache-felix-karaf/1.2.0/xml/features", "obr", "wrapper"), + + // load smx nmr feature (jbi) + scanFeatures("mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.0.0/xml/features", "jbi"), + + // start felix framework felix()); return options; }