Last active
August 15, 2016 11:34
-
-
Save salex89/6b2a0c3099de6e6360e8 to your computer and use it in GitHub Desktop.
Additional lines to Play's build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sources in (Compile, doc) := Seq.empty | |
publishArtifact in (Compile, packageDoc) := false | |
//Additional JPA configuration | |
PlayKeys.externalizeResources := false | |
mappings in Universal += file("conf/base.conf") -> "conf/base.conf" | |
mappings in Universal += file("conf/prod.conf") -> "conf/prod.conf" | |
///Use prod.conf as configuration | |
bashScriptExtraDefines += """if [ ! -f ${app_home}/../conf/prod.conf ]; then | |
echo "Configuration file: conf/prod.conf not found!" | |
exit 1 | |
fi | |
addJava "-Dconfig.file=${app_home}/../conf/prod.conf"""" | |
///Load external logger configuration when packaged. Originally uses the one from the JAR. | |
bashScriptExtraDefines += | |
"""if [ -f ${app_home}/../conf/logger.xml ]; then | |
echo "Alternative logger being used" | |
addJava "-Dlogger.file=${app_home}/../conf/logger.xml" | |
fi""" | |
///Different conf files for test and running | |
javaOptions in Test += "-Dconfig.file=conf/application.test.conf" | |
javaOptions in IntegrationTest += "-Dconfig.file=conf/application.test.conf" | |
//jacoco settings | |
jacoco.settings | |
jacoco.excludes in jacoco.Config := Seq("views*", "*Routes*", "controllers*routes*", "controllers*Reverse*", "controllers*javascript*", "controller*ref*") | |
parallelExecution in jacoco.Config := false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment