karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: [INFO] Update default etc/org.ops4j.pax.url.mvn.cfg on Karaf 3.0.x
Date Wed, 03 Sep 2014 11:05:53 GMT
Generally I agree with the production ready default.

I would like to see the development case covered better though. So I 
propose we have a build profile for karaf to create a karaf with 
development settings. This will allow a karaf developer to work with a 
snapshot karaf without tweaking configs.

Also as I wrote in the other mail I see big problems when using the 
system repo as local repo. Did you find a way to avoid that pax url 
writes into the system dir?

The ideal case for me would be that pax url caches all external bundles 
in the local repository but not the bundles in the system dir. So we 
would need to mark the system dir as read only but "local" to make sure 
the jars are not cached. I am not sure if this is possible though.

Christian


Am 01.09.2014 10:14, schrieb Jean-Baptiste Onofré:
> 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
>>>
>>
>>
>>
>


-- 
  
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


Mime
View raw message