Browse Source

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 năm trước cách đây
mục cha
commit
1a7b00106d
1 tập tin đã thay đổi với 25 bổ sung5 xóa
  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>