redhat-developer / redhat-developer/vscode-java

Regular error "Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available"

Offen
#603 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

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

Beschreibung

(Originally reported in https://github.com/Microsoft/vscode-maven/issues/115 by @lashchev )

Describe the bug
Very often I get this error: Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available. To enable full functionality, install the lifecycle mapping and run Maven->Update Project Configuration.

The strangest thing is that it happens when there were no updates in pom.xml or any other project-level files, when I am just editing *.java files. Sometimes it happens at the same time when "Language Support for Java" extension has issues parsing the files and dumps some errors in the log.

Also, "Maven->Update Project Configuration" (and Shift+Alt+U) works for me only if I have pom.xml open and it's window is active (which is unexpected).

Even "Maven->Update Project Configuration" does not always work for me.

First I typically need to fix all Java compilation issues and then I need to re-open VSCode and let it sit for a few minutes - then "Update Project Configuration" will start working. Sometimes I need to restart VSCode 2 or 3 times to finally make it work though.

Since VSCode restart fixes the issue - the recommendation to "install the lifecycle mapping" is pretty misleading in the message.

To Reproduce
It happens randomly, often when opening Java project that has compilation issues, but can appear while editing already opened project.

Expected behavior
Error shouldn't happen and if the only fix is to "Update configuration" - then it should be attempted automatically.

Environments (please complete the following information as much as possible):

  • OS: Windows 10 v1803
  • VS Code version: 1.25.1
  • Extension version 0.10.0

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 lifecycle-mapping-Fehler in einem Java-Projekt mit pom.xml zu reproduzieren, insbesondere wenn Java-Dateien Kompilierungsprobleme haben, und überprüfe die Erweiterungsprotokolle. Überprüfe den Befehl Maven → Update Project Configuration und sein Verhalten, wenn pom.xml nicht die aktive Datei ist; als erledigt gilt die Aufgabe, wenn der irreführende Fehler nicht mehr auftritt oder Konfigurationsaktualisierungen zuverlässig versucht werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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