2016-08-30 7:04 GMT+02:00 oski_bear <dariusham...@hotmail.com>:

> I'm having a hard time with feature installation in Karaf 4.0.5. The latest
> issue seems to be that Karaf 4.0.5 disregards the version specified for a
> prerequisite feature. E.g.
>
> <features name="my-features-${project.version}"
> xmlns="http://karaf.apache.org/xmlns/features/v1.4.0";>
>   <feature name="feature-a" version="${project.version}" description="Some
> feature">
>     <feature prerequisite="true"
> version="3.2.14.RELEASE_1">spring-orm</feature>
>     ...
>   </feature>
> </features>
>
> After the container starts up I see that multiple versions of the spring
> feature are installed instead of just the 3.2.14.RELEASE_1 version that I
> specified. Seems like a bug.
>

There's a JIRA raised about that I've started investigating. I need to get
back to it.
Also, note that the version is a range, so when you specify version="xxx",
it means anything >= xxx.  You can use a closed range [xxx,xxx] if you need.


>
> Also I've noticed:
> * The karaf-maven-plugin completely disregards the order specified in the
> <bootFeatures> section of its configuration. E.g. try configuring the
> <bootFeatures> section of the karaf-maven-plugin, build your custom
> container, then scratch your head at the seemingly completely random order
> of the boot features property in the org.apache.karaf.features.cfg file.
> Why
> can't it just generate the file with the boot features in the same order I
> specified in the plugin? Can I fix this? Is there a workaround?
>

The reason for the loss is that the maven plugin computes the actual list
of bundles, Karaf using the osgi resolver, and the definition order is
currently lost.

You can use start levels on bundles or features to change the start order.


> * What's up with the seemingly random restarts of the container and the
> endless stream of "The specified feature: blah version blah is already
> installed" messages? Why does this happen? If it's normal or expected
> behavior what's the point of these annoying messages? How can I prevent
> this
> situation?
>

This message should only appear when you request a feature installation
and the feature was already installed.  If that does not seem to be the
case,
please raise a JIRA with steps to reproduce the problem.

* Why is that sometimes when features fail to install the shell becomes
> completely unresponsive?
>

That's definitely not expected. Can you raise a JIRA and explain the steps
to reproduce the problem ?


> I don't remember installing and defining features being this frustrating in
> karaf 2.x.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Karaf-4-0-5-prerequisite-feature-not-installed-with-
> correct-version-tp4047753.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration

Email: gno...@redhat.com
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/

Reply via email to