Hi!

I try to generate a fragment bundle to "system.bundle", exporting the JVM packages not visible at runtime, like javax.servlet. Therefore, as the project bases on maven using maven-bundle-plugin, I would like to generate the MANIFEST.MF, rather than editing it by hand. However using the following instructions:

<plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <version>2.0.0</version>
        <configuration>
                <instructions>
                        
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                        
<Export-Package>javax.activation,javax.servlet</Export-Package>
                </instructions>
        </configuration>
</plugin>

i'll always get the following error:

[WARNING] Warning building bundle {...} : Instructions in Export- Package that are never used: javax\.activation, javax\.servlet [WARNING] Warning building bundle {...} : Superfluous export-package instructions: [javax.servlet, javax.activation] [WARNING] Warning building bundle {...} : Did not find matching referal for *

While that is totally correct behaviour in the normal use cases, I would nevertheless want to force the maven-bundle-plugin to generate the MANIFEST whatsoever, putting Export-Package: javax.servlet, ... inside.

Is there a way to do it? With maven-bundle-plugin?

Is there another way to get a grip on non-java.*-packages in the runtime? I know of the "org.osgi.framework.system.package" startup parameter. But I think that using the fragment bundle approach is more elegant, as I'll be able to deploy my bundles in any unconfigured newly downloaded OSGi runtime distro.

Kind regards,
        Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to