echo off

rem (jdk11 偱tools.jar傪壛偊偰僐儞僷僀儖)
set USE_JDK11=TRUE

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 *  仸 all           : compile,jar All running
echo *
echo *  javadoc (曐棷)   : javadoc(jdk11) , zip 仺 Use doc/01_javadoc.bat
echo *  spec (曐棷)      : create Javadoc Spec sheet
echo *
echo *  taglib           : create taglib xml files
echo *  check            : RELEASE-NOTES check
echo *  仸 alldoc        : taglib 乣 check All running
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 *  war              : create ge##XXXX.war files(src 佀 build/ge##XXXX.war)
echo *  build            : create build files(src,dev,verup) (svn 佀 build)
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 *  仸 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.9
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%"=="alldoc" (
	for %%A in (taglib check) 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) 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
)
