Installing Ant on Cygwin

前端 未结 3 1144
太阳男子
太阳男子 2020-12-13 20:03

I\'m having some trouble figuring out how to install Ant on Cygwin. I want to use Ant to build Nutch. I\'ve looked through a bunch of tutorials but I can\'t find anything

相关标签:
3条回答
  • 2020-12-13 20:41

    Assuming you have a JDK already installed, you can do this:

    $ export ANT_HOME=/cygdrive/c/apache-ant-1.7.1
    

    which assumes you've unzipped Ant into C:\apache-ant-1.7.1. Then:

    $ export PATH=$ANT_HOME/bin:$PATH
    $ ant -version
    Apache Ant version 1.7.1 compiled on June 27 2008
    
    0 讨论(0)
  • 2020-12-13 20:41

    In Windows, add the path to your ant /bin directory to the Path system variable. This can easily be done by right clicking on Computer > Properties > Advanced System Settings > Environment Variables, click on Path in the System Variables, click on Edit and add ; followed by the path to your ant bin directory to the end of the Variable value.

    Start or restart Cygwin.

    Type ant -version The version should be displayed.

    0 讨论(0)
  • 2020-12-13 20:54

    Here's a step-by-step guide:

    • simply download and unzip ANT binaries say into c:\apache-ant-1.8.1

    • download and unzip NUTCH sources say into: c:\apache-nutch-1.2

    • open the command prompt and run the following:

      cd c:\apache-nutch-1.2
      c:\apache-ant-1.8.1\bin\ant
      

      the same would work from the Bash shell, just use Cygwin-style paths:

      cd /cygdrive/c/apache-nutch-1.2
      ./cygdrive/c/apache-ant-1.8.1/bin/ant
      

    That's it, you will find a new directory build containing the output.

    For convenience, you might want to add the Ant bin directory to the PATH environment variable so that you don't have to give the full path each time, but that's optional.

    BTW I just did those exact steps, and all went fine.

    Finally, follow this tutorial to get started.

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