redhat-developer / redhat-developer/vscode-java
"missing required Java project" error when opening android maven projects
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Orginally reported by @Fr0stM0urne on https://github.com/microsoft/vscode-java-debug/issues/1329:
Trying to debug a java project (FlowDroid) using vscode. The project is built using maven. Getting this error when using "Run Debug" on the main function of a java file in the project:
Project 'soot-infoflow-summaries' is missing required Java project: 'soot'Tried cleaning java workspace and restarting java server but it did not fix the issue. These are the error logs of vscode java server:
!ENTRY org.eclipse.jdt.ls.core 4 0 2023-04-17 17:43:48.374 !MESSAGE Error occured while building workspace. Details: message: The project cannot be built until build path errors are resolved; code: 0; resource: ~/FlowDroid/soot-infoflow; message: Project 'soot-infoflow' is missing required Java project: 'soot'; code: 964; resource: ~/FlowDroid/soot-infoflow; message: The project was not built since it depends on soot-infoflow, which has build path errors; code: 0; resource: ~/FlowDroid/soot-infoflow-android; message: The project cannot be built until its prerequisite soot-infoflow-android is built. Cleaning and building all projects is recommended; code: 0; resource: ~/FlowDroid/soot-infoflow-cmd; message: The project was not built since it depends on soot-infoflow, which has build path errors; code: 0; resource: ~/FlowDroid/soot-infoflow-integration; message: Project 'soot-infoflow-summaries' is missing required Java project: 'soot'; code: 964; resource: ~/FlowDroid/soot-infoflow-summaries; message: The project cannot be built until build path errors are resolved; code: 0; resource: ~/FlowDroid/soot-infoflow-summaries;Steps To Reproduce
- Install sdkman using curl -s "https://get.sdkman.io" | bash
- Install maven using sdk install maven 3.8.7
- Clone FlowDroid using git clone https://github.com/secure-software-engineering/FlowDroid.git
- Set ANDROID_JARS environment variable. (See FlowDroid git repo for details)
- Install FlowDroid using mvn -DskipTests install. (See Flowdroid git repo for details)
- Open FlowDroid in VS code and go to soot-infoflow-cmd/src/soot/jimple/infoflow/cmd/MainClass.java.
Run/Debug the main functionEnvironment
- Operating System: Ubuntu 22.04.2 LTS x86_64
- JDK version: 1.8
- Visual Studio Code version: 1.77.3
- Java extension version: v0.25.10
- Java Debugger extension version: v0.49.1
Additional Information:
The missing project soot is located in ~/.m2/repository/org/soot-oss
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
報告されている FlowDroid の再現と、vscode-java language server のログにある Java プロジェクトのインポートおよびビルドパスのエラーから始めます。Maven ビルド後に soot-infoflow-cmd/src/soot/jimple/infoflow/cmd/MainClass.java を開き、その main 関数を実行またはデバッグして再現します。missing required Java project エラーが解消され、main 関数を実行またはデバッグできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, vscode
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100