選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ant.bat 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @echo off
  2. REM Copyright (c) 2001-2002 The Apache Software Foundation. All rights
  3. REM reserved.
  4. if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
  5. if "%OS%"=="Windows_NT" @setlocal
  6. rem %~dp0 is expanded pathname of the current script under NT
  7. set DEFAULT_ANT_HOME=%~dp0..
  8. if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
  9. set DEFAULT_ANT_HOME=
  10. REM aspectJ disabled - separates -Dfoo=bar into -Dfoo bar
  11. rem Slurp the command line arguments. This loop allows for an unlimited number
  12. rem of arguments (up to the command line limit, anyway).
  13. rem set ANT_CMD_LINE_ARGS=%1
  14. rem if ""%1""=="""" goto doneStart
  15. rem shift
  16. rem :setupArgs
  17. rem if ""%1""=="""" goto doneStart
  18. rem set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
  19. rem shift
  20. rem goto setupArgs
  21. rem This label provides a place for the argument list loop to break out
  22. rem and for NT handling to skip to.
  23. rem :doneStart
  24. rem find ANT_HOME if it does not exist due to either an invalid value passed
  25. rem by the user or the %0 problem on Windows 9x
  26. if exist "%ANT_HOME%" goto checkJava
  27. rem check for ant in Program Files on system drive
  28. if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
  29. set ANT_HOME=%SystemDrive%\Program Files\ant
  30. goto checkJava
  31. :checkSystemDrive
  32. rem check for ant in root directory of system drive
  33. if not exist %SystemDrive%\ant\nul goto checkCDrive
  34. set ANT_HOME=%SystemDrive%\ant
  35. goto checkJava
  36. :checkCDrive
  37. rem check for ant in C:\ant for Win9X users
  38. if not exist C:\ant\nul goto noAntHome
  39. set ANT_HOME=C:\ant
  40. goto checkJava
  41. :noAntHome
  42. echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
  43. goto end
  44. :checkJava
  45. set LOCALCLASSPATH=%CLASSPATH%
  46. for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" %%i
  47. rem aspectj adding junit to everything...
  48. call "%ANT_HOME%\bin\lcp.bat" %ANT_HOME%\..\junit\junit.jar
  49. if "%JAVA_HOME%" == "" goto noJavaHome
  50. if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
  51. set _JAVACMD=%JAVA_HOME%\bin\java.exe
  52. if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\tools.jar
  53. if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" %JAVA_HOME%\lib\classes.zip
  54. goto checkJikes
  55. :noJavaHome
  56. set _JAVACMD=java.exe
  57. echo.
  58. echo Warning: JAVA_HOME environment variable is not set.
  59. echo If build fails because sun.* classes could not be found
  60. echo you will need to set the JAVA_HOME environment variable
  61. echo to the installation directory of java.
  62. echo.
  63. :checkJikes
  64. if not "%JIKESPATH%"=="" goto runAntWithJikes
  65. :runAnt
  66. REM aspectJ increased max heap size for test purposes.
  67. "%_JAVACMD%" -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" -Xmx1024M %ANT_OPTS% org.apache.tools.ant.Main %*
  68. goto end
  69. :runAntWithJikes
  70. "%_JAVACMD%" -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" %ANT_OPTS% org.apache.tools.ant.Main %*
  71. goto end
  72. :end
  73. set LOCALCLASSPATH=
  74. set _JAVACMD=
  75. set ANT_CMD_LINE_ARGS=
  76. if "%OS%"=="Windows_NT" @endlocal
  77. :mainEnd
  78. if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"