我正在尝试使用 get 属性获取带有 ant 的文件。我正在运行 apache 2,我可以使用 wget 和 firefox 从指定的 URL 获取文件,但是 ant 给了我以下错误:
[get] Error opening connection java.io.IOException:
Server returned HTTP response code: 503 for URL: http://localhost/jars/jai_core.jar
这就是我在 build.xml 中所做的:
<get src="http://localhost/jars/jai_core.jar"
dest="${build.dir}/lib/jai_core.jar"
usetimestamp="true"/>
知道可能出了什么问题吗?
编辑:关于某事。当我提供我的盒子的完整主机名而不是 localhost 时,它可以工作。