felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bosschaert <david.bosscha...@gmail.com>
Subject [Karaf] Not importing the exported packages
Date Mon, 19 Oct 2009 11:37:53 GMT
Hi all,

I came across the following in a number of pom.xml files in the Karaf build
system:

<plugin>
  <groupId>org.apache.felix</groupId>
  <artifactId>maven-bundle-plugin</artifactId>
  <configuration>
    <instructions>
      <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
      <Export-Package>
          ${pom.artifactId}*;version=${pom.version}
      </Export-Package>
      <Import-Package>
          !${pom.artifactId}*,
          ... more stuff ...
      </Import-Package>
    </instructions>
  </configuration>
</plugin>

So in the Import-Package section, the packages that exported by a the bundle
are explicitly not imported. I always thought that you should be doing the
opposite and always import what you are also exporting. See
http://www.osgi.org/blog/2007/04/importance-of-exporting-nd-importing.html

Thoughts anyone?

David

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