forked from playframework/playframework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·45 lines (36 loc) · 1.32 KB
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/bash
# Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
set -e
set -o pipefail
if [ -z "$JAVA_HOME" ]; then
JAVA="java"
else
JAVA="$JAVA_HOME/bin/java"
fi
if [ "$1" == "debug" ]; then
JPDA_PORT=${JPDA_PORT:-9999}
shift
fi
if [ -z "${JPDA_PORT}" ]; then
DEBUG_PARAM=""
else
DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi
JAVA_VERSION=$("$JAVA" -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [ -z "$SBT_SCALA_VERSION" ]; then
# This value should be kept the same as Play's value so that
# we only need to download a single version of Play when we
# compile Play during continuous integration.
SBT_SCALA_VERSION=2.10.5
fi
DIR=`dirname "$0"`
if [ -z "$FILTER_LOGGING" ]
then
"$JAVA" ${DEBUG_PARAM} -Xms512M -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=192m -XX:+CMSClassUnloadingEnabled \
${JAVA_OPTS} -Dfile.encoding=UTF-8 -Dsbt.scala.version=${SBT_SCALA_VERSION} -jar "$DIR/sbt/sbt-launch.jar" "$@"
else
# Not running in a terminal, filter resolving statements
"$JAVA" ${DEBUG_PARAM} -Xms512M -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=192m -XX:+CMSClassUnloadingEnabled \
${JAVA_OPTS} -Dfile.encoding=UTF-8 -Dsbt.scala.version=${SBT_SCALA_VERSION} -jar "$DIR/sbt/sbt-launch.jar" "$@" \
| grep --line-buffered -v 'Resolving \|Generating '
fi