I am using something like this in an Aries RSA test where I need a
second container.
https://github.com/apache/aries-rsa/blob/master/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/TwoContainerPaxExam.java
ExamSystem testSystem = PaxExamRuntime.createTestSystem(remoteConfig());
container = PaxExamRuntime.createContainer(testSystem);
container.start();
I am not sure how good pax exam actually would be to define a running
system.
An alternative you could look into is bndtools with the recent maven
integration.
See http://bndtools.org/
It allows to define a running system using a backing index and requirements.
I used this in CXF DOSGi to create a small example:
https://github.com/apache/cxf-dosgi/blob/master/samples/soap/soap.bndrun
The runbundles are automatically computed from the index and
requirements. Using the Eclipse IDE extension it is quite easy to define
and change such running configs.
The CXF example above also has a maven plugin that does the build
completely automated. The result is a runnable jar that you can start
with java -jar.
So as was discussed before on this list it would also be quite
interesting to go the other way round and use bndtools bndrun files to
define a pax exam test run. This is not done yet though.
Christian
On 18.10.2016 15:06, Nick Baker wrote:
Hey All,
I've come to enjoy writing integration tests with PAX-Exam! Thanks so
much! Recently I had need to standup a lightweight embedded OSGI
container. I've done this with bare OSGI Framework APIs in the past
and started to do so again. It struck me that it would be so nice to
provision this container using the PAX-Exam configuration options.
Has there been any work done on adapting Exam as a Runner?
-Nick
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google
Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.