metrics icon indicating copy to clipboard operation
metrics copied to clipboard

Clean up package structure in `release/5.0.x` (JPMS)

Open joschi opened this issue 4 years ago • 1 comments

The sub-modules in the release/5.0.x branch contain overlapping packages which conflict with the Java Platform Module System (JPMS).

For example, metrics-core contains classes in io.dropwizard.metrics5 while all other sub-modules contain classes in a sub-package of io.dropwizard.metrics5.

Since the package structure in Dropwizard Metrics 5.x has been changed anyway, we should ship it in a state which is compatible to modularized Java applications.

joschi avatar Jun 25 '21 06:06 joschi

In what way is the packaging incompatible with JPMS?

For example package io.dropwizard.metrics5 (in metrics-core) and package io.dropwizard.metrics5.influxdb (in metrics-influxdb) are two different packages. There is no overlap.

mbrannstrom avatar Sep 20 '21 11:09 mbrannstrom

Jarviz says it's fine nowadays:

❯ bin/jarviz -V
------------------------------------------------------------
jarviz 0.3.0-SNAPSHOT
------------------------------------------------------------
Build time:   2023-02-24 15:08:14+01:00
Revision:     a046a0a5519e7a21a3da3bea1f3863472cd699e3
JVM:          19.0.2 (Azul Systems, Inc. 19.0.2+7)
------------------------------------------------------------

❯ bin/jarviz packages split --directory=m5
subject: metrics-jakarta-servlet-5.0.0-rc17-SNAPSHOT.jar
total: 1
io.dropwizard.metrics5.servlet
subject: metrics-jakarta-servlets-5.0.0-rc17-SNAPSHOT.jar
total: 1
io.dropwizard.metrics5.servlets
subject: metrics-servlet-5.0.0-rc17-SNAPSHOT.jar
total: 1
io.dropwizard.metrics5.servlet
subject: metrics-servlets-5.0.0-rc17-SNAPSHOT.jar
total: 1
io.dropwizard.metrics5.servlets

Overlap of metrics-jakarta-servlet and metrics-servlet, and metrics-jakarta-servlets and metrics-servlets is expected. These aren't meant to be used at the same time respectively.

joschi avatar Feb 24 '23 22:02 joschi