Browse Source

rename get-m2 dest.dir to m2.dest.dir for better portability;

<fail unless=""> is more compact than a nested <not><isset /></not> in fetch/pickDest


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@416830 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
d6c1221db2
2 changed files with 7 additions and 11 deletions
  1. +2
    -6
      fetch.xml
  2. +5
    -5
      get-m2.xml

+ 2
- 6
fetch.xml View File

@@ -66,13 +66,9 @@
value="${userlib.dir}">
<equals arg1="${dest}" arg2="user" />
</condition>
<fail>
Unknown destination : ${dest}
<condition>
<not><isset property="dest.dir" /></not>
</condition>
</fail>
<fail unless="dest.dir">Unknown destination : ${dest}</fail>
<echo>Downloading to ${dest.dir}</echo>
<property name="m2.dest.dir" value="${dest.dir}" />
</target>




+ 5
- 5
get-m2.xml View File

@@ -13,7 +13,7 @@

<description>
This build file downloads the Maven2 Ant tasks,
and installs them in the location specified by the dest.dir property.
and installs them in the location specified by the m2.dest.dir property.

You may need to set proxy settings. On Java1.5, Ant tries to get
this from the OS, unless you use the -noproxy option.
@@ -49,11 +49,11 @@
</macrodef>

<target name="probe-m2">
<require property="dest.dir" />
<require property="m2.dest.dir" />
<require property="m2.jar.name" />

<!-- Look for M2 ant tasks in our classpath-->
<property name="m2.artifact" location="${dest.dir}/${m2.jar.name}" />
<property name="m2.artifact" location="${m2.dest.dir}/${m2.jar.name}" />
<available property="m2.antlib.found" resource="${m2.antlib.resource}" />
<condition property="m2.antlib.typefound">
<typefound name="${m2.antlib.uri}:artifact" />
@@ -62,9 +62,9 @@

<target name="download-m2" depends="probe-m2" unless="m2.antlib.found">
<require property="m2.antlib.url" />
<echo>Downloading to ${dest.dir}</echo>
<echo>Downloading to ${m2.dest.dir}</echo>

<mkdir dir="${dest.dir}" />
<mkdir dir="${m2.dest.dir}" />
<!-- fetch M2 ant tasks into our repository, if it is not there-->
<get src="${m2.antlib.url}"
dest="${m2.artifact}"


Loading…
Cancel
Save