How to get Ant in Apache to copy files every build?

You can use overwrite="true" to force Ant to always overwrite files. But looking at the manual I also found this interesting tidbit regarding the granularity attribute.

Up vote 0 down vote favorite share g+ share fb share tw.

I'm using Eclipse and Ant in my development environment. I've come across a problem Here's part of my build. Xml Deploying in ${tomcat_home}/webapps Copying JSP files from ${build_dir} to ${tomcat_home}/${ant.project.

Name}/$ I change a file, then run an ant build - all the files and jars are copied to the right place on my server. But the problem I have is, if I make another change quickly and then run Ant again, my files aren't copied. Obviously Any is looking at the timestamp to see when I last updated the file.

If it matches the same minute, it doesn't update. How can I force the file copying every time? Thanks java eclipse ant build.

Xml link|improve this question asked Jul 30 '10 at 22:59jeph perro4431642 86% accept rate.

You can use overwrite="true" to force Ant to always overwrite files. But looking at the manual, I also found this interesting tidbit regarding the granularity attribute: The number of milliseconds leeway to give before deciding a file is out of date. This is needed because not every file system supports tracking the last modified time to the millisecond level.

Default is 1 second, or 2 seconds on DOS systems. This can also be useful if source and target files live on separate machines with clocks being out of sync. Since Ant 1.6.2.

You could try experimenting with this to see if it helps.

Thanks very much – jeph perro Jul 30 '10 at 23:17.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions