Hey Mark,

On Fri, Oct 21, 2011 at 11:51, Mark Derricutt <[email protected]> wrote:

> Congrats :)


Thank you very much :-)


> Just started playing with it - so far looking good after adding an
> exclusion for org.eclipse:osgi as the version of the artifact used isn't in
> central it seems.
>

you mean in the Karaf reference where we
already exclude org.apache.karaf.shell?


> Can one deploy .kar files or features.xml files with under this new
> framework? I've just added:
>
> new MavenArtifactProvisionOption()
>     .groupId("xxx").artifactId("xxx")
>     .type("xml").classifier("features").version("4.1.28").start()
>
> to my configuration method, but I don't see any evidence of it being
> loaded, or even -attempted- to be loaded..
>

well.... you've just discovered a bug in Karaf. By default the test
framework does nothing else than taking your features.xml and copy it to the
deploy folder of Karaf and starts the engines afterwards; the problem here
is that it seams that Karaf has a bug if you deploy the features.xml first
and start Karaf afterwards (give it a try; download a fresh Karaf build;
deploy your feature.xml into the deploy folder and start karaf; nothing
happens). I've to admit that I'vent noticed it by now because we configure
features in our use-cases a little bit different. We do not add the
features.xml directly expecting that everything is started. Instead we add
the features file and the features to start into the
etc/org.apache.karaf.features.cfg file in the @Configuration section:

...editConfigurationFileExtend(FeaturesCfg.REPOSITORIES,
",mvn:groupId/artifactId/version/xml/features"),
editConfigurationFileExtend(FeaturesCfg.BOOT,
",myfeature1"), , editConfigurationFileExtend(FeaturesCfg.BOOT,
",myfeature2"), ...

This should do the job till the problem is fixed.

Hope this helps and kind regards,
Andreas


>
> Cheers,
> Mark
>
> --
> "Great artists are extremely selfish and arrogant things" — Steven Wilson,
> Porcupine Tree
>
>
>
> On Fri, Oct 21, 2011 at 7:24 PM, Andreas Pieber <[email protected]>wrote:
>
>> Hey Guys,
>>
>> I've finished the third feature release of the Pax Exam Karaf
>> Testframework today and pushed it to maven central (should be there within
>> the next hours). You might want to give it shot if you need to do
>> integration tests on Karaf base. It is as simple as adding the following to
>> your pom...
>>
>> <dependency>
>>   <groupId>org.openengsb.labs.paxexam.karaf</groupId>
>>   <artifactId>paxexam-karaf-container</artifactId>
>>   <version>0.3.0</version>
>>   <scope>test</scope>
>> </dependency>
>> <dependency>
>>   <groupId>org.ops4j.pax.exam</groupId>
>>   <artifactId>pax-exam-junit4</artifactId>
>>   <version>2.3.0.M1</version>
>>   <scope>test</scope>
>> </dependency>
>>
>>
>> ... reference your karaf based distribution ...
>>
>> <dependency>
>>   <groupId>org.apache.karaf</groupId>
>>   <artifactId>apache-karaf</artifactId>
>>   <version>2.2.4</version>
>>   <type>zip</type>
>>   <scope>test</scope>
>>   <exclusions>
>>     <exclusion>
>>       <groupId>org.apache.karaf.shell</groupId>
>>       <artifactId>org.apache.karaf.shell.dev</artifactId>
>>     </exclusion>
>>   </exclusions>
>> </dependency>
>>
>>
>>
>> ... and the following configuration section ...
>>
>> @Configuration
>> public Option[] config() {
>>     return new Option[]{ karafDistributionConfiguration().frameworkUrl(
>>       
>> maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("zip").versionAsInProject())
>>  };
>> }
>>
>>
>> ... and your integration tests will run on the framework you've just
>> configured. The full documentation could be found here [1]. The changeset of
>> the new feature release could be found here [2]. Have fun and
>> don't hesitate to report any problems you encounter at this list or here
>> [3]. Btw, all sources are under Apache 2 License here [4] and will be
>> included in the karaf 3 release. It's just out of the ASF repos right now
>> so that it can be developed/released in faster cycles. BTW, hopefully this
>> is the last release outside the ASF. I'll start to replace our current
>> integration tests at Karaf and merge the source into the trunk by next
>> week...
>>
>> Special thanks go to Andreas Kuhtz for all his feature requests and bug
>> reports. Thanks Andreas!
>>
>> Kind regards,
>> Andreas
>>
>> [1] https://github.com/openengsb/labs-paxexam-karaf/wiki
>> [2] https://github.com/openengsb/labs-paxexam-karaf/wiki/V0.3.0
>> [3] http://issues.openengsb.org/jira/browse/lab
>> [4] https://github.com/openengsb/labs-paxexam-karaf
>>
>
>

Reply via email to