You can automate almost all kinds of things, from compilation files processed by ant stages.
- In project.properties file must add a reference for your end folder
war.custom.dir=/path/to/end/folder/
"this is not mandatory but is a correct method"
- Then, in your build.xml file should add this chunk of code
<target name="-post-dist"> <echo message="Copy .war file to my custom folder"/> <copy file="${dist.war}" todir="${war.custom.dir}" /> </target>
And your file .war, will move wherever you want.
Could also be changed your file in the build-impl.xml target "do-ear-dist"
allowing directly effect the compression to your end folder.
Or you could also modify references in your project to work on your end folder, the mechanism is really very simple to customize as you think best.