• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Automatically executing targets on change

 
Carl Tardif
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,

It will be easier to illustrate what I want to do with an example:

When we "deploy", we copy everything from our main/deploy folder to our generated build/deploy folder.

I would like to know if it is possible for Ant to copy ONLY the files that were modified since the last deploy and how to achieve this ?

Also, would it be possible for Ant to detect changes in the main/deploy folder and to automatically do the deploy when a change is made to any file in main/deploy ?

I've looked for a way to achieve this in the ant manual and accross the web, I have seen the <UpToDate> task but I fail to see how to actually include it in my code to be able to automatically detect changes to files in a folder and then call a target only on modified files when such a change is detected.

All help is appreciated. Thanks in advance.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally Ant won't copy files unless they've changed. Have you tried a simple <copy> and verified that it won't do that?
 
Carl Tardif
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I have tried that and it works as it should. I also found out there is no way to automatically trigger a target when a file is modified.

Thanks for the reply, I think I will have to look for a workaround to this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic