@echo off

REM -------------------------------------------------------
REM Update user installed JDK Home location in settings.xml
REM -------------------------------------------------------

set CONFIGFILE="%~dp0settings.xml"
for /F "tokens=2 delims=>,<" %%i IN ('findstr /L "JDKHome" %CONFIGFILE%') do call set JAVA_HOME=%%~fsi
set ANT_HOME=%CD%\tools\apache-ant-1.10.14
set PATH="C:\Windows\System32";%ANT_HOME%\bin";"%JAVA_HOME%\bin";%PATH%

REM Note: hitting 'clean' everytime below is done for clarity of operation.
REM       'clean' can be removed for more efficient operation.

CALL "%ANT_HOME%\bin\ant" clean
CALL "%ANT_HOME%\bin\ant" status -lib lib/
REM Do not hit both clean and status targets on same line; does not work.
