On Tue, 14 Dec 2004 08:14:15 +0000 James Abley <[EMAIL PROTECTED]> wrote > For that last part, I think that you need to look at <depend/>. Where is that documented? (I see a dependset, but I think that's different?) I've been working with the depends attribute in targets, but that is not the same? I've built a condition chain for a file that uses a custom compiler (well, more of a pre-processor), and that handles the dependencies, but I end up having to write specific targets in that, and I had the idea that ant allowed you to escape specifying every intermediate target. Idle hope? Here's the condition chain: ---------inclusion-------------------- <target name="horbsample-service-check" depends="horbsample-base"> <condition property="horbstuff.baseNotChanged"> <and> <uptodate property="horbstuff.proxygood"> <!-- Service_* != Service* --> <srcfiles dir="${src}/${sample}" includes="*.java" excludes="**/*Client.*, **/*Service_*.*"/> <mapper type="merge" to="${src}/${sample}/PermissionsService_Proxy.java"/> </uptodate> <uptodate property="horbstuff.skeletongood"> <!-- Service_* != Service* --> <srcfiles dir="${src}/${sample}" includes="*.java" excludes="**/*Client.*, **/*Service_*.*"/> <mapper type="merge" to="${src}/${sample}/PermissionsService_Skeleton.java"/> </uptodate> </and> </condition> </target> <target name="horbsample-server" depends="horbsample-service-check" unless="horbstuff.baseNotChanged"> <exec executable="horbc" dir="${src}" failifexecutionfails="true" > <arg line="-v ${sample}/*Service.java"/> </exec> </target> ---------end-of-inclusion-------------------- I tried doing the same thing with a regular java file further up the food chain, but it doesn't take: ---------inclusion-------------------- <target name="horbsample-client-check" depends="horbsample-server,horbsample-base"> <uptodate property="horbstuff.clientgood"> <srcfiles dir="${src}/${sample}" includes="*.java" excludes="**/*Client.*"/> <mapper type="merge" to="${src}/${sample}/PermissionsClient.java"/> </uptodate> </target> <target name="horbsample-client" depends="horbsample-client-check" unless="horbstuff.clientgood"> <javac srcdir="${src}" source="1.4" encoding="Shift_JIS" listfiles="yes" includes="${sample}/*Client.*" excludes="**/*.class" /> </target> ---------end-of-inclusion-------------------- And, since you tell me about -debug, here's what -debug says about the above: ---------inclusion-------------------- horbsample-client-check: fileset: Setup scanner in dir D:\data\rees_jefe\horb\src\jp\co\ddcom\horbsample with patternSet{ includes: [*.java] excludes: [**/*C lient.*] } [uptodate] Permissions.java added as D:/data/rees_jefe/horb/src/jp/co/ddcom/horbsample/PermissionsClient.java is outdated. [uptodate] PermissionsList.java omitted as D:/data/rees_jefe/horb/src/jp/co/ddcom/horbsample/PermissionsClient.java is up to date. [uptodate] PermissionsService.java omitted as D:/data/rees_jefe/horb/src/jp/co/ddcom/horbsample/PermissionsClient.java is up to dat e. [uptodate] PermissionsService_Proxy.java added as D:/data/rees_jefe/horb/src/jp/co/ddcom/horbsample/PermissionsClient.java is outda ted. [uptodate] PermissionsService_Skeleton.java added as D:/data/rees_jefe/horb/src/jp/co/ddcom/horbsample/PermissionsClient.java is ou tdated. horbsample-client: fileset: Setup scanner in dir D:\data\rees_jefe\horb\src with patternSet{ includes: [jp/co/ddcom/horbsample/*Client.*] excludes: [** /*.class] } [javac] jp\co\ddcom\horbsample\PermissionsClient.java omitted as jp/co/ddcom/horbsample/PermissionsClient.class is up to date. ---------end-of-inclusion-------------------- > Have a > > <depend srcdir="${src}" destdir="${dest}"> > > <javac/> is not aware of dependencies and inheritance hierarchies. I think I see that, although a dead simple build.xml sure does a good job of pretending it knows about such things. > For the problem with destdir, I'm not sure. What output do you get from > -verbose / -debug? -debug! I needed to know about that. (Thanks!) Setting project property: dest -> D:\data\rees_jefe\horb\object (I don't suppose I should post the whole debug listing?) > On Tue, 2004-12-14 at 07:43, Joel wrote: > > The following piece of my build.xml works well buried in a sequential: > > > > <javac > > srcdir="${src}" > > source="1.4" > > encoding="Shift_JIS" > > listfiles="yes" > > includes="${sample}/**" > > excludes="**/*Client.*, **/*Service*.*, **/*.class" > > /> > > > > Except for two things. One, if I add the > > > > destdir=${dest} > > > > attribute, it does not put any output in the directory tree referenced > > by ${dest} and it ignores that directory when checking dependencies. > > > > Moreover, when I bury it in a target that uses the depends attribute, it > > loses track of the dependencies. That is, I have a Sample.java and a > > SampleList.java, with SampleList importing Sample and referencing a > > Sample field, and if I edit Sample.java, ant will compile Sample.java > > but will not compile SampleList.java. > > > > Any suggestions about what I'm misunderstanding? Thanks again. -- Joel Rees <[EMAIL PROTECTED]> digitcom, inc. 株式会社デジコム Kobe, Japan +81-78-672-8800 ** <http://www.ddcom.co.jp> ** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]