maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1036663 - in /maven/maven-3/trunk: ./ maven-aether-provider/src/main/java/org/apache/maven/repository/internal/ maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/ maven-core/src/main/java/org/apache/maven/plugin/version/inte...
Date Thu, 18 Nov 2010 22:44:24 GMT
Author: bentmann
Date: Thu Nov 18 22:44:23 2010
New Revision: 1036663

URL: http://svn.apache.org/viewvc?rev=1036663&view=rev
Log:
[MNG-4883] [regression] Dependency resolution does not fail for artifact with over-constrained
version ranges

Modified:
    maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
    maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
    maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
    maven/maven-3/trunk/pom.xml

Modified: maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java?rev=1036663&r1=1036662&r2=1036663&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
(original)
+++ maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
Thu Nov 18 22:44:23 2010
@@ -44,6 +44,7 @@ import org.apache.maven.model.building.M
 import org.apache.maven.model.resolution.UnresolvableModelException;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
+import org.sonatype.aether.RepositoryEvent.EventType;
 import org.sonatype.aether.RepositoryException;
 import org.sonatype.aether.RepositoryListener;
 import org.sonatype.aether.RepositorySystemSession;
@@ -264,7 +265,7 @@ public class DefaultArtifactDescriptorRe
             {
                 if ( e.getCause() instanceof ArtifactNotFoundException )
                 {
-                    missingDescriptor( session, artifact );
+                    missingDescriptor( session, artifact, (Exception) e.getCause() );
                     if ( session.isIgnoreMissingArtifactDescriptor() )
                     {
                         return null;
@@ -422,12 +423,14 @@ public class DefaultArtifactDescriptorRe
         return new RepositoryPolicy( enabled, updates, checksums );
     }
 
-    private void missingDescriptor( RepositorySystemSession session, Artifact artifact )
+    private void missingDescriptor( RepositorySystemSession session, Artifact artifact, Exception
exception )
     {
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( session, artifact
);
+            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_DESCRIPTOR_MISSING,
session );
+            event.setArtifact( artifact );
+            event.setException( exception );
             listener.artifactDescriptorMissing( event );
         }
     }
@@ -437,7 +440,8 @@ public class DefaultArtifactDescriptorRe
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( session, artifact
);
+            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.ARTIFACT_DESCRIPTOR_INVALID,
session );
+            event.setArtifact( artifact );
             event.setException( exception );
             listener.artifactDescriptorInvalid( event );
         }

Modified: maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java?rev=1036663&r1=1036662&r2=1036663&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
(original)
+++ maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
Thu Nov 18 22:44:23 2010
@@ -32,6 +32,7 @@ import org.apache.maven.artifact.reposit
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.IOUtil;
+import org.sonatype.aether.RepositoryEvent.EventType;
 import org.sonatype.aether.RepositoryListener;
 import org.sonatype.aether.RepositorySystemSession;
 import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
@@ -241,7 +242,8 @@ public class DefaultVersionRangeResolver
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( session, metadata
);
+            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID,
session );
+            event.setMetadata( metadata );
             event.setException( exception );
             event.setRepository( repository );
             listener.metadataInvalid( event );

Modified: maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java?rev=1036663&r1=1036662&r2=1036663&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
(original)
+++ maven/maven-3/trunk/maven-aether-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
Thu Nov 18 22:44:23 2010
@@ -39,6 +39,7 @@ import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 import org.sonatype.aether.ConfigurationProperties;
 import org.sonatype.aether.RepositoryCache;
+import org.sonatype.aether.RepositoryEvent.EventType;
 import org.sonatype.aether.RepositoryListener;
 import org.sonatype.aether.RepositorySystemSession;
 import org.sonatype.aether.util.artifact.SubArtifact;
@@ -331,7 +332,8 @@ public class DefaultVersionResolver
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( session, metadata
);
+            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID,
session );
+            event.setMetadata( metadata );
             event.setException( exception );
             event.setRepository( repository );
             listener.metadataInvalid( event );

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java?rev=1036663&r1=1036662&r2=1036663&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
Thu Nov 18 22:44:23 2010
@@ -38,6 +38,7 @@ import org.apache.maven.plugin.prefix.Pl
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
+import org.sonatype.aether.RepositoryEvent.EventType;
 import org.sonatype.aether.RepositoryListener;
 import org.sonatype.aether.RepositorySystem;
 import org.sonatype.aether.RepositorySystemSession;
@@ -276,7 +277,8 @@ public class DefaultPluginPrefixResolver
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( session, metadata
);
+            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID,
session );
+            event.setMetadata( metadata );
             event.setException( exception );
             event.setRepository( repository );
             listener.metadataInvalid( event );

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java?rev=1036663&r1=1036662&r2=1036663&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
Thu Nov 18 22:44:23 2010
@@ -38,6 +38,7 @@ import org.codehaus.plexus.component.ann
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
+import org.sonatype.aether.RepositoryEvent.EventType;
 import org.sonatype.aether.RepositoryListener;
 import org.sonatype.aether.RepositorySystem;
 import org.sonatype.aether.RepositorySystemSession;
@@ -178,7 +179,8 @@ public class DefaultPluginVersionResolve
         RepositoryListener listener = session.getRepositoryListener();
         if ( listener != null )
         {
-            DefaultRepositoryEvent event = new DefaultRepositoryEvent( session, metadata
);
+            DefaultRepositoryEvent event = new DefaultRepositoryEvent( EventType.METADATA_INVALID,
session );
+            event.setMetadata( metadata );
             event.setException( exception );
             event.setRepository( repository );
             listener.metadataInvalid( event );

Modified: maven/maven-3/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/pom.xml?rev=1036663&r1=1036662&r2=1036663&view=diff
==============================================================================
--- maven/maven-3/trunk/pom.xml (original)
+++ maven/maven-3/trunk/pom.xml Thu Nov 18 22:44:23 2010
@@ -50,7 +50,7 @@
     <cipherVersion>1.4</cipherVersion>
     <modelloVersion>1.4</modelloVersion>
     <jxpathVersion>1.3</jxpathVersion>
-    <aetherVersion>1.7</aetherVersion>
+    <aetherVersion>1.8</aetherVersion>
     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
   </properties>
 



Mime
View raw message