Totally agree! That's on my todo and wish list for a long time. I am off until next week but would like to work on a joint effort to make bndtools work more seemlessly with pax exam. My ideas work really similar to what you suggested, basically first letting pax exam read bndrun definitions. However I would also like to see a way to consume pax exams internal dsl based configuration api (full Java power for configs) for bndrun definitions. Wdyt? Toni
On Friday, 19 August 2016, Christian Schneider <[email protected]> wrote: > I am currently experimenting with builds in maven that are assembled into > an application using bndrun files from bndtools. The packaging and running > part already works quite nicely but of course testing is at least as > important. I know that bndtools has its own way of testing but I am not > sure if it works with maven and I really like pax exam for its flexibility. > > So I wonder if it would make sense to provide pax exam config options for > bndrun configs. I could imagine to simply do somthing like > > protected static Option config() throws Exception { > return BndToolsOptions.bndrun("my.bndrun"); > } > > The advantage compared to the current approach of adding individual > bundles is that we can use the bndtools resolver and an index as backing. > This makes creating a test config a log easier - especially when you need > to install a bigger list of bundles. Still we could add more bundles to > this for special test cases. > > We could also get some more information from the bndrun file like the > framework to use and the framework options. > > Apart from the user facing API another question is how to get the list of > bundles to run. The resolve step in bndtools (which is now also available > as a maven plugin) creates a list of runbundles in the bndrun file with > bundle entries like this: > > org.apache.aries.rsa.core;version='[1.9.0,1.9.1)' > > So while this already clearly identifies the bundle you still need an > index to find the actual jar location. I will ask on the bndtools user list > which is the best way to get the locations. > > I found that there is a file generated/samples.bndrun.resolved which > might help. It contains lines like this: > > org.apache.aries.rsa.core;version='[1.9.0,1.9.1)';resolution > =file:/home/cschneider/.m2/repository/org/apache/aries/ > rsa/org.apache.aries.rsa.core/1.9.0/org.apache.aries.rsa.core-1.9.0.jar > > This might help already but I will validate if it is the correct way. > > So what do you think about such support? Had anyone maybe already > experimented with this? > > Christian > > > -- > 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. > -- *Toni Menzel* *Developer Advocates - The Rebaze Way * *www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com <http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>* -- -- ------------------ 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.
