You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2020/01/28 11:52:00 UTC

[jira] [Comment Edited] (MNG-6825) Cleaning Up dependencies plexus-utils/maven-shared-utils/commons-lang3/commons-io

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

Michael Osipov edited comment on MNG-6825 at 1/28/20 11:51 AM:
---------------------------------------------------------------

Using a 500 KB jar file for three classes: {{StringUtils}}, {{Validate}} and {{SystemUtils}}.
* {{StringUtils}} can be replaced by usage of either {{plexus-utils}} or {{maven-shared-utils}} or as I tested with self implementation
* {{SystemUtils}} is only used in some tests which can simply replaced by using JUnit Jupiter with all the support it has.
* {{Validate}} is a precondition class which checks for parameters etc. can be implemented very easily (done already to see how it works). Later this could be made part of {{maven-shared-utils}}.

Currently from {{maven-shared-utils}} we are using:
* {{org.apache.maven.shared.utils.io.FileUtils}} (Test Only)
* {{org.apache.maven.shared.utils.logging.MessageBuilder}}
* {{org.apache.maven.shared.utils.logging.MessageUtils}}

The real issue I have found (I was already aware of that) is that {{plexus-utils}} as well as {{maven-shared-utils}} having so many code in common (duplicate it more or less) and both of them are used.

Furthermore I found that currently the need for {{commons-io}} in Maven Core (or better it lands in the distribution {{lib}} directory) is only based on usage of {{commons-io}} in  {{maven-shared-utils}} where only a single class {{org.apache.commons.io.input.XmlStreamReader}} is used of {{commons-io}}. 

If I summarize this:
* If we would move to {{maven-shared-utils}} only we could get rid of 
** 501879 Byte {{commons-lang3}} (/)
** 261801 Byte {{plexus-utils}} (x)
** 208700 Byte {{commons-io}} (x)



was (Author: khmarbaise):
Using a 500 KB jar file for three classes: {{StringUtils}}, {{Validate}} and {{SystemUtils}}.
* {{StringUtils}} can be replaced by usage of either {{plexus-utils}} or {{maven-shared-utils}} or as I tested with self implementation
* {{SystemUtils}} is only used in some tests which can simply replaced by using JUnit Jupiter with all the support it has.
* {{Validate}} is a precondition class which checks for parameters etc. can be implemented very easily (done already to see how it works). Later this could be made part of {{maven-shared-utils}}.

Currently from {{maven-shared-utils}} we are using:
* {{org.apache.maven.shared.utils.io.FileUtils}} (Test Only)
* {{org.apache.maven.shared.utils.logging.MessageBuilder}}
* {{org.apache.maven.shared.utils.logging.MessageUtils}}

The real issue I have found (I was already aware of that) is that {{plexus-utils}} as well as {{maven-shared-utils}} having so many code in common (duplicate it more or less) and both of them are used.

Furthermore I found that currently the need for {{commons-io}} in Maven Core (or better it lands in the distribution {{lib}} directory) is only based on usage of {{commons-io}} in  {{maven-shared-utils}} where only a single class {{org.apache.commons.io.input.XmlStreamReader}} is used of {{commons-io}}. 

If I summarize this:
* If we would move to {{maven-share-utils}} only we could get rid of 
** 501879 Byte {{commons-lang3}} (/)
** 261801 Byte {{plexus-utils}} (x)
** 208700 Byte {{commons-io}} (x)


> 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 &amp; Build
>    Affects Versions: 3.6.3
>            Reporter: Karl Heinz Marbaise
>            Assignee: Karl Heinz Marbaise
>            Priority: Minor
>             Fix For: 3.7.0
>
>
> 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.3.4#803005)