Skip to main content
Jump to: navigation, search

Difference between revisions of "Export-Package"

 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
The [[Eclipse]] top-level project uses the following convention for the Export-Package manifest attribute:
 
The [[Eclipse]] top-level project uses the following convention for the Export-Package manifest attribute:
  
* ALL Eclipse SDK plugins must list ALL of their packages in their MANIFEST.MF files. 
+
* Newly added internal packages should not use x-internal exports unless there are very good reasons
* API or not.  If you have a package on your plugin's classpath, it must be listed. 
+
* For existing packages the x-internal export can be removed with PMC approval
* New?  List it!  Old?  List it!  Borrowed from a friend? List it! 
+
* Using x-friends is OK and should always be preferred over x-internals. The use of x-friends is an indication of tightly coupled bundles because its use is for when one bundle needs "approved" access to the internals of another bundle.
 
+
Exceptions to this model should be taken up with the PMC.
+
 
+
Notice that this puts us in exactly the same situation as we have always been in.  Everyone has the ability to see everything.  The community's desire/need for the freedom to access non-API is overwhelming.  In fact, this forms a critical part of the Eclipse ecosystem by allowing experimentation and investigation.
+
 
+
This approach is NOT at odds with, and is fundamentally separate from, our ongoing work to get control over the API and help developers stay on "the right path". That effort is supported by the addition of the component.xml files, the use of "x-internal" and "x-friends" annotations on export entries and the PDE/JDT work to more accurately model the runtime classpath at development time.
+
 
+
The PDE Tools > Organize Manifest operation will do the work for you, all you have to do is invoke the operation from time to time.
+
  
 
[[Category:API]]
 
[[Category:API]]

Latest revision as of 09:38, 15 January 2020

The Eclipse top-level project uses the following convention for the Export-Package manifest attribute:

  • Newly added internal packages should not use x-internal exports unless there are very good reasons
  • For existing packages the x-internal export can be removed with PMC approval
  • Using x-friends is OK and should always be preferred over x-internals. The use of x-friends is an indication of tightly coupled bundles because its use is for when one bundle needs "approved" access to the internals of another bundle.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.