[ https://issues.apache.org/jira/browse/MNG-5883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420983#comment-16420983 ]
Ben Caradoc-Davies commented on MNG-5883: ----------------------------------------- I agree with Cristian: the new mode should be removed. The core problem is that the new mode stores too much state in the local repository. In effect, artifacts now have not only groupId, artifactId, and version, but also a persistent origin that is set once and cannot be accessed from poms. The new mode is broken because it neglects the possibility that the origin might change, but this happens all the time in the real world. The new mode confuses the means of access (repository) with the payload (artifact). This analogous to mixing the transport and application layers in a network model. The new behaviour increases stability but this is orthogonal to correctness. A build can be stable and broken. Under the new behaviour, once the local repository has been poisoned with a bad artifact (e.g. corrupt zero-length jar or artifact built and deployed with wrong Java target), it will be stably broken, and cannot be fixed by adding a good artifact to a different repository. Manual repair of a local repository can be difficult if it is on a remote CI machine (who has admin on that box?). Not to mention all the confused developers who are unaware of Maven's broken default (new) behaviour, do not know that their local repository is poisoned, cannot figure out why their build is failing, and wander project developer mailing lists and stackexchange seeking help. If you want to bind artifacts to particular repositories (and I do not think this is as useful as you think), please implement this behaviour in the pom model, not as hidden state in the local repository. Until the new mode is removed, I use and recommend "-llr". > 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)