Thanks for the update.
The important part for Kar in etc/org.ops4j.pax.url.mvn.cfg is:
org.ops4j.pax.url.mvn.defaultRepositories=\
file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots, \
file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \
file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots
So the id=kar repository. It has to be a default repository there.
Regards
JB
On 03/08/2018 10:40 AM, Nicolas Brasey wrote:
> Yes, we are removing the remote internet repos and also customizing adding
> extra
> local repos. Our modification on this file might cause the problem, I will
> revert our changes and give another try.
>
> Thanks,
> Nicolas
>
> On Thu, Mar 8, 2018 at 10:36 AM, Jean-Baptiste Onofré <[email protected]
> <mailto:[email protected]>> wrote:
>
> By the way, the Kar service doesn't register the repo. If you take a look
> in
> etc/org.ops4j.pax.url.mvn.cfg you will find the implicit inclusion of the
> Kar repositories.
>
> Did you change this file in any way ?
>
> Regards
> JB
> Le 8 mars 2018, à 10:30, Nicolas Brasey <[email protected]
> <mailto:[email protected]>> a écrit:
>
> Hi JB,
>
> I believe it is atomic. It contains my feature file and the jar file
> that is referenced in the feature file.
>
> I will send you privately my project.
>
> Thanks a lot!
> Nicolas
>
>
>
>
>
> On Thu, Mar 8, 2018 at 10:10 AM, Jean-Baptiste Onofré
> <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hi Nicolas,
>
> a KAR has to be atomic: so it has to contain all, but it's not a
> profile.
>
> Can you share your project I will fix that for you ?
>
> Regards
> JB
>
> On 03/08/2018 10:08 AM, Nicolas Brasey wrote:
> > Hi all,
> >
> > I'm working on using the kar feature of Karaf to embed all our
> custom glue code
> > for the integration of our product with our customer 3rd party
> applications.
> >
> > I'm using the maven plugin to build the Kar, so far so good. The
> kar contains
> > my feature file and the jar file in /repository.
> >
> > The problem is when installing the kar file, it seems the
> resolver
> does not find
> > my feature file because it does not consider the new repository
> directory which
> > just got created by my kar file.
> >
> > I get this WARN message:
> >
> > 2018-03-08T10:02:54,014 | WARN | pipe-kar:install
> >
>
> file:/home/nbr/dev/dms/dms-profiles/dev/owkb2/target/owkb2-2.1.0-SNAPSHOT.kar
> |
> > AetherBasedResolver | 4 - org.ops4j.pax.url.mvn -
> 2.5.2 | Error
> > resolving artifact
> com.imtf.dms.profiles:owkb2:xml:features:2.1.0-SNAPSHOT:
> > [Could not find artifact
> com.imtf.dms.profiles:owkb2:xml:features:2.1.0-SNAPSHOT]
> > java.io.IOException: Error resolving artifact
> > com.imtf.dms.profiles:owkb2:xml:features:2.1.0-SNAPSHOT: [Could
> not find
> > artifact
> com.imtf.dms.profiles:owkb2:xml:features:2.1.0-SNAPSHOT]
> > at
> >
>
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:720)
> > [4:org.ops4j.pax.url.mvn:2.5.2]
> > at
> >
>
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659)
> > [4:org.ops4j.pax.url.mvn:2.5.2]
> > at
> >
>
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600)
> > [4:org.ops4j.pax.url.mvn:2.5.2]
> >
> >
> > But I can see the feature file is available in the new
> repository
> on the filesystem:
> >
> > repository/owkb2-2.1.0-SNAPSHOT
> > repository/owkb2-2.1.0-SNAPSHOT/com
> > repository/owkb2-2.1.0-SNAPSHOT/com/imtf
> > repository/owkb2-2.1.0-SNAPSHOT/com/imtf/dms
> > repository/owkb2-2.1.0-SNAPSHOT/com/imtf/dms/profiles
> > repository/owkb2-2.1.0-SNAPSHOT/com/imtf/dms/profiles/owkb2
> >
>
> repository/owkb2-2.1.0-SNAPSHOT/com/imtf/dms/profiles/owkb2/2.1.0-SNAPSHOT
> >
>
> repository/owkb2-2.1.0-SNAPSHOT/com/imtf/dms/profiles/owkb2/2.1.0-SNAPSHOT/maven-metadata-local.xml
> >
>
> repository/owkb2-2.1.0-SNAPSHOT/com/imtf/dms/profiles/owkb2/2.1.0-SNAPSHOT/owkb2-2.1.0-SNAPSHOT-features.xml
> >
>
> repository/owkb2-2.1.0-SNAPSHOT/com/imtf/dms/profiles/owkb2/2.1.0-SNAPSHOT/owkb2-2.1.0-SNAPSHOT.jar
> >
> >
> > I checked the code of the KarServiceImpl but I dont see where it
> registrers the
> > new mvn repository of the new kar (corresponding to a new entry
> in
> > org.ops4j.pax.url.mvn.cfg)
> >
> > I hope my question is clear enough :-)
> >
> > Thanks for any help
> > Nicolas
> >
> >
> >
> >
> >
>
> --
> Jean-Baptiste Onofré
> [email protected] <mailto:[email protected]>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com