[
https://issues.apache.org/jira/browse/MNG-7706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17691662#comment-17691662
]
ASF GitHub Bot commented on MNG-7706:
-------------------------------------
cstamas opened a new pull request, #1009:
URL: https://github.com/apache/maven/pull/1009
This PR deprecates the 'localRepository' mojo parameter expression, and Core
will emit warning if used by any Mojo.
---
https://issues.apache.org/jira/browse/MNG-7706
> Deprecate 'localRepository' mojo parameter expression
> -----------------------------------------------------
>
> Key: MNG-7706
> URL: https://issues.apache.org/jira/browse/MNG-7706
> Project: Maven
> Issue Type: Improvement
> Components: Core
> Reporter: Tamas Cservenak
> Priority: Major
> Fix For: 4.0.0, 4.0.0-alpha-5, 3.9.1
>
>
> This expression injects type {{ArtifactRepository}} that is part of the suite
> coming from Maven2 (predates Mercury, that was followed by Aether, today
> Maven Resolver to be precise).
> The problem with this interface is that it is not compatible (nor is possible
> to adapt it) to Maven Resolver LocalRepositoryManager due lack of context.
> Also, the use of this interface in Mojos causes issues like MNG-7663, as they
> fully (and blindly) re-implement Maven local repository with *wired in*
> layout.
> Moreover, Mojos using this expression are usually dragging other (legacy)
> deprecated things as well, most typically maven-artifact-transfer, or
> maven-dependency-tree and so on, all things that predates Maven 3.1 (are done
> to "protect" from Aether package change happened between Maven 3.0 and Maven
> 3.1).
> Today baseline for plugins is 3.2.5, so none of these "indirection" are
> needed anymore. In fact, the use of this expression is very good sign of
> legacy and technical debt present in given plugin.
> The type {{ArtifactRepository}} is used in Maven internally (most in
> maven-compat, a bit less in maven-core), this is telling as well, but IMHO
> there is no need to deprecate this interface, as:
> * plugins who migrate from this ancient interface to Resolver will have much
> simpler job with maven 4 API (as it is much closer to Resolver than old Maven
> APIs)
> * this tackles only Plugins, while Maven itself is fine, as post Maven 4 the
> internals will be shut off, so warning Mojo authors is enough
--
This message was sent by Atlassian Jira
(v8.20.10#820010)