redhat-developer / redhat-developer/vscode-java

localRepository in vscode not working

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

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

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

説明

I defined in the .vscode/settings.json of the project

./.vscode/settings.json

{
"java.configuration.maven.userSettings": "${HOME}/.m2/settings-my.xml", 
"maven.executable.options": "-s ${HOME}/.m2/settings-my.xml"
}

settings-my.xml has a directory ${HOME}/mvn_repo defined in its localRepository.

However, the code hints in vscode's editor window keep showing that the classes present in the ${HOME}/mvn_repo directory cannot be found. It looks like the editor or the language server could not index the classes from the specified localRepository directory, what can I do?

Environment
  • Operating System: macos
  • JDK version: openjdk version "21.0.4" 2024-07-16 LTS
  • Visual Studio Code version: Version: 1.94.0 (Universal)
  • Java extension version: Extension Pack for Java v0.29.
Steps To Reproduce

${HOME}/.m2/settings-my.xml

<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
		  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
	<localRepository>${HOME}/mvn_repo</localRepository>
	<servers>
         ...
Current Result

image

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

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

はじめの一歩

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

調査の方向性

.vscode/settings.json と ${HOME}/.m2/settings-my.xml を使用し、記載されている macOS、JDK、VS Code、Java 拡張機能のバージョンで再現する。まず、Java language server が Maven 設定と localRepository をどのように使用するかを追跡する。${HOME}/mvn_repo 内のクラスがインデックス化され、VS Code のコードヒントで見つからないものとして報告されなくなれば完了。

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

評価

技術スタック
java, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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