Index: test/java/org/apache/ivy/ant/IvyResolveTest.java
===================================================================
--- test/java/org/apache/ivy/ant/IvyResolveTest.java	(révision 1094689)
+++ test/java/org/apache/ivy/ant/IvyResolveTest.java	(copie de travail)
@@ -18,7 +18,6 @@
 package org.apache.ivy.ant;
 
 import java.io.File;
-import java.util.List;
 
 import junit.framework.TestCase;
 
@@ -586,5 +585,15 @@
             // ok
         }
     }
+    
+    public void testSimpleExtends() throws Exception {
+        resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-extends-multiconf.xml"));
+        resolve.execute();
+        assertEquals("1", resolve.getProject().getProperty("ivy.parents.count"));
+        assertEquals("apache", resolve.getProject().getProperty("ivy.parent[0].organisation"));
+        assertEquals("resolve-simple", resolve.getProject().getProperty("ivy.parent[0].module"));
+        assertEquals("1.0", resolve.getProject().getProperty("ivy.parent[0].revision"));
+        assertEquals(null, resolve.getProject().getProperty("ivy.parent[0].branch"));
+    }
 
 }
Index: src/java/org/apache/ivy/ant/IvyResolve.java
===================================================================
--- src/java/org/apache/ivy/ant/IvyResolve.java	(révision 1094689)
+++ src/java/org/apache/ivy/ant/IvyResolve.java	(copie de travail)
@@ -18,7 +18,6 @@
 package org.apache.ivy.ant;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.text.ParseException;
 import java.util.ArrayList;
@@ -32,6 +31,7 @@
 import org.apache.ivy.core.module.descriptor.DefaultExcludeRule;
 import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.ExtendsDescriptor;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.report.ResolveReport;
@@ -344,6 +344,24 @@
                 settings.setVariable("ivy.module", mdName);
                 getProject().setProperty("ivy.revision", mdRev);
                 settings.setVariable("ivy.revision", mdRev);
+                for (int i = 0; i < md.getInheritedDescriptors().length; i++) {
+                    ExtendsDescriptor parent = md.getInheritedDescriptors()[i];
+                    String parentOrg = parent.getResolvedParentRevisionId().getOrganisation();
+                    String parentModule = parent.getResolvedParentRevisionId().getName();
+                    String parentRevision = parent.getResolvedParentRevisionId().getRevision();
+                    String parentBranch = parent.getResolvedParentRevisionId().getBranch();
+                    getProject().setProperty("ivy.parent["+i+"].organisation", parentOrg);
+                    settings.setVariable("ivy.parent["+i+"].organisation", parentOrg);
+                    getProject().setProperty("ivy.parent["+i+"].module", parentModule);
+                    settings.setVariable("ivy.parent["+i+"].module", parentModule);
+                    getProject().setProperty("ivy.parent["+i+"].revision", parentRevision);
+                    settings.setVariable("ivy.parent["+i+"].revision", parentRevision);
+                    getProject().setProperty("ivy.parent["+i+"].branch", parentBranch);
+                    settings.setVariable("ivy.parent["+i+"].branch", parentBranch);
+                }
+                getProject().setProperty("ivy.parents.count", String.valueOf(md.getInheritedDescriptors().length));
+                settings.setVariable("ivy.parents.count", String.valueOf(md.getInheritedDescriptors().length));
+                
                 Boolean hasChanged = null;
                 if (getCheckIfChanged()) {
                     hasChanged = Boolean.valueOf(report.hasChanged());
Index: doc/use/resolve.html
===================================================================
--- doc/use/resolve.html	(révision 1094689)
+++ doc/use/resolve.html	(copie de travail)
@@ -54,6 +54,22 @@
 <li>ivy.deps.changed.${resolveId}</li>
 </ul>
 
+<b>Since 2.3</b>
+If current module extends other modules 
+<ul>
+<li>ivy.parents.count</li>
+number of parents module
+<li>ivy.parent[index].organisation</li>
+set to the organisation name found in the parent ivyfile which was used for resolve
+<li>ivy.parent[index].module</li>
+set to the module name found in the parent ivyfile which was used for resolve
+<li>ivy.parent[index].revision</li>
+set to the revision name found in the parent ivyfile which was used for resolve
+<li>ivy.parent[index].branch</li>
+set to the branch name found in the parent ivyfile which was used for resolve
+</ul>
+Where <i>index</i> represent the index of extends module.
+
 When ivy has finished the resolve task, it outputs a summary of what has been resolved. This summary looks like this:
 <pre>
 ---------------------------------------------------------------------
