Ant build tool installation not working properly!

后端 未结 3 359
爱一瞬间的悲伤
爱一瞬间的悲伤 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
    0 讨论(0)
  • 2020-12-22 13:00

    Depending on you verson of windows (win2k & win XP), you might need to reboot your computer to make your PATH modifications taken into account.

    0 讨论(0)
  • 2020-12-22 13:03

    Move the ';' to the end. Be sure that java is also correct installed (variable for classpath, etc.)

    0 讨论(0)
提交回复
热议问题