Sibling multi-release module is not found on the module path before packaging

Aperta
#1,137 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@efegokdemir ci sta già lavorando.

Dal 10/10/2026.

  • #1170 di @efegokdemir — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
64/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
build-system

Direzione di ricerca

Start with the apache/maven-executor reproducer at commit 10bf5cd and run mvn clean compile, focusing on the providers/docker-exe compile-java9 execution. Inspect how the plugin builds the module path for reactor dependencies whose descriptor is under META-INF/versions/9. Done means the sibling module compiles before packaging and the reported site-build scenario no longer fails.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

3.x bug
Affected version

3.15.0, 3.16.0

Bug description

In a reactor where module A writes module-info.class only to META-INF/versions/9 (<multiReleaseOutput>true</multiReleaseOutput>, Java 8 baseline), a module B whose src/main/java9/module-info.java has requires A fails to compile whenever A has not been packaged in the same build:

module-info.java:[23,41] module not found: org.apache.maven.executor

Reproducer: apache/maven-executor at 10bf5cd. mvn clean verify succeeds; mvn clean compile fails in providers/docker-exe, execution compile-java9. Before packaging, A resolves to target/classes, whose root has no module descriptor, and javac does not treat a directory as a multi-release jar.

With 3.16.0 this also breaks the site build: the recompile on dependency change (#1102) makes the compile fork of javadoc:aggregate rebuild B against A's target/classes (apache/maven-executor#52).

When the output directory of a reactor dependency contains META-INF/versions/<N>/module-info.class and N is not above the execution's release, the plugin could place META-INF/versions/<N> on the module path, so the directory resolves as it would from the packaged jar.

Lingua principale
Java
Stelle
264
Fork
196
Merge medio
2g 7h
PR unite (30g)
23

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/maven-compiler-plugin

Tutte le issue di apache/maven-compiler-plugin

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.