Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jmh.jvmArgs doesn't seem to work correctly #200

Open
fcurts opened this issue Jul 15, 2021 · 1 comment
Open

jmh.jvmArgs doesn't seem to work correctly #200

fcurts opened this issue Jul 15, 2021 · 1 comment

Comments

@fcurts
Copy link

fcurts commented Jul 15, 2021

Plugin version 0.6.5, Gradle 7.0.2, macOS 11.4, JDK 11.

I'm trying to set multiple JVM args in build.gradle.kts. I'm not totally sure what the correct syntax is, but I've tried:

jmh {
  jvmArgs.set(listOf(   // also tried jvmArgsAppend, also tried .addAll
    "--module-path=${foo.asPath}",
    "--upgrade-module-path=${bar.asPath}"
  ))
}

The above doesn't work (fails with errors such as "can't find main class --upgrade-module-path").
However, the following works:

jmh {
  jvmArgs.set(listOf(
    "--module-path=${foo.asPath} --upgrade-module-path=${bar.asPath}"
  ))
}

This makes me think that setting multiple JVM args is broken.

@blacklion
Copy link

Also, there is problem with spaces in individual jvmArgs. Maybe, on macOS and Linux it is unusual, but on Windows arguments like -Djava.library.path or --moudle-path can contains spaces easily, and I can not find proper escaping for this. "\"arg with spaces\"" doesn't work and simple "arg with spaces" doesn't work either, though with different error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants