Reputation: 27286
I have a build process in Java where I need to use the Ant exec
task to launch an external program. That external program will then create some sources based on an abstract specification, i.e. a kind of code generation.
How can I get the exec
task to execute only if the input to the code generation is newer than the output? I.e. when the input has been modified after the output was last created?
Upvotes: 1
Views: 255
Reputation: 27286
Since I wanted to specify an arbitrary set of target files (which is cumbersome or impossible with Uptodate
that only uses the Ant mapper
element for multiple target files), I ended up using the ant-contrib
OutOfDate task which supported what I wanted more intuitively.
Upvotes: 1