scalatest / scalatest-maven-plugin

ScalaTest Maven Plugin
Apache License 2.0
34 stars 61 forks source link

Allow to specify JVM path #95

Closed sdruzkin closed 2 years ago

sdruzkin commented 2 years ago

This change adds a capability to explicitly specify the path to Java executable for the forked process. This option works similar to Surefire's <jvm> configuration field.

We have custom version of Spark which uses JNI. We have a custom wrapper around java executable that starts the actual java processes using ld.so and sets all LD_ environment variables. Unfortunately the existing way of setting a JVM path via JAVA_HOME added in #43 doesn't quite work for us, as well as it's not unified with the Surefire config.

cla-bot[bot] commented 2 years ago

Hi @sdruzkin, we require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please access https://www.artima.com/cla/choose-type to sign our Contributor License Agreement. Your effort is highly appreciated. Thank you.

artimasites commented 2 years ago

@cla-bot[bot] check

cla-bot[bot] commented 2 years ago

The cla-bot has been summoned, and re-checked this pull request!

cheeseng commented 2 years ago

@sdruzkin I was just about to submit a PR to add the @parameter in the javadoc, seems you added already. :)

@bvenners Fyi I tested this and it works.

Thanks.

sdruzkin commented 2 years ago

@bvenners Fyi I tested this and it works.

Apologies about missing unit tests. I tried to fit it into existing cases in PluginTest, but they only check the arguments passed to the CLI, not the executable. If needed I can try to expose some pieces of the CLI to make them more testable.

sdruzkin commented 2 years ago

Up! Can someone please take a look and merge it?