Index: xdocs/changes.xml
===================================================================
--- xdocs/changes.xml	(revision 125097)
+++ xdocs/changes.xml	(working copy)
@@ -27,6 +27,7 @@
     
     <release version="1.9" date="">
       <action dev="epugh" type="add" issue="MPANT-7">Obey jar override and not attempt to download relative jars.</action>
+      <action dev="aheritier" type="add" issue="MPANT-20" due-to="Dennis Lundberg">Allow URL substitutions in generated build.xml files.</action>
     </release>    
     <release version="1.8.1" date="2004-08-20">
       <action dev="carlos" type="fix" issue="MPANT-16">Use relative paths in test resources filesets.</action>
Index: xdocs/properties.xml
===================================================================
--- xdocs/properties.xml	(revision 125097)
+++ xdocs/properties.xml	(working copy)
@@ -56,6 +56,26 @@
             goal.
           </td>
         </tr>
+        <tr>
+          <td>maven.ant.use.get.properties</td>
+          <td>Yes</td>
+          <td>
+            Setting this property to "true" changes the way the get
+            tasks are generated:
+            <ul>
+              <li>For each dependency where a &lt;get&gt; task is generated,
+                an Ant property is created that defines the default URL from
+                which Maven will retrieve that dependency.</li>
+              <li>In the actual &lt;get&gt; tasks, the Ant property is used
+                 instead of a hard coded URL based on the default
+                 repository.</li>
+              <li>A <code>&lt;property file="build.properties"/&gt;</code>
+                element is added at the top of the generated buildfile, to
+                allow local property overrides to be made.</li>
+            </ul>
+            Valid values are "true" or "false". Defaults to "false".
+          </td>
+        </tr>
       </table>
     </section>
   </body>
Index: src/plugin-resources/templates/build.jelly
===================================================================
--- src/plugin-resources/templates/build.jelly	(revision 125097)
+++ src/plugin-resources/templates/build.jelly	(working copy)
@@ -42,6 +42,9 @@
 
 <project name="${pom.artifactId}" default="jar" basedir=".">
   
+  <j:if test="${maven.ant.use.get.properties}">
+  <property file="build.properties"/>              
+  </j:if>
   <j:set var="baseDirFile" value="${pom.file.canonicalFile.parentFile}"/>
   <maven:makeRelativePath basedir="${baseDirFile}" path="${maven.build.dir}" separator="/" var="defaulttargetdir"/>
   <property name="defaulttargetdir" value="${defaulttargetdir}"/> 
@@ -355,9 +358,19 @@
       <j:choose>
         <j:when test="${checkExist.exists()}">
           <j:set var="dep" value="${lib.dependency}"/>
-   <!-- note: this is a valid use of artifactDirectory -->
+          <!-- note: this is a valid use of artifactDirectory -->
+          <j:set var="url" value="${repo}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"/>
+          <j:choose>
+            <j:when test="${maven.ant.use.get.properties}">
+    <property name="${dep.artifact}" value="${url}"/>
+              <j:set var="get.src" value="$${${dep.artifact}}"/>
+            </j:when>
+            <j:otherwise>
+              <j:set var="get.src" value="${url}"/>
+            </j:otherwise>
+          </j:choose>      
     <get 
-      src="${repo}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"
+      src="${get.src}"
       dest="$${libdir}/${dep.artifact}"
       usetimestamp="true"
       ignoreerrors="true"
