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

Bug 525803

Summary: Add Automatic-Module-Name to all our bundles
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: RelengAssignee: Pierre-Charles David <pierre-charles.david>
Status: CLOSED FIXED QA Contact: Florian Barbin <florian.barbin>
Severity: enhancement    
Priority: P3 CC: florian.barbin, laurent.fasani
Version: 4.1.1Keywords: triaged
Target Milestone: 6.0.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/116832
Whiteboard: java9

Description Pierre-Charles David CLA 2017-10-10 04:15:19 EDT
From the thread at https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg14888.html: to make sure our OSGi bundles can be consumed as Java 9 modules, it seems that it would be enough to add Automatic-Module-Name headers to our MANIFEST.MF. I'm not sure how important it is for us to be "consumable" as Java 9 modules, but the change is simple and low risk enough that we might do it anyway.

As a first approximation, a "one-shot" implementation could simply be made using a script like this:

for m in plugins/*/META-INF/MANIFEST.MF; do
    name=$(grep Bundle-SymbolicName $m | cut -d':' -f2 | cut -d';' -f1)
    echo " Automatic-Module-Name: $name" >> $m
done
Comment 1 Pierre-Charles David CLA 2018-02-20 11:37:20 EST
Fixed by ed58658a26e4e706467b7530cf34b978b35c0be4. Note that the commit message is wrong, it references bug #525808 which has nothing to do with Sirius.
Comment 2 Florian Barbin CLA 2018-05-24 09:36:40 EDT
Verified by importing some sirius plugins as plugin and fragment and making sure the Automatic-Module-Name is set in the Manifest
Comment 3 Laurent Redor CLA 2018-06-27 11:54:54 EDT
Available in Sirius 6.0.0, see https://wiki.eclipse.org/Sirius/6.0.0 for details