redhat-developer / redhat-developer/vscode-java

Maven Dependency is not Found

Offen
#545 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Maven
Vorherrschende Sprache
TypeScript
Sterne
2.3k
Forks
546
Ø Merge
20 Std. 1 Min.
Gemergte PRs (30 T.)
11

Beschreibung

I currently have the problem that the extension fails to build my project because

message: Failure to find org.owasp:dependency-check-maven:jar:3.2.1 in https://<company-repository> was cached in the local repository, resolution will not be reattempted until the update interval of maven has elapsed or updates are forced;code: 0

The artifact can be found in the repository. The project also builds successfully from the command line with mvn compile. I also saw it download the mentioned dependency and it did end up in my local cache in ~/.m2/repository but the extension still shows this error when triggering a full rebuild. Restarting VSCode did not help. It seems there is some remnant of the failed resolution in an extension specific place.

What I really don't like about this is that I occasionally get into these kinds of problems and I have no real way to deal with them. All I can do is cleaning the workspace directory as mentioned in the troubleshooting guide but that is not really a way to work. In that sense they are usually not reproducible as well. If I can provide you with more information I'd be more than happy to but unfortunately even setting the log to verbose does not add anything to what I pasted above; it's just formatted differently.

Environment
  • Operating System: OS X 10.13.4
  • JDK version: 1.8.0_171
  • Visual Studio Code version: 1.23.1
  • Java extension version: 0.25.0
Steps To Reproduce
  1. open project (I opened https://github.com/zalando/logbook)
Current Result
  • build fails with messages as shown above
Expected Result
  • build succeeds
Additional Informations
  • build succeeds from CLI

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den Fehler im verlinkten Logbook-Projekt mit den aufgeführten Versionen von VS Code, der Java extension, JDK und OS X zu reproduzieren, und vergleiche dabei den von der Extension ausgelösten vollständigen Neuaufbau mit mvn compile. Verfolge, wo die Extension die Maven-Abhängigkeitsauflösung durchführt, und überprüfe, ob das Löschen oder Aktualisieren ihres zwischengespeicherten Zustands den Build erfolgreich macht; als erledigt gilt es, wenn die Abhängigkeit aufgelöst wird und der vollständige Neuaufbau ohne Bereinigung des Workspace erfolgreich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
build-system, devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.