[1.2] play and -Dprecompiled=true

88 views
Skip to first unread message

Carl Perfect

unread,
Oct 3, 2013, 8:55:29 AM10/3/13
to pla...@googlegroups.com


Hello,

I am wondering what is the best way to deploy my app in production.

I read that precompiling my app before deploying to my server is making
things better (better start time, and the possibility to not include java
source files).

But for this to work, the app has to be started with

play start myApp -Dprecompiled=true


Which is fine when you run the app in standalone mode
(using play embedded netty webserver).

But what happens when you deploy your app as a war on
a J2EE container ?
Or when the deployment is made by automatic tools like
in the GAE case ?

So the question is : how to force my app to start with
-Dprecompiled=true ? 

Cheers,
Carl
Message has been deleted

zxsoft

unread,
Nov 27, 2013, 11:08:05 AM11/27/13
to pla...@googlegroups.com
There are source files for Play Framework 1.2.7 in your "play-1.2.7/framework/src" directory. So what I know is just modify "Play.java" line 165,change "    public static boolean usePrecompiled = false;" to "    public static boolean usePrecompiled = true;". Then compile the source code to play.jar, and replace the original play.jar on your server.

Carl Perfect

unread,
Dec 13, 2013, 11:13:52 AM12/13/13
to pla...@googlegroups.com


On Wednesday, November 27, 2013 5:08:05 PM UTC+1, zxsoft wrote:
There are source files for Play Framework 1.2.7 in your "play-1.2.7/framework/src"

Thanks for your feedback.
I guess this is a valid solution:)
Reply all
Reply to author
Forward
0 new messages