Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 516125

Summary: Change Export-Package: rules from internal* to internal.*
Product: z_Archived Reporter: Markus Keller <markus.kell.r>
Component: EBRAssignee: Gunnar Wagenknecht <gunnar>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, gunnar
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Markus Keller CLA 2017-05-03 12:48:06 EDT
(follow-up to bug 499717 comment 102)

According to http://bnd.bndtools.org/chapters/820-instructions.html#selector , the Export-Package rules in the bnd files would better all end in '.*'.

The following pattern is found all over the orbit-recipes repo, since it's being generated by "mvn ebr:create-recipe ...":

 *.internal*;x-internal:=true;version="${package-version}", \
 *.impl*;x-internal:=true;version="${package-version}", \

This form would mark packages *.internalization and *.implore as internal.

ebr:create-recipe should be changed to generate this instead:

 *.internal.*;x-internal:=true;version="${package-version}", \
 *.impl.*;x-internal:=true;version="${package-version}", \

After that, existing bundles can be updated one-by-one or in batch.
Comment 2 Markus Keller CLA 2017-05-04 15:11:31 EDT
Do the other instructions for "about" files really make sense?

Export-Package: \
 !about.html,!about_files, \

AFAICS, the first one tries not to export package "about.html" (not relevant, we only have a *file* called "about.html"), and the second one would better use .*

I.e. make it:

Export-Package: \
 !about_files.*, \
Comment 3 Gunnar Wagenknecht CLA 2017-05-05 02:02:43 EDT
(In reply to Markus Keller from comment #2)
> Do the other instructions for "about" files really make sense?
> 
> Export-Package: \
>  !about.html,!about_files, \
> 
> AFAICS, the first one tries not to export package "about.html" (not
> relevant, we only have a *file* called "about.html"), and the second one
> would better use .*

So bnd did not seem to be smart enough back in the day when I added them to the template. It did export "about.html" and "about_files" as a package when those files were present on the bundle classpath.

However, I haven't tested again with the latest versions of the Maven bnd plug-in that we are using now.