DependencyConvergence swallows the real resolution error, and it misdirects diagnosis
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 74/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- java
- Ambito
- documentation
Direzione di ricerca
Parti dall'elenco ordinato di correzioni nel corpo dell'issue: l'opzione 1 è un singolo paragrafo aggiunto a CLAUDE.md e/o a docs/BUILDING.md che dice ai lettori che Could not build dependency tree nasconde la causa reale e che devi rieseguire con -X e cercare Caused by. Prima di scriverlo, controlla dove il maven-enforcer-plugin (pinnato a 3.1.0) è configurato nei file di build per confermare il pin e vedere se una versione più recente propaga la causa (opzione 2). Fatto = il paragrafo finisce nella documentazione di build, oppure una nota spiega perché il pin deve restare; lascia fuori l'opzione 3 (eseguire dependency:tree in CI) a meno che non venga richiesto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
When dependency resolution fails for any reason, the enforcer's DependencyConvergence rule reports exactly this and nothing else:
[ERROR] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Could not build dependency tree Could not collect dependencies: org.vcell:vcell-rest:jar:1.0.0-SNAPSHOT
The underlying ArtifactResolutionException — which names the artifact and the repository that failed — is discarded. maven-shared-dependency-tree wraps it in a DependencyCollectorBuilderException, and the rule only propagates getMessage().
Why it cost real time
This is what run 33104159035 looked like, and it is actively misleading. The only visible scijava-related message anywhere in that log was a [WARNING] about net.minidev:json-smart/maven-metadata.xml returning 503. Being the only clue, it read like the cause — and the first attempt at a fix went after json-smart specifically.
It was not the cause, or at least not the whole one. Running the same build with -X produced the real chain:
Caused by: DependencyCollectionException: Failed to collect dependencies at
io.quarkus:quarkus-agroal:jar:3.5.2
-> io.quarkus:quarkus-narayana-jta:jar:3.5.2
-> org.jboss.narayana.jts:narayana-jts-integration:jar:7.0.0.Final
-> org.jboss.narayana.jts:idlj-idl-openjdk:jar:7.0.0.Final
Caused by: ArtifactResolutionException: The following artifacts could not be resolved:
org.jboss.narayana.jts:idlj-idl-openjdk:pom:7.0.0.Final (absent):
Could not transfer artifact ... from/to scijava.public: status code: 503
A different artifact entirely, on a dependency path nobody would have guessed from the log. Both were symptoms of the same thing (scijava answering 503 where every other repository answers 404), but the message pointed at the wrong one.
The failure mode generalises: the rule reports the shape of the problem ("could not build the tree") while withholding the one fact needed to act on it (which artifact, which repository). It also fires only on the module that happens to have the rule bound, so the log reads as "vcell-rest is broken" when the real condition is repository-wide.
What to do about it
Ordered by cost:
- Document it. A line in
CLAUDE.md/docs/BUILDING.md: if you seeCould not build dependency tree, re-run with-Xand grep forCaused by— the enforcer has hidden the real error. This is the cheap 90%. - Check whether a newer enforcer helps. We pin
maven-enforcer-plugin:3.1.0; later versions may propagate the cause. Worth a look before building anything. - Surface the cause ourselves, if neither of the above is enough — e.g. run
dependency:treeahead ofenforcein CI so a resolution failure reports itself properly before the enforcer gets to obscure it.
Context
Found while diagnosing #2037. Not urgent — nothing is broken by this — but it is the second time an enforcer message has sent a diagnosis in the wrong direction, and the fix in (1) costs one paragraph.
🤖 Generated with Claude Code
- Lingua principale
- Java
- Stelle
- 140
- Fork
- 35
- Merge medio
- 22h 6m
- PR unite (30g)
- 14
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di virtualcell/vcell
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
virtualcell/vcell#2193 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Accessibility Requirement Java-based User Interface
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
virtualcell/vcell#2138 ·
I maintainer di solito rispondono entro 1 giorno
-
Accessibility Requirement Java-based
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
virtualcell/vcell#2137 ·
I maintainer di solito rispondono entro 1 giorno
-
Accessibility Requirement User Interface
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
virtualcell/vcell#2135 ·
I maintainer di solito rispondono entro 1 giorno
-
Accessibility Requirement Java-based User Interface
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
virtualcell/vcell#2134 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di virtualcell/vcell
Issue simili
-
Document and enforce pull request review guidelinesForse già presa @dashorst l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
hermes-queue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
I maintainer di solito rispondono entro 1 giorno
-
Retry-After parser accepts invalid delay-seconds valuesForse già presa @Dhruvraj-Rana l’ha presa oggi. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
open-telemetry/opentelemetry-java#9018 ·
I maintainer di solito rispondono entro 2 giorni
-
dropwizard-testing: DAOTest.inTransaction leaves the transaction open when an Error is thrownAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dropwizard/dropwizard#11410 ·
I maintainer di solito rispondono entro 1 giorno