ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r640488 - in /ant/ivy/core/trunk: ./ src/java/org/apache/ivy/core/module/descriptor/ src/java/org/apache/ivy/core/resolve/ src/java/org/apache/ivy/plugins/parser/m2/ src/java/org/apache/ivy/plugins/parser/xml/ src/java/org/apache/ivy/plugin...
Date Mon, 24 Mar 2008 18:05:15 GMT
Author: xavier
Date: Mon Mar 24 11:05:10 2008
New Revision: 640488

URL: http://svn.apache.org/viewvc?rev=640488&view=rev
Log:
NEW: Add transitive dependency version and branch override mechanism (IVY-784) (not completed yet)
FIX: Compatibility with maven's dependencyMangement (IVY-753) (not completed yet)

Syntax for IVY-784 still needs to be cleared out. Then I need to update documentation, xml module descriptor writer and updater. For IVY-753 to be fully completed, update of xml module descriptor writer still need to be achieved to be able to use converted pom file from cache.

Added:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptorMediator.java   (with props)
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/OverrideDependencyDescriptorMediator.java   (with props)
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java   (with props)
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomDependencyMgt.java   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.jar   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.pom   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.jar   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.pom   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.jar   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.pom   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.jar   (with props)
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.pom   (with props)
Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResourceResolver.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/CacheResolver.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml
    ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/parent/2.0/parent-2.0.pom

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Mon Mar 24 11:05:10 2008
@@ -66,6 +66,7 @@
 =====================================
 - NEW: Retain original dependency constraint rules in resolved ivy file (IVY-739)
 - NEW: Add a new resolve mode (optionally per module) to utilize dynamic constraint rule metadata (IVY-740)
+- NEW: Add transitive dependency version and branch override mechanism (IVY-784) (not completed yet)
 
 - IMPROVEMENT: Make Ivy standalone runnable with no required dependencies (IVY-757)
 - IMPROVEMENT: add branch attribute in ivy:install task (IVY-727)
@@ -73,6 +74,7 @@
 - IMPROVEMENT: Parse description and home page from poms (IVY-767)
 - IMPROVEMENT: Smarter determination if an expression is exact or not for RegexpPatternMatcher and GlobPatternMatcher
 
+- FIX: Compatibility with maven's dependencyMangement (IVY-753) (not completed yet)
 - FIX: ivy:settings fails when override is not set to 'true' (IVY-771)
 - FIX: NPE when specifying both resolveId and inline in an Ivy:Resolve (IVY-776)
 - FIX: repreport task not working against a repository structured by branches (IVY-716)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java Mon Mar 24 11:05:10 2008
@@ -37,6 +37,7 @@
 import org.apache.ivy.plugins.namespace.NameSpaceHelper;
 import org.apache.ivy.plugins.namespace.Namespace;
 import org.apache.ivy.plugins.namespace.NamespaceTransformer;
+import org.apache.ivy.util.Checks;
 
 /**
  * This class can be used as the default implementation for DependencyDescriptor. It implements
@@ -118,7 +119,7 @@
         return newdd;
     }
 
-    private ModuleRevisionId revId;
+    private final ModuleRevisionId revId;
 
     private ModuleRevisionId dynamicRevId;
 
@@ -158,10 +159,19 @@
 
     private DependencyDescriptor asSystem = this;
 
-    public DefaultDependencyDescriptor(DependencyDescriptor dd, String revision) {
+    public DefaultDependencyDescriptor(DependencyDescriptor dd, ModuleRevisionId revision) {
+        Checks.checkNotNull(dd, "dd");
+        Checks.checkNotNull(revision, "revision");
+        
+        if (!revision.getModuleId().equals(dd.getDependencyId())) {
+            throw new IllegalArgumentException(
+                "new ModuleRevisionId MUST have the same ModuleId as original one."
+                + " original = " + dd.getDependencyId()
+                + " new = " + revision.getModuleId());
+        }
         md = null;
         parentId = dd.getParentRevisionId();
-        revId = ModuleRevisionId.newInstance(dd.getDependencyRevisionId(), revision);
+        revId = revision;
         dynamicRevId = dd.getDynamicConstraintDependencyRevisionId();
         isForce = dd.isForce();
         isChanging = dd.isChanging();
@@ -185,9 +195,20 @@
         this(md, mrid, mrid, force, changing, transitive);
     }
 
+    public DefaultDependencyDescriptor(ModuleRevisionId mrid, boolean force) {
+        this(mrid, force, false);
+    }
+
+    public DefaultDependencyDescriptor(ModuleRevisionId mrid, boolean force, boolean changing) {
+        this(null, mrid, mrid, force, changing, true);
+    }
+
     public DefaultDependencyDescriptor(
             ModuleDescriptor md, ModuleRevisionId mrid, ModuleRevisionId dynamicConstraint, 
             boolean force, boolean changing, boolean transitive) {
+        Checks.checkNotNull(mrid, "mrid");
+        Checks.checkNotNull(dynamicConstraint, "dynamicConstraint");
+        
         this.md = md;
         revId = mrid;
         dynamicRevId = dynamicConstraint;
@@ -196,18 +217,6 @@
         isTransitive = transitive;
     }
 
-    public DefaultDependencyDescriptor(ModuleRevisionId mrid, boolean force) {
-        this(mrid, force, false);
-    }
-
-    public DefaultDependencyDescriptor(ModuleRevisionId mrid, boolean force, boolean changing) {
-        md = null;
-        revId = mrid;
-        dynamicRevId = mrid;
-        isForce = force;
-        isChanging = changing;
-    }
-
     public ModuleId getDependencyId() {
         return getDependencyRevisionId().getModuleId();
     }
@@ -576,4 +585,7 @@
         return excludeRules;
     }
 
+    public DependencyDescriptor clone(ModuleRevisionId revision) {
+        return new DefaultDependencyDescriptor(this, revision);
+    }
 }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java Mon Mar 24 11:05:10 2008
@@ -160,10 +160,11 @@
         if (md instanceof DefaultModuleDescriptor) {
             DefaultModuleDescriptor dmd = (DefaultModuleDescriptor) md;
             nmd.conflictManagers.putAll(dmd.conflictManagers);
+            nmd.dependencyDescriptorMediators.putAll(dmd.dependencyDescriptorMediators);
         } else {
             Message.warn(
                 "transformed module descriptor is not a default module descriptor: "
-                + "impossible to copy conflict manager configuration: " + md);
+                + "impossible to copy conflict manager and version mediation configuration: " + md);
         }
         nmd.licenses.addAll(Arrays.asList(md.getLicenses()));
         nmd.homePage = md.getHomePage();
@@ -199,6 +200,9 @@
     private boolean isDefault = false;
 
     private Map conflictManagers = new LinkedHashMap(); // Map (ModuleId -> )
+    
+    private Map/*<ModuleId, DependencyDescriptorMediator>*/ dependencyDescriptorMediators 
+        = new LinkedHashMap(); 
 
     private List licenses = new ArrayList(); // List(License)
 
@@ -470,6 +474,22 @@
             }
         }
         return null;
+    }
+    
+    public void addDependencyDescriptorMediator(ModuleId moduleId, PatternMatcher matcher,
+            DependencyDescriptorMediator ddm) {
+        dependencyDescriptorMediators.put(new ModuleIdMatcher(matcher, moduleId), ddm);
+    }
+    
+    public DependencyDescriptor mediate(DependencyDescriptor dd) {
+        for (Iterator iter = dependencyDescriptorMediators.keySet().iterator(); iter.hasNext();) {
+            ModuleIdMatcher matcher = (ModuleIdMatcher) iter.next();
+            if (matcher.matches(dd.getDependencyId())) {
+                dd = ((DependencyDescriptorMediator) dependencyDescriptorMediators.get(matcher))
+                        .mediate(dd);
+            }
+        }
+        return dd;
     }
 
     public void addLicense(License license) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptor.java Mon Mar 24 11:05:10 2008
@@ -125,4 +125,16 @@
     public boolean canExclude();
 
     DependencyDescriptor asSystem();
+    
+    /**
+     * Clones current dependency descriptor with another revision.
+     * 
+     * @param revision
+     *            the revision of the cloned dependency descriptor
+     * @return the cloned dependency descriptor
+     * @throws IllegalArgumentException
+     *             if the given {@link ModuleRevisionId} has not the same {@link ModuleId} as the
+     *             {@link ModuleRevisionId} of this descriptor.
+     */
+    DependencyDescriptor clone(ModuleRevisionId revision);
 }

Added: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptorMediator.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptorMediator.java?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptorMediator.java (added)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptorMediator.java Mon Mar 24 11:05:10 2008
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.core.module.descriptor;
+
+/**
+ * A  DependencyDescriptorMediator is responsible for dependency descriptor mediation.
+ * <p>
+ * Dependency descriptor mediation consists in adjusting dependency descriptors according to
+ * a context, environment, the stack of dependers, ...
+ * </p> 
+ */
+public interface DependencyDescriptorMediator {
+    
+    /**
+     * Mediates the given {@link DependencyDescriptor} according to this {@link ModuleDescriptor}.
+     * <p>
+     * This method gives the opportunity to a ModuleDescriptor to override dependency version
+     * information of any of its transitive dependencies, since it is called by dependency resolvers
+     * before actually resolving a dependency.
+     * </p>
+     * 
+     * @param dd
+     *            the dependency descriptor which should be mediated.
+     * @return the mediated {@link DependencyDescriptor}, or the original
+     *         {@link DependencyDescriptor} if no mediation is required by this ModuleDescriptor.
+     */
+    DependencyDescriptor mediate(DependencyDescriptor dd);
+
+}

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptorMediator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DependencyDescriptorMediator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java Mon Mar 24 11:05:10 2008
@@ -36,7 +36,9 @@
 /**
  * Decriptor of a module. This is the Java representation of an ivy.xml
  */
-public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo {
+public interface ModuleDescriptor 
+        extends ExtendableItem, ArtifactInfo, DependencyDescriptorMediator {
+    
     public static final String DEFAULT_CONFIGURATION = "default";
 
     public static final String CALLER_ALL_CONFIGURATION = "all";
@@ -136,7 +138,8 @@
     Configuration getConfiguration(String confName);
 
     /**
-     * Returns the conflict manager to use for the given ModuleId
+     * Returns the conflict manager to use for the given ModuleId, or <code>null</code> if no
+     * specific conflict manager is associated with the given module id in this module descriptor.
      * 
      * @param id
      * @return

Added: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/OverrideDependencyDescriptorMediator.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/OverrideDependencyDescriptorMediator.java?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/OverrideDependencyDescriptorMediator.java (added)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/OverrideDependencyDescriptorMediator.java Mon Mar 24 11:05:10 2008
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.core.module.descriptor;
+
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+
+/**
+ * DependencyDescriptorMediator used to override some dependency descriptors values, such as 
+ * the branch or version of the dependency. 
+ */
+public class OverrideDependencyDescriptorMediator implements DependencyDescriptorMediator {
+    private String version;
+    private String branch;
+    
+    /**
+     * Constructs a new instance.
+     * 
+     * @param branch
+     *            the branch to give to mediated dependency descriptors, <code>null</code> to keep
+     *            the original branch.
+     * @param version
+     *            the version to give to mediated dependency descriptors, <code>null</code> to
+     *            keep the original one.
+     */
+    public OverrideDependencyDescriptorMediator(String branch, String version) {
+        this.branch = branch;
+        this.version = version;
+    }
+
+    /**
+     * Returns the version this mediator will give to mediated descriptors, or <code>null</code>
+     * if this mediator does not override version.
+     * 
+     * @return the version this mediator will give to mediated descriptors.
+     */
+    public String getVersion() {
+        return version;
+    }
+    
+    /**
+     * Returns the branch this mediator will give to mediated descriptors, or <code>null</code>
+     * if this mediator does not override branch.
+     * 
+     * @return the branch this mediator will give to mediated descriptors.
+     */
+    public String getBranch() {
+        return branch;
+    }
+
+    public DependencyDescriptor mediate(DependencyDescriptor dd) {
+        ModuleRevisionId mrid = dd.getDependencyRevisionId();
+        if ((version == null || version.equals(mrid.getRevision()))
+                && (branch == null || branch.equals(mrid.getBranch()))) {
+            return dd;
+        }
+        
+        String version = this.version == null ? mrid.getRevision() : this.version;
+        String branch = this.branch == null ? mrid.getBranch() : this.branch;
+        
+        return dd.clone(ModuleRevisionId.newInstance(
+            mrid.getOrganisation(), mrid.getName(), branch, version, mrid.getExtraAttributes()));
+    }
+}

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/OverrideDependencyDescriptorMediator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/OverrideDependencyDescriptorMediator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNode.java Mon Mar 24 11:05:10 2008
@@ -167,7 +167,7 @@
     private Map blacklisted = new HashMap();
 
     public IvyNode(ResolveData data, IvyNode parent, DependencyDescriptor dd) {
-        id = data.getEngine().getRequestedDependencyRevisionId(dd, data.getOptions());
+        id = dd.getDependencyRevisionId();
         dds.put(parent, dd);
         root = parent.getRoot();
         init(data);
@@ -220,8 +220,8 @@
                     Message.debug("\tusing " + resolver + " to resolve " + getId());
                     DependencyDescriptor dependencyDescriptor = getDependencyDescriptor(parent);
                     long start = System.currentTimeMillis();
-                    ModuleRevisionId requestedRevisionId = 
-                        data.getRequestedDependencyRevisionId(dependencyDescriptor);
+                    ModuleRevisionId requestedRevisionId 
+                        = dependencyDescriptor.getDependencyRevisionId();
                     data.getEventManager().fireIvyEvent(
                         new StartResolveDependencyEvent(resolver, dependencyDescriptor, requestedRevisionId));
                     module = resolver.getDependency(dependencyDescriptor, data);
@@ -370,15 +370,14 @@
         DependencyDescriptor[] dds = md.getDependencies();
         Collection dependencies = new LinkedHashSet(); // it's important to respect order
         for (int i = 0; i < dds.length; i++) {
-            DependencyDescriptor dd = dds[i];
+            DependencyDescriptor dd = data.mediate(dds[i]);
             String[] dependencyConfigurations = dd.getDependencyConfigurations(conf, requestedConf);
             if (dependencyConfigurations.length == 0) {
                 // no configuration of the dependency is required for current confs :
                 // it is exactly the same as if there was no dependency at all on it
                 continue;
             }
-            ModuleRevisionId requestedDependencyRevisionId = 
-                data.getEngine().getRequestedDependencyRevisionId(dd, data.getOptions());
+            ModuleRevisionId requestedDependencyRevisionId = dd.getDependencyRevisionId();
             if (isDependencyModuleExcluded(rootModuleConf, requestedDependencyRevisionId, conf)) {
                 // the whole module is excluded, it is considered as not being part of dependencies
                 // at all

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/IvyNodeCallers.java Mon Mar 24 11:05:10 2008
@@ -96,7 +96,7 @@
         }
 
         public ModuleRevisionId getAskedDependencyId(ResolveData resolveData) {
-            return resolveData.getRequestedDependencyRevisionId(dd);
+            return dd.getDependencyRevisionId();
         }
 
         public ModuleDescriptor getModuleDescriptor() {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java Mon Mar 24 11:05:10 2008
@@ -19,16 +19,20 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
 import org.apache.ivy.core.event.EventManager;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.report.ConfigurationResolveReport;
+import org.apache.ivy.util.Message;
 
 public class ResolveData {
     private ResolveEngine engine;
@@ -39,9 +43,12 @@
 
     private ResolveOptions options;
 
+    private VisitNode currentVisitNode = null;
+
     public ResolveData(ResolveData data, boolean validate) {
-        this(data.engine, new ResolveOptions(data.options).setValidate(validate), data.report,
-                data.visitData);
+        this(data.engine, new ResolveOptions(data.options).setValidate(validate), 
+            data.report, data.visitData);
+        setCurrentVisitNode(currentVisitNode);
     }
 
     public ResolveData(ResolveEngine engine, ResolveOptions options) {
@@ -86,6 +93,26 @@
     public VisitData getVisitData(ModuleRevisionId mrid) {
         return (VisitData) visitData.get(mrid);
     }
+    
+    /**
+     * Returns the VisitNode currently visited, or <code>null</code> if there is no node currently
+     * visited in this context.
+     * 
+     * @return the VisitNode currently visited
+     */
+    public VisitNode getCurrentVisitNode() {
+        return currentVisitNode;
+    }
+    
+    /**
+     * Sets the currently visited node. 
+     * WARNING: This should only be called by Ivy core ResolveEngine!
+     * 
+     * @param currentVisitNode
+     */
+    void setCurrentVisitNode(VisitNode currentVisitNode) {
+        this.currentVisitNode = currentVisitNode;
+    }
 
     public void register(VisitNode node) {
         register(node.getId(), node);
@@ -180,7 +207,30 @@
         return node != null && node.isBlacklisted(rootModuleConf);
     }
 
-    public ModuleRevisionId getRequestedDependencyRevisionId(DependencyDescriptor dd) {
-        return getEngine().getRequestedDependencyRevisionId(dd, getOptions());
+
+    public DependencyDescriptor mediate(DependencyDescriptor dd) {
+        VisitNode current = getCurrentVisitNode();
+        if (current != null) {
+            // mediating dd through dependers stack
+            DependencyDescriptor originalDD = dd;
+            List dependers = new ArrayList(current.getPath());
+            // the returned path contains the currently visited node, we are only interested in
+            // the dependers, so we remove the currently visted node from the end
+            dependers.remove(dependers.size() - 1);
+            // we want to apply mediation going up in the dependers stack, not the opposite
+            Collections.reverse(dependers);
+            for (Iterator iterator = dependers.iterator(); iterator.hasNext();) {
+                VisitNode n = (VisitNode) iterator.next();
+                ModuleDescriptor md = n.getDescriptor();
+                if (md != null) {
+                    dd = md.mediate(dd);
+                }
+            }
+            if (originalDD != dd) {
+                Message.verbose("dependency descriptor has been mediated: " 
+                    + originalDD + " => " + dd);
+            }
+        }
+        return getEngine().mediate(dd, getOptions());
     }
 }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java Mon Mar 24 11:05:10 2008
@@ -254,8 +254,7 @@
                         if (dd != null) {
                             ModuleRevisionId depResolvedId = dependencies[i].getResolvedId();
                             ModuleDescriptor depDescriptor = dependencies[i].getDescriptor();
-                            ModuleRevisionId depRevisionId = 
-                                getRequestedDependencyRevisionId(dd, options);
+                            ModuleRevisionId depRevisionId = dd.getDependencyRevisionId();
                             if (depResolvedId == null) {
                                 throw new NullPointerException("getResolvedId() is null for " 
                                     + dependencies[i].toString());
@@ -595,6 +594,10 @@
         } else {
             Message.verbose("== resolving dependencies for " + node.getId() + " [" + conf + "]");
         }
+        ResolveData data = node.getNode().getData();
+        VisitNode parentVisitNode = data.getCurrentVisitNode();
+        
+        data.setCurrentVisitNode(node);
         resolveConflict(node, conf);
 
         if (node.loadData(conf, shouldBePublic)) {
@@ -640,6 +643,7 @@
             Message.debug(node.getId() + " => dependencies resolved in " + conf + " ("
                     + (System.currentTimeMillis() - start) + "ms)");
         }
+        data.setCurrentVisitNode(parentVisitNode);
     }
 
     private void doFetchDependencies(VisitNode node, String conf) {
@@ -966,17 +970,20 @@
     }
 
     /**
-     * Returns the module revision id constraint requested by the given dependency descriptor,
-     * according to the given resolve options.
+     * Mediates the given dependency descriptor according to given options.
+     * <p>
+     * The mediated dependency descriptor must return the actually requested module revision id when
+     * the method {@link DependencyDescriptor#getDependencyRevisionId()} is called.
+     * </p>
      * 
      * @param dd
      *            the dependency descriptor for which the requested module revision id should be
      *            returned
      * @param options
      *            the resolve options to use
-     * @return the {@link ModuleRevisionId} corresponding to the requested dependency constraint
+     * @return the mediated {@link DependencyDescriptor}.
      */
-    public ModuleRevisionId getRequestedDependencyRevisionId(
+    public DependencyDescriptor mediate(
             DependencyDescriptor dd, ResolveOptions options) {
         if (dd == null) {
             return null;
@@ -984,9 +991,13 @@
         String resolveMode = options.getResolveMode() == null 
             ? settings.getResolveMode(dd.getDependencyId())
                     : options.getResolveMode();
-        return ResolveOptions.RESOLVEMODE_DYNAMIC.equals(resolveMode) 
-            ? dd.getDynamicConstraintDependencyRevisionId() 
-            : dd.getDependencyRevisionId();
+        if (ResolveOptions.RESOLVEMODE_DYNAMIC.equals(resolveMode)
+                && !dd.getDynamicConstraintDependencyRevisionId()
+                        .equals(dd.getDependencyRevisionId())) {
+            return dd.clone(dd.getDynamicConstraintDependencyRevisionId());
+        } else {
+            return dd;
+        }
     }
 
     public EventManager getEventManager() {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/VisitNode.java Mon Mar 24 11:05:10 2008
@@ -140,14 +140,14 @@
         return root;
     }
 
-    public Collection getPath() {
+    public Collection/*<VisitNode>*/ getPath() {
         if (path == null) {
             path = computePath();
         }
         return path;
     }
 
-    private Collection computePath() {
+    private Collection/*<VisitNode>*/ computePath() {
         if (parent != null) {
             Collection p = new LinkedHashSet(parent.getPath());
             p.add(this);

Added: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java (added)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java Mon Mar 24 11:05:10 2008
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.plugins.parser.m2;
+
+public class DefaultPomDependencyMgt implements PomDependencyMgt {
+    private String groupId;
+    private String artifactId;
+    private String version;
+    
+    public DefaultPomDependencyMgt(String groupId, String artifactId, String version) {
+        this.groupId = groupId;
+        this.artifactId = artifactId;
+        this.version = version;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+    public String getArtifaceId() {
+        return artifactId;
+    }
+    public String getVersion() {
+        return version;
+    }
+    
+    
+}

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/DefaultPomDependencyMgt.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomDependencyMgt.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomDependencyMgt.java?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomDependencyMgt.java (added)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomDependencyMgt.java Mon Mar 24 11:05:10 2008
@@ -0,0 +1,28 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.plugins.parser.m2;
+
+public interface PomDependencyMgt {
+
+    public abstract String getGroupId();
+
+    public abstract String getArtifaceId();
+
+    public abstract String getVersion();
+
+}
\ No newline at end of file

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomDependencyMgt.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomDependencyMgt.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java Mon Mar 24 11:05:10 2008
@@ -21,6 +21,7 @@
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -33,6 +34,7 @@
 import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.OverrideDependencyDescriptorMediator;
 import org.apache.ivy.core.module.descriptor.Configuration.Visibility;
 import org.apache.ivy.core.module.id.ArtifactId;
 import org.apache.ivy.core.module.id.ModuleId;
@@ -41,8 +43,8 @@
 import org.apache.ivy.plugins.matcher.PatternMatcher;
 import org.apache.ivy.plugins.parser.ModuleDescriptorParser;
 import org.apache.ivy.plugins.parser.m2.PomReader.PomDependencyData;
-import org.apache.ivy.plugins.parser.m2.PomReader.PomDependencyMgt;
 import org.apache.ivy.plugins.repository.Resource;
+import org.apache.ivy.util.Message;
 
 
 /**
@@ -52,6 +54,8 @@
 public class PomModuleDescriptorBuilder {
 
     
+    private static final int DEPENDENCY_MANAGEMENT_KEY_PARTS_COUNT = 3;
+
     public static final Configuration[] MAVEN2_CONFIGURATIONS = new Configuration[] {
         new Configuration("default", Visibility.PUBLIC,
                 "runtime dependencies and master artifact can be used with this conf",
@@ -257,6 +261,11 @@
     public void addDependencyMgt(PomDependencyMgt dep) {
         String key = getDependencyMgtExtraInfoKey(dep.getGroupId(), dep.getArtifaceId());
         ivyModuleDescriptor.addExtraInfo(key, dep.getVersion());
+        // dependency management info is also used for version mediation of transitive dependencies
+        ivyModuleDescriptor.addDependencyDescriptorMediator(
+            ModuleId.newInstance(dep.getGroupId(), dep.getArtifaceId()), 
+            ExactPatternMatcher.INSTANCE,
+            new OverrideDependencyDescriptorMediator(null, dep.getVersion()));
     }
 
     private String getDefaultVersion(PomDependencyData dep) {
@@ -274,6 +283,24 @@
         return PROPERTIES + EXTRA_INFO_DELIMITER + propertyName;
     }
 
+    public static Map/*<ModuleId, String version>*/ 
+            getDependencyManagementMap(ModuleDescriptor md) {
+        Map ret = new LinkedHashMap();
+        for (Iterator iterator = md.getExtraInfo().entrySet().iterator(); iterator.hasNext();) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            String key = (String) entry.getKey();
+            if ((key).startsWith(DEPENDENCY_MANAGEMENT)) {
+                String[] parts = key.split(EXTRA_INFO_DELIMITER);
+                if (parts.length != DEPENDENCY_MANAGEMENT_KEY_PARTS_COUNT) {
+                    Message.warn("what seem to be a dependency management extra info "
+                        + "doesn't match expected pattern: " + key);
+                } else {
+                    ret.put(ModuleId.newInstance(parts[1], parts[2]), entry.getValue());
+                }
+            }
+        }
+        return ret;
+    }
     
 
     public void addExtraInfos(Map extraAttributes) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java Mon Mar 24 11:05:10 2008
@@ -32,6 +32,7 @@
 import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.id.ModuleId;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.resolve.ResolveData;
 import org.apache.ivy.core.resolve.ResolveEngine;
@@ -196,22 +197,31 @@
                 }
                 
                 if (parentDescr != null) {
-                    Map parentPomProps = mdBuilder.extractPomProperties(parentDescr.getExtraInfo());
+                    Map parentPomProps = PomModuleDescriptorBuilder
+                            .extractPomProperties(parentDescr.getExtraInfo());
                     for (Iterator iter = parentPomProps.entrySet().iterator(); iter.hasNext();) {
                         Map.Entry prop = (Map.Entry) iter.next();
                         domReader.setProperty((String) prop.getKey(), (String) prop.getValue());
                     }                    
+
+                    mdBuilder.addExtraInfos(parentDescr.getExtraInfo());
+                    
+                    // add dependency management info from parent
+                    Map depMgt = PomModuleDescriptorBuilder.getDependencyManagementMap(parentDescr);
+                    for (Iterator iterator = depMgt.entrySet().iterator(); iterator.hasNext();) {
+                        Map.Entry entry = (Map.Entry) iterator.next();
+                        ModuleId mid = (ModuleId) entry.getKey();
+                        String v = (String) entry.getValue();
+                        mdBuilder.addDependencyMgt(
+                            new DefaultPomDependencyMgt(mid.getOrganisation(), mid.getName(), v));
+                    }
                 }
                 
                 for (Iterator it = domReader.getDependencyMgt().iterator(); it.hasNext();) {
-                    PomReader.PomDependencyMgt dep = (PomReader.PomDependencyMgt) it.next();
+                    PomDependencyMgt dep = (PomDependencyMgt) it.next();
                     mdBuilder.addDependencyMgt(dep);
                 }
                 
-                if (parentDescr != null) {
-                    mdBuilder.addExtraInfos(parentDescr.getExtraInfo());
-                }
-
                 for (Iterator it = domReader.getDependencies().iterator(); it.hasNext();) {
                     PomReader.PomDependencyData dep = (PomReader.PomDependencyData) it.next();
                     mdBuilder.addDependency(res, dep);

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomReader.java Mon Mar 24 11:05:10 2008
@@ -220,7 +220,7 @@
             for (int i = 0; i < childs.getLength(); i++) {
                 Node node = childs.item(i);
                 if (node instanceof Element && DEPENDENCY.equals(node.getNodeName())) {
-                    dependencies.add(new PomDependencyMgt((Element) node));
+                    dependencies.add(new PomDependencyMgtElement((Element) node));
                 }
             }
         }
@@ -228,23 +228,32 @@
     }
 
     
-    public class PomDependencyMgt {
+    public class PomDependencyMgtElement implements PomDependencyMgt {
         private final Element depElement;
         
-        PomDependencyMgt(Element depElement) {
+        PomDependencyMgtElement(Element depElement) {
             this.depElement = depElement; 
         }
         
+        /* (non-Javadoc)
+         * @see org.apache.ivy.plugins.parser.m2.PomDependencyMgt#getGroupId()
+         */
         public String getGroupId() {
             String val = getFirstChildText(depElement , GROUP_ID);
             return replaceProps(val);
         }
 
+        /* (non-Javadoc)
+         * @see org.apache.ivy.plugins.parser.m2.PomDependencyMgt#getArtifaceId()
+         */
         public String getArtifaceId() {
             String val = getFirstChildText(depElement , ARTIFACT_ID);
             return replaceProps(val);
         }
 
+        /* (non-Javadoc)
+         * @see org.apache.ivy.plugins.parser.m2.PomDependencyMgt#getVersion()
+         */
         public String getVersion() {
             String val = getFirstChildText(depElement , VERSION);
             return replaceProps(val);
@@ -253,7 +262,7 @@
     }
     
     
-    public class PomDependencyData extends PomDependencyMgt {
+    public class PomDependencyData extends PomDependencyMgtElement {
         private final Element depElement;
         PomDependencyData(Element depElement) {
             super(depElement);

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java Mon Mar 24 11:05:10 2008
@@ -45,6 +45,7 @@
 import org.apache.ivy.core.module.descriptor.License;
 import org.apache.ivy.core.module.descriptor.MDArtifact;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.OverrideDependencyDescriptorMediator;
 import org.apache.ivy.core.module.id.ArtifactId;
 import org.apache.ivy.core.module.id.ModuleId;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
@@ -184,6 +185,10 @@
 
         private static final int EXTRA_INFO = 12;
         
+        private static final int ENGINE_HINTS = 13;
+        
+        private static final int MEDIATION = 14;
+        
         private int state = NONE;
 
         private final URL xmlURL;
@@ -298,6 +303,11 @@
                 } else if ("conflicts".equals(qName)) {
                     state = CONFLICT;
                     checkConfigurations();
+                } else if ("engine-hints".equals(qName)) {
+                    state = ENGINE_HINTS;
+                    checkConfigurations();
+                } else if ("mediation".equals(qName)) {
+                    state = MEDIATION;
                 } else if ("artifact".equals(qName)) {
                     artifactStarted(qName, attributes);
                 } else if ("include".equals(qName) && state == DEP) {
@@ -317,6 +327,8 @@
                             .getValue("name")));
                 } else if ("manager".equals(qName) && state == CONFLICT) {
                     managerStarted(attributes);
+                } else if ("override".equals(qName) && state == MEDIATION) {
+                    mediationOverrideStarted(attributes);
                 } else if ("include".equals(qName) && state == CONF) {
                     includeConfStarted(attributes);
                 } else if (validate && state != EXTRA_INFO && state != DESCRIPTION) {
@@ -367,6 +379,25 @@
                 return;
             }
             getMd().addConflictManager(new ModuleId(org, mod), matcher, cm);
+        }
+
+        private void mediationOverrideStarted(Attributes attributes) {
+            String org = ivy.substitute(attributes.getValue("org"));
+            org = org == null ? PatternMatcher.ANY_EXPRESSION : org;
+            String mod = ivy.substitute(attributes.getValue("module"));
+            mod = mod == null ? PatternMatcher.ANY_EXPRESSION : mod;
+            String rev = ivy.substitute(attributes.getValue("rev"));
+            String branch = ivy.substitute(attributes.getValue("branch"));
+            String matcherName = ivy.substitute(attributes.getValue("matcher"));
+            PatternMatcher matcher = matcherName == null ? defaultMatcher : ivy
+                    .getMatcher(matcherName);
+            if (matcher == null) {
+                addError("unknown matcher: " + matcherName);
+                return;
+            }
+            getMd().addDependencyDescriptorMediator(
+                new ModuleId(org, mod), matcher, 
+                new OverrideDependencyDescriptorMediator(branch, rev));
         }
 
         private void includeConfStarted(Attributes attributes) 

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd Mon Mar 24 11:05:10 2008
@@ -251,6 +251,27 @@
 				        </xs:sequence>
 			      </xs:complexType>
       		</xs:element>
+      		<xs:element name="engine" minOccurs="0">
+			      <xs:complexType>
+				        <xs:sequence>
+				      		<xs:element name="mediation" minOccurs="0">
+							      <xs:complexType>
+								        <xs:sequence>
+								      		<xs:element name="override" minOccurs="0" maxOccurs="unbounded">
+								            	<xs:complexType>
+										            <xs:attribute name="org" type="xs:string"/>
+										            <xs:attribute name="module" type="xs:string"/>
+										            <xs:attribute name="matcher" type="xs:string"/>
+										            <xs:attribute name="rev" type="xs:string"/>
+										            <xs:attribute name="branch" type="xs:string"/>
+								            	</xs:complexType>
+								      		</xs:element>
+								        </xs:sequence>
+							      </xs:complexType>
+				      		</xs:element>
+				        </xs:sequence>
+			      </xs:complexType>
+      		</xs:element>
         </xs:sequence>
         <xs:attribute name="version" type="xs:string" use="required"/>
       </xs:complexType>

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResolver.java Mon Mar 24 11:05:10 2008
@@ -298,7 +298,7 @@
     protected ResolvedModuleRevision findModuleInCache(
             DependencyDescriptor dd, ResolveData data, boolean anyResolver) {
         return getRepositoryCacheManager().findModuleInCache(
-            dd, data.getRequestedDependencyRevisionId(dd), 
+            dd, dd.getDependencyRevisionId(), 
             getCacheOptions(data), anyResolver ? null : getName());
     }
 

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResourceResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResourceResolver.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResourceResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractResourceResolver.java Mon Mar 24 11:05:10 2008
@@ -71,7 +71,7 @@
     }
 
     public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data) {
-        ModuleRevisionId mrid = data.getRequestedDependencyRevisionId(dd);
+        ModuleRevisionId mrid = dd.getDependencyRevisionId();
         if (isM2compatible()) {
             mrid = convertM2IdForResourceSearch(mrid);
         }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/BasicResolver.java Mon Mar 24 11:05:10 2008
@@ -166,8 +166,8 @@
         try {
             clearIvyAttempts();
             clearArtifactAttempts();
-            ModuleRevisionId systemMrid = data.getRequestedDependencyRevisionId(systemDd);
-            ModuleRevisionId nsMrid = data.getRequestedDependencyRevisionId(nsDd);
+            ModuleRevisionId systemMrid = systemDd.getDependencyRevisionId();
+            ModuleRevisionId nsMrid = nsDd.getDependencyRevisionId();
             
             checkRevision(systemMrid);
 
@@ -444,7 +444,7 @@
         DependencyDescriptor nsDd = dd;
         dd = toSystem(nsDd);
         
-        ModuleRevisionId mrid = data.getRequestedDependencyRevisionId(dd);
+        ModuleRevisionId mrid = dd.getDependencyRevisionId();
         ModuleDescriptorParser parser = ModuleDescriptorParserRegistry
                 .getInstance().getParser(mdRef.getResource());
         if (parser == null) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/CacheResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/CacheResolver.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/CacheResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/CacheResolver.java Mon Mar 24 11:05:10 2008
@@ -26,7 +26,6 @@
 import org.apache.ivy.core.cache.DefaultRepositoryCacheManager;
 import org.apache.ivy.core.cache.RepositoryCacheManager;
 import org.apache.ivy.core.module.descriptor.Artifact;
-import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.report.ArtifactDownloadReport;
@@ -56,7 +55,7 @@
             throws ParseException {
         clearIvyAttempts();
 
-        ModuleRevisionId mrid = data.getRequestedDependencyRevisionId(dd);
+        ModuleRevisionId mrid = dd.getDependencyRevisionId();
         // check revision
 
         ResolvedModuleRevision rmr = getRepositoryCacheManager()
@@ -84,7 +83,8 @@
                     return node.getModuleRevision();
                 }
                 rmr = getRepositoryCacheManager().findModuleInCache(
-                        new DefaultDependencyDescriptor(dd, ivyRef.getRevision()),
+                        dd.clone(ModuleRevisionId.newInstance(
+                            dd.getDependencyRevisionId(), ivyRef.getRevision())),
                         dd.getDependencyRevisionId(),
                         getCacheOptions(data), null);
                 if (rmr != null) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/ChainResolver.java Mon Mar 24 11:05:10 2008
@@ -106,7 +106,7 @@
 
         ResolvedModuleRevision mr = null;
 
-        ModuleRevisionId mrid = data.getRequestedDependencyRevisionId(dd);
+        ModuleRevisionId mrid = dd.getDependencyRevisionId();
 
 
         Message.verbose(getName() + ": Checking cache for: " + dd);

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java Mon Mar 24 11:05:10 2008
@@ -80,7 +80,7 @@
 
     public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data) {
         if (isM2compatible() && isUsepoms()) {
-            ModuleRevisionId mrid = data.getRequestedDependencyRevisionId(dd);
+            ModuleRevisionId mrid = dd.getDependencyRevisionId();
             mrid = convertM2IdForResourceSearch(mrid);
             ResolvedResource rres = findResourceUsingPatterns(mrid, getIvyPatterns(),
                 DefaultArtifact.newPomArtifact(mrid, data.getDate()), getRMDParser(dd, data), data

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Mon Mar 24 11:05:10 2008
@@ -3564,7 +3564,50 @@
         assertTrue(getArchiveFileInCache(ivy, "org.apache.dm", "test3", "1.0",
             "test3", "jar", "jar").exists());
     }
+
+    public void testResolveMaven2ParentPomDependencyManagementOverrideTransitiveVersion() throws Exception {
+        // test;2.0 has a dependency on test2;3.0. 
+        // test has a parent of parent(2.0) then parent2. 
+        // Both parents have a dependencyManagement element for test2, and each list the version as
+        // ${pom.version}. The version for test2 in test should take precedance, 
+        // so the version should be test2 version 3.0. 
+        // test2;3.0 -> test4;2.0, but parent has a dependencyManagement section specifying test4;1.0.
+        // since maven 2.0.6, the information in parent should override transitive dependency version,
+        // and thus we should get test4;1.0
+        Ivy ivy = new Ivy();
+        ivy.configure(new File("test/repositories/parentPom/ivysettings.xml"));
+        ivy.getSettings().setDefaultResolver("parentChain");
         
+        ResolveReport report = ivy.resolve(new File(
+                "test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.pom").toURL(),
+            getResolveOptions(new String[] {"*"}));
+        assertNotNull(report);
+
+        //test the report to make sure the right dependencies are listed
+        List dependencies = report.getDependencies();
+        assertEquals(3, dependencies.size());
+        
+        IvyNode ivyNode;
+        ivyNode = (IvyNode) dependencies.get(0);
+        assertNotNull(ivyNode);
+        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.apache.dm", "test2", "3.0");
+        assertEquals(mrid, ivyNode.getId());
+        assertTrue(getIvyFileInCache(
+            ModuleRevisionId.newInstance("org.apache.dm", "test2", "3.0")).exists());
+        assertTrue(getArchiveFileInCache(ivy, "org.apache.dm", "test2", "3.0",
+            "test2", "jar", "jar").exists());
+        
+        ivyNode = (IvyNode) dependencies.get(2);
+        assertNotNull(ivyNode);
+        mrid = ModuleRevisionId.newInstance("org.apache.dm", "test4", "1.0");
+        assertEquals(mrid, ivyNode.getId());
+        assertTrue(getIvyFileInCache(
+            ModuleRevisionId.newInstance("org.apache.dm", "test4", "1.0")).exists());
+        assertTrue(getArchiveFileInCache(ivy, "org.apache.dm", "test4", "1.0",
+            "test4", "jar", "jar").exists());
+    }
+    
+
     public void testNamespaceMapping() throws Exception {
         // the dependency is in another namespace
         Ivy ivy = new Ivy();

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java Mon Mar 24 11:05:10 2008
@@ -29,7 +29,9 @@
 import org.apache.ivy.Ivy;
 import org.apache.ivy.core.module.descriptor.Artifact;
 import org.apache.ivy.core.module.descriptor.Configuration;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.DependencyDescriptorMediator;
 import org.apache.ivy.core.module.descriptor.ExcludeRule;
 import org.apache.ivy.core.module.descriptor.License;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
@@ -453,6 +455,12 @@
 
         cm = md.getConflictManager(new ModuleId("theirorg", "theirmodule2"));
         assertNull(cm);
+        
+        assertEquals(
+            ModuleRevisionId.parse("yourorg#yourmodule1#BRANCH;1.0"),
+            md.mediate(new DefaultDependencyDescriptor(
+                    ModuleRevisionId.parse("yourorg#yourmodule1;2.0"), false))
+                .getDependencyRevisionId());
 
         ExcludeRule[] rules = md.getAllExcludeRules();
         assertNotNull(rules);

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml Mon Mar 24 11:05:10 2008
@@ -106,4 +106,9 @@
 		<manager org="yourorg" module=".*" name="all" matcher="regexp"/>
 		<manager org="theirorg" module="theirmodule1" rev="1.0, 1.1"/>
 	</conflicts>
+	<engine-hints>
+	    <mediation>
+	        <override org="yourorg" module=".*1" matcher="regexp" branch="BRANCH" rev="1.0" /> 
+	    </mediation>
+	</engine-hints>
 </ivy-module>

Modified: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/parent/2.0/parent-2.0.pom
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/parent/2.0/parent-2.0.pom?rev=640488&r1=640487&r2=640488&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/parent/2.0/parent-2.0.pom (original)
+++ ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/parent/2.0/parent-2.0.pom Mon Mar 24 11:05:10 2008
@@ -35,6 +35,11 @@
           <artifactId>test2</artifactId>
           <version>${pom.version}</version>
         </dependency>
+    <dependency>
+          <groupId>org.apache.dm</groupId>
+          <artifactId>test4</artifactId>
+          <version>1.0</version>
+        </dependency>
     </dependencies>
   </dependencyManagement>
    <dependencies>

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.jar?rev=640488&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.pom
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.pom?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.pom (added)
+++ ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.pom Mon Mar 24 11:05:10 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<project>
+  <parent>
+    <artifactId>parent</artifactId>
+    <groupId>org.apache.dm</groupId>
+    <version>2.0</version>
+   </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.dm</groupId>
+  <artifactId>test</artifactId>
+  <name>Test parsing parent POM</name>
+  <version>2.0</version>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.dm</groupId>
+      <artifactId>test2</artifactId>
+      <version>3.0</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test/2.0/test-2.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.jar?rev=640488&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.pom
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.pom?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.pom (added)
+++ ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.pom Mon Mar 24 11:05:10 2008
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.dm</groupId>
+  <artifactId>test2</artifactId>
+  <name>Test parsing parent POM</name>
+  <version>3.0</version>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.dm</groupId>
+      <artifactId>test4</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test2/3.0/test2-3.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.jar?rev=640488&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.pom
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.pom?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.pom (added)
+++ ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.pom Mon Mar 24 11:05:10 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.dm</groupId>
+  <artifactId>test4</artifactId>
+  <name>Test parsing parent POM</name>
+  <version>1.0</version>
+</project>

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/1.0/test4-1.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.jar?rev=640488&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.pom
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.pom?rev=640488&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.pom (added)
+++ ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.pom Mon Mar 24 11:05:10 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.dm</groupId>
+  <artifactId>test4</artifactId>
+  <name>Test parsing parent POM</name>
+  <version>2.0</version>
+</project>

Propchange: ant/ivy/core/trunk/test/repositories/parentPom/org/apache/dm/test4/2.0/test4-2.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message