Closed GoogleCodeExporter closed 9 years ago
Hi
Two side notes first:
1.
In your case "runEnv" is not an environment variable. Environment variable are
for example "PATH" or "JAVA_HOME". "runEnv" is a system property.
2.
Surefire is used for unit and functional tests. For Selenium tests you have to
configure Failsafe plugin.
Arguments passed to Play! server starting commands (including starting Play!
for Selenium tests) are not supported yet.
I will implement it.
When running unit and functional tests with Surefire, Play! server is not being
started, only core Play engine (Play.java class) is initialized. Passing system
property should work, but you should configure it like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<property>
<name>runEnv</name>
<value>local</value>
</property>
</systemProperties>
</configuration>
</plugin>
or better:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<runEnv>local</runEnv>
</systemPropertyVariables>
</configuration>
</plugin>
because <systemProperties> parameter is deprecated. Read more here:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties
.html
Original comment by gslowiko...@gmail.com
on 21 May 2012 at 1:03
svn rev.9285 - added "serverJvmArgs" configuration property used in: "run",
"test", "start", "start-server" and "precompile" (only if "precompileFork" =
true) mojos.
Original comment by gslowiko...@gmail.com
on 22 May 2012 at 12:58
svn rev.9286 - in "precompile" and Play! server starting mojos WITHOUT forking
system properties are extracted from "serverJvmArgs" configuration parameter
and passed to Ant task.
Original comment by gslowiko...@gmail.com
on 22 May 2012 at 12:58
Functionality implemented, snapshot deployed.
You should add plugin configuration:
<plugin>
<groupId>com.google.code.maven-play-plugin</groupId>
<artifactId>play-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverJvmArgs>-DrunEnv=local</serverJvmArgs>
</configuration>
</plugin>
or specify it in Maven invocation, for example:
mvn play:start -Dplay.serverJvmArgs="-DrunEnv=local"
It works for: "run", "test", "start" and "precompile" mojos.
Original comment by gslowiko...@gmail.com
on 22 May 2012 at 1:17
Hi,
Thanks for fixing this, i will try it out soon.
Original comment by share.re...@gmail.com
on 24 May 2012 at 11:10
Hi Grzegorz Słowikowski
Will you be creating a new snapshot version so that i can try this fix, i
noticed that the lastest snapshot build is still
1.0.0-beta2-SNAPSHOT/<http://maven-play-plugin.googlecode.com/svn/mavenrepo/snap
shots/com/google/code/maven-play-plugin/maven-parent/1.0.0-beta2-SNAPSHOT/>
Original comment by share.re...@gmail.com
on 25 May 2012 at 12:45
New snapshot has been created, you don't have to change anything, your local
version will be upgraded, this it the way snapshots work in Maven.
Look here:
https://maven-play-plugin.googlecode.com/svn/mavenrepo/snapshots/com/google/code
/maven-play-plugin/play-maven-plugin/1.0.0-beta2-SNAPSHOT/
There are many versions of 1.0.0-beta2-SNAPSHOT, and Maven is responsible for
downloading the most recent for you.
Original comment by gslowiko...@gmail.com
on 25 May 2012 at 7:51
Hi Grzegorz,
That worked well, thank you for fixing it so fast. You must spend a lot of
time of this project especially since you are doing it all in your spare
time.
Let me know when the play PDF module is ready i would be have happy to use
it, i wish i knew what was involved in mavenizing this project and i would
help you out.
Original comment by share.re...@gmail.com
on 26 May 2012 at 12:40
Original issue reported on code.google.com by
share.re...@gmail.com
on 19 May 2012 at 10:00