This is my play2 project having maven nature:
pom.xml with relevant code:
<packaging>play2</packaging>
<plugin>
<groupId>com.google.code.play2-maven-plugin</groupId>
<artifactId>play2-maven-plugin</artifactId>
<version>${play2.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<!-- only if using database evolutions -->
<serverJvmArgs>-DapplyEvolutions.default=true</serverJvmArgs>
</configuration>
<executions>
<!-- only if there are assets in the project -->
<execution>
<id>default-play2-compile-assets</id>
<goals>
<goal>closure-compile</goal>
<goal>coffee-compile</goal>
<goal>less-compile</goal>
</goals>
</execution>
</executions>
</plugin>
I run the project with command:
mvn play2:run
But each time I do any change to the file, I have to do mvn compile play2:run
and then reload the page.
Isn't any feature to reload with current changes without doing any maven compile each time ?
NOTE:
I found that using mvn play2:run
, it always runs in PROD
mode. So this seems to be the problem. Don't know how to run it in DEV
mode.
Console:
[play] [info] play - Application started (Prod)
[play] [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0%0:9000
The only way I found is to use
activator
instead:And to run at specific port say
9543
use: