feat(build): add Maven thread count setting (#1800)

Signed-off-by: Inf1mum <[email protected]>
Цей коміт міститься в:
Vadim Lazuk authored and GitHub committed 2026-11-07 02:49:38 +08:00
1 джерело ebac061a1f
коміт b5974ab3ac
10 files changed
+183 -9

No files matched your search

+3 -1
Переглянути файл
@@ -26,7 +26,7 @@ describe("languages settings", () => {
jdtlsVmArgs: " -Xmx2g ",
jdk: 21,
jdtlsJdk: " /opt/jdk-25 ",
maven: { home: " /opt/maven ", daemon: "yes", mvndHome: " /opt/mvnd " },
maven: { home: " /opt/maven ", daemon: "yes", mvndHome: " /opt/mvnd ", threads: " 2C " },
},
});
expect(v.python).toEqual({ interpreter: "/usr/bin/python3", activateVirtualenv: true });
@@ -45,8 +45,10 @@ describe("languages settings", () => {
linkedProjects: [],
daemon: false,
mvndHome: "/opt/mvnd",
threads: "2C",
});
expect(validateSettings({}).languages).toEqual(DEFAULT_LANGUAGES);
expect(validateLanguages({ java: { maven: { threads: 4 } } }).java.maven.threads).toBe("");
});
it("keeps the Ruby interpreter through settings normalization and defaults to Auto", () => {
+19
Переглянути файл
@@ -477,6 +477,8 @@ export function GradlePage() {
export function MavenPage() {
const [daemon, setDaemon] = useSetting<boolean>("languages.java.maven.daemon");
const [threads, setThreads] = useSetting<string>("languages.java.maven.threads");
const id = useId();
return (
<div className={styles.page}>
<Section>
@@ -506,6 +508,23 @@ export function MavenPage() {
title="Select Local Repository"
hint="Passed as -Dmaven.repo.local."
/>
<Row
label="Thread count"
htmlFor={id}
hint="Passed as -T to Maven builds and run configurations: a thread count (4) or a core multiplier (2C, 2.5C) for parallel builds of multi-module projects. Empty runs Maven serially."
>
<span className={styles.pathRow}>
<Input
id={id}
mono
className={styles.pathInput}
value={threads}
placeholder="4, 2C"
onChange={(e) => setThreads(e.target.value.trim())}
aria-label="Thread count"
/>
</span>
</Row>
<Toggle
label="Use Maven Daemon (mvnd)"
checked={daemon}
+14 -1
Переглянути файл
@@ -144,7 +144,20 @@ export const EXECUTION_PAGES: PageSpec[] = [
group: BUILD_GROUP,
// IntelliJ IDEA: Build Tools › Maven, before Console / Debugger.
order: 359,
keywords: ["maven home", "mvn", "mvnw", "wrapper", "settings.xml", "user settings", "local repository", "m2"],
keywords: [
"maven home",
"mvn",
"mvnw",
"wrapper",
"settings.xml",
"user settings",
"local repository",
"m2",
"thread count",
"threads",
"-T",
"parallel",
],
component: MavenPage,
},
{