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

Guillaume Nodet commented on MNG-8749:
--------------------------------------

{{ModelPathTranslator}} goes through a {{Model}} and is actually using 
{{PathTranslator}} to translate each path.

In theory, having an interface and a component provides an easy way for an 
extension to provide a slightly different component.  That's how Maven has been 
written 20 years ago. 

The package {{org.apache.maven.api.services.model}} is a semi-public api.   
Some plugins / extensions do customize model building by providing a few 
components, reusing all the other standard ones.  This is the case of 
{{flatten-maven-plugin}} for example (though it's using Maven 3 API).  Static 
methods are very difficult to replace if you want to slightly alter Maven's 
behavior, so I think this package has its value.  You need to consider the 
ecosystem, not just Maven's internal.  There may never be a need for a second 
usage or implementation in Maven, but that does not mean there's none in any 
plugins / extensions.

> Hide PathTranslator from API
> ----------------------------
>
>                 Key: MNG-8749
>                 URL: https://issues.apache.org/jira/browse/MNG-8749
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Elliotte Rusty Harold
>            Priority: Blocker
>
> org.apache.maven.api.services.model.PathTranslator has exactly one 
> implementation that is only used in the impl package. Move it there, make it 
> non-public, and combine it with DefaultPathTranslator.
> It can be added to the org.apache.maven.api.services.model package later if a 
> need is uncovered, but right now no such need exists. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to