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

Specifying javaHome per configuration #212

Open
AvaPL opened this issue Jan 23, 2022 · 0 comments
Open

Specifying javaHome per configuration #212

AvaPL opened this issue Jan 23, 2022 · 0 comments

Comments

@AvaPL
Copy link

AvaPL commented Jan 23, 2022

Is it possible to specify javaHome per configuration? Here is a fragment of my build.sbt:

import pl.project13.scala.sbt.JmhPlugin.JmhKeys.Jmh

lazy val Corretto11 = config("corretto11") extend Jmh
lazy val Zulu11 = config("zulu11") extend Jmh

lazy val myProject = project
  .enablePlugins(JmhPlugin)
  .configs(Corretto11, Zulu11)
  .settings(
    scalaVersion := "2.13.7",
    fork := true,
    Corretto11 / javaHome := Some(file("path/to/corretto-11.0.14")),
    Zulu11 / javaHome := Some(file("path/to/azul-11.0.14"))
  )

Corretto11 / javaHome in sbt console returns the correct path but when I use Corretto11 / run it runs benchmarks with a fork of JVM used to run sbt shell instead of the one specified in javaHome.

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

1 participant