File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Apache Ant Installation - Build Failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Apache Ant Installation - Build Failed " Watch "Apache Ant Installation - Build Failed " New topic
Author

Apache Ant Installation - Build Failed

Suneel Gupta
Greenhorn

Joined: Nov 18, 2011
Posts: 11
After downloading Ant 1.8.2 on my Windows machine, I run the following from %ANT_HOME% per the installation directions:

bin\ant -f fetch.xml -Ddest=system

And I get this:

Buildfile: C:\bin\apache-ant-1.8.2\fetch.xml

pick-dest:
[echo] Downloading to C:\bin\apache-ant-1.8.2\lib

probe-m2:

download-m2:
[echo] Downloading to C:\bin\apache-ant-1.8.2\lib
[get] Getting: http://ibiblio.org/maven2//org/apach...aven-artifact-
ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar
[get] To: C:\bin\apache-ant-1.8.2\lib\maven-artifact-ant-2.0.4-dep.jar
[get] Error opening connection java.io.FileNotFoundException: http://ibibl
io.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://ibibl
io.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://ibibl
io.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/apach...maven-artifact
-ant/2.0.4/maven-artifact-ant-2.0.4-dep.jar to C:\bin\apache-ant-1.8.2\lib\maven
-artifact-ant-2.0.4-dep.jar

BUILD FAILED
C:\bin\apache-ant-1.8.2\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 C:\bin
\apache-ant-1.8.2\lib\maven-artifact-ant-2.0.4-dep.jar

Total time: 0 seconds

So it looks like the Maven files aren't there and I verified that by going to the sites myself.

So where does that leave this installation? Perhaps there's an updated fetch.xml somewhere I can use? Can I edit that file to not pull in the Maven artifacts? Or should I do something else.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Do you really need all of the dependencies for all of the optional tasks? I can usually go for a long time using Ant before requireing an optional task, and when I need one, I usually just install its dependencies (such as the junit.jar file) manually.

Also, I am surprised that it is attempting to download from ibiblio.org, and not from repo1.maven.org, because the artifacts are located there. Try changing the value of m2.url in lib/libraries.properties:



JBoss In Action
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Apache Ant Installation - Build Failed
 
Similar Threads
new to maven, error in mvn war:war
maven java:compile
Learning Struts 2
fetch.xml in ant 1.6.5
i am looking for Ant scripts help