-
Notifications
You must be signed in to change notification settings - Fork 588
Description
With Java 9 now released, we need to reserve module names by using the MANIFEST.MF entry approach - that is having a key Automatic-Module-Name in it.
As a reminder, there are two ways of consuming Ehcache:
- Individual jars, that do not contain any shaded dependencies. The end result is that you have many small jars on the uclasspath.
- Fat jars that contain all of the Ehcache code and shaded dependencies, but not repackaged.
The moment we introduce modularity concepts, even as small as picking a module name, I believe we have to make a choice.
We cannot keep two options in the modular world. As it would mean having different modules containing the same package, which would break any app that would have dependencies which did not pick the same Ehcache distribution.
So I would suggest the following:
Only offer the small jars with module definitions
- that is effectively deprecating our fat jars for the modular world.
- this would solve the shading issue as well, since we would only need dependencies to also have a proper module name and we are good to go.
I would then suggest the following modules (from maven coordinates to module name):
org.ehcache.modules:ehcache-api->org.ehcache.apiorg.ehcache.modules:ehcache-core->org.ehcache.coreorg.ehcache.modules:ehcache-impl->org.ehcacheorg.ehcache.modules:ehcache-xml->org.ehcache.xmlorg.ehcache.modules:ehcache-107->org.ehcache.jcacheorg.ehcache.modules:ehcache-client->org.ehcache.clustered.clientorg.ehcache.modules:ehcache-common->org.ehcache.clustered.commonorg.ehcache.modules:ehcache-management->org.ehcache.managementorg.ehcache:ehcache-transactions->org.ehcache.transactions
The following jars would not get a module name:
org.ehcache:ehcahceas it is a fat jarorg.ehcache:ehcache-clusteredas it is a fat jarorg.ehcache.modules:ehcache-serveras this is not required as long as the Terracotta Server does not run on the module path.