[MNG-6825] Consistently use commons-lang3 StringUtils#1066
[MNG-6825] Consistently use commons-lang3 StringUtils#1066timtebeek wants to merge 8 commits intoapache:masterfrom
Conversation
|
Here's a first PR to standardize on Commons-Lang3 StringUtils in Apache Maven core. It uses the following recipes: type: specs.openrewrite.org/v1beta/recipe
name: com.github.timtebeek.PlexusStringUtilsToCommonsLang3
displayName: Replace Plexus StringUtils with Commons Lang3
description: https://issues.apache.org/jira/browse/MNG-6825
recipeList:
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.codehaus.plexus.util.StringUtils
newFullyQualifiedTypeName: org.apache.commons.lang3.StringUtils
- org.openrewrite.java.ChangeMethodTargetToStatic:
methodPattern: org.codehaus.plexus.util.StringUtils clean(String)
fullyQualifiedTargetTypeName: org.apache.commons.lang3.StringUtils
- org.openrewrite.java.ChangeMethodName:
methodPattern: org.apache.commons.lang3.StringUtils clean(String)
newMethodName: trimToEmpty
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.apache.maven.shared.utils.StringUtils
newFullyQualifiedTypeName: org.apache.commons.lang3.StringUtilsCouldn't yet remove the maven-shared/plexus-utils dependencies everywhere, as there's still references to other classes such as type: specs.openrewrite.org/v1beta/recipe
name: com.github.timtebeek.MNG-6825
displayName: MNG-6825
description: https://issues.apache.org/jira/browse/MNG-6825
recipeList:
- org.openrewrite.java.search.FindMethods:
methodPattern: org.apache.maven.shared.utils..* *(..)
- org.openrewrite.java.search.FindMethods:
methodPattern: org.codehaus.plexus.util..* *(..)Note that the above recipes are most easily executed by creating a custom repository group, and then uploading the yaml into the recipe builder, after which a Dry run should give results in a couple seconds. |
This reverts commit ba61051.
| <dependency> | ||
| <groupId>org.apache.maven</groupId> | ||
| <artifactId>plexus-utils</artifactId> | ||
| </dependency> |
There was a problem hiding this comment.
This was removed in 703f814, restored as per this thread, and similar for maven-embedder below. Not a net-new dependency, but explicit direct dependency that also comes in transitively.
|
Resolved the conflicts after 54afd17 ; Think this is good to go. |
…exus-string-utils-with-commons-lang-3
|
I think this one can be closed now. |
|
Resolve #8219 |
For: https://issues.apache.org/jira/browse/MNG-6825
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] SUMMARY,where you replace
MNG-XXXandSUMMARYwith the appropriate JIRA issue.[MNG-XXX] SUMMARY.Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.