alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Play Framework/Scala example source code file (build)

This example Play Framework source code file (build) is included in my "Source Code Warehouse" project. The intent of this project is to help you more easily find Play Framework (and Scala) source code examples by using tags.

All credit for the original source code belongs to Play Framework; I'm just trying to make examples easier to find. (For my Scala work, see my Scala examples and tutorials.)

Play Framework tags/keywords

debug_param, java, java_opts, java_version, jpda_port, jpda_port:-9999, permgen_param, play_version, xms512m, xrunjdwp:transport=dt_socket,server=y,suspend=n,address

The build Play Framework example source code

#! /bin/bash

# Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>

if [ -z "${PLAY_VERSION}" ]; then
  PLAY_VERSION="2.4-SNAPSHOT"
fi

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 [[ "$JAVA_VERSION" > "1.8" ]]; then
  PERMGEN_PARAM=""
else
  PERMGEN_PARAM="-XX:MaxPermSize=512M"
fi

DIR=`dirname "$0"`
"$JAVA" ${DEBUG_PARAM} -Xms512M -Xmx1536M -Xss2M -XX:ReservedCodeCacheSize=192m -XX:+CMSClassUnloadingEnabled ${PERMGEN_PARAM} ${JAVA_OPTS} -Dfile.encoding=UTF-8 -Dplay.version="${PLAY_VERSION}" ${PLAY_OPTS} -jar "$DIR/sbt/sbt-launch.jar" "$@"

Other Play Framework source code examples

Here is a short list of links related to this Play Framework build source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.