Permalink
Browse files

Run auto-reconfig tests against multiple Spring versions during test …

…execution

Change-Id: I6687216b74bcf6556399b8232f29d3361526e14d
  • Loading branch information...
1 parent a4fe179 commit a84db2078cd2ee36b0400000f82bf690c84f6724 Jennifer Hickey committed Sep 21, 2011
View
15 auto-reconfiguration/auto-reconfiguration-core/multi-test-build.xml
@@ -0,0 +1,15 @@
+<project name="auto-reconfiguration-core" default="test" basedir=".">
+ <!-- Runs maven project tests against a specified version of Spring. The surefire:test goal will also resolve
+ dependencies so new Spring versions will be downloaded if not in local repo-->
+ <target name="test">
+ <exec executable="mvn" outputproperty="results" dir="${basedir}" searchpath="true" failonerror="true">
+ <arg value="-Dspring.version=${test.spring.version}"/>
+ <arg value="surefire:test"/>
+ </exec>
+ <echo message="${results}"/>
+ <move todir="target/surefire-reports" includeemptydirs="false">
+ <fileset dir="target/surefire-reports"/>
+ <mapper type="glob" from="TEST-org.*.xml" to="TEST-Spring${test.spring.version}-org.*.xml"/>
+ </move>
+ </target>
+</project>
View
35 auto-reconfiguration/auto-reconfiguration-core/pom.xml
@@ -235,7 +235,40 @@
</execution>
</executions>
</plugin>
-
+ <!-- Run the project tests against multiple Spring versions for backwards compatibility check -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>Spring-2.5.6-Test</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <property name="test.spring.version" value="2.5.6"/>
+ <ant antfile="multi-test-build.xml"/>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Spring-3.0.5-Test</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <property name="test.spring.version" value="3.0.5.RELEASE"/>
+ <ant antfile="multi-test-build.xml"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>

0 comments on commit a84db20

Please sign in to comment.