Skip to content

Decide on Java 9 module name(s) #2158

@ljacomet

Description

@ljacomet

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.api
  • org.ehcache.modules:ehcache-core -> org.ehcache.core
  • org.ehcache.modules:ehcache-impl -> org.ehcache
  • org.ehcache.modules:ehcache-xml -> org.ehcache.xml
  • org.ehcache.modules:ehcache-107 -> org.ehcache.jcache
  • org.ehcache.modules:ehcache-client -> org.ehcache.clustered.client
  • org.ehcache.modules:ehcache-common ->org.ehcache.clustered.common
  • org.ehcache.modules:ehcache-management -> org.ehcache.management
  • org.ehcache:ehcache-transactions -> org.ehcache.transactions

The following jars would not get a module name:

  • org.ehcache:ehcahce as it is a fat jar
  • org.ehcache:ehcache-clustered as it is a fat jar
  • org.ehcache.modules:ehcache-server as this is not required as long as the Terracotta Server does not run on the module path.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions