[MSHARED-473] Upgrade Maven 3.X Only JDK 1.6
authorKarl Heinz Marbaise <khmarbaise@apache.org>
Sun, 6 Dec 2015 21:13:55 +0000 (21:13 +0000)
committerKarl Heinz Marbaise <khmarbaise@apache.org>
Sun, 6 Dec 2015 21:13:55 +0000 (21:13 +0000)
Upgraded to Maven 3.0 minimum
Upgraded wagon-providate-api to 2.10
Upgraded plexus-utils to 3.0.22
Removed optional dependency plexus-container-default
Added junit 4.11 test dependency

git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1718222 13f79535-47bb-0310-9956-ffa450edef68

pom.xml
src/test/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategyTest.java

diff --git a/pom.xml b/pom.xml
index babe514..297a2fa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
   <description>API for I/O support like logging, download or file scanning.</description>
 
   <prerequisites>
-    <maven>2.0.6</maven>
+    <maven>${mavenVersion}</maven>
   </prerequisites>
 
   <contributors>
@@ -61,6 +61,9 @@
   </distributionManagement>
 
   <properties>
+    <mavenVersion>3.0</mavenVersion>
+    <maven.compiler.target>1.6</maven.compiler.target>
+    <maven.compiler.source>1.6</maven.compiler.source>
     <checkstyle.violation.ignore>RedundantThrows,NewlineAtEndOfFile,ParameterNumber,MethodLength,FileLength,JavadocType</checkstyle.violation.ignore>
   </properties>
 
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact</artifactId>
-      <version>2.0.2</version>
+      <version>${mavenVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
-      <artifactId>maven-artifact-manager</artifactId>
-      <version>2.0.2</version>
+      <artifactId>maven-compat</artifactId>
+      <version>${mavenVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-provider-api</artifactId>
-      <version>1.0-alpha-6</version>
+      <version>2.10</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
-      <optional>true</optional>
+      <version>${mavenVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>1.4.6</version>
+      <version>3.0.22</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-container-default</artifactId>
-      <version>1.0-alpha-9</version>
-      <optional>true</optional>
-    </dependency>
-
-    <dependency>
       <groupId>org.easymock</groupId>
       <artifactId>easymock</artifactId>
       <version>3.2</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
index e1ac734..13b8bc3 100644 (file)
@@ -22,6 +22,7 @@ package org.apache.maven.shared.io.location;
 import java.io.File;
 import java.io.IOException;
 import java.util.Collections;
+import java.util.List;
 
 import junit.framework.TestCase;
 
@@ -118,7 +119,7 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
         }
         catch ( ArtifactResolutionException e )
         {
@@ -162,7 +163,7 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
         }
         catch ( ArtifactResolutionException e )
         {
@@ -206,7 +207,7 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
         }
         catch ( ArtifactResolutionException e )
         {
@@ -251,7 +252,7 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
         }
         catch ( ArtifactResolutionException e )
         {
@@ -296,7 +297,7 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
         }
         catch ( ArtifactResolutionException e )
         {
@@ -341,7 +342,7 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
         }
         catch ( ArtifactResolutionException e )
         {
@@ -384,7 +385,7 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
         }
         catch ( ArtifactResolutionException e )
         {
@@ -424,10 +425,10 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
             expectLastCall().andThrow( new ArtifactNotFoundException( "not found", "group", "artifact", "version",
-                                                                               "jar", Collections.EMPTY_LIST,
-                                                                               "http://nowhere.com", Collections.EMPTY_LIST,
+                                                                               "jar", null, Collections.<ArtifactRepository>emptyList(),
+                                                                               "http://nowhere.com", Collections.<String>emptyList(),
                                                                                 new NullPointerException() ) );
         }
         catch ( ArtifactResolutionException e )
@@ -469,11 +470,12 @@ public class ArtifactLocatorStrategyTest
 
         try
         {
-            resolver.resolve( artifact, Collections.EMPTY_LIST, localRepository );
+            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
             expectLastCall().andThrow( new ArtifactResolutionException( "resolution failed", "group", "artifact",
-                                                                                 "version", "jar", Collections.EMPTY_LIST,
-                                                                                 Collections.EMPTY_LIST,
+                                                                                 "version", "jar", null, Collections.<ArtifactRepository>emptyList(),
+                                                                                 Collections.<String>emptyList(),
                                                                                  new NullPointerException() ) );
+
         }
         catch ( ArtifactResolutionException e )
         {