redhat-developer / redhat-developer/vscode-java
maven extension support
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
I'm experimenting with using this polyglot maven extension to convert my projects' pom.xml files into other languages (in particular pom.yaml or pom.kts). Maven seems to work just fine with it, but java language server doesn't seem to pick up either the maven extension or the non-xml pom file.
Is there some way to configure the language server to recognize the maven extension and/or the non-xml pom file, or is there a change that needs to be made to the vscode extension itself to pick things up?
Environment
- Operating System: Mac 14.5
- JDK version: 17
- Visual Studio Code version: VSCodium 1.88.1
- Java extension version: 1.32.0
Steps To Reproduce
- clone https://github.com/takari/polyglot-maven-examples and open that in vscode with the java language server
- add another dependency, e.g. guava collections compile("com.google.guava:guava:31.1-jre") to kotlin/pom.kts > dependencies
- open Main.kts, add a line for "import com.google.common.collect.Lists" and in the main function call "Lists.newArrayList(1, 2, 3)"
- Run "mvn install" to compile the project
Current Result
because of the extension registered in the project's .mvn/extensions.xml, maven handles the alternative pom file just fine; however, vscode shows red underlines on the google import with an error about an unresolved reference; implying that the language server failed to recognize the added dependency on guava.
Expected Result
the language server recognizes the maven extension and uses it to parse and process the non-xml pom file. (completion support within the pom file a bonus)
Additional Informations
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
takari/polyglot-maven-examples で問題を再現し、.mvn/extensions.xml、kotlin/pom.kts、Main.kts に焦点を当てます。まず、Java language server が Maven プロジェクトをインポートし、XML ではない POM ファイルをどのように処理するかを追跡します。追加した Guava 依存関係が Main.kts で解決され、代替 POM が処理されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- build-system, devtools, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100