[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cross-project-issues-dev] Eclipse plug-ins as automatic modules in Java 9?
- From: Aleksandar Kurtakov <akurtako@xxxxxxxxxx>
- Date: Fri, 6 Oct 2017 10:36:48 +0300
- Delivered-to: firstname.lastname@example.org
On Fri, Oct 6, 2017 at 10:34 AM, Ed Willink <ed@xxxxxxxxxxxxx> wrote:
> "I propose to make this a rule"
> Do you mean an informal good practice
> or a Manifest editor warning and a quick fix
^^ is probably best. It would be nice if someone opens PDE bug with the details.
> or a Manifest builder automated edit?
> Ed Willink
> On 05/10/2017 22:10, Stephan Herrmann wrote:
>> I just noticed by chance that none of the artifacts we are producing
>> are consumable as "automatic modules" in Java 9 speak.
>> The reason is: JPMS defines an algorithm how names for automatic modules
>> are derived from the jar file name. Unfortunately, the spec expects any
>> version to be separated from the name by "-", whereas our files use "_".
>> As a result a jar file like
>> is interpreted as an automatic module named
>> (cutting off the version fails, then "_" is converted to ".").
>> Since that module name is not a legal Java identifier, the given jar file
>> cannot be referenced in any "requires" clause of a Java 9 module.
>> While all this is very unfortunate, Java 9 provides a means for a
>> solution: adding an Automatic-Module-Name header to MANIFEST.MF.
>> Hence, I propose to make this a rule for future releases that all bundles
>> should have this manifest header, where the value should be identical to
>> the value of Bundle-SymbolicName.
>> There may not yet be any consumers of Eclipse plug-ins as Java 9 modules,
>> but as we know that several of our artifacts are being consumed outside
>> I am sure that clients will expect our artifacts to be consumable as Java
>> modules sooner or later. And then a general solution looks cleaner to me
>> then doing this for selected artifacts only.
>> Reference for naming of automatic modules:
>> cross-project-issues-dev mailing list
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
> This email has been checked for viruses by Avast antivirus software.
> cross-project-issues-dev mailing list
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
Red Hat Eclipse Team