I am using the latest Pax Exam (3.3.0) for OSGi testing. I have Pax Exam up and running, deploying and starting my bundles etc. Life is good.
I also have a utility project containing various factories and other helpful functionality that I want to be able to re-use in multiple test projects. It is a maven project which is included as a dependency ion the Pax Exam pom.xml.
However, as soon as I try to access any of the classes contained within the utility jar I get a ClassNotFoundException. I've been playing around with the class loader and discovered that I can directly load the class via a URLClassLoader. But still, I get the ClassNotFoundException thrown.
Turning the utility project into a bundle is not an option. I will need to use the utility code in @BeforeClass annotated methods and the BundleContext instance hasn't been injected yet.
Can anybody tell me the best/easiest way to get my utility project inside Pax Exam?