lightbend-labs / dbuild

Multi-project build tool, based on sbt.
https://lightbend-labs.github.io/dbuild
Other
83 stars 14 forks source link

Unhardcode default JVM args #141

Closed retronym closed 10 years ago

retronym commented 10 years ago

e.g. -XX:MaxPermSize=640M.

I'm trying to set up a Java 9 community build and this option now is unavailable. (In Java 8, it is a no op but allowed.)

retronym commented 10 years ago
object SbtRunner {
  // TODO - Configure these somewhere?
  val defaultJavaArgs = Seq(
    "-XX:+CMSClassUnloadingEnabled",
    "-XX:+DoEscapeAnalysis",
    "-Xms1536m",
    "-Xmx1536m",
    "-Xss2m",
    "-XX:MaxPermSize=640m",
    "-XX:ReservedCodeCacheSize=192m"
  )
gkossakowski commented 10 years ago

:+1:

I can't think of any workaround. @cunei, are those settings needed at all? Problems with permgen and code caches were addressed in sbt itself, right?

cunei commented 10 years ago

Those settings are useful, in the sense that they are defaults that allow stuff like the community build to work even if the user has no special java options defined. However, I agree that there should be a way to override them. I will add a further configuration option.