You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gerald Kallas <ca...@mailbox.org> on 2020/02/02 13:02:58 UTC

Disable karaf remote repositories for Karaf as Camel runtime

Dear community,

I did setup a docker container for Camel/Karaf based on a pre-configured runtime. Finally I want to instantiate the container on a system with no internet access.

I'm getting a lot of maven connectivity errors at startup depite all features are installed and working.

Ho can I disable the maven remote access properly?

Many thanks for any hints.

Best
- Gerald

Re: Disable karaf remote repositories for Karaf as Camel runtime

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

That's because hawtio features XML and related are not in the system folder.

If you use Karaf "vanilla", it's resolved at runtime.
If you want to prepackage those artifacts to work offline, you have to
populate Karaf.

Again, you can do it by hand (for instance using mvn deploy:deploy-file
providing the system folder location, or creating a script copying your
.m2/repository resources in system folder) or create your own custom
distribution (with the karaf-maven-plugin).

Another thing you can do is to start karaf on your machine (where you
have Internet connection), install the features you want, stop karaf and
create a tar.gz with that (including the data folder). It's basically
what docker:provision is doing.

Regards
JB

On 02/02/2020 14:34, Gerald Kallas wrote:
> Thanks, JB.
> 
> I followed step 1 but am still getting errors like
> 
> 2020-02-02T13:29:48,930 | WARN  | FelixStartLevel  | AetherBasedResolver              | 4 - org.ops4j.pax.url.mvn - 2.6.1 | Error resolving artifact io.hawt:hawtio-karaf:xml:features:2.8.0: [Could not find artifact io.hawt:hawtio-karaf:xml:features:2.8.0]
> java.io.IOException: Error resolving artifact io.hawt:hawtio-karaf:xml:features:2.8.0: [Could not find artifact io.hawt:hawtio-karaf:xml:features:2.8.0]
> 
> Seems that I need to do something following step 2. My initial setup was
> 
> feature:repo-add hawtio 2.8.0
> feature:repo-add activemq 5.15.11
> feature:repo-add camel 3.0.0
> feature:install webconsole hawtio activemq-broker-noweb camel camel-jms jms camel-http camel-ftp camel-jackson camel-jsonpath camel-zipfile camel-velocity
> 
> So how can I add these as "<installedFeature/>" you mentioned.
> 
> Many thanks in advance
> - Gerald
> 
>> Jean-Baptiste Onofré <jb...@nanthrax.net> hat am 2. Februar 2020 14:22 geschrieben:
>>
>>  
>> Hi Gerald,
>>
>> There are two things here:
>>
>> 1. You can have org.ops4j.pax.url.mvn.repository empty in
>> etc/org.ops4j.pax.url.mvn.cfg. Then, Karaf won't use any remove
>> repositories and will look for artifacts in first user .m2/repository
>> folder and system folder.
>>
>> 2. In your case, if you have error like the artifacts can be resolved,
>> that's because they are not located in the system folder.
>> You can populate the system folder by hand or, if you create your own
>> custom distribution, you have to specify the <installedFeature/>.
>>
>> Regards
>> JB
>>
>> On 02/02/2020 14:06, Gerald Kallas wrote:
>>> Dear community,
>>>
>>> I did setup a docker container for Camel/Karaf based on a pre-configured runtime. Finally I want to instantiate the container  system with no internet access.
>>>
>>> I'm getting a lot of maven connectivity errors at startup depite all features are installed and working.
>>>
>>> Ho can I disable the maven remote access properly?
>>>
>>> Many thanks for any hints.
>>>
>>> Best
>>> - Gerald
>>>
>>
>> -- 
>> 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

Re: Disable karaf remote repositories for Karaf as Camel runtime

Posted by Gerald Kallas <ca...@mailbox.org>.
Thanks, JB.

I followed step 1 but am still getting errors like

2020-02-02T13:29:48,930 | WARN  | FelixStartLevel  | AetherBasedResolver              | 4 - org.ops4j.pax.url.mvn - 2.6.1 | Error resolving artifact io.hawt:hawtio-karaf:xml:features:2.8.0: [Could not find artifact io.hawt:hawtio-karaf:xml:features:2.8.0]
java.io.IOException: Error resolving artifact io.hawt:hawtio-karaf:xml:features:2.8.0: [Could not find artifact io.hawt:hawtio-karaf:xml:features:2.8.0]

Seems that I need to do something following step 2. My initial setup was

feature:repo-add hawtio 2.8.0
feature:repo-add activemq 5.15.11
feature:repo-add camel 3.0.0
feature:install webconsole hawtio activemq-broker-noweb camel camel-jms jms camel-http camel-ftp camel-jackson camel-jsonpath camel-zipfile camel-velocity

So how can I add these as "<installedFeature/>" you mentioned.

Many thanks in advance
- Gerald

> Jean-Baptiste Onofré <jb...@nanthrax.net> hat am 2. Februar 2020 14:22 geschrieben:
> 
>  
> Hi Gerald,
> 
> There are two things here:
> 
> 1. You can have org.ops4j.pax.url.mvn.repository empty in
> etc/org.ops4j.pax.url.mvn.cfg. Then, Karaf won't use any remove
> repositories and will look for artifacts in first user .m2/repository
> folder and system folder.
> 
> 2. In your case, if you have error like the artifacts can be resolved,
> that's because they are not located in the system folder.
> You can populate the system folder by hand or, if you create your own
> custom distribution, you have to specify the <installedFeature/>.
> 
> Regards
> JB
> 
> On 02/02/2020 14:06, Gerald Kallas wrote:
> > Dear community,
> > 
> > I did setup a docker container for Camel/Karaf based on a pre-configured runtime. Finally I want to instantiate the container  system with no internet access.
> > 
> > I'm getting a lot of maven connectivity errors at startup depite all features are installed and working.
> > 
> > Ho can I disable the maven remote access properly?
> > 
> > Many thanks for any hints.
> > 
> > Best
> > - Gerald
> > 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: Disable karaf remote repositories for Karaf as Camel runtime

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

There are two things here:

1. You can have org.ops4j.pax.url.mvn.repository empty in
etc/org.ops4j.pax.url.mvn.cfg. Then, Karaf won't use any remove
repositories and will look for artifacts in first user .m2/repository
folder and system folder.

2. In your case, if you have error like the artifacts can be resolved,
that's because they are not located in the system folder.
You can populate the system folder by hand or, if you create your own
custom distribution, you have to specify the <installedFeature/>.

Regards
JB

On 02/02/2020 14:06, Gerald Kallas wrote:
> Dear community,
> 
> I did setup a docker container for Camel/Karaf based on a pre-configured runtime. Finally I want to instantiate the container  system with no internet access.
> 
> I'm getting a lot of maven connectivity errors at startup depite all features are installed and working.
> 
> Ho can I disable the maven remote access properly?
> 
> Many thanks for any hints.
> 
> Best
> - Gerald
> 

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

Disable karaf remote repositories for Karaf as Camel runtime

Posted by Gerald Kallas <ca...@mailbox.org>.
Dear community,

I did setup a docker container for Camel/Karaf based on a pre-configured runtime. Finally I want to instantiate the container  system with no internet access.

I'm getting a lot of maven connectivity errors at startup depite all features are installed and working.

Ho can I disable the maven remote access properly?

Many thanks for any hints.

Best
- Gerald

Re: Disable karaf remote repositories for Karaf as Camel runtime

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Gerald,

Did you setup pax url to be offline (worse case through a settings.xml or
*etc/org.ops4j.pax.url.mvn.cfg*)?

Maybe also share your logs to ensure it comes from that.


Le dim. 2 févr. 2020 à 14:03, Gerald Kallas <ca...@mailbox.org> a écrit :

> Dear community,
>
> I did setup a docker container for Camel/Karaf based on a pre-configured
> runtime. Finally I want to instantiate the container on a system with no
> internet access.
>
> I'm getting a lot of maven connectivity errors at startup depite all
> features are installed and working.
>
> Ho can I disable the maven remote access properly?
>
> Many thanks for any hints.
>
> Best
> - Gerald
>
>

Re: Disable karaf remote repositories for Karaf as Camel runtime

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
See my comment on the karaf mailing list.

Regards
JB

On 02/02/2020 14:02, Gerald Kallas wrote:
> Dear community,
> 
> I did setup a docker container for Camel/Karaf based on a pre-configured runtime. Finally I want to instantiate the container on a system with no internet access.
> 
> I'm getting a lot of maven connectivity errors at startup depite all features are installed and working.
> 
> Ho can I disable the maven remote access properly?
> 
> Many thanks for any hints.
> 
> Best
> - Gerald
> 

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