[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Support for Java 9 modules
- From: Stephan Herrmann <stephan.herrmann@xxxxxxxxx>
- Date: Thu, 5 Oct 2017 22:55:06 +0200
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
On 05.10.2017 22:26, Thomas Watson wrote:
I think we should be explicit in deciding what our automatic module name is instead of depending on what the file name is on disk.
Anyone can rename our bundle file names on disk, that does not change what its OSGi Bundle-SymbolicName is.Â Therefore I would
advocate we use the Automatic-Module-Name header so we have explicit control over the name which cannot be changed simply by
renaming the file.
Did you mean to put an underscore _ in for the separator of the version?Â I would have expected
Correct, jar file with underscore, automatic module name then converts
underscore to dot. Sorry for confusion.
I don't have a good idea on how hard it would be to change the build and consumption of the artifacts with a - (dash) vs _
(underscore).Â I do know the osgi.bundles property supports both.Â It was a bit tricky to get it to play nicely with discovering
both bundles with dash and bundles with underscore.
OK, I was only aware of magic in p2, maybe p2 translates arbitrary file names to
canonical file names during installation? If so, that wouldn't help the issue at hand.
I'll bring the matter of Automatic-Module-Name to the table at cross-project.
----- Original message -----
From: Stephan Herrmann <stephan.herrmann@xxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
Subject: Re: [equinox-dev] Support for Java 9 modules
Date: Thu, Oct 5, 2017 2:00 PM
We (JDT) have just been toying with the opposite direction:
add module-info.java to an existing OSGi bundle.
I only then noticed that none of our OSGi bundles can be
consumed as automatic JPMS modules, because the algorithm
for names of automatic modules, fails to cut off the version
from jar files like
Due to lack of a separating "-" we end up with an illegal
module name of
I'm not even sure if this is a useful exercise, but in case
it might be: should we recommend / request that all future
releases of Eclipse plug-ins specify a legal module name
via Automatic-Module-Name manifest attribute?
Or could the names of jar files be adjusted to use "-" as in
I believe, p2 could absorb this change, no? It would then be
an issue of convincing tools like PDE and tycho to produce jars
with a modified naming scheme? (Or CBI aggregator for that matter).