aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2014-12-15 22:27:07 +0100
committerManolo Carrasco <manolo@apache.org>2014-12-16 08:02:59 +0100
commit2b5ad316cfe4146042373d47ec70aeeb9687de53 (patch)
tree8344aab2b353969e260eb691edbbe40230584c8b
parent9d2e3cd3e58f57319e66f1a45d2abd38431b9a52 (diff)
downloadgwtquery-2b5ad316cfe4146042373d47ec70aeeb9687de53.tar.gz
gwtquery-2b5ad316cfe4146042373d47ec70aeeb9687de53.zip
Use surefire instead of gwt-maven so as we can run emma
-rw-r--r--gwtquery-core/pom.xml61
-rw-r--r--gwtquery-core/src/test/java/com/google/gwt/query/client/ajax/AjaxTestJre.java2
2 files changed, 29 insertions, 34 deletions
diff --git a/gwtquery-core/pom.xml b/gwtquery-core/pom.xml
index b8026dcf..dbc1b26f 100644
--- a/gwtquery-core/pom.xml
+++ b/gwtquery-core/pom.xml
@@ -6,25 +6,28 @@
<version>1.4.3-SNAPSHOT</version>
</parent>
+
+ <properties>
+ <!-- valid emulations are FF17 IE8 IE9 Chrome, but only FF17 works. -->
+ <gwt.test.htmlunit>FF17</gwt.test.htmlunit>
+ <gwt.test.default>-ea -out ${basedir}/target/gwt-junit -checkAssertions</gwt.test.default>
+ <gwt.args></gwt.args>
+ </properties>
<profiles>
<profile>
<!-- example:
$ mvn clean test -Ptest-prod
$ mvn clean test -Ptest-prod -Dgwt.test.htmlunit=FF17
- valid emulations are FF17 IE8 IE9 Chrome, but only FF17 works.
-->
<id>test-prod</id>
<properties>
- <productionMode>true</productionMode>
+ <gwt.args>-prod -runStyle HtmlUnit:${gwt.test.htmlunit}</gwt.args>
</properties>
</profile>
<profile>
<id>test-browser</id>
<properties>
- <draftCompile>true</draftCompile>
- <style>PRETTY</style>
- <productionMode>true</productionMode>
- <mode>manual</mode>
+ <gwt.args>-draftCompile -style PRETTY -prod -runStyle Manual:1</gwt.args>
</properties>
</profile>
</profiles>
@@ -79,43 +82,35 @@
</testResource>
</testResources>
<plugins>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<version>1.0-alpha-1</version>
</plugin>
- <!-- Skip normal test execution, we use gwt:test instead -->
+
+ <!-- We use standard surefire plugin to run gwt tests instead of
+ gwt-maven so as we can run coverage analysis with emma:emma -->
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.18</version>
<configuration>
- <skip>true</skip>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${basedir}/src/main/java</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/src/test/java</additionalClasspathElement>
+ </additionalClasspathElements>
+ <systemPropertyVariables>
+ <java.awt.headless>true</java.awt.headless>
+ <gwt.args>${gwt.test.default} ${gwt.args}</gwt.args>
+ </systemPropertyVariables>
+ <forkMode>always</forkMode>
+ <includes>
+ <include>**/*SuiteTest.class</include>
+ </includes>
+ <useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <version>${gwtmaven}</version>
- <executions>
- <execution>
- <id>gwt-tests</id>
- <phase>test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <checkAssertions>true</checkAssertions>
- <draftCompile>true</draftCompile>
- <gwtVersion>${gwtversion}</gwtVersion>
- <productionMode>${productionMode}</productionMode>
- <timeOut>300</timeOut>
- <includes>**/GQueryGwtSuiteTest.java</includes>
- <style>${style}</style>
- <mode>${mode}</mode>
- </configuration>
- </execution>
- </executions>
- </plugin>
+
<!-- We include elemental json implementation for JVM so as people
using GQuery json builders and ajax in server side don't have
to include that dependency -->
diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/ajax/AjaxTestJre.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/ajax/AjaxTestJre.java
index d86c8bbc..64d7ce6e 100644
--- a/gwtquery-core/src/test/java/com/google/gwt/query/client/ajax/AjaxTestJre.java
+++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/ajax/AjaxTestJre.java
@@ -106,5 +106,5 @@ public class AjaxTestJre extends AjaxTests {
server.start();
return server;
}
+}
-} \ No newline at end of file