Hi Richard - Thanks for your inputs. It worked using !*. As per
documentation, it should export all classes and it is. Right now, no
other bundle will use any exported packages from my bundle , so I wanted
to get rid of this header at all from manifest . Similarly, there are
hundreds of entries in Import-Package but none of them is needed . So I
am disabling it as you suggested. That worked, but it created new header
Ignore-Package and ignored all the one which were getting included. Just
in case you wanted to see my configuration..
Here is my code,
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>2.1.0</version>
<configuration>
<instructions>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Bundle-ClassPath>{maven-dependencies},.</Bundle-ClassPath>
<Embed-Transitive>true</Embed-Transitive>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment>
<Bundle-Activator>osgi.Activator</Bundle-Activator>
<Require-Bundle>org.eclipse.osgi;bundle-version="3.5.2"</Require-Bundle>
<Import-Package>!*</Import-Package>
<Export-Package>!*</Export-Package>
</instructions>
</configuration>
</plugin>
Richard S. Hall wrote:
On 7/20/10 1:20, Sudhir Dharmadhikari wrote:
I am trying simple osgi bundle which has every dependency embedded
inside my bundle. By default, bundle-plugin creates several entries
in Import-Package and Export-Package . I want to get rid of them
completely. I tried several ways . If I try giving empty
Import-Package , it fails at build. I tried blank _exportcontents,
does not work too !
Any clue ?
I don't believe it should ever export anything by default, so if it is
exporting it seems you must be telling it to do so somehow. On the
other hand, it imports everything not included in the bundle by
default. Not importing anything at all is harder than you might think.
If you need any of the OSGi API then you need to import those
packages; if you use any of the javax packages then you need to import
them. But specifying !* should not import anything.
-> richard
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]