Index: src/main/java/org/apache/maven/artifact/ant/Repository.java
===================================================================
--- src/main/java/org/apache/maven/artifact/ant/Repository.java	(revision 559324)
+++ src/main/java/org/apache/maven/artifact/ant/Repository.java	(working copy)
@@ -35,12 +35,14 @@
     private String refid;
 
     private String layout = "default";
+    
+    protected abstract String getDefaultId();
 
     public String getId()
     {
         if ( getInstance().id == null )
         {
-            getInstance().setId( "remote" );
+            getInstance().setId( getDefaultId() );
         }
         return getInstance().id;
     }
Index: src/main/java/org/apache/maven/artifact/ant/LocalRepository.java
===================================================================
--- src/main/java/org/apache/maven/artifact/ant/LocalRepository.java	(revision 559324)
+++ src/main/java/org/apache/maven/artifact/ant/LocalRepository.java	(working copy)
@@ -41,4 +41,9 @@
     {
         this.path = path;
     }
+
+    protected String getDefaultId()
+    {
+        return "local";
+    }
 }
Index: src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java
===================================================================
--- src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java	(revision 559324)
+++ src/main/java/org/apache/maven/artifact/ant/RemoteRepository.java	(working copy)
@@ -88,4 +88,9 @@
         this.releases = releases;
     }
 
+    protected String getDefaultId()
+    {
+        return getUrl();
+    }
+
 }
Index: sample.build.xml
===================================================================
--- sample.build.xml	(revision 559324)
+++ sample.build.xml	(working copy)
@@ -39,7 +39,7 @@
   </target>
   
   <target name="test-all-deps" description="All dependencies tests"
-    depends="test-pom,test-pom-with-parent,test-no-deps,test-pom-deps,test-deps,test-legacy-pom">
+    depends="test-pom,test-pom-with-parent,test-no-deps,test-pom-deps,test-dep-two-repos,test-deps,test-legacy-pom">
     <echo>test-bad-dep and test-invalid-pom-ref must be run manually, since they are intended to fail</echo>
   </target>
 
@@ -153,6 +153,17 @@
     </copy>
   </target>
 
+  <target name="test-dep-two-repos" depends="initTaskDefs">
+    <delete dir="target/tmp"/>
+    <!-- MANTTASKS-78 -->
+    <artifact:dependencies verbose="true">
+      <dependency groupId="it.ant-tasks" artifactId="snapshotUniqueFalse" version="2.0.7-SNAPSHOT"/>
+      <localRepository path="target/tmp"/>
+      <remoteRepository url="file://${user.dir}/src/test/repo"/>
+      <remoteRepository url="file://${user.dir}/target/tmp/fake"/>
+    </artifact:dependencies>
+  </target>
+
   <target name="test-deploy-spaces" depends="initTaskDefs,installSshProvider">
     <echo file="target/test file.txt">dummy</echo>
     <artifact:deploy file="target/test file.txt">
