redhat-developer / redhat-developer/vscode-java

Java Maven Projects containing other nested Java Maven Projects not being recognized as Java Projects in 1.17

Open
#3,080 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

upstream
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Description

I admit that our project structure is not standard, but it's how we've been working for many years. We have a java (war) project that contains many Java (jar) projects in a folder structure similar to the one below.

**root_java_project**
|-> pom.xml
|-> src
|-> **child_java_project_1**
      |-> pom.xml
      |-> src
|-> **child_java_project_2**
      |-> pom.xml
      |-> src
...
|-> child_java_project_n
      |-> pom.xml
      |-> src

Several on our team recently experienced this issue when we updated to Java Extension Pack to 1.17. It immediately ceased recognizing our ROOT project as being a legit java project. The child projects were fine. (note that the project hierarchy is only one level deep -- a root and it's children). Reverting back to 1.16 or earlier made the issue disappear.

Environment
  • Operating System: Mac OS Ventura 13.13.1
  • JDK version: 17 and 16
  • Visual Studio Code version: 1.77.3
  • Java extension version: 1.17
Steps To Reproduce
  1. Assume folder structure as shown above.
  2. Open an empty workspace
  3. click Add folder to workspace and select child_java_project_1
  4. project is added to workspace and it's recognized as a java project
  5. repeat for child_java_project_2 ... child_java_project_n
  6. all projects are recognized as java projects with full linking, debugging, etc, support.
  7. finally repeat for root_java_project. It shows up in the "Java Projects" but it doesn't recognize that there's a pom in that root folder and consequently doesn't capture it as being a legit java project.
  8. Revert back to 1.15 or 1.16 and it works.

I do see quite of few Stack Overflows in the Language Server Log file. Not sure if that's the cause.

VS Code Language Server Log file.txt
VSCode Client Logs.txt

Current Result
Expected Result
Additional Informations

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 nested pom.xml workspace structure described in the issue, then inspect the attached VS Code Language Server Log and VSCode Client Logs for the reported Stack Overflows. Done means the root Java project is recognized with its pom.xml and the existing child-project support still works in Java extension 1.17.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.