Author: agudian
Date: Tue Mar 24 19:37:27 2015
New Revision: 1668965

URL: http://svn.apache.org/r1668965
Log:
o Fix ITs, allow to run a single test case from an IT by using the surefire 
JUnit 4 test runner

Modified:
    maven/plugins/trunk/maven-eclipse-plugin/   (props changed)
    maven/plugins/trunk/maven-eclipse-plugin/README-testing.txt
    maven/plugins/trunk/maven-eclipse-plugin/pom.xml
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipsePluginIT.java
    
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-50-MECLIPSE-415/pom.xml

Propchange: maven/plugins/trunk/maven-eclipse-plugin/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Mar 24 19:37:27 2015
@@ -11,3 +11,4 @@ bin
 *.ipr
 *.iws
 placeholder.txt
+.git*

Modified: maven/plugins/trunk/maven-eclipse-plugin/README-testing.txt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/README-testing.txt?rev=1668965&r1=1668964&r2=1668965&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/README-testing.txt (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/README-testing.txt Tue Mar 24 
19:37:27 2015
@@ -17,21 +17,11 @@ Testing maven-eclipse-plugin
   One day these tests will be unified into whatever "sanctioned" way of doing 
integration tests becomes.
   
 Running a single test
-* Comment out the TestCase file
-  For the test case you want to run, you need to manually comment out *ALL* 
the other tests.
-  e.g. 
-    in EclipsePluginIT if you want to run just "testProject65" you need to 
comment out 
-    everything but that one method.
-    
-* Run mvn and tell surefire to only run your TestCase file 
+* Run mvn and tell surefire to only run your TestCase: 
 
   (See 
http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html 
for more details)
   
-  mvn -Prun-its -Dtest=EclipsePluginIT verify
-  
-* Dont forget to undo this prior to committing
-
-  You probably wont, since the file will have a massive change set, but you 
have been warned.
+  mvn -Prun-its integration-test -Dit.test=EclipsePluginIT#testProject10
   
 PluginTestTool
   The bulk of the integration tests are using the old (and obsoleted) method 
of PluginTestTool.

Modified: maven/plugins/trunk/maven-eclipse-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/pom.xml?rev=1668965&r1=1668964&r2=1668965&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/pom.xml Tue Mar 24 19:37:27 2015
@@ -62,6 +62,7 @@ under the License.
   <properties>
     <mavenVersion>2.2.1</mavenVersion>
     <maven.test.jvmargs>-Xmx1024m</maven.test.jvmargs>
+    <surefire.version>2.18.1</surefire.version>
   </properties>
 
   <dependencies>
@@ -220,7 +221,7 @@ under the License.
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>3.8.2</version>
+      <version>4.11</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -242,7 +243,7 @@ under the License.
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-report-plugin</artifactId>
-          <version>2.18.1</version>
+          <version>${surefire.version}</version>
           <configuration>
             <reportsDirectories>
               
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
@@ -251,6 +252,18 @@ under the License.
           </configuration>
         </plugin>
         <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>${surefire.version}</version>
+          <dependencies>
+            <dependency>
+              <groupId>org.apache.maven.surefire</groupId>
+              <artifactId>surefire-junit47</artifactId>
+              <version>${surefire.version}</version>
+            </dependency>
+          </dependencies>
+        </plugin>
+        <plugin>
           <groupId>org.apache.rat</groupId>
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
@@ -420,7 +433,6 @@ under the License.
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-failsafe-plugin</artifactId>
-            <version>2.18.1</version>
             <executions>
               <execution>
                 <goals>
@@ -460,7 +472,7 @@ under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-report-plugin</artifactId>
-        <version>2.18.1</version>
+        <version>${surefire.version}</version>
         <reportSets>
           <reportSet>
             <id>integration-tests</id>

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipsePluginIT.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipsePluginIT.java?rev=1668965&r1=1668964&r2=1668965&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipsePluginIT.java
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/it/EclipsePluginIT.java
 Tue Mar 24 19:37:27 2015
@@ -474,26 +474,25 @@ public class EclipsePluginIT
     public void testProject40_a()
         throws Exception
     {
-        String jre131 = new java.io.File( 
"target/test-classes/eclipse/dummyJDK/1.3.1/bin/javac" ).getCanonicalPath();
-        checkJRESettingsWithEclipseWorkspace( "project-40-a", 
TempEclipseWorkspace.getFixtureEclipseWithDefault13(),
-                                              jre131 );
+        TempEclipseWorkspace eclipseWorkspace = 
TempEclipseWorkspace.getFixtureEclipseWithDefault13();
+        String jre131 = new File( eclipseWorkspace.workspaceLocation, 
"../../dummyJDK/1.3.1/bin/javac" ).getCanonicalPath();
+        checkJRESettingsWithEclipseWorkspace( "project-40-a", 
eclipseWorkspace, jre131 );
     }
 
     public void testProject40_b()
         throws Exception
     {
-        String jre131 = new java.io.File( 
"target/test-classes/eclipse/dummyJDK/1.3.1/bin/javac" ).getCanonicalPath();
-        checkJRESettingsWithEclipseWorkspace( "project-40-b", 
TempEclipseWorkspace.getFixtureEclipseWithDefault15(),
-                                              jre131 );
+        TempEclipseWorkspace eclipseWorkspace = 
TempEclipseWorkspace.getFixtureEclipseWithDefault15();
+        String jre131 = new File( eclipseWorkspace.workspaceLocation, 
"../../dummyJDK/1.3.1/bin/javac" ).getCanonicalPath();
+        checkJRESettingsWithEclipseWorkspace( "project-40-b", 
eclipseWorkspace, jre131 );
     }
 
     public void testProject40_c()
         throws Exception
     {
-        String jre131 = new java.io.File( 
"target/test-classes/eclipse/dummyJDK/1.3.1/bin/javac" ).getCanonicalPath();
-        checkJRESettingsWithEclipseWorkspace( "project-40-c",
-                                              
TempEclipseWorkspace.getFixtureEclipseWorkspaceWithRad7Default14(),
-                                              jre131 );
+        TempEclipseWorkspace eclipseWorkspace = 
TempEclipseWorkspace.getFixtureEclipseWorkspaceWithRad7Default14();
+        String jre131 = new File( eclipseWorkspace.workspaceLocation, 
"../../dummyJDK/1.3.1/bin/javac" ).getCanonicalPath();
+        checkJRESettingsWithEclipseWorkspace( "project-40-c", 
eclipseWorkspace, jre131 );
     }
 
     public void testProject41()
@@ -609,7 +608,10 @@ public class EclipsePluginIT
     public void testProject50MECLIPSE415()
         throws Exception
     {
-        testProject( "project-50-MECLIPSE-415" );
+        TempEclipseWorkspace dynamicWorkspace = 
TempEclipseWorkspace.getFixtureEclipseDynamicWorkspace();
+        Properties props = new Properties();
+        props.setProperty( "eclipse.workspace", 
dynamicWorkspace.workspaceLocation.getCanonicalPath() );
+        testProject( "project-50-MECLIPSE-415", props, "clean", "eclipse" );
     }
 
     /**

Modified: 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-50-MECLIPSE-415/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-50-MECLIPSE-415/pom.xml?rev=1668965&r1=1668964&r2=1668965&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-50-MECLIPSE-415/pom.xml
 (original)
+++ 
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-50-MECLIPSE-415/pom.xml
 Tue Mar 24 19:37:27 2015
@@ -47,7 +47,6 @@ under the License.
         <artifactId>maven-eclipse-plugin</artifactId>
         <version>test</version>
         <configuration>
-          
<workspace>${basedir}/../../eclipse/dynamicWorkspace/workspace</workspace>
           <downloadSources>true</downloadSources>
         </configuration>
       </plugin>


Reply via email to