[
https://issues.apache.org/jira/browse/MNG-6825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690503#comment-17690503
]
Tim te Beek commented on MNG-6825:
----------------------------------
Thought this could be a fun one to dive into for me, with my involvement in
OpenRewrite & Moderne for some potential automated fixes (if appreciated!). For
those not familiar: through `public.moderne.io` you can create a repository
group containing some 80+ (but likely not yet {_}all{_}) Apache Maven projects,
and not only find all occurrences of types and methods, but also replace those
with alternatives where available.
So as a quick example; when I search for the type
`org.codehaus.plexus.util.StringUtils` (emphasis on the final `s`), I see some
387 results across 44 out of 85 repositories, with the top three having 71
(maven-scm), 49 (maven) and 24 (maven-doxia) results each, with a long tail in
the other 41 repositories. We can also zoom in on particular methods, and then
only on projects that also depend on `commons-lang3` or `maven-shared-utils`
for instance, to swap those plexus implementations out for their alternatives,
where desired.
All I would need to apply these fixes is some guidelines on what replacements
are desired, and how you'd like me to approach such replacements.
* Should we add dependencies where they don't currently exist for instance? Or
should we only replace where alternative are already available on the classpath?
* And would you want different replacements to be applied all together at
once, or isolated for an easier review (but more PRs)?
* And would anyone want to pair on this such that it's not just me creating
these, and potentially skip the asynchronous review work?
Any and all feedback appreciated, also if this work is not desired at this
time. :)
> Cleaning Up dependencies
> plexus-utils/maven-shared-utils/commons-lang3/commons-io
> ---------------------------------------------------------------------------------
>
> Key: MNG-6825
> URL: https://issues.apache.org/jira/browse/MNG-6825
> Project: Maven
> Issue Type: Improvement
> Components: Bootstrap & Build
> Affects Versions: 3.6.3
> Reporter: Karl Heinz Marbaise
> Assignee: Karl Heinz Marbaise
> Priority: Minor
> Fix For: 4.0.x-candidate
>
>
> Experiment to see if we can get rid of commons-lang3 dependency.
> * Identified code duplication between:
> ** {{org.apache.commons.lang3.StringUtils}} from {{commons-lang3}} (501879
> Bytes commons-lang3-3.8.1.jar)
> ** {{org.codehaus.plexus.util.StringUtil}} from {{plexus-utils}} (261801
> Bytes plexus-utils-3.2.1.jar)
> ** {{org.apache.maven.shared.utils}} from {{maven-shared-utils}} (166562
> Bytes maven-shared-utils-3.2.1.jar)
> ** We should replace the self implemented with
> {{org.codehaus.plexus.util.StringUtil}}. or with {{maven-shared-utils}}
> * {{commons-io}} usage by {{maven-shared-utils}} (208700 Bytes
> commons-io-2.5.jar)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)