felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Walker <r...@ascert.com>
Subject Re: Automatic generation of Import-Package statements
Date Fri, 02 Jun 2006 13:49:16 GMT

> While investigating this it dawned on me that you are importing 
> every package which you export.  I now realize that is a result 
> of running the automatic manifest generation tool (is this mangen?).
> This only happens if you have the "Bundle-ManifestVersion: 2" 
> header to indicate you are using OSGi R4 bundle manifest syntax.
Haven't followed the thread fully, so not sure whether mangen is in use 
here - and whether this is the case.

But if so, you can add a mangen rule to suppress this behaviour either 
globally or locally on a per-JAR basis:


    *Usable globally* 	|yes|
    *Usable locally* 	|yes|
    *Standard options* 	 
    *Rule specific options* 	 

    In many application cases it's not necessary for a bundle JAR to
    import it' own exports. This rule may be used locally or globally to
    remove from a bundle's import list any package which it also exports.

> One last nit.  The tool seems to add packages to the uses clause 
> which either do not exist or are internal packages to your bundle.
> For example search for org.ops4j.pax.wicket.service.internal in 
> your uses clause.  It states that exported package 
> org.ops4j.pax.wicket.service uses this internal package.  Is 
> the tool being to aggressive?  Or do you have an unintentional 
> internal dependency?
I'm reading this part and actually thinking maybe this isn't mangen 
related - since as I recall, we didn't get as far as having mangen 
create uses clauses.

If it is though - there are also ways to generation "Ignore" rules to 
prune out unwanted imports or exports which have been automatically 
detected but are not actually needed.


-- Rob

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