Here's my situation:
- Windows Server
- Apache
- CruiseControl
The last step of my CruiseControl deploy scripts copies the build to Apache's htdocs folder, in a "demos" folder (I believe this is referred to as a "hot deploy"?)
All is good and dandy, except that SOMETIMES (not common, but it happens enough that it bugs me), the demos folder doesn't contain the files I built! The old one is gone and the new one isn't there, just vanished.
My gut feeling is that if I try to overwrite a file while someone on the web is downloading it, Apache just deletes it after the download is done? I don't know, it doesn't make any sense.
I looked everywhere and couldn't find even a hint...let's see how good this StackOverflow community really is! :)
Here's the "deploy" target in my ANT script:
<target name="deploy" depends="revertVersionFile">
<copy todir="${deploy.dir}">
<fileset dir="${bin.dir}"/>
</copy>
<copy todir="${deploy.dir}">
<fileset dir="${bin.dir}"/>
</copy>
<available file="${deploy.dir}/MockupsLive.swf" property="mockupsFile"/>
<fail unless="mockupsFile" message="MockupsLive doesn't exist!"/>
<available file="${deploy.dir}/skins/sketch/sketch.swf" property="skinFile"/>
<fail unless="skinFile" message="sketch.swf doesn't exist!"/>
</target>