redhat-developer / redhat-developer/vscode-java
Regular error "Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available"
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
(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
Guida per i contributori
Apri 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.
Direzione di ricerca
Inizia riproducendo l’errore di lifecycle-mapping in un progetto Java con pom.xml, soprattutto quando i file Java presentano problemi di compilazione, e ispeziona i log dell’estensione. Verifica il comando Maven → Update Project Configuration e il suo comportamento quando pom.xml non è il file attivo; il lavoro è concluso quando l’errore fuorviante non si verifica più oppure gli aggiornamenti della configurazione vengono tentati in modo affidabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript, vscode
- Ambito
- build-system, developer-experience
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100