Return-Path: X-Original-To: apmail-felix-commits-archive@www.apache.org Delivered-To: apmail-felix-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 536FD95C1 for ; Thu, 8 Mar 2012 04:38:26 +0000 (UTC) Received: (qmail 52443 invoked by uid 500); 8 Mar 2012 04:38:25 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 52311 invoked by uid 500); 8 Mar 2012 04:38:23 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 52284 invoked by uid 99); 8 Mar 2012 04:38:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 04:38:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED 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; Thu, 08 Mar 2012 04:38:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9BBEE2388860 for ; Thu, 8 Mar 2012 04:37:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1298268 - in /felix/trunk/scr: pom.xml src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java src/test/java/org/apache/felix/scr/integration/components/MyTinyBundle.java Date: Thu, 08 Mar 2012 04:37:56 -0000 To: commits@felix.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120308043756.9BBEE2388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fmeschbe Date: Thu Mar 8 04:37:56 2012 New Revision: 1298268 URL: http://svn.apache.org/viewvc?rev=1298268&view=rev Log: FELIX-3371 Apply patch FELIX-3371-3.diff to update to newer pax-exam (patch provided by David Jencks, thanks alot) Removed: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/MyTinyBundle.java Modified: felix/trunk/scr/pom.xml felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java Modified: felix/trunk/scr/pom.xml URL: http://svn.apache.org/viewvc/felix/trunk/scr/pom.xml?rev=1298268&r1=1298267&r2=1298268&view=diff ============================================================================== --- felix/trunk/scr/pom.xml (original) +++ felix/trunk/scr/pom.xml Thu Mar 8 04:37:56 2012 @@ -21,7 +21,7 @@ org.apache.felix felix-parent 2.1 - ../pom/pom.xml + 4.0.0 bundle @@ -113,33 +113,92 @@ - junit - junit - 4.6 + org.ops4j.pax.exam + pax-exam-container-forked + 2.4.0.RC1 test + org.ops4j.pax.exam - pax-exam - 0.6.0 + pax-exam-junit4 + 2.4.0.RC1 test + org.ops4j.pax.exam - pax-exam-junit - 0.6.0 + pax-exam-link-mvn + 2.4.0.RC1 + test + + + + org.ops4j.pax.url + pax-url-aether + 1.4.0.RC1 test - org.ops4j.pax.exam - pax-exam-container-default - 0.6.0 + org.ops4j.pax.url + pax-url-wrap + 1.4.0.RC1 + test + + + org.ops4j.pax.logging + pax-logging-api + 1.6.3 + test + + + org.ops4j.pax.logging + pax-logging-service + 1.6.3 + test + + + + ch.qos.logback + logback-core + 0.9.29 + test + + + + ch.qos.logback + logback-classic + 0.9.29 + test + + + org.apache.geronimo.specs + geronimo-atinject_1.0_spec + 1.0 + test + + + org.junit + com.springsource.org.junit + 4.9.0 test - org.ops4j.pax.swissbox - pax-swissbox-tinybundles - 1.1.0 + org.ops4j.base + ops4j-base-lang + 1.2.3 + provided + + + org.ops4j.base + ops4j-base-net + 1.2.3 + provided + + + org.ops4j.pax.tinybundles + tinybundles + 1.0.0 test @@ -149,7 +208,7 @@ org.apache.felix maven-bundle-plugin - 2.3.4 + 2.3.7 true @@ -295,36 +354,9 @@ - + maven-surefire-plugin - - - surefire-it - integration-test - - test - - - - - project.bundle.file - ${bundle.file.name} - - - - **/components/** - - - **/integration/* - - - - **/integration/** @@ -334,6 +366,33 @@ + + + maven-failsafe-plugin + 2.12 + + + + integration-test + verify + + + + + + + project.bundle.file + ${bundle.file.name} + + + + **/components/** + + + **/integration/* + + + org.apache.maven.plugins maven-javadoc-plugin @@ -374,17 +433,40 @@ + + + felix + + true + + + + org.apache.felix + org.apache.felix.framework + 4.0.2 + test + + + + + equinox + + + org.eclipse + osgi + 3.7.1.R37x_v20110808-1106 + test + + + - - - ops4j - ops4j - http://repository.ops4j.org/maven2 - - false - - + + + com.springsource.repository.bundles.external + SpringSource Enterprise Bundle Repository - External Bundle Releases + http://repository.springsource.com/maven/bundles/external + Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java?rev=1298268&r1=1298267&r2=1298268&view=diff ============================================================================== --- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java (original) +++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java Thu Mar 8 04:37:56 2012 @@ -19,11 +19,13 @@ package org.apache.felix.scr.integration; +import static org.ops4j.pax.exam.CoreOptions.junitBundles; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.CoreOptions.systemProperty; -import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd; +import static org.ops4j.pax.tinybundles.core.TinyBundles.bundle; +import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd; import java.io.File; import java.io.IOException; @@ -31,19 +33,20 @@ import java.io.InputStream; import java.lang.reflect.Field; import java.util.Dictionary; import java.util.Hashtable; + +import javax.inject.Inject; import junit.framework.TestCase; import org.apache.felix.scr.Component; import org.apache.felix.scr.ScrService; -import org.apache.felix.scr.integration.components.MyTinyBundle; import org.junit.After; import org.junit.Before; import org.ops4j.pax.exam.CoreOptions; -import org.ops4j.pax.exam.Inject; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.OptionUtils; -import org.ops4j.pax.exam.container.def.PaxRunnerOptions; +import org.ops4j.pax.exam.TestProbeBuilder; import org.ops4j.pax.exam.junit.Configuration; +import org.ops4j.pax.exam.junit.ProbeBuilder; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleException; @@ -91,6 +94,11 @@ public abstract class ComponentTestBase theConfig.put( PROP_NAME, PROP_NAME ); } + @ProbeBuilder + public TestProbeBuilder extendProbe(TestProbeBuilder builder) { + builder.setHeader("Export-Package", "org.apache.felix.scr.integration.components,org.apache.felix.scr.integration.components.activatesignature"); + return builder; + } @Configuration public static Option[] configuration() @@ -106,12 +114,14 @@ public abstract class ComponentTestBase final Option[] base = options( provision( CoreOptions.bundle( bundleFile.toURI().toString() ), - mavenBundle( "org.ops4j.pax.swissbox", "pax-swissbox-tinybundles", "1.1.0" ), + mavenBundle( "org.ops4j.pax.tinybundles", "tinybundles", "1.0.0" ), mavenBundle( "org.apache.felix", "org.apache.felix.configadmin", "1.0.10" ) ), + junitBundles(), systemProperty( "ds.factory.enabled" ).value( "true" ) + ); - final Option vmOption = ( paxRunnerVmOption != null ) ? PaxRunnerOptions.vmOption( paxRunnerVmOption ) : null; + final Option vmOption = ( paxRunnerVmOption != null ) ? CoreOptions.vmOption( paxRunnerVmOption ) : null; return OptionUtils.combine( base, vmOption ); } @@ -319,17 +329,15 @@ public abstract class ComponentTestBase protected Bundle installBundle( final String descriptorFile ) throws BundleException { - final InputStream bundleStream = new MyTinyBundle() - .add( "OSGI-INF/components.xml", getClass().getResource( descriptorFile ) ) - .prepare( - withBnd() - .set( Constants.BUNDLE_SYMBOLICNAME, "simplecomponent" ) - .set( Constants.BUNDLE_VERSION, "0.0.11" ) - .set( Constants.IMPORT_PACKAGE, - "org.apache.felix.scr.integration.components,org.apache.felix.scr.integration.components.activatesignature" ) - .set( "Service-Component", "OSGI-INF/components.xml" ) - ) - .build(); + final InputStream bundleStream = bundle() + .add("OSGI-INF/components.xml", getClass().getResource(descriptorFile)) + + .set(Constants.BUNDLE_SYMBOLICNAME, "simplecomponent") + .set(Constants.BUNDLE_VERSION, "0.0.11") + .set(Constants.IMPORT_PACKAGE, + "org.apache.felix.scr.integration.components,org.apache.felix.scr.integration.components.activatesignature") + .set("Service-Component", "OSGI-INF/components.xml") + .build(withBnd()); try {