Import Maven Projects with groupId + artifactId + version to avoid duplicate error on import
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- java, vscode
調査の方向性
Start by tracing the Maven project import flow in the vscode-java extension and how it detects duplicate groupId/artifactId values; the issue does not name files or tests. Check how import identity is formed and whether the existing maven.explorer.projectName setting participates. Done when the two sample projects with versions 1.0 and 2.0 can both be imported without duplicate errors.
索引モデルが issue の本文から書いたものです。
説明
The Problem
On importing Java projects we get errors like this:
23 Maven project(s) could not be imported due to duplicate groupId/artifactId. See the language server log for details.
We are using a multi-root workspace:
- Each root folder imports a Java multi-project project from a seperate git local repo.
- Each repo / folder is a set to a different release branch from the same git repo.
This means that each root folder contains substantially the same set of maven projects, with the same groupId(s) and artifactId(s), but with different version(s).
i.e. as indicated by the error, groupId + artifactId is duplicate / ambiguous,
but the combination groupId + artifactId + version is unique.
For our maven projects the property name is also unique.
Proposed Solution
It should be possible to configure which maven properties are used to import maven projects:
e.g. groupId + artifactId + version
or groupId + artifactId + name
Note the Eclipse IDE when properly configured supports our project structure. Eclipse is able make otherwise duplicate maven projects unique on import via the "Import Maven Projects / Advanced / Name Template" option.
Describe alternatives you've considered
We have seen the setting "maven.explorer.projectName": "${project.groupId}.${project.artifactId}-${project.version}", but that has no effect on project import.
How to Reproduce
The issue can be demonstrated with:
A trusted multi-root-workspace "foo" with two folders foo_one and foo_two imported:
workspace "foo"
├─foo_one
│ └── demo
│ └── pom.xml
└─foo_two
└── demo
└── pom.xml
foo_one is a maven project with this pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>foo.bar</groupId>
<artifactId>demo</artifactId>
<version>1.0</version>
<properties>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
</properties>
</project>
foo_two is a maven project with this pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>foo.bar</groupId>
<artifactId>demo</artifactId>
<version>2.0</version>
<properties>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
</properties>
</project>
The projects differ only in the version (1.0) vs (2.0)
My Setup
IBM Bob Version: 1.126.0+bob2.2.3
VSCode Version: 1.126.0
Bob Version: 2.2.3
Extension Pack for Java 0.31.2
Language Suppor for Java(TM) by RedHat pre-release 1.59.2026102008
Maven for Java 0.45.3
OS: Darwin arm64 27.0.0
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 550
- 平均マージ
- 4日 5時間
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
redhat-developer/vscode-java のほかの issue
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
redhat-developer/vscode-java#4550 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
redhat-developer/vscode-java#4537 ·
メンテナーはふだん 1 日以内に返信
-
bug need info
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
redhat-developer/vscode-java#4520 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
redhat-developer/vscode-java#4517 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
redhat-developer/vscode-java#4516 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
redhat-developer/vscode-java の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cloudscape-design/components#5184 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
JarX-Concepts/react-native-platform-components#130 ·
メンテナーはふだん 1 日以内に返信
-
fix(api): optimize-for-web /preview outer catches miss asDecoderOutOfMemory on V8 OOM and SIGKILLオープンarea: backend bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
snapotter-hq/SnapOtter#3773 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa ux-audit
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
linagora/twake-contacts-frontend#386 ·
メンテナーはふだん 1 日以内に返信
-
git: README should state plainly that without --repository every reachable repository is in scopeオープンdocumentation server-git v2
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
modelcontextprotocol/servers#5225 ·
メンテナーはふだん 1 日以内に返信