Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Lighthouse 453: Have the play script do a better check as to whether project is actually a play project #324

Closed
wants to merge 3 commits into from

2 participants

@benmccann
Collaborator

This is an alternative to pull request 323 (#323). Both are better than the current situation in my personal opinion. This actually checks whether the project is a play project. The current script does not do that and is not a great check since other sbt or even non-sbt projects may have an application.conf file. Also, as described in Lighthouse 453 you get into goofy situations right now where you need to place an empty application.conf, which seems rather silly.

@pk11 pk11 was assigned
@pk11 pk11 referenced this pull request from a commit
@pk11 pk11 [#324 #323] add a check against `project` folder in play scripts
This will allow the play scripts to be used with ad-hoc project layouts where the root PlayProject (and therefore `conf/application.conf`) is missing. Defining a root project is still recommended though.
f8e95ce
@pk11 pk11 closed this
@ornicar ornicar referenced this pull request from a commit
@ornicar ornicar Merge branch 'master' of git://github.com/playframework/Play20 into m…
…aster-tcp

* 'master' of git://github.com/playframework/Play20:
  [#324 #323] add a check against `project` folder in play scripts
  Fix for #472
  Ticket #476
9f8116f
@jroper jroper referenced this pull request from a commit
@jroper jroper [#324] Fixed bug in Router.queryString when handling empty strings fr…
…om QueryStringBindable
63a19ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +1 −1  play
  2. +3 −2 play.bat
View
2  play
@@ -13,7 +13,7 @@ else
JAVA=$JAVA_HOME/bin/java
fi
-if [ -f conf/application.conf -o -f conf/reference.conf ]; then
+if [ -f project/plugins.sbt ] && grep -q "addSbtPlugin(\"play\"" project/plugins.sbt ; then
if test "$1" = "clean-all"; then
rm -rf target
rm -rf tmp
View
5 play.bat
@@ -9,8 +9,9 @@ set fp=file:///!p: =%%20!
set buildScript="%~dp0framework\build.bat"
set additionalArgs=%*
-if exist "conf\application.conf" goto existingApplication
-if exist "conf\reference.conf" goto existingApplication
+if not exist "project\plugins.sbt" goto noApplication
+findstr addSbtPlugin(\"play\" project\plugins.sbt > NUL
+if %errorlevel%==0 goto existingApplication
:noApplication
java -Dsbt.ivy.home="%~dp0repository" -Dplay.home="%~dp0framework" -Dsbt.boot.properties="%fp%framework/sbt/play.boot.properties" -jar "%~dp0framework\sbt\sbt-launch.jar" %*
Something went wrong with that request. Please try again.