You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by smunro <st...@gmail.com> on 2017/04/02 22:42:38 UTC

Karaf & feature.xml files

Hello,

I'm trying to put together a guide on installing multiple osgi bundles for
my team and one solution I would like to explore is using the features.xml
file.

All the guides on-line have made reference to a features:addUrl command.
When entering this, I'm informed the features command does not exist, nor
can I see it referenced in the available commands. There are other ways
around this to use feature:repo-add mvn:blah, however, I'd like to be able
to use the file protocol.

So, for example, if I had a features.xml file in
C:/feature_sandbox/features.xml, I'd like to do 
feature:repo-add file://C:/feature_sandbox/features.xml 

The above does not work either. The only other option I have is to use the
karaf feature plugin, which I'm happy to do, but I was keen to get something
faster in place before I add this plugin to the project. Is the file
protocol option available? 

Secondly, has the features command been removed completely or is it
something I need to install in addition to my base installation. I haven't
seen the removal of this mentioned in some of the release notes, so it's
omission is mystery to me based on the very recently posted articles
regarding it's usage.

Warm Regards,
Stephen Munro



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-feature-xml-files-tp4049996.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf & feature.xml files

Posted by Guillaume Nodet <gn...@apache.org>.
The addUrl command has been renamed to repo-add.
So they are the same command.

To add a file, you may need to use 3 slashes for a file.  The following
command works for me:

feature:repo-add
file:///Users/gnodet/work/git/karaf4x/assemblies/apache-karaf-minimal/target/assembly/system/org/apache/karaf/features/spring/4.1.2-SNAPSHOT/spring-4.1.2-SNAPSHOT-features.xml

2017-04-03 0:42 GMT+02:00 smunro <st...@gmail.com>:

> Hello,
>
> I'm trying to put together a guide on installing multiple osgi bundles for
> my team and one solution I would like to explore is using the features.xml
> file.
>
> All the guides on-line have made reference to a features:addUrl command.
> When entering this, I'm informed the features command does not exist, nor
> can I see it referenced in the available commands. There are other ways
> around this to use feature:repo-add mvn:blah, however, I'd like to be able
> to use the file protocol.
>
> So, for example, if I had a features.xml file in
> C:/feature_sandbox/features.xml, I'd like to do
> feature:repo-add file://C:/feature_sandbox/features.xml
>
> The above does not work either. The only other option I have is to use the
> karaf feature plugin, which I'm happy to do, but I was keen to get
> something
> faster in place before I add this plugin to the project. Is the file
> protocol option available?
>
> Secondly, has the features command been removed completely or is it
> something I need to install in addition to my base installation. I haven't
> seen the removal of this mentioned in some of the release notes, so it's
> omission is mystery to me based on the very recently posted articles
> regarding it's usage.
>
> Warm Regards,
> Stephen Munro
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-feature-xml-files-tp4049996.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet

Re: Karaf & feature.xml files

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

feature:repo-add with a local URL works (I just tried on my linux box).

features:addUrl has been replace by feature:repo-add in Karaf 3/4 (the 
documentation refers to feature:repo-add).

All features:* commands have been replace with feature:* commands. You can see 
this in the update notes (from Karaf 2 to Karaf 3):

http://karaf.apache.org/manual/latest-3.0.x/#_update_notes_from_2_x_to_3_x

Which Karaf version are you using (in order to test feature:repo-add with a 
local path on Windows) ?

Regards
JB

On 04/03/2017 12:42 AM, smunro wrote:
> Hello,
>
> I'm trying to put together a guide on installing multiple osgi bundles for
> my team and one solution I would like to explore is using the features.xml
> file.
>
> All the guides on-line have made reference to a features:addUrl command.
> When entering this, I'm informed the features command does not exist, nor
> can I see it referenced in the available commands. There are other ways
> around this to use feature:repo-add mvn:blah, however, I'd like to be able
> to use the file protocol.
>
> So, for example, if I had a features.xml file in
> C:/feature_sandbox/features.xml, I'd like to do
> feature:repo-add file://C:/feature_sandbox/features.xml
>
> The above does not work either. The only other option I have is to use the
> karaf feature plugin, which I'm happy to do, but I was keen to get something
> faster in place before I add this plugin to the project. Is the file
> protocol option available?
>
> Secondly, has the features command been removed completely or is it
> something I need to install in addition to my base installation. I haven't
> seen the removal of this mentioned in some of the release notes, so it's
> omission is mystery to me based on the very recently posted articles
> regarding it's usage.
>
> Warm Regards,
> Stephen Munro
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-feature-xml-files-tp4049996.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

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