redhat-developer / redhat-developer/vscode-java

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

Ouverte
#3,080 12 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

upstream
Langage dominant
TypeScript
Étoiles
2.3k
Forks
546
Merge moyen
20 h 1 min
PR mergées (30 j)
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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire la structure imbriquée du workspace avec pom.xml décrite dans l’issue, puis examinez le VS Code Language Server Log et les VSCode Client Logs joints à la recherche des Stack Overflows signalés. C’est terminé lorsque le projet Java racine est reconnu avec son pom.xml et que la prise en charge existante des projets enfants continue de fonctionner dans Java extension 1.17.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java, vscode
Domaine
build-system, devtools
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.