redhat-developer / redhat-developer/vscode-java

Maven project inside another maven project not recognized

オープン
#3,240 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

potential-duplicate
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

When you have a maven project inside another maven project, only the top level project is properly recognized in the java projects view. However, if the sub-project is opened in another window by itself, the project is properly recognized

Environment
  • Operating System: Fedora 38
  • JDK version: openjdk 17.0.7
  • Visual Studio Code version: 1.81.0
  • Java extension version: 1.21.0
Steps To Reproduce
  1. Create new maven project (using maven for java extension)
  2. Create new maven project inside project from step 1. Example structure below:
test_project/
    src/
        main/
             java/
                TestMain.java
    pom.xml
    sub_project/
        src/
            main/
                java/
                    SubMain.java
        pom.xml
  1. Import Java Projects into Workspace
  2. Observe only test_project is properly imported in this case
  3. Open a new window: File > New Window
  4. Inside new window, open sub_project: File > Open Folder > select sub_project
  5. Observe sub_project can now be recognized as a java project
Current Result

Only top level projects are recognized, projects inside projects are not. This leads to the warning SubMain.java is not on the classpath of project test_project, only syntax errors are reported and many features of the extension not working

Expected Result

Projects are recursively detected by their pom files and the extension features can be used for projects inside projects

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

issueで説明されているネストされたpom.xmlファイルを使ってworkspaceを再現し、その後、Import Java Projectsとsub_project単体を開いた場合を比較します。まず、プロジェクトインポートのエントリーポイントと、extensionがpom.xmlファイルをどのように検出するかを追跡します。ネストされたプロジェクトが再帰的に認識され、SubMain.javaがclasspathの外にあると報告しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
build-system, devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。