redhat-developer / redhat-developer/vscode-java

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

Open
#603 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Maven
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the lifecycle-mapping error in a Java project with pom.xml, especially while Java files have compilation issues, and inspect the extension logs. Check the Maven → Update Project Configuration command and its behavior when pom.xml is not the active file; done means the misleading error no longer occurs or configuration updates are attempted reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.