You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jörg von Frantzius <jo...@aperto.de> on 2013/03/26 13:02:40 UTC

Why are POMs of non-SNAPSHOT versions downloaded although already in local repo?

Hi,

during our builds I can see that Maven downloads POMs for non-SNAPSHOT 
versions again, even though the POMs are already present in the local 
repository. I could understand that it does so for SNAPSHOT versions, 
but why also for non-SNAPSHOT versions?

This causes the build to spend considerable time downloading POMs where 
it doesn't seem necessary.

Does anybody know a particular reason for this happening?

Regards,
Jörg

-- 
*Dipl. inf. Jörg von Frantzius, System Architect*

Email mailto:joerg.frantzius@aperto.de
Phone +49 30 283921-318
Fax +49 30 283921-29

Aperto AG - In der Pianofabrik
Chausseestraße 5, D-10115 Berlin-Mitte
http://www.aperto.de
http://www.facebook.com/aperto
https://www.xing.com/companies/apertoag

HRB 77049, AG Berlin Charlottenburg
Vorstand: Dirk Buddensiek (Vorsitzender), Kai Großmann, Stephan Haagen
Aufsichtsrat: Bernd Hardes (Vorsitzender)

Re: Why are POMs of non-SNAPSHOT versions downloaded although already in local repo?

Posted by Jörg von Frantzius <jo...@aperto.de>.
Hi Stephen,

thanks for your answer. Indeed we had a change of repository id, as I 
switched the build on our CI server to use a different settings.xml, 
pointing to a different mirror.

It seems that it is the "_maven.repositories" file holding the 
repository or mirror id that it downloaded a POM from. It now contains 
the id of the new mirror, and there are no downloads of the same POMs 
anymore.

Thanks + regards,
Jörg

On 26.03.2013 13:28, Stephen Connolly wrote:
> Are these POMs that exist? If a POM does not exist (i.e. only the .jar is
> in the remote repository) then Maven will keep trying to find that pom.
>
> Are you using Maven 3.x and changing effective repository ids across
> builds? Maven 3.x stores the repository that a file was downloaded from and
> if requesting a specific GAVCT and the local repository cache has that
> GAVCT downloaded from a different URI then Maven will re-download from the
> URI that is in effect in your current build.
>
> The first question will probably be the answer you are looking for. The
> second will lead you on a rat-run of chasing down bad poms, so only go that
> way if the first does not resolve your issue.
>
> -Stephen
>
>
> On 26 March 2013 12:02, Jörg von Frantzius <jo...@aperto.de>wrote:
>
>> Hi,
>>
>> during our builds I can see that Maven downloads POMs for non-SNAPSHOT
>> versions again, even though the POMs are already present in the local
>> repository. I could understand that it does so for SNAPSHOT versions, but
>> why also for non-SNAPSHOT versions?
>>
>> This causes the build to spend considerable time downloading POMs where it
>> doesn't seem necessary.
>>
>> Does anybody know a particular reason for this happening?
>>
>> Regards,
>> Jörg
>>
>> --
>> *Dipl. inf. Jörg von Frantzius, System Architect*
>>
>> Email mailto:joerg.frantzius@aperto.**de <jo...@aperto.de>
>> Phone +49 30 283921-318
>> Fax +49 30 283921-29
>>
>> Aperto AG - In der Pianofabrik
>> Chausseestraße 5, D-10115 Berlin-Mitte
>> http://www.aperto.de
>> http://www.facebook.com/aperto
>> https://www.xing.com/**companies/apertoag<https://www.xing.com/companies/apertoag>
>>
>> HRB 77049, AG Berlin Charlottenburg
>> Vorstand: Dirk Buddensiek (Vorsitzender), Kai Großmann, Stephan Haagen
>> Aufsichtsrat: Bernd Hardes (Vorsitzender)
>>


-- 
*Dipl. inf. Jörg von Frantzius, System Architect*

Email mailto:joerg.frantzius@aperto.de
Phone +49 30 283921-318
Fax +49 30 283921-29

Aperto AG - In der Pianofabrik
Chausseestraße 5, D-10115 Berlin-Mitte
http://www.aperto.de
http://www.facebook.com/aperto
https://www.xing.com/companies/apertoag

HRB 77049, AG Berlin Charlottenburg
Vorstand: Dirk Buddensiek (Vorsitzender), Kai Großmann, Stephan Haagen
Aufsichtsrat: Bernd Hardes (Vorsitzender)

Re: Why are POMs of non-SNAPSHOT versions downloaded although already in local repo?

Posted by Stephen Connolly <st...@gmail.com>.
Are these POMs that exist? If a POM does not exist (i.e. only the .jar is
in the remote repository) then Maven will keep trying to find that pom.

Are you using Maven 3.x and changing effective repository ids across
builds? Maven 3.x stores the repository that a file was downloaded from and
if requesting a specific GAVCT and the local repository cache has that
GAVCT downloaded from a different URI then Maven will re-download from the
URI that is in effect in your current build.

The first question will probably be the answer you are looking for. The
second will lead you on a rat-run of chasing down bad poms, so only go that
way if the first does not resolve your issue.

-Stephen


On 26 March 2013 12:02, Jörg von Frantzius <jo...@aperto.de>wrote:

> Hi,
>
> during our builds I can see that Maven downloads POMs for non-SNAPSHOT
> versions again, even though the POMs are already present in the local
> repository. I could understand that it does so for SNAPSHOT versions, but
> why also for non-SNAPSHOT versions?
>
> This causes the build to spend considerable time downloading POMs where it
> doesn't seem necessary.
>
> Does anybody know a particular reason for this happening?
>
> Regards,
> Jörg
>
> --
> *Dipl. inf. Jörg von Frantzius, System Architect*
>
> Email mailto:joerg.frantzius@aperto.**de <jo...@aperto.de>
> Phone +49 30 283921-318
> Fax +49 30 283921-29
>
> Aperto AG - In der Pianofabrik
> Chausseestraße 5, D-10115 Berlin-Mitte
> http://www.aperto.de
> http://www.facebook.com/aperto
> https://www.xing.com/**companies/apertoag<https://www.xing.com/companies/apertoag>
>
> HRB 77049, AG Berlin Charlottenburg
> Vorstand: Dirk Buddensiek (Vorsitzender), Kai Großmann, Stephan Haagen
> Aufsichtsrat: Bernd Hardes (Vorsitzender)
>