Hi Christian

I have a maven dependancy that is needed by my unit test (the bundles being 
tested don’t need the dependancy, just the unit test does!). Is there anyway 
for Pax Exam to automatically pick this up from my pom.xml or do I need to 
manually add it to the @Configuration method (along with the six transitive 
dependencies that it has)?

Oli

<dependancy>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-base</artifactId>
        <version>0.3</version>
        <scope>test</scope>
</dependancy>

On 21 May 2014, at 14:19, cschneider [via Karaf] 
<[email protected]> wrote:

> You have to define all dependencies in the pax exam @Configuration. 
> 
> The karaf test container of pax exam starts an empty karaf by default. 
> Inside the @Configuration method you then define the bundles and 
> features you need on top of this. 
> 
> See https://ops4j1.jira.com/wiki/display/PAXEXAM3/Karaf+Container
> and this for the full example: 
> https://github.com/ops4j/org.ops4j.pax.exam2/tree/master/samples/exam-itest-sample-karaf
> 
> For camel you have to install the camel feature repo and the camel 
> features you use. 
> 
> Christian 
> 
> On 21.05.2014 15:13, ozzyoli wrote:
> 
> > I'd like to test my camel routes (which have Http endpoints) which are 
> > deployed on my custom karaf distro. 
> > 
> > The problem with using Pax Exam is that the tests are executed as bundles 
> > inside the container. 
> > 
> > I'd like my test to treat karaf as a black box. Use a simple HttpClient to 
> > make requests to Karaf and process the results. 
> > 
> > If I run the test inside Pax Exam my tests fail because my dependencies 
> > (e.g. Apache HttpClient) aren't found in any of the bundles deployed in 
> > karaf. 
> > 
> > I think i'm missing something obvious here, any help would be greatly 
> > appreciated. Thank you 
> > 
> > Oli 
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > View this message in context: 
> > http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218.html
> > Sent from the Karaf - User mailing list archive at Nabble.com.
> 
> 
> -- 
> Christian Schneider 
> http://www.liquid-reality.de
> 
> Open Source Architect 
> http://www.talend.com
> 
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218p4033219.html
> To unsubscribe from How to test my Camel Routes on Karaf using Pax-Exam?, 
> click here.
> NAML





--
View this message in context: 
http://karaf.922171.n3.nabble.com/How-to-test-my-Camel-Routes-on-Karaf-using-Pax-Exam-tp4033218p4033220.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to