Yes .. karaf custom distro is a good solution.
You can test the distro with pax exam and also run the same artifact.
So it allows to test something that is really close to production
Christian
On 18.10.2016 16:34, 'Achim Nierbeck' via OPS4J wrote:
Hi,
there used to be the pax-runner doing exactly this, but as it's not
used as the heart for Pax-Exam it only has frequent updates.
Never the less people still use it.
Another thing to use, is to run with a Karaf minimal distribution, or
better a
custom distribution which is basically a stripped down minimal Karaf
distribution.
For example one could neglect shell, jaas and other things not needed.
Regards, Achim
2016-10-18 15:35 GMT+02:00 Christian Schneider
<[email protected] <mailto:[email protected]>>:
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
<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
<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]
<mailto:[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
<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]
<mailto:[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
<https://groups.google.com/d/optout>.
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Software Architect / Project Manager / Scrum Master
--
--
------------------
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.