[2.0] Deploy application only compiled classes

240 views
Skip to first unread message

Marini

unread,
May 28, 2012, 2:26:52 PM5/28/12
to play-framework
Hello

I would like to know how to generate the deployment of an application
play framework 2.0.1
with only the compiled classes without source codes together. The
command "START" to the mode of
production work with the directory with source code plus the compiled
classes.
Its use production mode using only the compiled classes ?

Andrew Lau

unread,
May 28, 2012, 7:43:40 PM5/28/12
to play-fr...@googlegroups.com
Not sure if i'm understanding your question correctly, but running "play stage" should create a target folder that contains only the compiled classes and libraries needed to run the application in a production environment.

Leon Radley

unread,
May 29, 2012, 2:13:51 AM5/29/12
to play-fr...@googlegroups.com
play clean compile dist

creates a zip in the dist directory containing only the compiled app.

// Leon

Marini

unread,
May 29, 2012, 9:07:41 AM5/29/12
to play-framework
I did the command "play clean compile dist" and created the directory
dist zip file with the application. So that when I extract the
contents of the zip file to a directory and having to start such an
application with only the compiled classes does not work ....

Marini

unread,
May 29, 2012, 9:28:37 AM5/29/12
to play-framework
Hi Leon,

Firstly thanks for your reply!

The command works as expected, but a shell script file called 'start'
was generated.
How can I run the command below in Windows? I must to change some
parameter ?
exec java $* -cp "`dirname $0`/lib/*" play.core.server.NettyServer
`dirname $0`
===



On May 29, 3:13 am, Leon Radley <l...@radley.se> wrote:

Thiago Marini

unread,
May 30, 2012, 8:29:01 AM5/30/12
to play-fr...@googlegroups.com
Thanks for the reply, Andrew and Kevin

First I had already tried before to use the command "play stage" but the following error occurs:
C: \ workspace \ test> stage play
[info] Loading project definition from C: \ workspace \ test \ project
[info] Set current project to shit (build in file :/ C :/ workspace / test /)
[error] {file :/ C :/ workspace / test / test} / *: stage: java.io.IOException: Can not runprogram "chmod": CreateProcess error = 2, n  u The system can find the file specified
[error] Total time: 1 s, completed 30/05/2012 09:10:31

Second, it also already tried using the plugin sbtgoodies so that when I create a new project with the command "new play" The sbt.version = 0.11.2 and use the sbtgoodiessbt.version = 0.11.3 is needed.





On Wed, May 30, 2012 at 5:46 AM, Kevin Bosman <ke...@gosh.co.za> wrote:
> How can I run the command below in Windows?

See the dist-unzip command in the sbtgoodies plugin, which creates a
Windows start.bat for you.
https://github.com/typesafehub/play-plugins/tree/master/sbtgoodies

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


Kevin Bosman

unread,
May 30, 2012, 9:13:53 AM5/30/12
to play-fr...@googlegroups.com
> First I had already tried before to use the command "play stage" but the
> following error occurs:
> C: \ workspace \ test> stage play
> [info] Loading project definition from C: \ workspace \ test \ project
> [info] Set current project to shit (build in file :/ C :/ workspace / test
> /)
> [error] {file :/ C :/ workspace / test / test} / *:
> stage: java.io.IOException: Can not runprogram "chmod": CreateProcess error
> = 2, n ├ u The system can find the file specified
> [error] Total time: 1 s, completed 30/05/2012 09:10:31
>
> Second, it also already tried using the plugin sbtgoodies so that when I
> create a new project with the command "new play"
> The sbt.version = 0.11.2 and use
> the sbtgoodiessbt.version = 0.11.3 is needed.

Sounds like you're running an older version of Play. Upgrade to Play
2.0.1 (or trunk). Also remember to update the sbt.version setting in
your project's project/build.properties file to 0.11.3

Also, for reference, please see comments here regarding potential
workarounds for stage on Windows:
https://play.lighthouseapp.com/projects/82401/tickets/252

Kevin Bosman

unread,
May 30, 2012, 9:51:42 AM5/30/12
to play-fr...@googlegroups.com
> Upgrade to Play 2.0.1 (or trunk). Also remember to update the sbt.version setting in
> your project's project/build.properties file to 0.11.3

Oops, sorry. Play 2.0.1 still uses sbt 0.11.2
You're going to have to either build from source or wait for 2.0.2 or
2.1, or build sbtgoodies from source and change the sbt.version
setting in sbtgoodies back to 0.11.2

Thiago Marini

unread,
May 30, 2012, 10:47:16 AM5/30/12
to play-fr...@googlegroups.com
the links
http://repo.typesafe.com/typesafe/releases/play/sbt-plugin/scala_2.9.1/sbt_0.11.3/2.0.1/jars/ 
and
http://repo.typesafe.com/typesafe/simple/ivy-releases/com.typesafe/play-plugins-sbtgoodies/scala_2.9.1/sbt_0.11.3/0.1/jars/ 

I downloaded the jars and added the project in buildpath. When I use the command "unzip-dist" generates the following error:

[error] {file :/ C :/ lala / lala} / *: dist-unzip: java.lang.UnsatisfiedLinkError: Unabl
and to load library 'c': Could not find the specified module. 




Kevin Bosman

unread,
May 30, 2012, 11:17:50 AM5/30/12
to play-fr...@googlegroups.com
If you follow the instructions on the sbtgoodies home page, you should
actually be ok using sbt-0.11.2.
https://github.com/typesafehub/play-plugins/tree/master/sbtgoodies

You should not need sbt-0.11.3 at all, because there is actually a
0.11.2 version there too.
http://repo.typesafe.com/typesafe/simple/ivy-releases/com.typesafe/play-plugins-sbtgoodies/scala_2.9.1/sbt_0.11.2/0.1/jars/
Reply all
Reply to author
Forward
0 new messages