Thanks for the reply.

Our Ivy repo does not follow the Maven structure. There is a mention of Ivy 
protocol support in Pax URL,
but it doesn't appear to be implemented.

For OBR, I was able make some progress using the Pax URL integration test for 
OBR as a guide.
https://github.com/ops4j/org.ops4j.pax.url/blob/master/pax-url-itest/

I can provision a bundle in the body of a test by passing the URL stream into 
bundleContext.installBundle().
However, if I instead try to provision in the config using bundle or provision 
options, I get an "unknown protocol" URL exception.
The exception and config are listed below.

Cheers,
Patrick


                @Configuration
                public Option[] config() throws Exception {
                                return options(

                                                                // OBR location
                                                                
frameworkProperty("obr.repository.url").value(
                                                                                
                "http://sigil.codecauldron.org/spring-external.obr";),

                                                                // bundle under 
test and its dependencies
                                                                
mavenBundle("org.ops4j.pax.url", "pax-url-obr", "1.4.0.RC1"),
                                                                
mavenBundle("org.ops4j.pax.url", "pax-url-commons", "1.4.0.RC1"),
                                                                
mavenBundle("org.ops4j.pax.swissbox", "pax-swissbox-lifecycle"),
                                                                
mavenBundle("org.ops4j.pax.swissbox", "pax-swissbox-property"),
                                                                
mavenBundle("org.ops4j.pax.swissbox", "pax-swissbox-tracker"),
                                                                
mavenBundle("org.ops4j.base", "ops4j-base", "1.3.0"),
                                                                
mavenBundle("org.apache.felix", "org.osgi.service.obr", "1.0.2"),

                                                                // OBR 
RepositoryAdmin implementation
                                                                
mavenBundle("org.apache.felix",
                                                                                
                "org.apache.felix.bundlerepository", "1.6.6"),

                                                                // provision 
bundle from OBR
                                                                
bundle("obr:com.springsource.org.apache.commons.lang/2.5.0"),

                                                                junitBundles(), 
felix()

                                );
                }

org.ops4j.pax.exam.TestContainerException: Problem starting test container.
                at 
org.ops4j.pax.exam.nat.internal.NativeTestContainer.start(NativeTestContainer.java:177)
                at 
org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.<init>(EagerSingleStagedReactor.java:55)
                at 
org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactorFactory.create(EagerSingleStagedReactorFactory.java:34)
                at 
org.ops4j.pax.exam.spi.DefaultExamReactor.stage(DefaultExamReactor.java:83)
                at 
org.ops4j.pax.exam.junit.JUnit4TestRunner.prepareReactor(JUnit4TestRunner.java:187)
                at 
org.ops4j.pax.exam.junit.JUnit4TestRunner.<init>(JUnit4TestRunner.java:80)
                at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                at java.lang.reflect.Constructor.newInstance(Unknown Source)
                at 
org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
                at 
org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
                at 
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
                at 
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
                at 
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
                at 
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
                at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
                at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
                at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
                at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
                at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: 
obr:com.springsource.org.apache.commons.lang/2.5.0
                at 
org.apache.felix.framework.Felix.installBundle(Felix.java:2703)
                at 
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
                at 
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:138)
                at 
org.ops4j.pax.exam.nat.internal.NativeTestContainer.installAndStartBundles(NativeTestContainer.java:303)
                at 
org.ops4j.pax.exam.nat.internal.NativeTestContainer.start(NativeTestContainer.java:174)
                ... 23 more
Caused by: java.net.MalformedURLException: Unknown protocol: obr
                at java.net.URL.<init>(Unknown Source)
                at 
org.apache.felix.framework.util.SecureAction.createURL(SecureAction.java:250)
                at 
org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:148)
                at 
org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:77)
                at 
org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878)
                at 
org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
                at 
org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
                at 
org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
                at 
org.apache.felix.framework.Felix.installBundle(Felix.java:2699)
                ... 27 more


From: general-boun...@lists.ops4j.org [mailto:general-boun...@lists.ops4j.org] 
On Behalf Of David Jencks
Sent: Thursday, March 01, 2012 5:53 PM
To: General OPS4J
Subject: Re: Provisioning from Ivy or OBR

If Ivy repos have the same structure and remote capabilities as maven repos I 
think you can get provisioning from an ivy repo to work if you configure 
~/.m2/settings.xml for it.  The mvn provisioning works from that.

I'm not sure about OBR.

hope this helps -- never used ivy.

david jencks

On Mar 1, 2012, at 10:10 AM, Conreaux, Patrick wrote:


I am new to Pax Exam and wanting to provision bundles from either an Ivy repo 
or an OBR (using Pax Exam 2.3+).
Could anyone provide some insight on how to accomplish this?

Cheers,
Patrick
_______________________________________________
general mailing list
general@lists.ops4j.org<mailto:general@lists.ops4j.org>
http://lists.ops4j.org/mailman/listinfo/general

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to