Browse Source

fetch moves to maven, though no auto download of those tasks, yet.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278281 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 20 years ago
parent
commit
5555fa6a05
2 changed files with 59 additions and 41 deletions
  1. +58
    -41
      fetch.xml
  2. +1
    -0
      lib/libraries.properties

+ 58
- 41
fetch.xml View File

@@ -81,48 +81,65 @@
</fail> </fail>
<echo>Downloading to ${dest.dir}</echo> <echo>Downloading to ${dest.dir}</echo>
</target> </target>

<target name="probe-m2" >
<!-- Look for M2 ant tasks in our classpath-->
<available property="m2.antlib.found"
resource="org/apache/maven/artifact/ant/antlib.xml" />
<condition property="m2.antlib.typefound">
<typefound name="antlib:org.apache.maven.artifact.ant:artifact" />
</condition>
</target>
<!-- any init stuff -->
<target name="init" depends="setproxy,pick-dest" >
<macrodef name="f">
<attribute name="project" />
<sequential>
<fail>
Unknown project @{project}
<condition>
<not>
<isset property="@{project}.version"/>
</not>
</condition>
</fail>
<libraries destDir="${dest.dir}" flatten="true" >
<library project="@{project}" version="${@{project}.version}" />
</libraries>
</sequential>
</macrodef>

<target name="get-m2" depends="setproxy,probe-m2" unless="m2.antlib.found">
<!-- fetch M2 ant tasks into our repository, if it is not there-->
<!-- <property name="" /> -->
<fail>
Fetch the ant task JAR from http://maven.apache.org/maven2/ant-tasks.html
</fail>
</target>
<target name="macros" depends="get-m2"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">


<macrodef name="f2"> <macrodef name="f2">
<attribute name="project" /> <attribute name="project" />
<attribute name="archive" />
<attribute name="archive" default="@{project}"/>
<sequential> <sequential>
<fail> <fail>
Unknown file @{archive}/
Unknown archive @{archive}
<condition> <condition>
<not> <not>
<isset property="@{archive}.version"/> <isset property="@{archive}.version"/>
</not> </not>
</condition> </condition>
</fail>
<libraries destDir="${dest.dir}" flatten="true" >
<library project="@{project}"
archive="archive"
version="${@{archive}.version}" />
</libraries>
</fail>
<artifact:dependencies pathID="@{archive}.path">
<dependency groupID="@{project}"
artifactID="@{archive}"
version="${@{archive}.version}"/>
</artifact:dependencies>
<!-- now we are left with the problem of getting the files
into our directory -->
<copypath destdir="${dest.dir}" pathref="@{archive}.path">
<flattenmapper/>
</copypath>
</sequential> </sequential>
</macrodef> </macrodef>
</target> </target>

<!-- any init stuff -->
<target name="init" depends="setproxy,pick-dest,macros" >

</target>

<target name="diag" depends="init"> <target name="diag" depends="init">
<echoproperties /> <echoproperties />
</target> </target>
@@ -130,65 +147,65 @@
<target name="logging" <target name="logging"
description="load logging libraries" description="load logging libraries"
depends="init"> depends="init">
<f project="log4j" />
<f project="commons-logging" />
<f2 project="log4j" />
<f2 project="commons-logging" archive="commons-logging-api" />
</target> </target>
<target name="junit" <target name="junit"
description="load junit libraries" description="load junit libraries"
depends="init"> depends="init">
<f project="junit" />
<f2 project="junit" />
</target> </target>
<target name="xml" <target name="xml"
description="load full XML libraries (xalan, resolver)" description="load full XML libraries (xalan, resolver)"
depends="init"> depends="init">
<f project="xalan" />
<f project="xml-resolver" />
<f2 project="xalan" />
<f2 project="xml-resolver" />
</target> </target>


<target name="networking" <target name="networking"
description="load networking libraries (commons-net; jsch)" description="load networking libraries (commons-net; jsch)"
depends="init"> depends="init">
<f project="commons-net" />
<f project="jsch" />
<f2 project="commons-net" />
<f2 project="jsch" />
</target> </target>


<target name="regexp" <target name="regexp"
description="load regexp libraries" description="load regexp libraries"
depends="init"> depends="init">
<f project="regexp" />
<f project="oro" />
<f2 project="regexp" />
<f2 project="oro" />
</target> </target>
<target name="antlr" <target name="antlr"
description="load antlr libraries" description="load antlr libraries"
depends="init"> depends="init">
<f project="antlr" />
<f2 project="antlr" />
</target> </target>


<target name="bcel" <target name="bcel"
description="load bcel libraries" description="load bcel libraries"
depends="init"> depends="init">
<f project="bcel" />
<f2 project="bcel" />
</target> </target>


<target name="jdepend" <target name="jdepend"
description="load jdepend libraries" description="load jdepend libraries"
depends="init"> depends="init">
<f project="jdepend" />
<f2 project="jdepend" />
</target> </target>


<target name="bsf" <target name="bsf"
description="load bsf libraries" description="load bsf libraries"
depends="init"> depends="init">
<f project="bsf" />
<f2 project="bsf" />
</target> </target>


<target name="debugging" <target name="debugging"
description="internal ant debugging" description="internal ant debugging"
depends="init"> depends="init">
<f project="which" />
<f2 project="which" />
</target> </target>
<target name="all" <target name="all"


+ 1
- 0
lib/libraries.properties View File

@@ -7,6 +7,7 @@ bsf.version=2.3.0
bsh.version=2.0.b1 bsh.version=2.0.b1
commons-net.version=1.4.0 commons-net.version=1.4.0
commons-logging.version=1.0.4 commons-logging.version=1.0.4
commons-logging-api.version=${commons-logging.version}
jdepend.version=2.7 jdepend.version=2.7
junit.version=3.8.1 junit.version=3.8.1
jsch.version=0.1.17 jsch.version=0.1.17


Loading…
Cancel
Save