在 Cygwin 上安装 Ant
我在弄清楚如何在 Cygwin 上安装 Ant 时遇到了一些麻烦。我想使用 Ant 构建 Nutch。我浏览了很多教程,但找不到任何低级内容足以让我理解。我需要类似的东西...
- 下载 ant,把它放在这里
- 打开 Cygwin
- 输入“export ANT_HOME=...”
- ...
有人能帮我吗?
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 that is low level enough for me to understand. I need something like...
- Download ant, put it here
- Open Cygwin
- type "export ANT_HOME=..."
- ...
Can anyone help me out here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Windows 中,将 ant /bin 目录的路径添加到 Path 系统变量。这可以通过右键单击“计算机”>“计算机”轻松完成。属性>高级系统设置>环境变量,点击系统变量中的Path,点击编辑并添加;接下来是 ant bin 目录的路径到变量值的末尾。
启动或重新启动 Cygwin。
键入
ant -version
应显示版本。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.以下是分步指南:
只需下载 ANT 二进制文件并将其解压缩到
c:\apache-ant-1.8.1
下载并解压 NUTCH 源代码到:
c:\apache-nutch-1.2
打开命令提示符并运行以下命令:
在 Bash shell 中同样可以工作,只需使用 Cygwin 样式的路径:
<前><代码>cd /cygdrive/c/apache-nutch-1.2
./cygdrive/c/apache-ant-1.8.1/bin/ant
就这样,您将找到一个新目录
build
包含输出。为了方便起见,您可能希望将 Ant bin 目录添加到 PATH 环境变量中,这样您就不必每次都提供完整路径,但这是可选的。
顺便说一句,我只是做了这些确切的步骤,一切都很顺利。
最后,请按照此教程开始。
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:
the same would work from the Bash shell, just use Cygwin-style paths:
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.
假设您已经安装了 JDK,您可以执行以下操作:
假设您已将 Ant 解压到
C:\apache-ant-1.7.1
中。然后:Assuming you have a JDK already installed, you can do this:
which assumes you've unzipped Ant into
C:\apache-ant-1.7.1
. Then: