maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <ja...@tesla.io>
Subject Re: Pain with MNG-5181 (_maven.repositories)
Date Sun, 03 Feb 2013 22:08:56 GMT
Would still be useful if you removed your passwords and sent me both configurations, if this
is happening to you with this configuration it's probably happening to others. If I can give
it a quick look I can probably tell you why the error is happening or determine if it is,
in fact, a bug.

On Feb 3, 2013, at 5:04 PM, Romain Manni-Bucau <rmannibucau@gmail.com> wrote:

> well nothing special in it (host/port/protocol proxies + username/password
> servers).
> 
> however i build company projects using enterprise project having as
> dependencies tomee, could it generate it?
> 
> 
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
> 
> 
> 
> 2013/2/3 Jason van Zyl <jason@tesla.io>
> 
>> Can you send me the configurations?
>> 
>> If the artifacts are accessible and it fails then that's a bug. But I am
>> willing to bet one configuration yields a different set of URLs to which
>> particular artifacts are not accessible. If I can reproduce it then this
>> will help contribute to an error message that's more useful.
>> 
>> On Feb 3, 2013, at 4:35 PM, Romain Manni-Bucau <rmannibucau@gmail.com>
>> wrote:
>> 
>>> I switch my settings and the only differences are:
>>> 
>>> 1) some server config (i guess that's not important)
>>> 2) (more important) proxies (host/port)
>>> 
>>> i don't use mirrorOf.
>>> 
>>> PS: the issue can happen with tomee trunk so repos are always available
>>> since the internet is available.
>>> 
>>> *Romain Manni-Bucau*
>>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>>> *Blog: **http://rmannibucau.wordpress.com/*<
>> http://rmannibucau.wordpress.com/>
>>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>> *Github: https://github.com/rmannibucau*
>>> 
>>> 
>>> 
>>> 2013/2/3 Jason van Zyl <jason@tesla.io>
>>> 
>>>> If this is on one machine where you are not changing configurations or
>>>> locations then something else is wrong as this does not happen for a
>>>> machine that stays in the same place using the same settings.xml. Do you
>>>> use a mirrorOf in your settings.xml that points to a group repository?
>> Can
>>>> you share your configuration? When you encounter this problem next, move
>>>> your whole local repository out of the way (or use
>>>> -Dmaven.repo.local=/tmp/repo) and you find that the build will fail.
>>>> 
>>>> When this error occurs it means that the artifacts you're asking for are
>>>> not available in any configured repository. You erase
>> _maven.repositories
>>>> file, and Maven does not verify that artifact's existence in the remote
>>>> repository and let's you use the artifact you acquired locally by some
>>>> other means.
>>>> 
>>>> This generally happens as a result of switching between configurations
>>>> which changes the id/url of the repository you are using. You do a build
>>>> against id=repo1(URL1) and get some artifacts and those are recorded in
>> the
>>>> _maven.repositories files, and then you switch configurations and use
>>>> id=repo2(URL2) and that repository doesn't have the artifacts you
>> acquired
>>>> from id=repo1(URL1).
>>>> 
>>>> The problem encountered for people flipping between using Central
>> directly
>>>> and using a mirrorOf setting with a repository manager is as follows:
>>>> 
>>>> If you have no mirrorOf setting and you have POMs that contain
>> repository
>>>> entries Maven will follow the repositories in the POMs and acquire any
>>>> dependencies from those repositories listed in the POMs. Now when you
>> flip
>>>> to using a mirrorOf setting with a repository manager all those requests
>>>> will be routed through that single URL. If you have not setup the
>> proxies
>>>> in your repository manager that correspond to the repositories in the
>> POMs
>>>> the build will fail because those artifacts are not accessible to the
>>>> repository manager.
>>>> 
>>>> On Feb 3, 2013, at 3:46 PM, Romain Manni-Bucau <rmannibucau@gmail.com>
>>>> wrote:
>>>> 
>>>>> Hi guys,
>>>>> 
>>>>> Not sure it is linked or not (i read the thread lately) but at work we
>>>> use
>>>>> a proxy and not at "home" and i often have to remove _maven.repo files
>>>>> (both ways) to make my build work again...that's an everyday pain.
>>>>> Le 3 févr. 2013 21:41, "Jason van Zyl" <jason@tesla.io> a écrit
:
>>>>> 
>>>>>> 
>>>>>> On Feb 3, 2013, at 3:26 PM, Baptiste MATHUS <ml@batmat.net>
wrote:
>>>>>> 
>>>>>>> +1.
>>>>>>> 
>>>>>>> Though the feature seems interesting, it should have had its
own
>>>>>>> advertisement while being introduced.
>>>>>>> Even after re-reading
>>>>>>> 
>>>>>> 
>>>> 
>> https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-ResolutionfromLocalRepository
>>>>>>> I'm
>>>>>>> still unsure about where/when it would bite me.
>>>>>> 
>>>>>> Does this make sense to you?
>>>>>> 
>>>>>> ---
>>>>>> 
>>>>>> h1. Enhanced Remote Repository Support
>>>>>> 
>>>>>> The feature verifies that the remote repositories configured for
the
>>>>>> current build can be used to successfully resolve the artifact in
>>>> question.
>>>>>> If you retrieved an artifact in the past from Central and now changed
>>>> your
>>>>>> build to only know about Nexus and it doesn't have any knowledge
of
>> that
>>>>>> artifact then the build is going to fail. Put differently, if you
>> purged
>>>>>> your local repo, your build won't work either. Neglecting offline
>> mode,
>>>> the
>>>>>> goal is to ensure that the resolution works if it could be performed
>>>> using
>>>>>> a clean local repo with the current configuration. Giving confidence
>>>> that
>>>>>> co-workers can reproduce the build and not depend on some artifact
>>>>>> magically being pulled down into your local repository in the past
>>>> which is
>>>>>> nowhere to be found in the configured remote repository.
>>>>>> 
>>>>>> ---
>>>>>> 
>>>>>> And would you want that off by default?
>>>>>> 
>>>>>>> As I know and like Maven quite well, if I was bitten by that,
I might
>>>> do
>>>>>>> some reseach and find jiras etc.
>>>>>>> 
>>>>>>> Others might just struggle to make it work and grow the maven
bashing
>>>>>> group
>>>>>>> as Jeff said.
>>>>>>> 
>>>>>>> 
>>>>>>> 2013/2/1 Jeff MAURY <jeffmaury@jeffmaury.com>
>>>>>>> 
>>>>>>>> +1 on Arnaud's comments.
>>>>>>>> The main problem with this "feature" is that it is not documented
>>>> thus I
>>>>>>>> can't explain the real reason why Maven download several
times
>>>> released
>>>>>>>> artifacts and this causes members of the Maven bashing group
to grow
>>>>>>>> 
>>>>>>>> Jeff
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Fri, Feb 1, 2013 at 9:47 AM, Arnaud Héritier <
>> aheritier@gmail.com>
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> My position was to propose the low cost possible solution
to have a
>>>>>> quick
>>>>>>>>> fix and not to wait for months.
>>>>>>>>> If it could be fixed/configurable in aether it may be
the solution
>> to
>>>>>>>>> follow but I'm not sure about the status of this 3rd
party project
>>>>>>>> (eclipse
>>>>>>>>> migration ...) on which we don't have the hand.
>>>>>>>>> Seriously I helped and lost MANY hours with this problem
because it
>>>> is
>>>>>>>> hard
>>>>>>>>> to diagnose.
>>>>>>>>> I'm sure that many people abandoned to try to understand
and just
>>>>>> dropped
>>>>>>>>> their local repo or decided to downgraded to m2 (or to
switch to
>>>>>> another
>>>>>>>>> tool).
>>>>>>>>> I think we can have a lot of similar feedbacks.
>>>>>>>>> The worst thing is to have another thing that users don't
>> understand
>>>>>>>> (lake
>>>>>>>>> of documentation ? communication ?)
>>>>>>>>> The side effect is that changing a repository id (or
mirror id)
>> makes
>>>>>>>> maven
>>>>>>>>> to re-download all the earth (while we are claiming from
the
>>>> beginning
>>>>>>>> that
>>>>>>>>> Maven won't never download twice a release).
>>>>>>>>> And when the remote artifact just disappeared it is just
a
>> nightmare
>>>>>> due
>>>>>>>> to
>>>>>>>>> the lake of correct logs and this case is easy to have.
>>>>>>>>> For example in my company I have a profile to let people
DL
>> artifacts
>>>>>>>> from
>>>>>>>>> staging repositories (thus these are releases). It happened
that
>> they
>>>>>>>>> activated it once to test a build and then they rebuild
the project
>>>>>>>> without
>>>>>>>>> the profile (thinking the artifact is in the local repo)
and it
>> fails
>>>>>> ...
>>>>>>>>> 
>>>>>>>>> Sincerely I think I had my worst headaches with maven
due to this
>> bug
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Fri, Feb 1, 2013 at 4:47 AM, Jason van Zyl <jason@tesla.io>
>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> On Jan 31, 2013, at 7:13 PM, Arnaud Héritier <aheritier@gmail.com
>>> 
>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>>> Hi Olivier,
>>>>>>>>>>> 
>>>>>>>>>>> Thx a lot for the fix. It will help a lot the
community.
>>>>>>>>>>> But from my point of view it's perhaps not yet
enough.
>>>>>>>>>>> We should :
>>>>>>>>>>> 1/ change the default behavior to deactivate
this control which
>> is
>>>>>>>>>>> difficult to understand
>>>>>>>>>> 
>>>>>>>>>> I disagree. We may want to change it slightly but
it's only a
>>>> problem
>>>>>>>> for
>>>>>>>>>> people who flip between Maven a repository manager
and without but
>>>>>> it's
>>>>>>>>> to
>>>>>>>>>> ensure the identity of a component. I haven't seen
a huge number
>> of
>>>>>>>>>> complaints. I do not want to turn this off. Improve
it, sure, but
>>>>>>>> turning
>>>>>>>>>> it off by default I believe is not the right thing
to do.
>>>>>>>>>> 
>>>>>>>>>>> 2/ change the error message when this control
is activated to
>>>>>>>> clearly
>>>>>>>>>>> explain that the problem comes from the unavailability
of the
>>>>>>>> artifact
>>>>>>>>> on
>>>>>>>>>>> its original remote repo.
>>>>>>>>>>> 
>>>>>>>>>>> For me 1/ is mandatory and 2/ a nice to have
>>>>>>>>>>> 
>>>>>>>>>>> WDYT ?
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Fri, Feb 1, 2013 at 12:53 AM, Olivier Lamy
<olamy@apache.org>
>>>>>>>>> wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> I have pushed a fix for that.
>>>>>>>>>>>> Now you can desactivate the enhanced local
repository using:
>>>>>>>>>>>> * new cli option: -slrm,--simple-local-repository-manager
>>>>>>>>>>>> * or in MAVEN_OPTS: -Dmaven.simpleLocalRepoMan=true
>>>>>>>>>>>> 
>>>>>>>>>>>> will be available for testing here
>>>>>>>>>>>> https://builds.apache.org/job/maven-3.x/
with build #368
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 2013/1/31 Jörg Hohwiller <joerg@j-hohwiller.de>:
>>>>>>>>>>>>> Hi Arnaud,
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> +1 to consider the current behavior
as a bug.
>>>>>>>>>>>>>> We should be able to deactivate it
easily (and perhaps to have
>>>> it
>>>>>>>>> off
>>>>>>>>>> by
>>>>>>>>>>>>>> default to activate it only on CI
servers)
>>>>>>>>>>>>> 
>>>>>>>>>>>>> :)
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> and we should take care to have
>>>>>>>>>>>>>> a real error message explaining the
issue and not a classical
>>>>>>>>>> dependency
>>>>>>>>>>>>>> not found while the artifact is in
the local repo.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> This is exactly filed here:
>>>>>>>>>>>>> http://jira.codehaus.org/browse/MNG-5185
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Arnaud
>>>>>>>>>>>>> Cheers
>>>>>>>>>>>>> Jörg
>>>>>>>>>>>>> 
>>>>>>>>>>>>> --
>>>>>>>>>>>>> If know-how becomes know-where, then
knowledge gets nowhere.
>>>>>>>>>>>>> [Jörg Hohwiller]
>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> --
>>>>>>>>>>>> Olivier Lamy
>>>>>>>>>>>> Talend: http://coders.talend.com
>>>>>>>>>>>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>> 
>> ---------------------------------------------------------------------
>>>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>>>>>>>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> --
>>>>>>>>>>> -----
>>>>>>>>>>> Arnaud Héritier
>>>>>>>>>>> http://aheritier.net
>>>>>>>>>>> Mail/GTalk: aheritier AT gmail DOT com
>>>>>>>>>>> Twitter/Skype : aheritier
>>>>>>>>>> 
>>>>>>>>>> Thanks,
>>>>>>>>>> 
>>>>>>>>>> Jason
>>>>>>>>>> 
>>>>>>>>>> ----------------------------------------------------------
>>>>>>>>>> Jason van Zyl
>>>>>>>>>> Founder & CTO, Sonatype
>>>>>>>>>> Founder,  Apache Maven
>>>>>>>>>> http://twitter.com/jvanzyl
>>>>>>>>>> ---------------------------------------------------------
>>>>>>>>>> 
>>>>>>>>>> Our achievements speak for themselves. What we have
to keep track
>>>>>>>>>> of are our failures, discouragements and doubts.
We tend to forget
>>>>>>>>>> the past difficulties, the many false starts, and
the painful
>>>>>>>>>> groping. We see our past achievements as the end
result of a
>>>>>>>>>> clean forward thrust, and our present difficulties
as
>>>>>>>>>> signs of decline and decay.
>>>>>>>>>> 
>>>>>>>>>> -- Eric Hoffer, Reflections on the Human Condition
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> -----
>>>>>>>>> Arnaud Héritier
>>>>>>>>> http://aheritier.net
>>>>>>>>> Mail/GTalk: aheritier AT gmail DOT com
>>>>>>>>> Twitter/Skype : aheritier
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Jeff MAURY
>>>>>>>> 
>>>>>>>> 
>>>>>>>> "Legacy code" often differs from its suggested alternative
by
>> actually
>>>>>>>> working and scaling.
>>>>>>>> - Bjarne Stroustrup
>>>>>>>> 
>>>>>>>> http://www.jeffmaury.com
>>>>>>>> http://riadiscuss.jeffmaury.com
>>>>>>>> http://www.twitter.com/jeffmaury
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Baptiste <Batmat> MATHUS - http://batmat.net
>>>>>>>> Sauvez un arbre,
>>>>>>>> Mangez un castor ! nbsp;! <http://www.twitter.com/jeffmaury>
>>>>>> 
>>>>>> Thanks,
>>>>>> 
>>>>>> Jason
>>>>>> 
>>>>>> ----------------------------------------------------------
>>>>>> Jason van Zyl
>>>>>> Founder & CTO, Sonatype
>>>>>> Founder,  Apache Maven
>>>>>> http://twitter.com/jvanzyl
>>>>>> ---------------------------------------------------------
>>>>>> 
>>>>>> To do two things at once is to do neither.
>>>>>> 
>>>>>> -- Publilius Syrus, Roman slave, first century B.C.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> Thanks,
>>>> 
>>>> Jason
>>>> 
>>>> ----------------------------------------------------------
>>>> Jason van Zyl
>>>> Founder & CTO, Sonatype
>>>> Founder,  Apache Maven
>>>> http://twitter.com/jvanzyl
>>>> ---------------------------------------------------------
>>>> 
>>>> The modern conservative is engaged in one of man's oldest exercises in
>>>> moral philosophy; that is,
>>>> the search for a superior moral justification for selfishness.
>>>> 
>>>> -- John Kenneth Galbraith
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>> 
>> Thanks,
>> 
>> Jason
>> 
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder & CTO, Sonatype
>> Founder,  Apache Maven
>> http://twitter.com/jvanzyl
>> ---------------------------------------------------------
>> 
>> What matters is not ideas, but the people who have them. Good people can
>> fix bad ideas, but good ideas can't save bad people.
>> 
>> -- Paul Graham
>> 
>> 
>> 
>> 
>> 
>> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder & CTO, Sonatype
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

You are never dedicated to something you have complete confidence in.
No one is fanatically shouting that the sun is going to rise tomorrow.
They know it is going to rise tomorrow. When people are fanatically
dedicated to political or religious faiths or any other kind of 
dogmas or goals, it's always because these dogmas or
goals are in doubt.

  -- Robert Pirzig, Zen and the Art of Motorcycle Maintenance






Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message