You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wes Wannemacher <we...@wantii.com> on 2009/06/24 06:24:05 UTC

artifacts not downloading

Hello,

Lately I have noticed that while building, maven is downloading its
dependencies, but once in a while, an artifact will come over
incorrectly (I suspect a bad mirror somewhere). For instance, if I
look at the contents of
~/.m2/repository/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar I see -

cat /home/wesw/.m2/repository/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a
href="http://download.java.net/maven/2/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar">here</a>.</p>
<hr>
<address>Apache Server at maven2-repository.dev.java.net Port 443</address>
</body></html>

It is helpful that they tell me where to find it, but how can I make
maven understand that?

-Wes
-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: artifacts not downloading

Posted by Todd Thiessen <th...@nortel.com>.
We have also been having some trouble with java.net. We are using Nexus
as our repo manager and it will sometimes take an extremely long time to
download an artifact to the local repository that Nexus already has
cached. This only seems to happen with java.net artifact. It also
doesn't seem to be consistent as to which artifact it has trouble
downloading. It seems to be random.

We have been doing some in depth analysis of the problem and don't as of
yet have a solution.

---
Todd Thiessen
 

> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com] 
> Sent: Thursday, June 25, 2009 2:20 AM
> To: Maven Users List
> Subject: Re: artifacts not downloading
> 
> > (which it did). I'll check the effective poms because I'm 
> sure that if 
> > it were one of the commonly used mirrors, I wouldn't be the 
> only one 
> > having the problem.
> 
> I've seen this specific problem reported just recently by 
> another user here on Maven Users. I consider this a 
> bad/broken mirror at dev.java.net but feel that Maven should 
> perform some minimal validation of what it downloaded before 
> saving to the local repo cache (eg the Jar is really a Jar, 
> and the pom is not an HTML file, etc).
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: artifacts not downloading

Posted by Wayne Fay <wa...@gmail.com>.
> (which it did). I'll check the effective poms because I'm sure that if it
> were one of the commonly used mirrors, I wouldn't be the only one having the
> problem.

I've seen this specific problem reported just recently by another user
here on Maven Users. I consider this a bad/broken mirror at
dev.java.net but feel that Maven should perform some minimal
validation of what it downloaded before saving to the local repo cache
(eg the Jar is really a Jar, and the pom is not an HTML file, etc).

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: artifacts not downloading

Posted by Wes Wannemacher <we...@wantii.com>.
On Wed, Jun 24, 2009 at 2:21 AM, Barrie Treloar <ba...@gmail.com> wrote:

>
> Run
>  mvn help:effective-pom > epom.txt
>
> This will show you the complete <repositories> defined in the inheritance
> chain.
>
> You can also check your settings.xml to see whether you are pointing
> to something wierd.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Thanks, I'll run run that and see what I find. It's not a critical problem
for me right now, and I have been meaning to run analyze dependencies, etc.
to clean up some of our poms.

As far as the settings.xml, I only brought it up because this was a new
laptop I had just bought. I was so excited about getting new hardware that I
downloaded/installed ubuntu, java, maven and IDEA. The first thing I did was
try to run a build and ended up with the same problem I had previously. When
I look at the HTML, it points to another location, but at the "new"
location, I get a 404. Assuming that it is a mirror (that isn't really fully
mirroring), it would make sense that running again later, the build worked
(which it did). I'll check the effective poms because I'm sure that if it
were one of the commonly used mirrors, I wouldn't be the only one having the
problem.

-Wes
-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

Re: artifacts not downloading

Posted by adasal <ad...@gmail.com>.
Just to mention:-
I had a problem with downloads.
Information from
http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories
The mirrors mentioned as synced independently mostly don't work and some of
those pushed directly from central may not, I would need to test further.
I found reliable one's are central and a couple of others in the US.
Adam

2009/6/24 Barrie Treloar <ba...@gmail.com>

> On Wed, Jun 24, 2009 at 2:35 PM, Wes Wannemacher<we...@wantii.com> wrote:
> > It is a large multi-module build (the struts2 build, in fact) and a
> > quick glance/grep through poms didn't yield any obvious entries
> > pointing to download.java.net, but I will dig further tomorrow. I
> > noticed the same thing at my office recently and I did get around it
> > by using nexus. I just wasn't sure if it was my build or if others had
> > noticed that artifacts weren't where maven was looking.
>
> Run
>  mvn help:effective-pom > epom.txt
>
> This will show you the complete <repositories> defined in the inheritance
> chain.
>
> You can also check your settings.xml to see whether you are pointing
> to something wierd.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: artifacts not downloading

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Jun 24, 2009 at 2:35 PM, Wes Wannemacher<we...@wantii.com> wrote:
> It is a large multi-module build (the struts2 build, in fact) and a
> quick glance/grep through poms didn't yield any obvious entries
> pointing to download.java.net, but I will dig further tomorrow. I
> noticed the same thing at my office recently and I did get around it
> by using nexus. I just wasn't sure if it was my build or if others had
> noticed that artifacts weren't where maven was looking.

Run
  mvn help:effective-pom > epom.txt

This will show you the complete <repositories> defined in the inheritance chain.

You can also check your settings.xml to see whether you are pointing
to something wierd.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: artifacts not downloading

Posted by Wes Wannemacher <we...@wantii.com>.
It is a large multi-module build (the struts2 build, in fact) and a
quick glance/grep through poms didn't yield any obvious entries
pointing to download.java.net, but I will dig further tomorrow. I
noticed the same thing at my office recently and I did get around it
by using nexus. I just wasn't sure if it was my build or if others had
noticed that artifacts weren't where maven was looking.

-Wes

On Wed, Jun 24, 2009 at 12:41 AM, Barrie Treloar<ba...@gmail.com> wrote:
> On Wed, Jun 24, 2009 at 1:54 PM, Wes Wannemacher<we...@wantii.com> wrote:
>> Hello,
>>
>> Lately I have noticed that while building, maven is downloading its
>> dependencies, but once in a while, an artifact will come over
>> incorrectly (I suspect a bad mirror somewhere). For instance, if I
>> look at the contents of
>> ~/.m2/repository/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar I see -
>>
>> cat /home/wesw/.m2/repository/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar
>> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>> <html><head>
>> <title>301 Moved Permanently</title>
>> </head><body>
>> <h1>Moved Permanently</h1>
>> <p>The document has moved <a
>> href="http://download.java.net/maven/2/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar">here</a>.</p>
>> <hr>
>> <address>Apache Server at maven2-repository.dev.java.net Port 443</address>
>> </body></html>
>>
>> It is helpful that they tell me where to find it, but how can I make
>> maven understand that?
>
> Do you have multiple <repository>s defined in your pom?
>
> I can download http://repo1.maven.org/maven2/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar
> fine.
>
> However if I go to http://download.java.net/maven/2/cglib/cglib/ you
> can see there is only one version 2.2_beta1/ (and no cglib-full at
> all)
>
> I suspect that you have included another repository that is claiming
> to have that artifact - when in fact it doesn't.
> It is very bad for a repository to delete or move an artifact.
>
> You may be able to get around this by fixing your <repository> declarations.
> You may be able to get around this by using a repository manager like
> archiva or nexus.
>
> Good luck.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: artifacts not downloading

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Jun 24, 2009 at 1:54 PM, Wes Wannemacher<we...@wantii.com> wrote:
> Hello,
>
> Lately I have noticed that while building, maven is downloading its
> dependencies, but once in a while, an artifact will come over
> incorrectly (I suspect a bad mirror somewhere). For instance, if I
> look at the contents of
> ~/.m2/repository/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar I see -
>
> cat /home/wesw/.m2/repository/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>301 Moved Permanently</title>
> </head><body>
> <h1>Moved Permanently</h1>
> <p>The document has moved <a
> href="http://download.java.net/maven/2/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar">here</a>.</p>
> <hr>
> <address>Apache Server at maven2-repository.dev.java.net Port 443</address>
> </body></html>
>
> It is helpful that they tell me where to find it, but how can I make
> maven understand that?

Do you have multiple <repository>s defined in your pom?

I can download http://repo1.maven.org/maven2/cglib/cglib-full/2.0.2/cglib-full-2.0.2.jar
fine.

However if I go to http://download.java.net/maven/2/cglib/cglib/ you
can see there is only one version 2.2_beta1/ (and no cglib-full at
all)

I suspect that you have included another repository that is claiming
to have that artifact - when in fact it doesn't.
It is very bad for a repository to delete or move an artifact.

You may be able to get around this by fixing your <repository> declarations.
You may be able to get around this by using a repository manager like
archiva or nexus.

Good luck.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org