Ant build tool installation not working properly!

后端 未结 3 371
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-22 12:12

i have downloaded the Ant distribution from the Ant web site. apache-ant-1.7.0 and set environment variable specifying the location of the Ant installationas ANT_HOME = C:\\

3条回答
  •  长情又很酷
    2020-12-22 12:44

    Better use batch or shell scripts to start your ant files, f.e. =

    windows

      set JAVA_HOME=C:\java\jdk\1.6.0_xx
      set ANT_HOME=C:\ant
      set ANT_ARGS=-lib C:\ant_xtralibs;C:\ant_testlibs
      set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\cvsnt
    
      :: default
      call ant -f %1
    
      :: debug
      ::call ant -debug -f %1
      ...
    

    unix - don't forget the quotationmarks on the ANT_ARGS line !

      ...
      ANT_ARGS="-lib /usr/local/ant_xtralibs:/usr/local/ant_testlibs"
      export ANT_ARGS
      ...
    

    Some advantages of starting ant like that :

    • ANT_ARGS is a special environment variable. Its content is automatically added to the invocation of ant.

    • you may use your own ant settings on a machine where you have no admin rights

    • using a separate folder for your ant addon libs and load via -lib option keeps your ant installation clean and avoids polluting the %ANT_HOME%/lib folder

提交回复
热议问题