A bundle needs to be a single artifact. So you have to list all the maven modules or bundles within the feature element. You cannot get Karaf to resolve a maven super project into artifacts and download them.
OSGi (Karaf) maven dependencies resolution
-
04-07-2022 - |
Вопрос
I am creating a new Karaf feature that would contain several bundles (jclouds). I also have a maven "superproject" (jclouds-all) that contains all the modules/bundles I need.
Is it possible, when defining the feature, to specify just the one superproject's bundle and have all the concrete bundles resolved automatically or do I need to list all the bundles in my feature?
I tried it:
<feature name="my-cloud" version="${project.osgi.version}" resolver="(obr)">
<bundle start-level="${core.startlevel}" dependency="true">mvn:org.apache.jclouds/jclouds-all/1.6.2-incubating</bundle>
</feature>
and it complains:
java.lang.IllegalArgumentException: Unable to build OBR representation for bundle mvn:org.apache.jclouds/jclouds-all/1.6.2-incubating
Решение
Не связан с StackOverflow