From 09f448b70f1418852e474080797c32ca847d2d0e Mon Sep 17 00:00:00 2001 From: Meher Srujana Matcha Date: Fri, 23 Oct 2026 09:18:49 +0100 Subject: [PATCH 1/2] Add setting for Maven project name template (#4552) --- README.md | 1 + package.json | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 2b2728b2f..f28d10358 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,7 @@ The following settings are supported: * `java.compile.nullAnalysis.nullable`: Specify the Nullable annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies. This setting will be ignored if `java.compile.nullAnalysis.mode` is set to `disabled`. * `java.compile.nullAnalysis.nonnullbydefault`: Specify the NonNullByDefault annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies. This setting will be ignored if `java.compile.nullAnalysis.mode` is set to `disabled`. * `java.import.maven.offline.enabled`: Enable/disable the Maven offline mode. Defaults to `false`. +* `java.import.maven.projectNameTemplate`: Specifies the template used to name imported Maven projects, e.g. `[groupId]-[artifactId]-[version]`. Supported variables are `[groupId]`, `[artifactId]`, `[version]` and `[name]`. Already imported projects keep their name until the workspace is cleaned. * `java.codeAction.sortMembers.avoidVolatileChanges`: Reordering of fields, enum constants, and initializers can result in semantic and runtime changes due to different initialization and persistence order. This setting prevents this from occurring. Defaults to `true`. * `java.jdt.ls.protobufSupport.enabled`: Specify whether to automatically add Protobuf output source directories to the classpath. **Note:** Only works for Gradle `com.google.protobuf` plugin `0.8.4` or higher. Defaults to `true`. * `java.jdt.ls.aspectjSupport.enabled`: Specify whether to enable `io.freefair.aspectj` plugin in Gradle projects. Defaults to `false`. diff --git a/package.json b/package.json index eb6b1361f..bf317dc32 100644 --- a/package.json +++ b/package.json @@ -700,6 +700,13 @@ "scope": "window", "order": 20 }, + "java.import.maven.projectNameTemplate": { + "type": "string", + "default": null, + "markdownDescription": "Specifies the template used to name imported Maven projects, e.g. `[groupId]-[artifactId]-[version]`. Supported variables are `[groupId]`, `[artifactId]`, `[version]` and `[name]`. Already imported projects keep their name until the workspace is cleaned.", + "scope": "window", + "order": 25 + }, "java.import.maven.disableTestClasspathFlag": { "type": "boolean", "default": false, From ebe5d98cc3bc3b8b8c97f147022a7d80d0916211 Mon Sep 17 00:00:00 2001 From: Meher Srujana Matcha Date: Fri, 23 Oct 2026 16:02:28 +0100 Subject: [PATCH 2/2] Mention same groupId/artifactId use case in description --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f28d10358..01476fc07 100644 --- a/README.md +++ b/README.md @@ -239,7 +239,7 @@ The following settings are supported: * `java.compile.nullAnalysis.nullable`: Specify the Nullable annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies. This setting will be ignored if `java.compile.nullAnalysis.mode` is set to `disabled`. * `java.compile.nullAnalysis.nonnullbydefault`: Specify the NonNullByDefault annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies. This setting will be ignored if `java.compile.nullAnalysis.mode` is set to `disabled`. * `java.import.maven.offline.enabled`: Enable/disable the Maven offline mode. Defaults to `false`. -* `java.import.maven.projectNameTemplate`: Specifies the template used to name imported Maven projects, e.g. `[groupId]-[artifactId]-[version]`. Supported variables are `[groupId]`, `[artifactId]`, `[version]` and `[name]`. Already imported projects keep their name until the workspace is cleaned. +* `java.import.maven.projectNameTemplate`: Specifies the template used to name imported Maven projects, e.g. `[groupId]-[artifactId]-[version]`. This is helpful when importing projects with the same groupId and artifactId but a different version. Supported variables are `[groupId]`, `[artifactId]`, `[version]` and `[name]`. Already imported projects keep their name until the workspace is cleaned. * `java.codeAction.sortMembers.avoidVolatileChanges`: Reordering of fields, enum constants, and initializers can result in semantic and runtime changes due to different initialization and persistence order. This setting prevents this from occurring. Defaults to `true`. * `java.jdt.ls.protobufSupport.enabled`: Specify whether to automatically add Protobuf output source directories to the classpath. **Note:** Only works for Gradle `com.google.protobuf` plugin `0.8.4` or higher. Defaults to `true`. * `java.jdt.ls.aspectjSupport.enabled`: Specify whether to enable `io.freefair.aspectj` plugin in Gradle projects. Defaults to `false`. diff --git a/package.json b/package.json index bf317dc32..3651eecd5 100644 --- a/package.json +++ b/package.json @@ -703,7 +703,7 @@ "java.import.maven.projectNameTemplate": { "type": "string", "default": null, - "markdownDescription": "Specifies the template used to name imported Maven projects, e.g. `[groupId]-[artifactId]-[version]`. Supported variables are `[groupId]`, `[artifactId]`, `[version]` and `[name]`. Already imported projects keep their name until the workspace is cleaned.", + "markdownDescription": "Specifies the template used to name imported Maven projects, e.g. `[groupId]-[artifactId]-[version]`. This is helpful when importing projects with the same groupId and artifactId but a different version. Supported variables are `[groupId]`, `[artifactId]`, `[version]` and `[name]`. Already imported projects keep their name until the workspace is cleaned.", "scope": "window", "order": 25 },