Javadoc reactor fails on WebServer metrics module-link mismatch
envgap__helidon-io__helidon-12184
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
42fb0f81ba0f6526b919891fc2786df9eb35c94d- Manifest
webserver/observe/metrics/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
helidon-io/helidon #12184 · read the original issue
## Problem
The Javadoc build fails in `helidon-webserver-observe-metrics` when
`helidon-metrics-providers-micrometer` is also part of the active reactor.
The Javadoc tool reports:
```text
warning: The code being documented uses packages in the unnamed module, but the packages defined in .../helidon-metrics-providers-micrometer/apidocs/ are in named modules.
```
Because the WebServer project sets `javadoc.fail-on-warnings` to `true`, this
warning fails the build.
## Reproducer
Using JDK 26 on `main`:
```shell
mvn clean package -Pjavadoc -DskipTests \
-pl :helidon-metrics-providers-micrometer,:helidon-webserver-observe-metrics
```
Restarting from `:helidon-webserver-observe-metrics` succeeds because the
Micrometer provider is no longer part of the active reactor. The two-module
reproducer also succeeds with `-DdetectOfflineLinks=false`, confirming that the
failure comes from the automatically detected reactor Javadoc link.
## Cause
`webserver/observe/metrics/pom.xml` declares
`helidon-metrics-providers-micrometer` as a compile dependency, although the
WebServer metrics module does not use provider types and its module descriptor
does not require the provider module. Maven therefore documents the dependency
as part of the unnamed module while linking to Javadocs whose element list
declares the named `io.helidon.metrics.providers.micrometer` module.
## Proposed solution
Declare `helidon-metrics-providers-micrometer` with `runtime` scope in
`webserver/observe/metrics/pom.xml`. The provider remains available at runtime
but is removed from the compile and Javadoc class paths, avoiding the modularity
mismatch.
The two-module reproducer and the full reactor Javadoc build should then pass
without disabling offline links or relaxing `javadoc.fail-on-warnings`.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]