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)       : copy local 仺 dev02 [ge,gf] jar files ] 亂Obsolete亃
echo *  copy2(db/jsp/src): copy local 仺 dev02 [ge,gf] , mics[ge] db/jsp/src files
echo *  copy3(Build)     : copy Build files to its-dev2,mis-dev02,F:
echo *  copy4(jar/war)   : local 仺 dev02 uap/verup [ge.war,*.jar] files copy
echo *   or dev02
echo *
echo *  copy6(eu63)      : copy jar files 10611119-0001(euromap63) jar files
echo *
echo *  allcopy          : copy 2,3,4,6 All copy (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 (copy2 copy3 copy4 copy6) do (
		echo %%A
		call ant -autoproxy -f build.xml %%A >> log1.txt 2>> log2.txt
	)
) else if "%target%"=="dev02" (
	echo %%A
	call ant -autoproxy -f build.xml copy4 >> log1.txt 2>> log2.txt
) else (
	call ant -autoproxy -f build.xml %target% > log1.txt 2> log2.txt
)
