ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iyad Elayyan" <Iyad.Elay...@oracle.com>
Subject RE: ant task to run subprojects
Date Fri, 03 Jan 2003 22:18:03 GMT
-the testcase/example was inlined with the original email
-I choose srcDir to be compatible with the javac task
-the subprojects are executed in the order specified,
javac will have to track sub-projejct inter dependencies.
    <!--
=================================================================== -->
    <!-- compile
             -->
    <!--
=================================================================== -->
    <target name="compile-subproject1" depends="setup, copy-subproject1">
        <javac srcdir="${subproject1.src.dir}"
               destdir="${subproject1.bld.dir}"
               fork="${javac.fork}">
            <classpath>
                <pathelement location="${subproject2.bld.dir}"/>
                <pathelement path="${common.class.path}"/>
            </classpath>
        </javac>
    </target>

thanks.

|Iyad Elayyan
|j2eedev_us
|Oracle Corporation


-----Original Message-----
From: Nick Chalko [mailto:nick@chalko.com]
Sent: Friday, January 03, 2003 1:49 PM
To: Ant Developers List
Subject: Re: ant task to run subprojects


Looks intesting.

IMHO, If you want to get stuff included you should send it as a patch
with testcases.  see http://jakarta.apache.org/site/source.html#Patches
  (note I am not a commiter here)


It seems to me like srcPathRef is a better name than srcDir.



Iyad Elayyan wrote:

>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>
>
>
>------------------------------------------------------------------------
>
>--
>To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message