karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: [INFO] Update default etc/org.ops4j.pax.url.mvn.cfg on Karaf 3.0.x
Date Mon, 01 Sep 2014 17:39:20 GMT
+1 makes sense to me

PS. you might also want to upgrade pax-swissbox-bnd to 1.7.1 to pick up the fix for https://ops4j1.jira.com/browse/PAXSB-75

On 1 Sep 2014, at 14:25, Jean-Baptiste Onofré <jb@nanthrax.net> wrote:

> Working on this improvement, I faced a couple of severe bugs in Pax URL, preventing a
clean usage of the system repository.
> 
> So, I upgraded to Pax URL 2.1.0 on Karaf 3.0.x. I know that we should avoid such kind
of changes for a minor release, however, I think the Pax URL issues are really important and
justify the update.
> 
> I did:
> - upgrade to Pax URL 2.1.0
> - use of the uber bundles
> - cleanup in the etc/org.ops4j.pax.url.mvn.cfg configuration file
> 
> You can see the commit there:
> https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=commitdiff;h=9c6fccd6b376512fa73e92cfad83ed6062ce9d4f
> 
> IMHO, the situation is largely better now, as the system repo is use first.
> 
> If you see a problem with this change, please let me know, I will revert my change.
> 
> Thanks,
> Regards
> JB
> 
> On 09/01/2014 10:14 AM, Jean-Baptiste Onofré wrote:
>> Hi Matt,
>> 
>> I agree.
>> 
>> Let me explain what I have in mind.
>> 
>> Karaf can work in two modes:
>> - by default, it should be standalone/atomic. I mean here that it should
>> not use any "external folders" like the .m2/repository folder.
>> It means the following configuration in etc/org.ops4j.pax.url.mvn.cfg file:
>>  -- org.ops4j.pax.url.mvn.settings=${karaf.etc}/settings.xml
>>      where the settings.xml contains an "empty" settings.xml like:
>>         <?xml version="1.0" encoding="UTF-8"?>
>>         <settings></settings>
>>  --
>> org.ops4j.pax.url.mvn.localRepository=${karaf.home}/${karaf.default.repository}
>> 
>>    to use the system repo as local by default (and not .m2/repository)
>>  -- org.ops4j.pax.url.mvn.defaultRepositories=\
>>       ${karaf.home}/${karaf.default.repository}@id=system@snapshots, \
>>       ${karaf.data}/kar@id=kar@multi@snapshots
>>  -- org.ops4j.pax.url.mvn.repositories=\
>>       http://repo1.maven.org/maven2@id=central, \
>> 
>> http://repository.springsource.com/maven/bundle/release@id=spring.ebr.release,
>> \
>> 
>> http://repository.springsource.com/maven/bundles/external@id=spring.ebr.external,
>> \
>> 
>> http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases,
>> \
>> 
>> https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@norelease,
>> \
>> 
>> https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases
>> 
>> 
>> - as an alternative, we document (both in the user guide and using
>> comments in etc/org.ops4j.pax.url.mnv.cfg) how to switch in "development
>> mode", meaning:
>>   -- comment the org.ops4j.pax.url.mvn.settings property to use the
>> user .m2/settings.xml
>>   -- comment the org.ops4j.pax.url.mvn.localRepository property to use
>> the user .m2/repository
>> 
>> WDYT ?
>> 
>> Regards
>> JB
>> 
>> On 08/31/2014 10:49 PM, Matt Sicker wrote:
>>> Basically, the way I see it, in a developer setting, using your
>>> .m2/repository makes sense as it's likely to have tons of libraries there
>>> already. On production/staging/testing servers, however, it's far more
>>> likely to contain things as much as possible. For instance, I may wish to
>>> run Karaf as a user that has no home directory.
>>> 
>>> 
>>> On 31 August 2014 15:43, Jean-Baptiste Onofré <jb@nanthrax.net> wrote:
>>> 
>>>> Following this thread, I wonder if it doesn't make sense to add the
>>>> system
>>>> repo as local repo:
>>>> 
>>>> org.ops4j.pax.url.mvn.localRepository=file:${karaf.home}/${karaf.default.
>>>> 
>>>> repository}
>>>> 
>>>> and override the default m2 settings with an empty one in Karaf:
>>>> 
>>>> org.ops4j.pax.url.mvn.settings=${karaf.home}/${karaf.default.repository}/
>>>> 
>>>> settings.xml
>>>> 
>>>> by default, and document how to switch back to Maven "local user
>>>> configuration".
>>>> 
>>>> It would avoid to populate the .m2/repository and force to use the
>>>> artifacts from the system repo (so very close to what we have in
>>>> Karaf 2.x).
>>>> 
>>>> WDYT ?
>>>> 
>>>> Regards
>>>> JB
>>>> 
>>>> 
>>>> On 08/31/2014 10:31 PM, Matt Sicker wrote:
>>>> 
>>>>> I quite like that change. In my Karaf usage, I've always
>>>>> reconfigured the
>>>>> .m2/repository directory to be inside KARAF_HOME instead just to
>>>>> isolate
>>>>> the repositories in the first place. Any sort of change that prefers
>>>>> usage
>>>>> of artifact repositories embedded in Karaf are a step forward IMO.
>>>>> 
>>>>> 
>>>>> On 31 August 2014 14:36, Jean-Baptiste Onofré <jb@nanthrax.net>
wrote:
>>>>> 
>>>>>  Hi all,
>>>>>> 
>>>>>> FYI, I aligned the etc/org.ops4j.pax.url.mvn.cfg files between master
>>>>>> (Karaf 4.x) and Karaf 3.0.x.
>>>>>> 
>>>>>> Basically, the change is to move the system repo and the kar repo
as
>>>>>> default repositories, instead of "regular" repositories.
>>>>>> 
>>>>>> It allows Karaf to start quicker on a fresh machine, without any
>>>>>> .m2/repository.
>>>>>> 
>>>>>> Any objection ?
>>>>>> 
>>>>>> Regards
>>>>>> JB
>>>>>> --
>>>>>> 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