ant -f fetch.xml -> maven-artifact-ant-2.0.4-dep.jar -> 404 (not found)

When you install ant from tarball, according to http://ant.apache.org/manual/install.html library dependencies need to be downloaded and installed.
If you recieve 404 (Not found) you should check this post.

Error message:

# bin/ant -f fetch.xml -Ddest=system
Buildfile: fetch.xml

pick-dest:
     [echo] Downloading to /data/apps/ant/1.7.1/lib

probe-m2:

download-m2:
     [echo] Downloading to /data/apps/ant/1.7.1/lib
      [get] Getting: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
      [get] To: /data/apps/ant/1.7.1/lib/maven-artifact-ant-2.0.4-dep.jar
      [get] Error opening connection java.io.FileNotFoundException: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
      [get] Error opening connection java.io.FileNotFoundException: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
      [get] Error opening connection java.io.FileNotFoundException: http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
      [get] Can't get http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar to /data/apps/ant/1.7.1/lib/maven-artifact-ant-2.0.4-dep.jar

BUILD FAILED
/data/apps/ant/1.7.1/get-m2.xml:85: Can't get http://ibiblio.org/maven2//org/apache/maven/maven-artifact-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar to /data/apps/ant/1.7.1/lib/maven-artifact-ant-2.0.4-dep.jar

Total time: 0 seconds

Set a right variable for m2.url:

cd $ANT_HOME
sed -i "s#m2.url=.*#m2.url=http://mirrors.ibiblio.org/pub/mirrors/maven2/#" lib/libraries.properties
avatar

About tompos

Hungary, Budapest
This entry was posted in IT. Bookmark the permalink.

Leave a Reply