Author: xavier
Date: Mon Aug  4 10:57:10 2008
New Revision: 682450

URL: http://svn.apache.org/viewvc?rev=682450&view=rev
Log:
use getDependencyRevisionId instead of getDynamicConstraintRevisionId to check 
version matching, since dependency mediation is done before sorting, and 
keeping it like this makes build relying on version matcher and build specific 
resources (like a properties file) fail when the resource is not loaded, while 
the revConstraint should not be used.

Modified:
    
ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/MessageBasedNonMatchingVersionReporter.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/ModuleInSort.java

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/MessageBasedNonMatchingVersionReporter.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/MessageBasedNonMatchingVersionReporter.java?rev=682450&r1=682449&r2=682450&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/MessageBasedNonMatchingVersionReporter.java
 (original)
+++ 
ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/MessageBasedNonMatchingVersionReporter.java
 Mon Aug  4 10:57:10 2008
@@ -25,8 +25,7 @@
 abstract class MessageBasedNonMatchingVersionReporter implements 
NonMatchingVersionReporter {
 
     public void reportNonMatchingVersion(DependencyDescriptor descriptor, 
ModuleDescriptor md) {
-        ModuleRevisionId dependencyRevisionId = 
-            descriptor.getDynamicConstraintDependencyRevisionId();
+        ModuleRevisionId dependencyRevisionId = 
descriptor.getDependencyRevisionId();
         ModuleRevisionId parentRevisionId = descriptor.getParentRevisionId();
         if (parentRevisionId == null) {
             // There are some rare case where DependencyDescriptor have no 
parent.

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/ModuleInSort.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/ModuleInSort.java?rev=682450&r1=682449&r2=682450&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/ModuleInSort.java 
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/sort/ModuleInSort.java Mon 
Aug  4 10:57:10 2008
@@ -179,7 +179,7 @@
         ModuleDescriptor md = module;
         return md.getResolvedModuleRevisionId().getRevision() == null
                 || 
md.getResolvedModuleRevisionId().getRevision().equals(Ivy.getWorkingRevision())
-                || 
versionMatcher.accept(descriptor.getDynamicConstraintDependencyRevisionId(), 
md);
+                || versionMatcher.accept(descriptor.getDependencyRevisionId(), 
md);
         // Checking 
md.getResolvedModuleRevisionId().getRevision().equals(Ivy.getWorkingRevision()
         // allow to consider any local non resolved ivy.xml
         // as a valid module.


Reply via email to