Maven cannot download anything.

1,447 views
Skip to first unread message

Stuart Grimshaw

unread,
Dec 30, 2009, 11:10:13 AM12/30/09
to Sheffield Java User Group
Has anyone see this error before:

# mvn -X clean

+ Error stacktraces are turned on.
Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_16
Java home: /usr/lib/jvm/java-6-sun-1.6.0.16/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux" version: "2.6.30-2-686" arch: "i386" Family: "unix"
[DEBUG] Building Maven user-level plugin registry from: '/home/
stuart/.m2/plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: '/usr/share/
maven2/conf/plugin-registry.xml'
[INFO] Scanning for projects...
[DEBUG] Wagons could not be registered as the extension container was
never created
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [clean]
[INFO]
------------------------------------------------------------------------
[DEBUG] Trying repository jboss-plugins
[DEBUG] Using Wagon implementation lightweight from default mapping
for protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] Connecting to repository: 'jboss-plugins' with url: 'http://
repository.jboss.com/maven2'.
Downloading: http://repository.jboss.com/maven2/org/apache/maven/plugins/maven-clean-plugin/2.3/maven-clean-plugin-2.3.pom
[DEBUG] Error transferring file: Network is unreachable
org.apache.maven.wagon.TransferFailedException: Error transferring
file: Network is unreachable
at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData
(LightweightHttpWagon.java:143)
at org.apache.maven.wagon.StreamWagon.getInputStream
(StreamWagon.java:116)
at org.apache.maven.wagon.StreamWagon.getIfNewer
(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)


It's trying to download from the remote repo and failing because the
network is unreachable, but doing

# GET http://repository.jboss.com/maven2/org/apache/maven/plugins/maven-clean-plugin/2.3/maven-clean-plugin-2.3.pom

downloads the file no problem. I don't see the same problem on my
lappy and I don't have the same problem, neither do other devs on the
same network.

I don't have a proxy set up, and there are no proxy setting in my mvn
setting (global or user)

Any ideas?

Ian Ibbotson

unread,
Dec 30, 2009, 11:16:26 AM12/30/09
to java-sh...@googlegroups.com
wget on that gives me a 404 not found? Never seen that before.. Out of
interest does mvn -O clean work ok?

e.

2009/12/30 Stuart Grimshaw <stuart....@gmail.com>:

Stuart Grimshaw

unread,
Dec 30, 2009, 11:51:01 AM12/30/09
to Sheffield Java User Group
On 30 Dec, 16:16, Ian Ibbotson <iani...@googlemail.com> wrote:
> wget on that gives me a 404 not found? Never seen that before.. Out of
> interest does mvn -O clean work ok?

I would expect it to return 404 because that's not the repository
where that plugin lives, but I'm getting a Network Unreachable error,
the java httpclient, for some reason cannot access the network, but
the rest of the OS can ...

Stuart Grimshaw

unread,
Dec 30, 2009, 11:52:23 AM12/30/09
to Sheffield Java User Group
On 30 Dec, 16:16, Ian Ibbotson <iani...@googlemail.com> wrote:
> interest does mvn -O clean work ok?

-o would work if I hadn't blatted my repository directory trying to
get this working :-)

stuart@beavis:~/git/maven-sar$ mvn -o clean
[INFO]
NOTE: Maven is executing in offline mode. Any artifacts not already in
your local
repository will be inaccessible.

[INFO] Scanning for projects...


[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [clean]
[INFO]
------------------------------------------------------------------------

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-clean-plugin

Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in
repository: System is offline.

org.apache.maven.plugins:maven-clean-plugin:pom:2.3


for project org.apache.maven.plugins:maven-clean-plugin

Ed Bowler

unread,
Dec 30, 2009, 11:54:38 AM12/30/09
to java-sh...@googlegroups.com
what does "blatted my repository" mean ??

Ed Bowler

unread,
Dec 30, 2009, 12:01:50 PM12/30/09
to java-sh...@googlegroups.com
have you removed the maven central repo from the settings.xml ? It
seems plausible that the error is trying to say that maven can't
download the plugin it's looking for

Stuart Grimshaw

unread,
Dec 30, 2009, 12:13:30 PM12/30/09
to Sheffield Java User Group
On 30 Dec, 17:01, Ed Bowler <ed.bow...@gmail.com> wrote:
> have you removed the maven central repo from the settings.xml ?  It
> seems plausible that the error is trying to say that maven can't
> download the plugin it's looking for

blatted means deleted.

It's not that it can't find it, it can't access the network resource
at all, if I run it in less verbose mode I can see that it's running
through all the repos it knows about trying to downllad the same file,
central being the last one it tries (I should do something about that
order, I know)

http://pastie.org/761446

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

The fact that it says the network is unreachable is what confuses me,
why can't Maven's Wagon download the file when I can from the same
command line?

There are no proxy settings in my settings file, the one in /etc/
maven2 or the one in /usr/share/maven2/conf, is there another location
where java might look for proxy setting?

The same settings file works on other machines, both my laptop & other
developers. It has worked on this machine in the past too because I
had quite a full local repository before I deleted it.

James Jefferies

unread,
Dec 30, 2009, 4:47:54 PM12/30/09
to Sheffield Java User Group
have you tried...

1) removing settings.xml completely
2) having a basic settings.xml but explicitly define the
pluginRepository

?

just my two pennorth..

Stuart Grimshaw

unread,
Dec 30, 2009, 5:36:15 PM12/30/09
to java-sh...@googlegroups.com
On Wed, Dec 30, 2009 at 9:47 PM, James Jefferies <jamesje...@gmail.com> wrote:
have you tried...

1) removing settings.xml completely

Yep, same problem.
 
2) having a basic settings.xml but explicitly define the
pluginRepository

I havn't tried this, I'll give it a go tomorrow. 

Stuart Grimshaw

unread,
Dec 31, 2009, 6:26:58 AM12/31/09
to Sheffield Java User Group
On 30 Dec, 22:36, Stuart Grimshaw <stuart.grims...@gmail.com> wrote:
> On Wed, Dec 30, 2009 at 9:47 PM, James Jefferies
> <jamesjeffer...@gmail.com>wrote:

>
> > have you tried...
>
> > 1) removing settings.xml completely
>
> Yep, same problem.
>
> > 2) having a basic settings.xml but explicitly define the
> > pluginRepository
>
> I havn't tried this, I'll give it a go tomorrow.

It doesn't look like it's a Maven related problem at all, Eclipse
can't see any of it's update sites with the same error message:

Some sites could not be found. See the error log for more detail.
Unable to connect to repository http://download.eclipse.org/webtools/updates/content.xml
Network is unreachable

Ed Bowler

unread,
Dec 31, 2009, 6:32:42 AM12/31/09
to java-sh...@googlegroups.com

Is there a security manager policy setup to deny access to the network ?

On 31 Dec 2009 11:27, "Stuart Grimshaw" <stuart....@gmail.com> wrote:

On 30 Dec, 22:36, Stuart Grimshaw <stuart.grims...@gmail.com> wrote: > On Wed, Dec 30, 2009 at 9:47 ...

> <jamesjeffer...@gmail.com>wrote:

> > > have you tried... > > > 1) removing settings.xml completely > > Yep, same problem. > > > 2) ha...

Stuart Grimshaw

unread,
Dec 31, 2009, 7:41:41 AM12/31/09
to Sheffield Java User Group
I was suffering from this bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560142#35

"The update to netbase installs a new sysctl option to the system:

enygma@whitelight:~$ cat /etc/sysctl.d/bindv6only.conf

--- 8< --- 8< ---

This option makes it not possible to use the ::ffff::ip style mapped
addresses anymore, however, this is the default of the java virtual
machine, unless the specified define is used to suppress ipv6.

Setting the sysctl option to 0 makes java behave normal again."

Si

unread,
Dec 31, 2009, 10:16:01 AM12/31/09
to Sheffield Java User Group
On Dec 31, 12:41 pm, Stuart Grimshaw <stuart.grims...@gmail.com>
wrote:

Nice find. Turns out this is what stopped Hudson's GUI from working on
my home server too :-(

Reply all
Reply to author
Forward
0 new messages