If you use java2-security the easiest way to grant permissions is to add a
permissions.perm to your bundle. You could do that with the
maven-bundle-plugin.
...
<build>
<resources>
<resource>
<directory>OSGI-INF/</directory>
<filtering>true</filtering>
<includes>
<include>permissions.perm</include>
</includes>
</resource>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
...
<configuration>
...
<instructions>
...
<Include-Resource>
{maven-resources},
OSGI-INF/=OSGI-INF/,
...
Than edit the permission.perm and add the permission you need. That's all!
Here are some permission you can choose:
(org.osgi.framework.PackagePermission "your.package" "import")
(org.osgi.framework.PackagePermission "your.package" "export")
(org.osgi.framework.BundlePermission "groupID.artifactID" "host");
(org.osgi.framework.BundlePermission "groupID.artifactID" "fragment");
(org.osgi.framework.ServicePermission "your.package.yourSPI" "get")
(org.osgi.framework.ServicePermission "your.package.yourSPI" "register")
(org.osgi.framework.ConfigurationPermission * "configure")
(org.osgi.framework.AdminPermission * metadata)
(org.osgi.service.event.TopicPermission "your.topic" "subscribe")
(org.osgi.service.event.TopicPermission "your.topic" "publish")
maybe you need this too:
(java.util.PropertyPermission "your.package.table" "read")
(java.lang.RuntimePermission getClassLoader)
--
View this message in context:
http://apache-felix.18485.x6.nabble.com/Unable-to-resolve-1-0-missing-requirement-1-0-osgi-wiring-package-osgi-wiring-package-tp5004697p5004732.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]