Bug#563946: maven2: dependency downloads fail

Ed Schaller schallee at darkmist.net
Wed Jan 6 14:23:12 UTC 2010


Package: maven2
Version: 2.2.1-2
Severity: important


Maven fails to download dependencies with errors like:

Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0/maven-site-plugin-2.0.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0' from repository central (http://repo1.maven.org/maven2): Error transferring file: Network is unreachable
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0/maven-site-plugin-2.0.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:pom:2.0' from repository central (http://repo1.maven.org/maven2): Error transferring file: Network is unreachable

This happens systems with a functioning network connection where the failed urls can be successfully downloaded through another method (eg: wget, iceweasel).

Some investigation revealed that for some reason these downloads are only trying IPv6 on hosts which only have IPv4 configured. This makes the "Network is unreachable" sort of make sense.

This can be worked around by running maven with the argument -Djava.net.preferIPv4Stack=true.

Though the work around would suggest this is a jre issue I have not had such issues with other java programs.

Also, though this bug report is against squeeze, this also occurs in sid but does not occur in lenny.

As a help, the system information below includes multiple jres as I frequently need to test on multiple versions. The java alternative on my system is set to use sun's java6:

java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages maven2 depends on:
ii  gij-4.3 [java2-runtime-head 4.3.4-4      The GNU Java bytecode interpreter
ii  ibm-j2sdk1.4 [java2-runtime 1.4.2        Java(TM) JDK, Standard Edition, IB
ii  ibm-j2sdk1.6 [java2-runtime 1.6.0        Java(TM) JDK, Standard Edition, IB
ii  libmaven2-core-java         2.2.1-1      Core libraries for Maven2
ii  openjdk-6-jre [java2-runtim 6b16-1.6.1-2 OpenJDK Java runtime, using Hotspo
ii  openjdk-6-jre-headless [jav 6b16-1.6.1-2 OpenJDK Java runtime, using Hotspo
ii  sun-java5-jre [java2-runtim 1.5.0-17-0.1 Sun Java(TM) Runtime Environment (
ii  sun-java6-jre [java2-runtim 6-16-1       Sun Java(TM) Runtime Environment (

Versions of packages maven2 recommends:
ii  libmaven-clean-plugin-java    2.3-3      Maven clean plugin
ii  libmaven-compiler-plugin-java 2.0.2-4    Maven compiler plugin
ii  libmaven-install-plugin-java  2.3-2      Maven install plugin
ii  libmaven-jar-plugin-java      2.2-4      Maven Jar plugin
ii  libmaven-resources-plugin-jav 2.3-5      Maven resources plugin
ii  libmaven-shade-plugin-java    1.2.1-2    Maven shade plugin

maven2 suggests no packages.

-- no debconf information





More information about the pkg-java-maintainers mailing list