Bug 52374 - Ant installation fails (library dependencies) - Suggestion to FIX included
Summary: Ant installation fails (library dependencies) - Suggestion to FIX included
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.8.2
Hardware: PC All
: P2 blocker (vote)
Target Milestone: 1.8.3
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-20 13:50 UTC by André Højgaard
Modified: 2011-12-20 23:38 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description André Højgaard 2011-12-20 13:50:56 UTC
In the final part of the installation of Ant described on the page (Short Story):

http://ant.apache.org/manual/index.html

there is several build errors because of artifacts that cannot be found
when executing the following command line:

>ant -f fetch.xml -Ddest=system

To fix that do the following:

In %ANT_HOME%\lib\libraries.properties

comment out and add so the result is:
#m2.url=http://ibiblio.org/maven2/
m2.url=http://mirrors.ibiblio.org/pub/mirrors/maven2

Int In %ANT_HOME%\fetch.xml

comment out and add so the result is:

  <!-- original content  
  <target name="jai" depends="init"
          description="load java advanced imaging">
    <f2 project="javax.media" archive="jai-core" repository="http://repository.jboss.org/maven2"/>
    <f2 project="com.sun.media" archive="jai-codec" repository="http://repository.jboss.org/maven2"/>
  </target>
  -->
  
  <!-- new context -->
  <target name="jai" depends="init" 
          description="load java advanced imaging"> 
    <f2 project="javax.media" archive="jai-core" repository="https://repository.jboss.org/nexus/content/groups/public/"/> 
    <f2 project="com.sun.media" archive="jai-codec" repository="http://maven.alfresco.com/nexus/content/groups/public/"/> 
  </target> 
  
  
Traces from the build before the above corrections are shown below:

Trace 1:

C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2>ant -f fetch.xml -Ddest=system
Buildfile: C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2\fetch.xml

pick-dest:
     [echo] Downloading to C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2\lib

probe-m2:

download-m2:
     [echo] Downloading to C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2\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: C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2\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 C:\Program Files (x86)\Apache Sof
tware Foundation\apache-ant-1.8.2\lib\maven-artifact-ant-2.0.4-dep.jar

BUILD FAILED
C:\Program Files (x86)\Apache Software Foundation\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:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2\lib\maven-artifact-ant-2.0.4-dep.jar

Total time: 2 seconds



Trace 2:

...
jai:
[artifact:dependencies] Downloading: javax/media/jai-core/1.1.3/jai-core-1.1.3.pom
[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.
[artifact:dependencies]  Diagnosis:
[artifact:dependencies]
[artifact:dependencies] Unable to resolve artifact: Unable to get dependency information: 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 transferring 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
C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2\fetch.xml:309: The following error occurred while executing this line:
C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.8.2\fetch.xml:116: Unable to resolve artifact: Unable to get dependency information: Unable to re
ad the metadata file for artifact 'javax.media:jai-core:jar': Error getting POM for 'javax.media:jai-core' from the repository: Error 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: 1 minute 1 second
Comment 1 Jesse Glick 2011-12-20 23:38:33 UTC
This was already fixed in trunk: revision 1187945.