ant 没有获取库依赖项

ant 没有获取库依赖项

我的系统:Windows 7 Ant 版本:1.8.2 JDK:1.6.27 x64

抱歉,我刚开始使用 ant 并且正在尝试正确安装它。

当我在 cmd 中输入此命令时:

ant -f fetch.xml -Ddest=system

为了获取库依赖项,根据官方文档,我收到以下错误:

jspc:
[artifact:dependencies] Downloading: tomcat/jasper-compiler/4.1.36/jasper-compil
er-4.1.36.pom
[artifact:dependencies] [WARNING] Unable to get resource from repository remote
(http://repo1.maven.org/maven2/)
[artifact:dependencies] Downloading: tomcat/jasper-compiler/4.1.36/jasper-compil
er-4.1.36.pom
[artifact:dependencies] [WARNING] Unable to get resource from repository central
 (http://repo1.maven.org/maven2)
[artifact:dependencies] Downloading: tomcat/jasper-runtime/4.1.36/jasper-runtime
-4.1.36.pom
[artifact:dependencies] [WARNING] Unable to get resource from repository remote
(http://repo1.maven.org/maven2/)
[artifact:dependencies] Downloading: tomcat/jasper-runtime/4.1.36/jasper-runtime
-4.1.36.pom
[artifact:dependencies] [WARNING] Unable to get resource from repository central
 (http://repo1.maven.org/maven2)

jai:
[artifact:dependencies] Downloading: javax/media/jai-core/1.1.3/jai-core-1.1.3.p
om
[artifact:dependencies] An error has occurred while processing the Maven artifac
t tasks.
[artifact:dependencies]  Diagnosis:
[artifact:dependencies]
[artifact:dependencies] Unable to resolve artifact: Unable to get dependency inf
ormation: Unable to read the metadata file for artifact 'javax.media:jai-core:ja
r': Error getting POM for 'javax.media:jai-core' from the repository: Error tran
sferring file
[artifact:dependencies]   javax.media:jai-core:pom:1.1.3
[artifact:dependencies]
[artifact:dependencies] from the specified remote repositories:
[artifact:dependencies]   remote (http://repository.jboss.org/maven2),
[artifact:dependencies]   central (http://repo1.maven.org/maven2)
[artifact:dependencies]
[artifact:dependencies]   javax.media:jai-core:jar:1.1.3
[artifact:dependencies]
[artifact:dependencies] from the specified remote repositories:
[artifact:dependencies]   remote (http://repository.jboss.org/maven2),
[artifact:dependencies]   central (http://repo1.maven.org/maven2)
[artifact:dependencies] Path to dependency:
[artifact:dependencies]         1) unspecified:unspecified:jar:0.0
[artifact:dependencies]
[artifact:dependencies]
[artifact:dependencies] Server returned HTTP response code: 403 for URL: http://
repository.jboss.org/maven2/javax/media/jai-core/1.1.3/jai-core-1.1.3.pom
[artifact:dependencies]

BUILD FAILED
D:\work\ant_182\fetch.xml:309: The following error occurred while executing this
 line:
D:\work\ant_182\fetch.xml:116: Unable to resolve artifact: Unable to get depende
ncy information: Unable to read the metadata file for artifact 'javax.media:jai-
core:jar': Error getting POM for 'javax.media:jai-core' from the repository: Err
or transferring file
  javax.media:jai-core:pom:1.1.3

from the specified remote repositories:
  remote (http://repository.jboss.org/maven2),
  central (http://repo1.maven.org/maven2)

  javax.media:jai-core:jar:1.1.3

from the specified remote repositories:
  remote (http://repository.jboss.org/maven2),
  central (http://repo1.maven.org/maven2)
Path to dependency:
        1) unspecified:unspecified:jar:0.0



Total time: 4 seconds

我尝试用谷歌搜索,但找不到任何合适的解决方案,除了jasper-运行时-4.1.36.pom在存储库中不可用。有人能告诉我如何解决这个问题吗?

答案1

我知道这是一个老问题,但对于那些寻求解决方案的人来说,这个页面简明扼要地解释了它:

http://mail-archives.apache.org/mod_mbox/ant-notifications/201112.mbox/%[电子邮件保护]/错误代码/%3E

答案2

似乎无法从您的构建机器访问 maven。您可以在构建机器上使用浏览器,看看是否可以访问http://repo1.maven.org/maven2/

相关内容