echo off

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

set DEV_DIR=..\..\..\dev
set SVN_DIR=C:/opengion_svn/opengionV8
set PROXY=mtc-px1.muratec.co.jp

echo ****************************************************
echo * Ant Target is
echo *  compile(default) : compile java files
echo *  jar              : create Jar files
echo *  war              : create ge##XXXX.war files(src 佀 build/ge##XXXX.war)
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 *  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,gg] jar files ] 亂Obsolete亃
echo *  copy2(db/jsp/src): copy local 仺 dev02 [ge,gf,gg] , 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,dbload All copy (V8 is not copy MICS)
echo *
echo ****************************************************

set /p target=Type Target:

set ANT_VER=apache-ant-1.10.12
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僼傽僀儖偺僋儕傾
type nul > log1.txt
type nul > log2.txt

if "%target%"=="all" (
	call minify.bat

	for %%A in (compile jar war) do (
		call ant -autoproxy -f build.xml %%A >> log1.txt 2>> log2.txt
	)
) else if "%target%"=="alldoc" (
	for %%A in (taglib check) do (
		call ant -autoproxy -f build.xml %%A >> log1.txt 2>> log2.txt
	)
) else if "%target%"=="allcopy" (
	for %%A in (copy2 copy3 copy4 dbload) do (
		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
)
