tangrammer / play2-maven-plugin

Automatically exported from code.google.com/p/play2-maven-plugin
0 stars 1 forks source link

Play only starts in Prod mode when using the play2:run goal #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[play] [info] play - Application started (Prod)
[play] [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0%0:9000

Everything seems to be working well except for being able to run the 
application in Dev mode. Is this possible without the Play SBT plugin?

Original issue reported on code.google.com by a...@enclarify.com on 8 Oct 2013 at 8:57

GoogleCodeExporter commented 9 years ago
Currently "run" and "start" goals are ported from my plugin for Play! 1.x.

In Play! 2.x this functionality works a little bit differently. I did it this 
way, because it was simple.

I don't know yet, how reloading functionality works in Play! 2.x. I will have 
to learn it. There is non trivial code in Play SBT plugin I will have to learn 
and rewrite to Java.

Original comment by gslowiko...@gmail.com on 9 Oct 2013 at 12:47

GoogleCodeExporter commented 9 years ago
This would be an awesome feature, not having automatic reload of templates like 
with play:debug is killing me a bit atm. Vote +1

Original comment by al...@cakesolutions.net on 6 Nov 2013 at 2:20

GoogleCodeExporter commented 9 years ago
I'm aware of this.

Original comment by gslowiko...@gmail.com on 6 Nov 2013 at 9:59

GoogleCodeExporter commented 9 years ago
This would be awesome! Any way this can be circumvented? We really need some 
way of dev mode in my current project....

Original comment by matej.ko...@gmail.com on 3 Apr 2014 at 11:07

GoogleCodeExporter commented 9 years ago
Unfortunately we now just use the plugin for the build system and fall back to 
regular "play run" for development mode. It would be great to only use the 
plugin. Can you point us to some code where this happens? Thanks. Vote +1.

Original comment by lramo...@gmail.com on 30 Apr 2014 at 2:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Can this plugin support play2:debug? It would be awesome feature to support 
play2:debug command.

Original comment by dong...@gmail.com on 18 Aug 2014 at 6:59

GoogleCodeExporter commented 9 years ago
1. I'm sorry, but implementing hot-reloading is not trivial and I have not 
enough free time to start working on this functionality. I don't want to start 
working on functionality I know I will not finish in predictable time frame.

2. What do you mean by "play:debug"? Functionality similar to "play debug run" 
in Play 2.2.x and "activator -jvm-debug 9999 run" in Play 2.3.x?
Does it only add jvm options for remote debugging? If so, you can set 
"serverJvmArgs" configuration property 
(https://play2-maven-plugin.googlecode.com/svn/mavensite/1.0.0-alpha7/play2-mave
n-plugin/run-mojo.html#serverJvmArgs) used by "run" and "start" mojos.

Setting it to something like "-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999" would be what 
you need (for example you can do it in "debug" profile):

    <profiles>
        <profile>
            <id>debug</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.google.code.play2-maven-plugin</groupId>
                        <artifactId>play2-maven-plugin</artifactId>
                        <configuration>
                            <serverJvmArgs>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999</serverJvmArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

Running Play! without debug - "mvn play2:run", with debug - "mvn play2:run 
-Pdebug".

Original comment by gslowiko...@gmail.com on 19 Aug 2014 at 5:48

GoogleCodeExporter commented 9 years ago
Thank you. That is what I needed. I figure it out yerterday and my solution
is similar : mvn play2:run -Dplay2.serverJvmArgs="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999"

Original comment by dong...@gmail.com on 19 Aug 2014 at 6:00