Conor MacNeill wrote: > > Conditional execution of tasks is a topic of considerable debate on the ant > list. Many people have a strong desire to avoid creating within ant a new > programming language. > > Conor
I agree 100%. And, I'm new to this arena, so I'm not up to speed on what's been proposed, debated, etc. I'm trying to move from an Imakefile / Makefile universe, and that stuff is a MESS. Full of fragments of shell script, etc, etc. I have been able to do 95% of what those Imakefiles did without anything special, and the build xml file is more more readable. But, there's the remaining 5%. And that 5% are the tasks that have some conditional processing. If the build universe were perfect, we could live without it. But, I've never encountered a perfect world yet. When I read about the "available" task, it made sense that I could set a property to check to see if something is available. But, if there isn't any facility to use those properties to conditionally perform some other task, then what's the point? For example, we use CORBA. Before the java sources can be compiled, we need to run a program that does idl to java processing, creating additional java sources to be compiled. If I make the compile target depend on the idl2java target, then every time I compile, the idl2java processing occurs and the generated java files' time stamps change, so now ant thinks there are a bunch of files that need to be recompiled. But the content of those generated files really didn't change, so there is no reason to re-compile. If I could set and TEST a property to see if one of the generated files was present, I could suppress the idl2java processing, and solve this problem. Next time I do a "clean", the generated java files would disappear, the corresponding 'available' property would be false, and so I'd do the idl2java processing, then the compile. I can't be the only one with this kind of situation in a build. But right now, since I can't conditionally run a java program based on the value of a property, I have to live with having the idl to java processing happen every build, causing extra compilation. Or am I being dumb in this area, and not catching on to some capability that would do what I want??? Thanks! -ken
