[MacPorts] #39793: Allow custom Java options to launch sbt

MacPorts noreply at macports.org
Sat Jul 27 12:34:18 PDT 2013


#39793: Allow custom Java options to launch sbt
------------------------------+----------------------
  Reporter:  luc_j_bourhis@…  |      Owner:  blair@…
      Type:  enhancement      |     Status:  new
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:
Resolution:                   |   Keywords:  haspatch
      Port:  sbt              |
------------------------------+----------------------

Comment (by blair@…):

 Here's my new proposed patch which doesn't assume that ~/.sbtconfig sets
 SBT_JAVA_OPTS.  Let me know if this works for you.

 {{{

 Index: sbt.sh
 ===================================================================
 --- sbt.sh      (revision 108610)
 +++ sbt.sh      (working copy)
 @@ -17,9 +17,15 @@
  # Is the location of the SBT launcher JAR file.
  LAUNCHJAR="__SBT_LAUNCHER_PATH__"

 -# Ensure enough heap space is created for sbt.  These settings are the
 -# default settings from Typesafe's sbt wrapper.
 +# Customization: this may define a variable SBT_JAVA_OPTS
 +SBTCONF=~/.sbtconfig
 +if [ -f "$SBTCONF" ]; then
 +    . $SBTCONF
 +    JAVA_OPTS="$SBT_JAVA_OPTS"
 +fi
  if [ -z "$JAVA_OPTS" ]; then
 +    # Ensure enough heap space is created for sbt.  These settings are
 +    # the default settings from Typesafe's sbt wrapper.
      JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -Xms1536m -Xmx1536m
 -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=192m -Dfile.encoding=UTF8"
  fi
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/39793#comment:4>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list