You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by roedll <lu...@ait.ac.at> on 2014/03/27 06:15:10 UTC

Starting up features in Karaf 3.0.x

Hi all,

I'm currently using Karaf 2.3.x and starting up our framework using a
features xml file in the deploy folder.
I wanted to use this approach also on Karaf 3.0.x but it doesn't work
unfortunately - I tested it with the binaries of Karaf 3.0.0 and
3.0.1-SNAPSHOT.

For a simple test I just put the following features file into the deploy
folder which simply tries to install the webconsole feature on startup:

<?xml version="1.0" encoding="UTF-8"?>
<features name="test" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0
http://karaf.apache.org/xmlns/features/v1.2.0">

	<feature name="testfeature" install="true">
		<feature>webconsole</feature>
	</feature>
</features>

In the log I only get "Started bundle:
feature:file:/C:/apache-karaf-3.0.0/deploy/test.xml" but nothing more and
the feature also isn't started... (but it's listed when I do "feature:list"
and I can install it manually with "feature:install")

I also tried to add the desired feature to the bootFeatures and there it
works like a charm. But unfortunately for our software this way wouldn't
help much...

So did I get anything wrong here?
Is this behavior intended in 3.0.x?
Can you verify this behaviour?

Any help on this would be great!

best regards,

Lukas



--
View this message in context: http://karaf.922171.n3.nabble.com/Starting-up-features-in-Karaf-3-0-x-tp4032422.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Starting up features in Karaf 3.0.x

Posted by roedll <lu...@ait.ac.at>.
Hi!

Thanks for the quick response. That did the trick ;-)

best regards,

Lukas



--
View this message in context: http://karaf.922171.n3.nabble.com/Starting-up-features-in-Karaf-3-0-x-tp4032422p4032428.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Starting up features in Karaf 3.0.x

Posted by Mateo Ramey <ma...@gmail.com>.
Hi Lukas,

install="true" is not valid with the features schema. Try doing
install="auto" instead:

        <feature name="testfeature" install="auto">

                <feature>webconsole</feature>

        </feature>

The only valid entries are either "manual" or "auto". If you had that set
to true before, I am guessing that the prior versions of karaf were more
lenient and defaulted to "auto" even if the value was not valid.

Hopefully this helps solve your issue.




On Wed, Mar 26, 2014 at 10:15 PM, roedll <lu...@ait.ac.at> wrote:

> Hi all,
>
> I'm currently using Karaf 2.3.x and starting up our framework using a
> features xml file in the deploy folder.
> I wanted to use this approach also on Karaf 3.0.x but it doesn't work
> unfortunately - I tested it with the binaries of Karaf 3.0.0 and
> 3.0.1-SNAPSHOT.
>
> For a simple test I just put the following features file into the deploy
> folder which simply tries to install the webconsole feature on startup:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <features name="test" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0
> "
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0
> http://karaf.apache.org/xmlns/features/v1.2.0">
>
>         <feature name="testfeature" install="true">
>                 <feature>webconsole</feature>
>         </feature>
> </features>
>
> In the log I only get "Started bundle:
> feature:file:/C:/apache-karaf-3.0.0/deploy/test.xml" but nothing more and
> the feature also isn't started... (but it's listed when I do "feature:list"
> and I can install it manually with "feature:install")
>
> I also tried to add the desired feature to the bootFeatures and there it
> works like a charm. But unfortunately for our software this way wouldn't
> help much...
>
> So did I get anything wrong here?
> Is this behavior intended in 3.0.x?
> Can you verify this behaviour?
>
> Any help on this would be great!
>
> best regards,
>
> Lukas
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Starting-up-features-in-Karaf-3-0-x-tp4032422.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>