Author: bentmann
Date: Tue Aug 11 16:14:54 2009
New Revision: 803180

URL: http://svn.apache.org/viewvc?rev=803180&view=rev
Log:
[MNG-4059] Remove support for non-unique SNAPSHOT deployments

o Updated affected plugin ITs to work with uniqueVersion=true as well

Modified:
    maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/pom.xml
    maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/verify.bsh
    maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/pom.xml
    maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/verify.bsh

Modified: maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/pom.xml?rev=803180&r1=803179&r2=803180&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/pom.xml 
(original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/pom.xml Tue Aug 
11 16:14:54 2009
@@ -39,7 +39,6 @@
     <repository>
       <id>it</id>
       <url>file:///${basedir}/target/repo</url>
-      <uniqueVersion>false</uniqueVersion>
     </repository>
   </distributionManagement>
 

Modified: maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/verify.bsh?rev=803180&r1=803179&r2=803180&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/verify.bsh 
(original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-jar/verify.bsh Tue 
Aug 11 16:14:54 2009
@@ -1,21 +1,28 @@
 import java.io.*;
 import java.util.*;
 
+import org.codehaus.plexus.util.*;
+
 String[] paths =
 {
     "org/apache/maven/its/deploy/sj/test/maven-metadata.xml",
     "org/apache/maven/its/deploy/sj/test/1.0-SNAPSHOT/maven-metadata.xml",
-    "org/apache/maven/its/deploy/sj/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom",
-    "org/apache/maven/its/deploy/sj/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.jar",
+    "org/apache/maven/its/deploy/sj/test/1.0-SNAPSHOT/test-1.0-*.pom",
+    "org/apache/maven/its/deploy/sj/test/1.0-SNAPSHOT/test-1.0-*.jar",
 };
 
+File repoDir = new File( basedir, "target/repo" );
+
 for ( String path : paths )
 {
-    File file = new File( new File( basedir, "target/repo" ), path );
+    File file = new File( repoDir, path );
     System.out.println( "Checking for existence of " + file );
     if ( !file.isFile() )
     {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
+        if ( FileUtils.getFiles( repoDir, path, null ).isEmpty() )
+        {
+            throw new FileNotFoundException( "Missing: " + 
file.getAbsolutePath() );
+        }
     }
 }
 

Modified: maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/pom.xml?rev=803180&r1=803179&r2=803180&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/pom.xml 
(original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/pom.xml Tue Aug 
11 16:14:54 2009
@@ -39,7 +39,6 @@
     <repository>
       <id>it</id>
       <url>file:///${basedir}/target/repo</url>
-      <uniqueVersion>false</uniqueVersion>
     </repository>
   </distributionManagement>
 

Modified: maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/verify.bsh?rev=803180&r1=803179&r2=803180&view=diff
==============================================================================
--- maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/verify.bsh 
(original)
+++ maven/plugins/trunk/maven-deploy-plugin/src/it/snapshot-pom/verify.bsh Tue 
Aug 11 16:14:54 2009
@@ -1,20 +1,27 @@
 import java.io.*;
 import java.util.*;
 
+import org.codehaus.plexus.util.*;
+
 String[] paths =
 {
     "org/apache/maven/its/deploy/sp/test/maven-metadata.xml",
     "org/apache/maven/its/deploy/sp/test/1.0-SNAPSHOT/maven-metadata.xml",
-    "org/apache/maven/its/deploy/sp/test/1.0-SNAPSHOT/test-1.0-SNAPSHOT.pom",
+    "org/apache/maven/its/deploy/sp/test/1.0-SNAPSHOT/test-1.0-*.pom",
 };
 
+File repoDir = new File( basedir, "target/repo" );
+
 for ( String path : paths )
 {
-    File file = new File( new File( basedir, "target/repo" ), path );
+    File file = new File( repoDir, path );
     System.out.println( "Checking for existence of " + file );
     if ( !file.isFile() )
     {
-        throw new FileNotFoundException( "Missing: " + file.getAbsolutePath() 
);
+        if ( FileUtils.getFiles( repoDir, path, null ).isEmpty() )
+        {
+            throw new FileNotFoundException( "Missing: " + 
file.getAbsolutePath() );
+        }
     }
 }
 


Reply via email to