continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r490423 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
Date Wed, 27 Dec 2006 01:08:28 GMT
Author: brett
Date: Tue Dec 26 17:08:28 2006
New Revision: 490423

URL: http://svn.apache.org/viewvc?view=rev&rev=490423
Log:
[CONTINUUM-995] MavenTwoBuildExecutor.getDeployableArtifacts does not return attached artifacts
Submitted by: John Didion

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?view=diff&rev=490423&r1=490422&r2=490423
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
Tue Dec 26 17:08:28 2006
@@ -42,6 +42,7 @@
 import java.io.FileReader;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -173,8 +174,6 @@
                 "Unable to read the Maven project descriptor '" + f + "': " + result.getErrorsAsString()
);
         }
 
-        List artifacts = new ArrayList( 1 );
-
         // Maven could help us out a lot more here by knowing how to get the deployment artifacts
from a project.
         // TODO: this is currently quite lame
 
@@ -246,9 +245,19 @@
             }
         }
 
+        List attachedArtifacts = project.getAttachedArtifacts();
+
+        List artifacts = new ArrayList( attachedArtifacts.size() + 1 );
+
         if ( artifact.getFile().exists() )
         {
             artifacts.add( artifact );
+        }
+
+        for ( Iterator iterator = attachedArtifacts.iterator(); iterator.hasNext(); )
+        {
+            Artifact attachedArtifact = (Artifact) iterator.next();
+            artifacts.add( attachedArtifact );
         }
 
         return artifacts;



Mime
View raw message