ant不会得到库依赖

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

对不起,我开始与ant一起工作,并正在尝试正确安装它。

当我inputcmd这个命令时:

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 

我试图谷歌和不能find任何合适的解决scheme,除了jasper-runtime -4.1.36.pom不在仓库中可用。 任何人都可以指出如何解决这个问题吗?

我知道这是一个古老的问题,但对于那些寻求解决scheme的人来说,这个页面简洁地解释:

http://mail-archives.apache.org/mod_mbox/ant-notifications/201112.mbox/%[email protected]/bugzilla/%3E

看来,你的生成机器无法访问maven。 你可以使用生成机器上的浏览器,看看你是否可以访问http://repo1.maven.org/maven2/