You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Fraser <pa...@qnenet.com> on 2022/04/06 10:07:04 UTC

Kars not expanding into karaf/data/kar directory

Hi,

Karaf 4.3.6, Ubuntu 20.04

Copy kar into deploy directory and the expanded kar is not in the  
karaf/data/kar directory.

In a clean install on a new vps it creates a new .m2 directory and 
places the kar contents there.

When run on an existing system with an existing .m2 repo the system runs OK.

If I rename the existing .m2 it creates a new one and the system does 
not start.

Has anyone experienced this situation?

The problem prevents an installation of a karaf based system from 
running on a fresh vps.

Paul Fraser


Re: Kars not expanding into karaf/data/kar directory

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

It's because in etc/org.ops4j.pax.url.mvn.cfg file, by default you can
see org.ops4j.pax.url.mvn.localRepository points to
$USER/.m2/repository.
Wherever the artifacts are coming (from kar included), the artifacts
are cached in .m2 repository.

On the other hand, you can see:

org.ops4j.pax.url.mvn.defaultRepositories=\
    ${karaf.home.uri}${karaf.default.repository}@id=system.repository@snapshots,
\
    ${karaf.data.uri}kar@id=kar.repository@multi@snapshots, \
    ${karaf.base.uri}${karaf.default.repository}@id=child.system.repository@snapshots

it's where you can see the kar mvn repository.

So, by default, you will have the artifacts in both kar repository and .m2.

Regards
JB

On Wed, Apr 6, 2022 at 12:07 PM Paul Fraser <pa...@qnenet.com> wrote:
>
> Hi,
>
> Karaf 4.3.6, Ubuntu 20.04
>
> Copy kar into deploy directory and the expanded kar is not in the
> karaf/data/kar directory.
>
> In a clean install on a new vps it creates a new .m2 directory and
> places the kar contents there.
>
> When run on an existing system with an existing .m2 repo the system runs OK.
>
> If I rename the existing .m2 it creates a new one and the system does
> not start.
>
> Has anyone experienced this situation?
>
> The problem prevents an installation of a karaf based system from
> running on a fresh vps.
>
> Paul Fraser
>