mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 08:52:12 +00:00
feat(run): Add VM options to Java run configurations (#206)
Adds Application and Spring Boot run configuration types with main class, VM options, program arguments, classpath and active profiles. Maven passes them through spring-boot.run.jvmArguments / profiles / argLine; Gradle through an init script. Fixes #187 Claude-Session: https://claude.ai/code/session_01Dq6jQQn8ZhRfkkyj3PRutA
This commit is contained in:
1 parent
ed7b0f88ef
commit
8ebeaa2663
15 files changed
+690
-8
No files matched your search
@@ -75,6 +75,23 @@ describe("Java debugging (java-debug through jdtls)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("passes the configuration's VM options to java-debug's vmArgs, before the main class", async () => {
|
||||
const args = [
|
||||
"-Ddemo.flag=on",
|
||||
"--add-opens",
|
||||
"java.base/java.lang=ALL-UNNAMED",
|
||||
"-Dname=a b",
|
||||
"-cp",
|
||||
"${classpath}",
|
||||
];
|
||||
const l = await javaLaunchConfig({ ...app, args: [...args, "a.App", "--spring.profiles.active=dev"] }, "/p");
|
||||
expect(JSON.parse(l.extraJson!)).toMatchObject({
|
||||
mainClass: "a.App",
|
||||
vmArgs: '-Ddemo.flag=on --add-opens java.base/java.lang=ALL-UNNAMED "-Dname=a b"',
|
||||
args: "--spring.profiles.active=dev",
|
||||
});
|
||||
});
|
||||
|
||||
it("lets java-debug shorten a classpath too long for the OS, as Run does", async () => {
|
||||
for (const how of ["jarmanifest", "argfile"]) {
|
||||
shortenCommandLine = how;
|
||||
|
||||
Reference in new issue
Block a user