karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Lessons learned from my first attempt to use the pax-exam test container
Date Fri, 28 Aug 2015 14:20:39 GMT
Hi Benson,

for 4 (mirror), you can also update etc/org.ops4j.pax.url.mvn.cfg to 
define the location of a settings.xml containing the mirror definition.

Regards
JB

On 08/28/2015 02:12 PM, Benson Margulies wrote:
> In penance for my many emails, I am hoping that this message is
> googleable for others, or can be adapted to documentation.
>
> 1: Beware of 'wrap'
>
>     -- or -- undefined protocol 'wrap:'
>
> The karaf-maven-plugin will cheerfully create wrap urls, but does not
> add a feature dependency for the wrap feature. This is fine in
> production, where 'wrap' is boot and your feature is not. It's not so
> good with pax-exam, where they are all boot features. Adding a
>
>       <feature prerequisite="true" dependency="true">wrap</feature>
>
> to src/main/feature/feature.xml should fix this, but I chose to embed
> my would-be wrapped dependencies instead.
>
> 2: Don't forget '<includeProjectArtifact>true</includeProjectArtifact>'
>
>    -- or -- missing package for your probe bundle, or elsewhere.
>
> My feature consisted one one bundle of mine, plus its dependencies.
> So, I added the feature descriptor as a plugin execution instead of
> having a separate feature project. Turns out that the default is not
> to include the current project's artifact.
>
> 3: Watch out for slf4j-api
>
>    -- or -- wiring errors with org.slf4j
>
> You don't want slf4j-api in your feature(s) -- karaf supplies slf4j
> via pax-logging. If you accidently include it, the result is a wiring
> error.
>
> 4: Karaf does not do maven mirrors
>
> If your standard maven settings include a * mirror, Karaf will hang,
> due to Aether's desire to match up the metadata, even if you add your
> mirror as an additional repo. I cured this with:
>
> editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
> "org.ops4j.pax.url.mvn.repositories", "http:/MY-MIRROR-URL"),
> editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
> "org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote", "true"),
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message