Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 52715 invoked from network); 18 Apr 2009 08:00:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Apr 2009 08:00:25 -0000 Received: (qmail 29497 invoked by uid 500); 18 Apr 2009 08:00:25 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 29397 invoked by uid 500); 18 Apr 2009 08:00:24 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 29388 invoked by uid 99); 18 Apr 2009 08:00:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Apr 2009 08:00:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Sat, 18 Apr 2009 08:00:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0A53623889CF; Sat, 18 Apr 2009 08:00:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r766263 - in /geronimo/sandbox/blueprint: blueprint-api/pom.xml blueprint-bundle/ blueprint-bundle/pom.xml itests/pom.xml itests/src/test/java/org/apache/felix/blueprint/itests/Test.java pom.xml Date: Sat, 18 Apr 2009 08:00:00 -0000 To: scm@geronimo.apache.org From: gnodet@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090418080001.0A53623889CF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gnodet Date: Sat Apr 18 08:00:00 2009 New Revision: 766263 URL: http://svn.apache.org/viewvc?rev=766263&view=rev Log: Add a bundle containing all the needed dependencies (is asm really required?) Added: geronimo/sandbox/blueprint/blueprint-bundle/ (with props) geronimo/sandbox/blueprint/blueprint-bundle/pom.xml Modified: geronimo/sandbox/blueprint/blueprint-api/pom.xml geronimo/sandbox/blueprint/itests/pom.xml geronimo/sandbox/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java geronimo/sandbox/blueprint/pom.xml Modified: geronimo/sandbox/blueprint/blueprint-api/pom.xml URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-api/pom.xml?rev=766263&r1=766262&r2=766263&view=diff ============================================================================== --- geronimo/sandbox/blueprint/blueprint-api/pom.xml (original) +++ geronimo/sandbox/blueprint/blueprint-api/pom.xml Sat Apr 18 08:00:00 2009 @@ -34,6 +34,7 @@ ${pom.artifactId} + org.osgi.service.blueprint*;version="1.0" Propchange: geronimo/sandbox/blueprint/blueprint-bundle/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Sat Apr 18 08:00:00 2009 @@ -0,0 +1,2 @@ +*.iml +target Added: geronimo/sandbox/blueprint/blueprint-bundle/pom.xml URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-bundle/pom.xml?rev=766263&view=auto ============================================================================== --- geronimo/sandbox/blueprint/blueprint-bundle/pom.xml (added) +++ geronimo/sandbox/blueprint/blueprint-bundle/pom.xml Sat Apr 18 08:00:00 2009 @@ -0,0 +1,58 @@ + + + 4.0.0 + + org.apache.felix + blueprint + 1.0.0-SNAPSHOT + + + blueprint-bundle + bundle + Blueprint Bundle + + + + org.apache.felix + maven-bundle-plugin + true + + + ${pom.artifactId} + org.apache.felix.blueprint.Activator + + org.osgi.service.blueprint*;version="1.0", + org.apache.felix.blueprint*;version="${pom.version}" + + + org.apache.xbean* + + + + + + + + + org.apache.felix + org.apache.felix.blueprint + ${version} + provided + + + Modified: geronimo/sandbox/blueprint/itests/pom.xml URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/itests/pom.xml?rev=766263&r1=766262&r2=766263&view=diff ============================================================================== --- geronimo/sandbox/blueprint/itests/pom.xml (original) +++ geronimo/sandbox/blueprint/itests/pom.xml Sat Apr 18 08:00:00 2009 @@ -36,7 +36,13 @@ org.apache.felix - org.apache.felix.blueprint + blueprint-bundle + ${pom.version} + test + + + org.apache.felix + sample ${pom.version} test Modified: geronimo/sandbox/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java?rev=766263&r1=766262&r2=766263&view=diff ============================================================================== --- geronimo/sandbox/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java (original) +++ geronimo/sandbox/blueprint/itests/src/test/java/org/apache/felix/blueprint/itests/Test.java Sat Apr 18 08:00:00 2009 @@ -18,11 +18,20 @@ */ package org.apache.felix.blueprint.itests; +import java.net.URLDecoder; + import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest; +import org.osgi.framework.Bundle; +import org.springframework.core.io.Resource; +import org.springframework.util.Assert; public class Test extends AbstractIntegrationTest { public void test() throws Exception { + Resource res = locateBundle(getBundle("org.apache.felix", "sample")); + Bundle bundle = installBundle(res); + assertNotNull(bundle); + bundle.start(); } /** @@ -53,10 +62,27 @@ */ protected String[] getTestBundlesNames() { return new String[] { - getBundle("org.apache.xbean", "xbean-reflect"), - getBundle("org.apache.felix", "blueprint-api"), - getBundle("org.apache.felix", "org.apache.felix.blueprint"), + getBundle("org.apache.felix", "blueprint-bundle"), }; } + private Bundle installBundle(Resource location) throws Exception { + Assert.notNull(bundleContext); + Assert.notNull(location); + if (logger.isDebugEnabled()) + logger.debug("Installing bundle from location " + location.getDescription()); + + String bundleLocation; + + try { + bundleLocation = URLDecoder.decode(location.getURL().toExternalForm(), "UTF-8"); + } + catch (Exception ex) { + // the URL cannot be created, fall back to the description + bundleLocation = location.getDescription(); + } + + return bundleContext.installBundle(bundleLocation, location.getInputStream()); + } + } Modified: geronimo/sandbox/blueprint/pom.xml URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/pom.xml?rev=766263&r1=766262&r2=766263&view=diff ============================================================================== --- geronimo/sandbox/blueprint/pom.xml (original) +++ geronimo/sandbox/blueprint/pom.xml Sat Apr 18 08:00:00 2009 @@ -66,6 +66,7 @@ blueprint-api org.apache.felix.blueprint + blueprint-bundle sample itests