ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RADEMAKERS Tanguy <>
Subject Re: Dependencies between two subdirectories
Date Fri, 12 Mar 2004 15:29:39 GMT
Baz wrote:

>The first thing comes to my head is to do <ant dir="../B"
>Target="compile"/> from directory A. Is it the right way to do it?


That's how i do it, plus the compile target in /B/build.xml looks like:

<target name="compile" depends="check.required" if="compile.required">

where the "check.required" targets checks if a compile is required:

    <target name="check.required">
        <condition property="compile.required">
                    <available file="${SAP_EAR}"/>
                    <uptodate targetfile="${SAP_EAR}">
                        <srcfiles dir="${COMP_JAVA_SRC}" 
                        <srcfiles dir="${COMP_SRC}/META-INF" 
                        <srcfiles file="${COMMON_JAR}"/>
                        <srcfiles file="${EJBMSG_JAR}"/>
        <echo message="Build of ${COMP_NAME} required ? 

so that B only rebuilds itself if it has to but A is guaranteed that the 
latest version of B will be available when A is built.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message