瀏覽代碼

Upgraded to junit 4.4 (mainly to allow use of BeforeClass and AfterClass annotations) and changed pom to use different source and versions for production and test sources (1.4 and 1.5 respectively)

Luke Taylor 18 年之前
父節點
當前提交
1a7b00106d
共有 1 個文件被更改,包括 25 次插入5 次删除
  1. 25 5
      pom.xml

+ 25 - 5
pom.xml

@@ -231,7 +231,7 @@
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
-			<version>3.8.1</version>
+			<version>4.4</version>
 			<scope>test</scope>
 		</dependency>
 	</dependencies>
@@ -279,10 +279,30 @@
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.4</source>
-					<target>1.4</target>
-				</configuration>
+                <executions>
+                    <execution>
+                        <id>java-1.4-compile</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <configuration>
+                            <source>1.4</source>
+                            <target>1.4</target>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>java-1.5-compile</id>
+                        <phase>process-test-sources</phase>
+                        <goals>
+                            <goal>testCompile</goal>
+                        </goals>
+                        <configuration>
+                            <source>1.5</source>
+                            <target>1.5</target>
+                        </configuration>
+                    </execution>
+                </executions>
 			</plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>