felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch" <stuart.mccull...@jayway.net>
Subject Re: Maven-bundle-plugin, import-package header and java.*/javax.* packages
Date Fri, 26 Oct 2007 13:14:46 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message