I am updating a project to OSGi R6 Annotations (I have constraints running OSGi R7 due to my the dependencies deployed to my container) and have run into a problem where my old Apache Felix SCR annotation had dashes in them, which is not possible with OSGi R6.
I am trying to keep my existing OSGi properties as is (containing the dashes) while moving to the OSGi R6 annotations, however this is proving difficult.
What i am trying to do now is use OSGi R7 annotations that support dashes via $_$
, and looking for some way i can force the /target/classes/OSGI-INF/metatype
XML files to have
<metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.2.0"...
instead of
<metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.4.0"...
..which is the incompatibility in my application (the 1.4.0 namespace cannot be resolved, and no I cannot update my Metatype service).
Is there any way I can force the XMLNS on my metatype XML generation? I can force it on the Component XML files at /target/classes/OSGI-INF by specifying @Component(xmlns="http://www.osgi.org/xmlns/metatype/v1.2.0")
however this set it for the Component and not the Metatype (and i need it for the metatype).
Im using:
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.1.0</version>
Any thoughts on how I can achieve this?