Re: [Pax-exam] Import package with attributes

2017-01-01 Thread Henri Tremblay
Thanks Toni, the wrap suffix now works. But importing sadly still fails. I'm currently doing this: public static CompositeOption junitBundles() { return new DefaultCompositeOption(

Re: [Pax-exam] Import package with attributes

2016-12-30 Thread Toni Menzel
Why shouldn't it work? the link handler resolves to an InputStream thas is being consumed by wrap protocol handler. Otherwise i would consider it a bug in the url parser of pax-url-wrap. The error to me indicates a missing dependency, like: org.ops4j.pax.url:pax-url-wrap:2.5.2 in your pom or

Re: [Pax-exam] Import package with attributes

2016-12-30 Thread 'Achim Nierbeck' via OPS4J
Hi, I'm not sure if wrap and link do work in combination. It does work nicely though with maven bundles, so if you give a maven coordinate instead of a link, that should work well. I fear with link, which is another URL handler, the mixing of wrap doesn't work well. regards, Achim 2016-12-29

Re: [Pax-exam] Import package with attributes

2016-12-28 Thread Henri Tremblay
I'm currently trying but with mild results. I tried this: public static CompositeOption junitBundles() { return new DefaultCompositeOption(new JUnitBundlesOption(), systemProperty("pax.exam.invoker").value("junit"),

Re: [Pax-exam] Import package with attributes

2016-12-28 Thread Henri Tremblay
Thanks. I will try to wrap everything. In fact, I'm testing OSGi. I have an attribute that is supposed to allow poweruser to access EasyMock internal packages. This was done to allow compatibility for framework like PowerMock when using EasyMock in OSGi. However, normal use should not use

Re: [Pax-exam] Import package with attributes

2016-12-27 Thread Henri Tremblay
Thanks. I was pretty much there but I can't wrappedBundle(junitBundles()) So I guess I need to wrap one of the 3 bundles inside the junitBundles. Probably bundle( "link:classpath:META-INF/links/org.ops4j.pax.tipi.junit.link"). I will try tonight but will be happy if there is an easier way. But

Re: [Pax-exam] Import package with attributes

2016-12-27 Thread 'Achim Nierbeck' via OPS4J
Hi, you can wrap the junit bundle and add those export declarations to it. [1] Just make sure you don't have the junit configuration [2] in your project, as that will collide with your own custom declaration. Hope this helps, Achim [1] -

[Pax-exam] Import package with attributes

2016-12-27 Thread Henri Tremblay
Hi, I've been fighting for a bunch of hours now so I hope someone can help me. I've trying to test EasyMock OSGi configuration with Pax-Exam. Everything works fine except one thing. I need to export a conditional package from the JUnit bundle. With an attribute. Normally I would import like