ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iyad Elayyan" <Iyad.Elay...@oracle.com>
Subject ant task to run subprojects
Date Fri, 03 Jan 2003 21:23:22 GMT
Hi all, please find attached changes to the <ant> task to enable it to scan
a path specified by the new scrDir attribute and build each subproject.
below is an example. would someone kindly check it in.
thanks.


|Iyad Elayyan
|j2eedev_us
|Oracle Corporation

common.xml
~~~~~~~~~~
    <path id="all.src.path">
        <pathelement location="subproject1"/>
        <pathelement location="subproject2"/>
        <pathelement location="subproject3"/>
    </path>
    <property name="all.src.path" refid="all.src.path" />

build.xml
~~~~~~~~~
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE project [<!ENTITY common SYSTEM "file:./common.xml">]>

<project name="src" default="all" basedir=".">

    &common;

    <!--
=================================================================== -->
    <!-- call clean on
            -->
    <!--
=================================================================== -->
    <target name="clean">
      <ant srcDir="${all.src.path}" target="clean"/>
    </target>

    <!--
=================================================================== -->
    <!-- call compile on
            -->
    <!--
=================================================================== -->
    <target name="compile">
      <ant srcDir="${all.src.path}" target="compile"/>
    </target>

    <!--
=================================================================== -->
    <!-- call jar on
            -->
    <!--
=================================================================== -->
    <target name="jar">
      <ant srcDir="${all.src.path}" target="jar"/>
    </target>

    <!--
=================================================================== -->
    <!-- call all on
            -->
    <!--
=================================================================== -->
    <target name="all">
      <ant srcDir="${all.src.path}" target="all"/>
    </target>

</project>

Mime
View raw message