简体   繁体   English

无法正确安装Apache Ant的二进制版本

[英]Unable to properly install binary edition of Apache Ant

I'm following this tutorial to install the binary edition of Apache Ant. 我正在按照教程安装Apache Ant的二进制版本。

Unfortunately, when I get to the "optional" step 5, I'm unable to get some resources. 不幸的是,当我进入“可选”步骤5时,我无法获得一些资源。 That is, an error occurs while processing the Maven artifact tasks. 即,在处理Maven工件任务时发生错误。

在此处输入图片说明

When I try to navigate to the servers, it appears that they are either down, or non-existent. 当我尝试导航到服务器时,它们似乎已关闭或不存在。 Anyone else encounter this problem? 还有其他人遇到这个问题吗?

And I just found this piece of information regarding the HTTP 403 response code, 我刚刚发现了有关HTTP 403响应代码的信息,

This response is returned by the Apache web server when directory listings have been disabled. 禁用目录列表后,Apache Web服务器将返回此响应。

So, would enabling directory listings fix this? 那么,启用目录列表是否可以解决此问题? And if so, how do I go about enabling that? 如果是这样,我应该如何启用它?

It seems that Ant is trying to download some JARs from a Maven repository on the Internet, in this case on JBoss' site. 似乎Ant正在尝试从Internet上的Maven存储库下载一些JAR,在这种情况下,是在JBoss的站点上。 They changed the location of their repository some time ago. 他们在一段时间前更改了存储库的位置。

Here's how to change the URL: 更改网址的方法如下:

  1. Go to your ant installation folder. 转到您的ant安装文件夹。

  2. Open fetch.xml in your favorite text editor. 在您喜欢的文本编辑器中打开fetch.xml。

  3. Search for http://repository.jboss.org/maven2 and replace it with https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/ 搜索http://repository.jboss.org/maven2并将其替换为https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/

Run the optional command again: 再次运行可选命令:

ant -f fetch.xml -Ddest=system ant -f fetch.xml -Ddest =系统

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM