echo off

call %~dp0..\..\bin\init.bat

set DEV_DIR=..\..\..\dev
set SVN_DIR=C:/opengion_svn/opengionV7

echo ****************************************************
echo * Ant Target is
echo *  compile(default) : compile java files
echo *  jar              : create Jar files
echo *
echo *  all 仸           : compile 乣 create All running
echo *
echo *  javadoc          : javadoc(jdk11) , zip
echo *
echo * Web is used.
echo *  xml              : create Data XML files (quickReference.html)
echo *  table            : create Table/Index XML files
echo *  dbload           : insert Database in db/common/xml/taglib XML files
echo *
echo * MIS Only.
echo *  build (and war)  : create build and war files(svn 佀 build,war)
echo *  apps             : make apps archive(difference only)
echo *
echo *  copy1(jar)       : local 仺 dev2 [ge,gf,gg] jar files copy
echo *  copy2(db/jsp/src): local 仺 dev2 [ge,gf] , mics[ge] db/jsp/src files copy
echo *  copy3(Build)     : copy Build files to its-dev1,mis-dev2,F:
echo *
rem  *  copy4(GMIS)      : copy jar files and ge.war to mis-mnt1:
rem  *  copy5(SVN7)      : copy jar files and ge,gf to opengion_svn\opengionV7
echo *  copy6(eu63)      : copy jar files 10611119-0001(euromap63) jar files
echo *
echo *  allcopy          : build + copy1,2,3,6 All running (Ver7 is not copy MICS)
echo *
echo ****************************************************

set /p target=Type Target:

set ANT_VER=apache-ant-1.10.3
set ANT_HOME=%DEV_DIR%\%ANT_VER%
set PATH=%PATH%;%ANT_HOME%\bin;

rem log4j:WARN No appenders could be found for logger 懳嶔丅
set CLASSPATH=%~dp0..\..\bin;%CLASSPATH%

echo %JDK_VER%

rem log僼傽僀儖偺僋儕傾
echo > log1.txt 2> log2.txt

if "%target%"=="all" (
	for %%A in (compile jar) do (
		echo %%A
		call ant -autoproxy -f build.xml %%A >> log1.txt 2>> log2.txt
	)
) else if "%target%"=="allcopy" (
	for %%A in (build copy1 copy2 copy3 copy6) do (
		echo %%A
		call ant -autoproxy -f build.xml %%A >> log1.txt 2>> log2.txt
	)
) else (
	call ant -autoproxy -f build.xml %target% > log1.txt 2> log2.txt
)
