After taking a look at the mavenization so far, comparing some manifests 
between Ant and Maven builds, there was one thing that caught my attention. A 
lot of bundles generated by Maven seem to export packages, even without 
explicit statements in osgi.bnd or pom.xml files.

Looking at the documentation of the plugin at:
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

There is a section about default behavior, which states:

> <Export-Package> is now assumed to be the set of packages in your local Java 
> sources, excluding the default package '.' and any packages containing 'impl' 
> or 'internal'.


Personally, I really don't like a default that exports anything unless you 
explicitly state you want to do this. Exporting something should be a very 
concious decision, and not exporting anything should be the default. I 
definitely want to see in my pom.xml or osgi.bnd what is exported.

Luckily the plugin also provides a way to override this default behavior:

> It is possible to override any of these values (except 
> Bundle-ManifestVersion) just by specifying the desired value in the plugin 
> configuration section of the POM file.


I would be in favor of adding a single line to our global ACE configuration 
that states:

<Export-Package></Export-Package>

Greetings, Marcel

Reply via email to