Martin Desruisseaux ha scritto:
> Jody Garnett a écrit :
>> What is the maven support for JUnit4 like?
> 
> I'm using it since a few months for seagis project and it work very well.
> 
> The only requirements are:
> 
> 1) Upgrate maven-surefire-plugin to 2.3 (we are still using 2.2).
> 2) Upgrate junit to 4 (I use 4.3.1).
> 
> However the upgrate to maven-surefire-plugin 2.3 may not be completly smooth.
> Last time we tried, we got test failures (probably related to classloaders) 
> and
> had the downgrate to surefire 2.2.
> 
> If we have a volunter for upgrating surefire to 2.3 and make sure that all 
> tests
> pass, then I think that switching to JUnit 4 would be painless.

Hum, I've just upgraded surefire to 2.4 and junit to 4.4 in my checkout.
I had to kill one class that ended with ...Test without being a real 
test (surefire complained it had no tests) and after that the build
went fine.

If someone else wants to try it out I've pasted the changes to the
main pom at the end of this message.

I still have to try if a legitimate junit4 test gets run, but so far so 
good.

Cheers
Andrea

Index: pom.xml
===================================================================
--- pom.xml     (revisione 28983)
+++ pom.xml     (copia locale)
@@ -732,7 +732,7 @@
        <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
-        <version>3.0.10</version>
+        <version>5.1.5</version>
        </dependency>
        <dependency>
          <groupId>hsqldb</groupId>
@@ -774,10 +774,16 @@
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
-        <version>3.8.1</version>
+        <version>4.4</version>
          <scope>test</scope>
        </dependency>
        <dependency>
+        <groupId>org.easymock</groupId>
+        <artifactId>easymock</artifactId>
+        <version>2.3</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
          <groupId>com.mockrunner</groupId>
          <artifactId>mockrunner</artifactId>
          <version>0.3.6</version>
@@ -888,7 +894,7 @@
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.2</version>
+          <version>2.4</version>
            <!-- Current version is 2.3, but it cause the following 
exception:
                  Running 
org.geotools.gce.imagepyramid.ImagePyramidReaderTest

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to