pax-exam

osgi-in-action pax exam example code not working

匆匆过客 提交于 2021-01-29 15:44:12
问题 I am studying osgi-in-action to understand pax exam unfortunately the provided examples are not working. I have downloaded the source from osgi-in-action code on github changed into the directory [osgi-in-action]/chapter07/testing-example executed: ant test.container in the logfile i see ... Caused by: org.ops4j.pax.runner.platform.PlatformException: [mvn:org.ops4j.pax.exam/pax-exam/1.1.0] is not a valid bundle ... Caused by: java.util.zip.ZipException: error in opening zip file ... I am

Pax Exam issue with Apache POI wrapped bundle

不想你离开。 提交于 2020-01-03 04:26:04
问题 I have been beating my head against the wall trying to get Apache POI to work within an OSGi bundle. Here is the history of what I have tried with no luck: 1) I initially tried using the pre wrapped Apache Servicemix POI bundle. However this had many dependencies I had to deploy, many of which were not needed. I hit a wall as even after adding Apache POI servicemix (and its dependencies), i was still getting issues with missing classes. 2) Due to the amount of unneeded stuff in the first

Pax Exam: provisioning bundle with all dependencies

梦想与她 提交于 2019-12-24 12:22:03
问题 Currently, to set up configuration for Pax Exam, I find that I need to include all dependencies. E.g. something like @Configuration public Option[] сonfig() { MavenArtifactProvisionOption commonsDbcp = mavenBundle("commons-dbcp", "commons-dbcp"); MavenArtifactProvisionOption commonsPool = mavenBundle("commons-pool", "commons-pool"); ... return options( felix(), provision(commonsDbcp, commonsPool)); } But since commons-dbcp depends on commons-pool , this feels like duplicate information. Is it

How to upgrade groovy-all from 2.4 to 2.5 when running in OSGi?

烂漫一生 提交于 2019-12-22 18:03:04
问题 I'm maintaining an open source library based partly on Groovy called Rest Assured. In the next version I'd like to upgrade the Groovy dependency from 2.4.x to 2.5.x. However when doing this I run into issues when running the OSGi tests. The tests are using Pax Exam they typically look something like this: @RunWith(PaxExam.class) public class XmlPathOSGiITest { @Configuration public static Option[] configure() { return new Option[] { mavenBundle("org.apache.servicemix.bundles", "org.apache

Karaf Pax Exam fails with Unknown protocol: wrap

做~自己de王妃 提交于 2019-12-11 19:12:18
问题 Hi my pax exam fails with the error Unknown protocol: wrap org.apache.karaf.features.internal.util.MultiException: Error at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.region

Any way for executing code to know it's running in the eclipse debugger?

*爱你&永不变心* 提交于 2019-12-11 06:59:36
问题 I have some Pax Exam tests. To execute the test normally, I just run the JUnit class in Eclipse. If I want to step through the code in the Eclipse debugger, I have to make it set the debug options, including the flag to make it wait for the debugger connection, which is a separate process I have to run. I'm presently having this code check for a "debug" system property to enable this, but that's sort of annoying. It would be really nice if the @Configuration method can look at a system