Skip to content

4.x: Dropwizard metrics split package #8165

@romain-grecourt

Description

@romain-grecourt

Environment Details

  • Helidon Version: 4.0.1

Problem Description

com.zaxxer:HikariCP:5.0.1 depends on io.dropwizard.metrics:metrics-core:3.2.5 but Helidon defines dependency management for it to 4.1.36.

metrics-core 3.x has an automatic module name derived from the JAR file file: metrics.core ; however metrics-core 4.x has an explicit automatic module name that is different: com.codahale.metrics.

Hikari provides a module-info that has a require on metrics.core which is conflicting with helidon-dbclient-metrics-hikari that defines a require on com.codahale.metrics.

  • If both metrics-core 3.x and 4.x are put on the module path, it creates a split package scenario: two different modules exporting the same package
  • If only one is on the module path, one of the required module is be missing

We need to downgrade io.dropwizard.metrics:metrics-core to a version that is compatible with HikariCP.

Steps to reproduce

jar --describe-module --file ~/.m2/repository/io/dropwizard/metrics/metrics-core/3.2.5/metrics-core-3.2.5.jar
No module descriptor found. Derived automatic module.

[email protected] automatic
requires java.base mandated
contains com.codahale.metrics
jar --describe-module --file ~/.m2/repository/io/dropwizard/metrics/metrics-core/4.1.36/metrics-core-4.1.36.jar
No module descriptor found. Derived automatic module.

[email protected] automatic
requires java.base mandated
contains com.codahale.metrics

Metadata

Metadata

Labels

4.xVersion 4.xDB clientHelidon DB ClientP2

Type

No type

Projects

Status

High priority

Relationships

None yet

Development

No branches or pull requests

Issue actions