OK I've missed that example. But I'm not quite sure if it's that useful for paxexam-karaf. Typically your options section is pretty minimal (compared to other exam tests). Therefore I'm not quite sure about the use. In addition pax-exam starts the process always in a new VM which might be neither what you like. If this is what you desire to do you might want to give the various runners here [1] a shot.
Kind regards, Andreas [1] https://svn.apache.org/repos/asf/karaf/trunk/tooling/exam/container/src/main/java/org/apache/karaf/tooling/exam/container/internal/runner/ 2012/3/6 Peter Gardfjäll <[email protected]>: > Thanks JB, > > I actually already have my own Karaf distribution (sorry for being unclear > on that point) so I was mostly interested in the wrapping part. > > Do you know if there are any nice examples of using the > org.apache.karaf.main.Main class (maybe Main.main() is the best one)? > > Regarding PaxExam Karaf, I am already using it for integration tests. > I'm just wondering if that project supports running Karaf outside of a JUnit > context similar to the following PaxExam example: > > https://github.com/tonit/Learn-PaxExam/blob/master/lesson-servermode/src/main/java/org/ops4j/pax/exam/servermode/SimpleServer.java > > best regards, Peter > > > > On Tue, Mar 6, 2012 at 2:37 PM, Jean-Baptiste Onofré <[email protected]> > wrote: >> >> Hi Peter, >> >> I would create my own distribution of Karaf. >> >> If you want to hide/wrap it in your application, Main could be a way to >> achieve that. >> >> Pax-Exam-Karaf is designed more for the itests. >> >> Regards >> JB >> >> >> On 03/06/2012 02:27 PM, peterg wrote: >>> >>> Hi all, >>> >>> what would be the easiest way to embed a Karaf instance within an >>> existing >>> Java application? >>> - using/deriving from org.apache.karaf.main.Main? >>> - using PaxExam Karaf? >>> - something else...? >>> >>> Ideally, I would like to just start an instance of my own Karaf >>> distribution >>> (available as a Maven artifact in my own repository) and interact with it >>> (accessing/invoking bundles and services, for example). >>> >>> best regards, Peter >>> >>> -- >>> View this message in context: >>> http://karaf.922171.n3.nabble.com/Embedding-Karaf-in-a-Java-application-tp3803560p3803560.html >>> Sent from the Karaf - User mailing list archive at Nabble.com. >> >> >> -- >> Jean-Baptiste Onofré >> [email protected] >> http://blog.nanthrax.net >> Talend - http://www.talend.com > >
