maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r738374 - in /maven/components/trunk/maven-project/src: main/java/org/apache/maven/project/MavenProject.java test/java/org/apache/maven/project/DefaultMavenProjectHelperTest.java
Date Wed, 28 Jan 2009 05:44:29 GMT
Author: sisbell
Date: Wed Jan 28 05:44:29 2009
New Revision: 738374

URL: http://svn.apache.org/viewvc?rev=738374&view=rev
Log:
MNG-4013: Identical plugin executions are allowed in pom. This can cause failure in Maven
3 (since there is no longer cloning of maven project) on duplicate attached artifacts.

Removed:
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/DefaultMavenProjectHelperTest.java
Modified:
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=738374&r1=738373&r2=738374&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
Wed Jan 28 05:44:29 2009
@@ -114,7 +114,7 @@
 
     private List collectedProjects = Collections.EMPTY_LIST;
 
-    private List attachedArtifacts;
+    private List<Artifact> attachedArtifacts;
 
     private MavenProject executionProject;
 
@@ -1437,17 +1437,20 @@
 
         if ( attachedArtifacts.contains( artifact ) )
         {
-            throw new DuplicateArtifactAttachmentException( this, artifact );
+             //should add logger to this class:
+             System.out.println("[Warning] Duplicate artifact: " + artifact.toString());
+             return;
+            //throw new DuplicateArtifactAttachmentException( this, artifact );
         }
 
         getAttachedArtifacts().add( artifact );
     }
 
-    public List getAttachedArtifacts()
+    public List<Artifact> getAttachedArtifacts()
     {
         if ( attachedArtifacts == null )
         {
-            attachedArtifacts = new ArrayList();
+            attachedArtifacts = new ArrayList<Artifact>();
         }
         return attachedArtifacts;
     }



Mime
View raw message