redhat-developer / redhat-developer/vscode-java
Regular error "Lifecycle mapping "org.eclipse.m2e.jdt.JarLifecycleMapping" is not available"
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 546
- Merge moyen
- 20 h 1 min
- PR mergées (30 j)
- 11
Description
(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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par reproduire l’erreur de lifecycle-mapping dans un projet Java avec pom.xml, en particulier lorsque les fichiers Java présentent des problèmes de compilation, et examinez les journaux de l’extension. Vérifiez la commande Maven → Update Project Configuration et son comportement lorsque pom.xml n’est pas le fichier actif ; le travail est terminé lorsque l’erreur trompeuse ne se produit plus ou que les mises à jour de configuration sont tentées de manière fiable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, typescript, vscode
- Domaine
- build-system, developer-experience
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100