Ant从http而不是https下载传递依赖项

问题描述 投票:0回答:1

我承认我对Ant不了解。显然,第一个工件似乎确实可以识别https的使用,但是传递依赖项却不能。我猜想,当Maven Central在1月15日从http更改为https时,maven-ant-tasks-2.1.3中没有发生变化。

20:16:26 ant-task-download:
20:16:27       [get] Getting: https://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
20:16:27       [get] To: /root/workspace/src/apache/hadoop/release_0.20.2+737/ivy/maven-ant-tasks-2.1.3.jar
20:16:27 
20:16:27 mvn-taskdef:
20:16:30 [artifact:dependencies] [INFO] artifact joda-time:joda-time: checking for updates from company-releases
20:16:30 [artifact:dependencies] [INFO] artifact joda-time:joda-time: checking for updates from company-snapshots
20:16:30 [artifact:dependencies] [INFO] artifact joda-time:joda-time: checking for updates from internal
20:16:30 [artifact:dependencies] [INFO] artifact joda-time:joda-time: checking for updates from central
20:16:30 [artifact:dependencies] [WARNING] repository metadata for: 'artifact joda-time:joda-time' could not be retrieved from repository: central due to an error: Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/joda-time/joda-time/maven-metadata.xml
20:16:30 [artifact:dependencies] [INFO] Repository 'central' will be blacklisted
20:16:30 

https://repo1.maven.org/...” joda-time URL确实存在。是否有此修复程序或将下载设置为使用https URL的方法?

maven ant maven-central
1个回答
0
投票

我遇到了同样的问题。最终,我通过手动下载所需的所有依赖项(在新的pom中编写依赖项并使用最新版本的maven进行下载)解决了我的问题,这可以避免从过时的http源驱动蚂蚁下载。

© www.soinside.com 2019 - 2024. All rights reserved.