Details
Description
Folowing https://blog.osgi.org/2018/08/osgi-r7-highlights-cdi-integration.html a annotation is used: org.osgi.service.cdi.annotations.Service
Therefore I add this dependency to my maven project:
<dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.service.cdi</artifactId> <version>1.0.0</version> <scope>provided</scope> </dependency>
And I create a class TestBean:
package de.e_nexus.vr.server.osgi; import org.osgi.service.cdi.annotations.Service; @Service public class TestBean { }
Unfortunately the result can not be load:
11:24:10.552 WARN [fileinstall-C:\Program Files\apache-karaf-4.3.0/deploy] Error while starting bundle: file:/C:/Program%20Files/apache-karaf-4.3.0/deploy/vr.server-1.0.0.jar org.osgi.framework.BundleException: Unable to resolve VR-Server [87](R 87.0): missing requirement [VR-Server [87](R 87.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.cdi.annotations)(version>=1.0.0)(!(version>=2.0.0))) Unresolved requirements: [[VR-Server [87](R 87.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.cdi.annotations)(version>=1.0.0)(!(version>=2.0.0)))]
Attachments
Issue Links
- contains
-
KARAF-6926 mvn-install failed - Shell-Core color problem in eclipse-ide
-
- Resolved
-
- is related to
-
KARAF-6434 Add CDI examples
-
- Resolved
-