You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Damien Lecan <ml...@dlecan.com> on 2007/10/26 14:34:57 UTC
Maven-bundle-plugin, import-package header and java.*/javax.* packages
Hello,
I'm using maven-bundle-plugin to embed non osgi dependencies in my applications.
Some times, java.* or javax.* packages appear in import-package,
depending on the embedded dependency.
Theses imported packages are the JDK 1.6 I'm using to compile, so I
don't understand why they appear as imported packages in my bundles.
Do you know how that works ?
Thanks
Damien Lecan
Re: Maven-bundle-plugin, import-package header and java.*/javax.* packages
Posted by Damien Lecan <ml...@dlecan.com>.
> however, I'm surprised you have java.* packages appearing in your
> Import-Package
> because the Bnd tool has an explicit section of code where these should be
> removed
Well, you're right, I only have imports with javax.* packages, and
never with java.* packages :-)
Thanks for explanations
Damien
Re: Maven-bundle-plugin, import-package header and java.*/javax.* packages
Posted by Stuart McCulloch <st...@jayway.net>.
On 26/10/2007, Damien Lecan <ml...@dlecan.com> wrote:
>
> Hello,
>
> I'm using maven-bundle-plugin to embed non osgi dependencies in my
> applications.
>
> Some times, java.* or javax.* packages appear in import-package,
> depending on the embedded dependency.
>
> Theses imported packages are the JDK 1.6 I'm using to compile, so I
> don't understand why they appear as imported packages in my bundles.
well, by default only java.* packages are exposed from the boot classpath to
bundles,
so it is very likely you do need those javax.* imports (some frameworks like
Equinox
as used under Eclipse operate in a less-strict mode where javax.* packages
are made
available - but you shouldn't expect this)
because javax.* packages aren't directly exposed, but must be imported, it
is possible
to have many versions of them and dynamically update them - which is very
useful :)
This is not done for java.* packages, because a number of them are directly
tied to the
JVM (cf. java.lang.Object) and cannot be updated for technical (and
security) reasons).
however, I'm surprised you have java.* packages appearing in your
Import-Package
because the Bnd tool has an explicit section of code where these should be
removed
- could you provide an example that recreates this issue?
if so then please open a JIRA issue and attach the files needed to recreate
it - without
such a testcase it's hard to know what is going on and difficult to tell
if/when its fixed
Do you know how that works ?
>
> Thanks
>
> Damien Lecan
>
--
Cheers, Stuart