You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2005/10/12 18:57:16 UTC

svn commit: r314962 - in /maven/components/trunk: maven-core/pom.xml maven-mboot2/src/main/java/model/ModelReader.java maven-plugins/maven-release-plugin/pom.xml

Author: brett
Date: Wed Oct 12 09:57:07 2005
New Revision: 314962

URL: http://svn.apache.org/viewcvs?rev=314962&view=rev
Log:
exclude old plexus utils

Modified:
    maven/components/trunk/maven-core/pom.xml
    maven/components/trunk/maven-mboot2/src/main/java/model/ModelReader.java
    maven/components/trunk/maven-plugins/maven-release-plugin/pom.xml

Modified: maven/components/trunk/maven-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/pom.xml?rev=314962&r1=314961&r2=314962&view=diff
==============================================================================
--- maven/components/trunk/maven-core/pom.xml (original)
+++ maven/components/trunk/maven-core/pom.xml Wed Oct 12 09:57:07 2005
@@ -86,12 +86,12 @@
       <version>1.0</version>
       <exclusions>
         <exclusion>
-          <artifactId>commons-lang</artifactId>
           <groupId>commons-lang</groupId>
+          <artifactId>commons-lang</artifactId>
         </exclusion>
         <exclusion>
-          <artifactId>commons-logging</artifactId>
           <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
         </exclusion>
       </exclusions>
     </dependency>
@@ -107,7 +107,17 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-interactivity-api</artifactId>
-      <version>1.0-alpha-4-SNAPSHOT</version>
+      <version>1.0-alpha-4</version>
+      <exclusions>
+        <exclusion>
+          <groupId>plexus</groupId>
+          <artifactId>plexus-utils</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -127,6 +137,16 @@
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-ssh</artifactId>
       <scope>runtime</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>plexus</groupId>
+          <artifactId>plexus-utils</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>

Modified: maven/components/trunk/maven-mboot2/src/main/java/model/ModelReader.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-mboot2/src/main/java/model/ModelReader.java?rev=314962&r1=314961&r2=314962&view=diff
==============================================================================
--- maven/components/trunk/maven-mboot2/src/main/java/model/ModelReader.java (original)
+++ maven/components/trunk/maven-mboot2/src/main/java/model/ModelReader.java Wed Oct 12 09:57:07 2005
@@ -23,7 +23,6 @@
 import util.AbstractReader;
 
 import javax.xml.parsers.ParserConfigurationException;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -33,6 +32,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.io.IOException;
 
 /**
  * Parse a POM.
@@ -108,12 +108,15 @@
 
     private final List chain;
 
+    private final String inheritedScope;
+
     public ModelReader( ArtifactDownloader downloader, boolean resolveTransitiveDependencies )
     {
-        this( downloader, resolveTransitiveDependencies, Collections.EMPTY_SET, Collections.EMPTY_LIST );
+        this( downloader, null, resolveTransitiveDependencies, Collections.EMPTY_SET, Collections.EMPTY_LIST );
     }
 
-    public ModelReader( ArtifactDownloader downloader, boolean resolveTransitiveDependencies, Set excluded, List chain )
+    public ModelReader( ArtifactDownloader downloader, String inheritedScope, boolean resolveTransitiveDependencies,
+                        Set excluded, List chain )
     {
         this.downloader = downloader;
 
@@ -121,6 +124,8 @@
 
         this.excluded = excluded;
 
+        this.inheritedScope = inheritedScope;
+
         this.chain = chain;
     }
 
@@ -245,12 +250,12 @@
             }
 
             // actually, these should be transtive (see MNG-77) - but some projects have circular deps that way
-            ModelReader p = retrievePom( parentGroupId, parentArtifactId, parentVersion, "pom", false, excluded,
-                                         Collections.EMPTY_LIST );
+            ModelReader p = retrievePom( parentGroupId, parentArtifactId, parentVersion, "pom", inheritedScope, false,
+                                         excluded, Collections.EMPTY_LIST );
 
-            addDependencies( p.getDependencies(), parentDependencies, null, excluded );
+            addDependencies( p.getDependencies(), parentDependencies, inheritedScope, excluded );
 
-            addDependencies( p.getManagedDependencies(), managedDependencies, null, Collections.EMPTY_SET );
+            addDependencies( p.getManagedDependencies(), managedDependencies, inheritedScope, Collections.EMPTY_SET );
 
             resources.addAll( p.getResources() );
 
@@ -440,28 +445,33 @@
 
             if ( !excluded.contains( dependency.getConflictId() ) )
             {
-                if ( dependency.getVersion() == null )
+                if ( !dependency.getScope().equals( Dependency.SCOPE_TEST ) || inheritedScope == null )
                 {
-                    Dependency managedDependency = (Dependency) managedDependencies.get( dependency.getConflictId() );
-                    if ( managedDependency == null )
+                    if ( dependency.getVersion() == null )
                     {
-                        throw new NullPointerException( "[" + groupId + ":" + artifactId + ":" + packaging + ":" +
-                            version + "] " + "Dependency " + dependency.getConflictId() +
-                            " is missing a version, and nothing is found in dependencyManagement. " );
+                        Dependency managedDependency =
+                            (Dependency) managedDependencies.get( dependency.getConflictId() );
+                        if ( managedDependency == null )
+                        {
+                            throw new NullPointerException( "[" + groupId + ":" + artifactId + ":" + packaging + ":" +
+                                version + "] " + "Dependency " + dependency.getConflictId() +
+                                " is missing a version, and nothing is found in dependencyManagement. " );
+                        }
+                        dependency.setVersion( managedDependency.getVersion() );
                     }
-                    dependency.setVersion( managedDependency.getVersion() );
-                }
 
-                if ( resolveTransitiveDependencies )
-                {
-                    Set excluded = new HashSet( this.excluded );
-                    excluded.addAll( dependency.getExclusions() );
+                    if ( resolveTransitiveDependencies )
+                    {
+                        Set excluded = new HashSet( this.excluded );
+                        excluded.addAll( dependency.getExclusions() );
 
-                    ModelReader p = retrievePom( dependency.getGroupId(), dependency.getArtifactId(),
-                                                 dependency.getVersion(), dependency.getType(),
-                                                 resolveTransitiveDependencies, excluded, dependency.getChain() );
+                        ModelReader p = retrievePom( dependency.getGroupId(), dependency.getArtifactId(),
+                                                     dependency.getVersion(), dependency.getType(),
+                                                     dependency.getScope(), resolveTransitiveDependencies, excluded,
+                                                     dependency.getChain() );
 
-                    addDependencies( p.getDependencies(), transitiveDependencies, dependency.getScope(), excluded );
+                        addDependencies( p.getDependencies(), transitiveDependencies, dependency.getScope(), excluded );
+                    }
                 }
             }
         }
@@ -515,7 +525,8 @@
     }
 
     private ModelReader retrievePom( String groupId, String artifactId, String version, String type,
-                                     boolean resolveTransitiveDependencies, Set excluded, List chain )
+                                     String inheritedScope, boolean resolveTransitiveDependencies, Set excluded,
+                                     List chain )
         throws SAXException
     {
         String key = groupId + ":" + artifactId + ":" + version;
@@ -527,7 +538,7 @@
 
         inProgress.add( key );
 
-        ModelReader p = new ModelReader( downloader, resolveTransitiveDependencies, excluded, chain );
+        ModelReader p = new ModelReader( downloader, inheritedScope, resolveTransitiveDependencies, excluded, chain );
 
         try
         {

Modified: maven/components/trunk/maven-plugins/maven-release-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-release-plugin/pom.xml?rev=314962&r1=314961&r2=314962&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-release-plugin/pom.xml (original)
+++ maven/components/trunk/maven-plugins/maven-release-plugin/pom.xml Wed Oct 12 09:57:07 2005
@@ -30,7 +30,17 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-interactivity-api</artifactId>
-      <version>1.0-alpha-4-SNAPSHOT</version>
+      <version>1.0-alpha-4</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>plexus</groupId>
+          <artifactId>plexus-utils</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>