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 Sat, 29 Aug 2015 11:18:09 GMT
And the .m2/settings.xml of the user who is running Karaf contains the 
proxy setting ?

Regards
JB

On 08/29/2015 01:15 PM, Benson Margulies wrote:
> Hmm. The file comments say that it looks at:
>
> 2. if not found looks for ${user.home}/.m2/settings.xml
>
> if not called out, and it _seems_ to be working fine for me.
>
> On Sat, Aug 29, 2015 at 1:12 AM, Jean-Baptiste Onofré <jb@nanthrax.net> wrote:
>> The settings.xml update is not enough: as I said, you have to specify the
>> location of the settings.xml in etc/org.ops4j.pax.url.mvn.cfg as well.
>>
>> Regards
>> JB
>>
>>
>> On 08/28/2015 05:17 PM, Benson Margulies wrote:
>>>
>>> Hmm. I tried adding it to my ~/.m2/settings.xml and that didn't seem
>>> to work. I'll try again.
>>>
>>>
>>> On Fri, Aug 28, 2015 at 10:20 AM, Jean-Baptiste Onofré <jb@nanthrax.net>
>>> wrote:
>>>>
>>>> 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
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

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

Mime
View raw message