[ 
https://issues.apache.org/jira/browse/MNG-5883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420341#comment-16420341
 ] 

Cristian Vasile Mocanu commented on MNG-5883:
---------------------------------------------

{quote}From my POV the legacy mode should be deprecated one day and removed 
thus the info / warning / notice ?
{quote}
Are you serious?
 One doesn't remove a functionality when the replacement is worse!

In my opinion the solution to this problem (mutable artifacts) is much worse 
that the problem it tries to solve:
 - if the artifact changes on a remote repository (HORRIBLE practice - are 
there people that still do this?), it's absolutely expected if build starts 
breaking. It's actually a very good thing to feel the pain. This will steer 
people away from bad repositories/practices.
 - on the other hand it's absolutely NOT expected for Maven to intentionally 
break a build when all artifacts are available locally

The new mode is one of those ideas that sound good on paper, but in the real 
world you waste much more time because of it compared the problem it tries to 
solve.
 I can't tell you how much time was wasted by me and my colleagues on this.

I only use the company Nexus (when at work) and Maven Central (when I am at 
home, where I don't have access to the company's Nexus without VPN, and I'm too 
lazy to start the VPN).
 Do you guys sincerely believe that me not being able to work at all (because 
Maven doesn't build) is better than risking a bad artifact? (zero risk of bad 
artifacts in my particular case)
 I find this very hard to believe.

Also, there is no excuse for the bad error message: it says the the POM is 
unresolvable. This is false. The file is there in the ~/m2/repository, so it's 
resolvable - Maven just refuses to use it. The message should clearly say that 
this artifact was downloaded from a different repository and since that 
repository is no longer available, Maven will do an extra check. Maybe a link 
to an FAQ page should also be added.

I second Ben. When you are forced to manually alter Maven internal data 
structures (e.g. delete "_*.repositories" files after a repository migration, 
or when the company Nexus is not available from home), there is something 
horribly wrong with Maven's design. It's like going inside the ".git" directory 
and changing files around to fix things.

Instead of removing the legacy mode, I would say: this should be the default!
 It's the new mode that should be removed.

> Silence unnecessary legacy local repository warning
> ---------------------------------------------------
>
>                 Key: MNG-5883
>                 URL: https://issues.apache.org/jira/browse/MNG-5883
>             Project: Maven
>          Issue Type: Improvement
>          Components: Command Line
>    Affects Versions: 3.2.5, 3.3.3, 3.5.0
>            Reporter: Ben Caradoc-Davies
>            Priority: Trivial
>
> Having been burned on several occasions by the new local repository 
> behaviour, which in effect scopes artifacts by their origin (when first 
> stored in the local repository), I was delighted by the introduction of the 
> -llr command line option in 3.0.3. I now use this behaviour for all builds to 
> avoid the build instability caused by remote repository migration. This 
> avoids the need to start each build with:
> {code}
> find ~/.m2/repository -name "_*.repositories" -exec rm -f {} \;
> {code}
> Given that users of -llr have made an informed choice to do so, please remove 
> the (in my view unnecessary) warning that it generates:
> {code}
> [WARNING] Disabling enhanced local repository: using legacy is strongly 
> discouraged to ensure build reproducibility.
> {code}
> Kind regards,
> Ben.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to