@echo off
rem This is an example "build-all-clean.bat" file, used to build struts from 
rem a clean commons. 
rem What is needed is a good top level commons build.xml for ant/maven.
rem I know I could submit a patch.
rem
rem This bat file uses Cygwin to remove build directories since 
rem commons doesn't have an ant clean target. (HINT for COMMONS COMITTERS!)
rem Make any changes you need, and rename this file
rem to "build-all-clean.bat" and place it in the same directory that 
rem contains the Struts "build.xml" file.
rem 
rem assumes jakarta-commons, 
rem         jakarta-commons-sandbox,
rem         struts
rem in the same directory.
rem Also assumes uses of 
rem           maven beta 10 or above,
rem           ant 1.5.2
rem           cactus v 1.4.1 & v1.2
rem              v 1.2 Because the commons (resources) use an old version
rem                    of cactus for units test, that maven doesn't precompile 
rem                    anymore. You'll need to copy the cactus.jar into the 
rem                    maven repository directory. I filed a bug report for this.
rem              
rem
rem $Id: build-all-clean.bat.sample 51783 2004-10-02 02:18:45Z jmitchell $

cd ..

rem goto manualbuild

rm -rf */*/dist
rm -rf */*/target
rm -rf */*/build
rm -rf struts/dist
rm -rf struts/target

:manualbuild

SET CLEAN=clean

cd jakarta-commons

cd logging
call ant %CLEAN% dist

cd ..\collections
call ant %CLEAN% dist

cd ..\beanutils
call ant %CLEAN% dist

cd ..\lang
call ant %CLEAN% dist

cd ..\digester
call ant %CLEAN% dist

cd ..\discovery
call ant %CLEAN% dist

cd ..\validator
call ant %CLEAN% dist

cd ..\fileupload
call ant %CLEAN% dist

cd ..\..\jakarta-struts
call ant %CLEAN% dist

pause