我承认我不太精通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的方法?
发布于 2020-03-06 10:28:56
我遇到了同样的问题。最后我解决了我的问题,通过手动下载我需要的所有依赖项(在新的pom中编写依赖项并使用最新版本的maven进行下载),这可以避免ant驱动从过时的http源下载。
https://stackoverflow.com/questions/59954466
复制相似问题