maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5378) Use maven-shared-utils in Maven core to replace plexus-utils
Date Fri, 14 Sep 2018 22:41:00 GMT

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

ASF GitHub Bot commented on MNG-5378:
-------------------------------------

slachiewicz closed pull request #155: [MNG-5378] Replace plexus-util StringUtils with commons-lang3
URL: https://github.com/apache/maven/pull/155
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
index 1167e91a53..3b4c6a4e71 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
@@ -35,7 +35,8 @@
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * @author Jason van Zyl
@@ -163,7 +164,7 @@ public String getClassifier()
 
     public boolean hasClassifier()
     {
-        return StringUtils.isNotEmpty( classifier );
+        return isNotEmpty( classifier );
     }
 
     public String getScope()
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
index 0fd49dd344..d76b0e7f88 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/metadata/MetadataBridge.java
@@ -26,12 +26,13 @@
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.codehaus.plexus.util.FileUtils;
 import org.eclipse.aether.RepositoryException;
 import org.eclipse.aether.metadata.AbstractMetadata;
 import org.eclipse.aether.metadata.MergeableMetadata;
 import org.eclipse.aether.metadata.Metadata;
 
+import static org.apache.commons.io.FileUtils.copyFile;
+
 /**
  * <strong>Warning:</strong> This is an internal utility class that is only public for technical reasons, it is not part
  * of the public API. In particular, this class can be changed or deleted without prior notice.
@@ -59,7 +60,7 @@ public void merge( File current, File result )
         {
             if ( current.exists() )
             {
-                FileUtils.copyFile( current, result );
+                copyFile( current, result );
             }
             ArtifactRepository localRepo = new MetadataRepository( result );
             metadata.storeInLocalRepository( localRepo, localRepo );
diff --git a/maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java b/maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java
index 7767aff1e0..62afe3a2e9 100644
--- a/maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java
+++ b/maven-compat/src/main/java/org/apache/maven/execution/DefaultRuntimeInformation.java
@@ -25,7 +25,8 @@
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
 
 /**
  * Describes runtime information about the application.
@@ -53,7 +54,7 @@ public void initialize()
     {
         String mavenVersion = rtInfo.getMavenVersion();
 
-        if ( StringUtils.isEmpty( mavenVersion ) )
+        if ( isEmpty( mavenVersion ) )
         {
             throw new InitializationException( "Unable to read Maven version from maven-core" );
         }
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java
index e7044f54e1..07efd3820c 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/FileProfileActivator.java
@@ -31,7 +31,9 @@
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+import static org.apache.commons.lang3.StringUtils.replace;
 
 /**
  * FileProfileActivator
@@ -72,18 +74,18 @@ public boolean isActive( Profile profile )
 
             try
             {
-                if ( StringUtils.isNotEmpty( fileString ) )
+                if ( isNotEmpty( fileString ) )
                 {
-                    fileString = StringUtils.replace( interpolator.interpolate( fileString, "" ), "\\", "/" );
+                    fileString = replace( interpolator.interpolate( fileString, "" ), "\\", "/" );
                     return FileUtils.fileExists( fileString );
                 }
 
                 // check if the file is missing, if it is then the profile will be active
                 fileString = actFile.getMissing();
 
-                if ( StringUtils.isNotEmpty( fileString ) )
+                if ( isNotEmpty( fileString ) )
                 {
-                    fileString = StringUtils.replace( interpolator.interpolate( fileString, "" ), "\\", "/" );
+                    fileString = replace( interpolator.interpolate( fileString, "" ), "\\", "/" );
                     return !FileUtils.fileExists( fileString );
                 }
             }
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java
index 1c835f814b..1c4bee23e6 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java
@@ -24,7 +24,8 @@
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.model.Activation;
 import org.apache.maven.model.Profile;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * JdkPrefixProfileActivator
@@ -94,7 +95,7 @@ protected String getJdkVersion()
 
     protected boolean canDetectActivation( Profile profile )
     {
-        return profile.getActivation() != null && StringUtils.isNotEmpty( profile.getActivation().getJdk() );
+        return profile.getActivation() != null && isNotEmpty( profile.getActivation().getJdk() );
     }
 
 }
diff --git a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
index d7e4003428..00a9282472 100644
--- a/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
+++ b/maven-compat/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
@@ -26,7 +26,8 @@
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.context.ContextException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * SystemPropertyProfileActivator
@@ -75,7 +76,7 @@ public boolean isActive( Profile profile )
             String sysValue = properties.getProperty( name );
 
             String propValue = property.getValue();
-            if ( StringUtils.isNotEmpty( propValue ) )
+            if ( isNotEmpty( propValue ) )
             {
                 boolean reverseValue = false;
                 if ( propValue.startsWith( "!" ) )
@@ -98,7 +99,7 @@ public boolean isActive( Profile profile )
             }
             else
             {
-                boolean result = StringUtils.isNotEmpty( sysValue );
+                boolean result = isNotEmpty( sysValue );
 
                 if ( reverseName )
                 {
diff --git a/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java b/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
index 81ea92d99a..8704de1674 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
@@ -44,9 +44,10 @@
 import org.apache.maven.model.Site;
 import org.apache.maven.project.ModelUtils;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
 /**
  * DefaultModelInheritanceAssembler
  */
@@ -151,21 +152,21 @@ private void assembleScmInheritance( Model child, Model parent, String childPath
                 child.setScm( childScm );
             }
 
-            if ( StringUtils.isEmpty( childScm.getConnection() ) && !StringUtils.isEmpty( parentScm.getConnection() ) )
+            if ( isEmpty( childScm.getConnection() ) && !isEmpty( parentScm.getConnection() ) )
             {
                 childScm.setConnection(
                     appendPath( parentScm.getConnection(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
             }
 
-            if ( StringUtils.isEmpty( childScm.getDeveloperConnection() )
-                && !StringUtils.isEmpty( parentScm.getDeveloperConnection() ) )
+            if ( isEmpty( childScm.getDeveloperConnection() )
+                && !isEmpty( parentScm.getDeveloperConnection() ) )
             {
                 childScm
                     .setDeveloperConnection( appendPath( parentScm.getDeveloperConnection(), child.getArtifactId(),
                                                          childPathAdjustment, appendPaths ) );
             }
 
-            if ( StringUtils.isEmpty( childScm.getUrl() ) && !StringUtils.isEmpty( parentScm.getUrl() ) )
+            if ( isEmpty( childScm.getUrl() ) && !isEmpty( parentScm.getUrl() ) )
             {
                 childScm.setUrl(
                     appendPath( parentScm.getUrl(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
@@ -357,7 +358,7 @@ private void assembleReportingInheritance( Model child, Model parent )
 
             childReporting.setExcludeDefaults( parentReporting.isExcludeDefaults() );
 
-            if ( StringUtils.isEmpty( childReporting.getOutputDirectory() ) )
+            if ( isEmpty( childReporting.getOutputDirectory() ) )
             {
                 childReporting.setOutputDirectory( parentReporting.getOutputDirectory() );
             }
@@ -629,7 +630,7 @@ private void assembleDistributionInheritance( Model child, Model parent, String
                 }
             }
 
-            if ( StringUtils.isEmpty( childDistMgmt.getDownloadUrl() ) )
+            if ( isEmpty( childDistMgmt.getDownloadUrl() ) )
             {
                 childDistMgmt.setDownloadUrl( parentDistMgmt.getDownloadUrl() );
             }
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java b/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java
index 6fa2c554a7..97df0a9f90 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/DefaultMirrorSelector.java
@@ -27,7 +27,8 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.settings.Mirror;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
 
 /**
  * DefaultMirrorSelector
@@ -164,7 +165,7 @@ static boolean matchesLayout( String repoLayout, String mirrorLayout )
         boolean result = false;
 
         // simple checks first to short circuit processing below.
-        if ( StringUtils.isEmpty( mirrorLayout ) || WILDCARD.equals( mirrorLayout ) )
+        if ( isEmpty( mirrorLayout ) || WILDCARD.equals( mirrorLayout ) )
         {
             result = true;
         }
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
index 0acab4f94a..fde5b970e5 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
@@ -72,13 +72,15 @@
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.repository.AuthenticationContext;
 import org.eclipse.aether.repository.AuthenticationSelector;
 import org.eclipse.aether.repository.ProxySelector;
 import org.eclipse.aether.repository.RemoteRepository;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * @author Jason van Zyl
  */
@@ -202,7 +204,7 @@ public Artifact createParentArtifact( String groupId, String artifactId, String
     public Artifact createPluginArtifact( Plugin plugin )
     {
         String version = plugin.getVersion();
-        if ( StringUtils.isEmpty( version ) )
+        if ( isEmpty( version ) )
         {
             version = "RELEASE";
         }
@@ -534,7 +536,7 @@ private void injectMirror( ArtifactRepository repository, Mirror mirror )
             repository.setId( mirror.getId() );
             repository.setUrl( mirror.getUrl() );
 
-            if ( StringUtils.isNotEmpty( mirror.getLayout() ) )
+            if ( isNotEmpty( mirror.getLayout() ) )
             {
                 repository.setLayout( getLayout( mirror.getLayout() ) );
             }
@@ -636,7 +638,7 @@ public void injectAuthentication( RepositorySystemSession session, List<Artifact
             {
                 if ( proxy.isActive() && repository.getProtocol().equalsIgnoreCase( proxy.getProtocol() ) )
                 {
-                    if ( StringUtils.isNotEmpty( proxy.getNonProxyHosts() ) )
+                    if ( isNotEmpty( proxy.getNonProxyHosts() ) )
                     {
                         ProxyInfo pi = new ProxyInfo();
                         pi.setNonProxyHosts( proxy.getNonProxyHosts() );
@@ -788,14 +790,14 @@ public ArtifactRepository buildArtifactRepository( Repository repo )
         {
             String id = repo.getId();
 
-            if ( StringUtils.isEmpty( id ) )
+            if ( isEmpty( id ) )
             {
                 throw new InvalidRepositoryException( "Repository identifier missing", "" );
             }
 
             String url = repo.getUrl();
 
-            if ( StringUtils.isEmpty( url ) )
+            if ( isEmpty( url ) )
             {
                 throw new InvalidRepositoryException( "URL missing for repository " + id, id );
             }
@@ -849,7 +851,7 @@ private static String getMessage( Throwable error, String def )
             return def;
         }
         String msg = error.getMessage();
-        if ( StringUtils.isNotEmpty( msg ) )
+        if ( isNotEmpty( msg ) )
         {
             return msg;
         }
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java
index 895b952669..e582210a67 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/transform/SnapshotTransformation.java
@@ -37,7 +37,8 @@
 import org.apache.maven.artifact.repository.metadata.Versioning;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.replace;
 
 /**
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
@@ -133,7 +134,7 @@ protected String constructVersion( Versioning versioning, String baseVersion )
             if ( snapshot.getTimestamp() != null && snapshot.getBuildNumber() > 0 )
             {
                 String newVersion = snapshot.getTimestamp() + "-" + snapshot.getBuildNumber();
-                version = StringUtils.replace( baseVersion, Artifact.SNAPSHOT_VERSION, newVersion );
+                version = replace( baseVersion, Artifact.SNAPSHOT_VERSION, newVersion );
             }
             else
             {
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java b/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java
index 3cadd29da4..eebb91746e 100644
--- a/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java
+++ b/maven-compat/src/test/java/org/apache/maven/artifact/testutils/TestFileManager.java
@@ -45,8 +45,11 @@
 import java.util.List;
 
 import junit.framework.Assert;
+import org.apache.commons.io.FileUtils;
 
-import org.codehaus.plexus.util.FileUtils;
+import static org.apache.commons.io.FileUtils.deleteDirectory;
+import static org.apache.maven.shared.utils.io.FileUtils.fileRead;
+import static org.apache.maven.shared.utils.io.FileUtils.fileWrite;
 
 public class TestFileManager
 {
@@ -146,7 +149,7 @@ public void cleanUp()
             {
                 if ( file.isDirectory() )
                 {
-                    FileUtils.deleteDirectory( file );
+                    deleteDirectory( file );
                 }
                 else
                 {
@@ -181,7 +184,7 @@ public void assertFileContents( File dir, String filename, String contentsTest,
 
         File file = new File( dir, filename );
 
-        String contents = FileUtils.fileRead( file, encoding );
+        String contents = fileRead( file, encoding );
 
         Assert.assertEquals( contentsTest, contents );
     }
@@ -193,7 +196,7 @@ public File createFile( File dir, String filename, String contents, String encod
 
         file.getParentFile().mkdirs();
 
-        FileUtils.fileWrite( file.getPath(), encoding, contents );
+        fileWrite( file.getPath(), encoding, contents );
 
         markForDeletion( file );
 
@@ -203,7 +206,7 @@ public File createFile( File dir, String filename, String contents, String encod
     public String getFileContents( File file, String encoding )
         throws IOException
     {
-        return FileUtils.fileRead( file, encoding );
+        return fileRead( file, encoding );
     }
 
     protected void finalize()
diff --git a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java
index 84ad93c923..767697ae5b 100644
--- a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java
+++ b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java
@@ -54,13 +54,15 @@
 import org.apache.maven.settings.Mirror;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.repository.AuthenticationContext;
 import org.eclipse.aether.repository.AuthenticationSelector;
 import org.eclipse.aether.repository.ProxySelector;
 import org.eclipse.aether.repository.RemoteRepository;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * @author Jason van Zyl
  */
@@ -156,7 +158,7 @@ public Artifact createPluginArtifact( Plugin plugin )
         try
         {
             String version = plugin.getVersion();
-            if ( StringUtils.isEmpty( version ) )
+            if ( isEmpty( version ) )
             {
                 version = "RELEASE";
             }
@@ -228,7 +230,7 @@ private void injectMirror( ArtifactRepository repository, Mirror mirror )
             repository.setId( mirror.getId() );
             repository.setUrl( mirror.getUrl() );
 
-            if ( StringUtils.isNotEmpty( mirror.getLayout() ) )
+            if ( isNotEmpty( mirror.getLayout() ) )
             {
                 repository.setLayout( getLayout( mirror.getLayout() ) );
             }
@@ -366,14 +368,14 @@ public static ArtifactRepository buildArtifactRepository( org.apache.maven.model
         {
             String id = repo.getId();
 
-            if ( StringUtils.isEmpty( id ) )
+            if ( isEmpty( id ) )
             {
                 throw new InvalidRepositoryException( "Repository identifier missing", "" );
             }
 
             String url = repo.getUrl();
 
-            if ( StringUtils.isEmpty( url ) )
+            if ( isEmpty( url ) )
             {
                 throw new InvalidRepositoryException( "URL missing for repository " + id, id );
             }
@@ -743,7 +745,7 @@ static boolean matchesLayout( String repoLayout, String mirrorLayout )
         boolean result = false;
 
         // simple checks first to short circuit processing below.
-        if ( StringUtils.isEmpty( mirrorLayout ) || WILDCARD.equals( mirrorLayout ) )
+        if ( isEmpty( mirrorLayout ) || WILDCARD.equals( mirrorLayout ) )
         {
             result = true;
         }
diff --git a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
index a4835fdd47..1780568804 100644
--- a/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
+++ b/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
@@ -46,9 +46,10 @@
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.classworlds.realm.DuplicateRealmException;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.artifact.Artifact;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * Manages the class realms used by Maven. <strong>Warning:</strong> This is an internal utility class that is only
  * public for technical reasons, it is not part of the public API. In particular, this class can be changed or deleted
@@ -291,7 +292,7 @@ private static String getId( ClassRealmConstituent constituent )
 
     private static String getId( String gid, String aid, String type, String cls, String ver )
     {
-        return gid + ':' + aid + ':' + type + ( StringUtils.isNotEmpty( cls ) ? ':' + cls : "" ) + ':' + ver;
+        return gid + ':' + aid + ':' + type + ( isNotEmpty( cls ) ? ':' + cls : "" ) + ':' + ver;
     }
 
     private void callDelegates( ClassRealm classRealm, RealmType type, ClassLoader parent, List<String> parentImports,
diff --git a/maven-core/src/main/java/org/apache/maven/configuration/DefaultBeanConfigurationRequest.java b/maven-core/src/main/java/org/apache/maven/configuration/DefaultBeanConfigurationRequest.java
index 5ec69f5976..892f4df464 100644
--- a/maven-core/src/main/java/org/apache/maven/configuration/DefaultBeanConfigurationRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/configuration/DefaultBeanConfigurationRequest.java
@@ -25,7 +25,8 @@
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.PluginExecution;
 import org.apache.maven.model.PluginManagement;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * A basic bean configuration request.
@@ -100,7 +101,7 @@ public DefaultBeanConfigurationRequest setConfiguration( Model model, String plu
         Plugin plugin = findPlugin( model, pluginGroupId, pluginArtifactId );
         if ( plugin != null )
         {
-            if ( StringUtils.isNotEmpty( pluginExecutionId ) )
+            if ( isNotEmpty( pluginExecutionId ) )
             {
                 for ( PluginExecution execution : plugin.getExecutions() )
                 {
diff --git a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
index 2a86667f16..add343644b 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
+++ b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
@@ -36,7 +36,9 @@
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.maven.project.ProjectBuildingResult;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /*
 
@@ -160,7 +162,7 @@ private ExceptionSummary handle( ModelProblem problem, String projectId )
 
             String location = ModelProblemUtils.formatLocation( problem, projectId );
 
-            if ( StringUtils.isNotEmpty( location ) )
+            if ( isNotEmpty( location ) )
             {
                 message += " @ " + location;
             }
@@ -216,12 +218,12 @@ else if ( exception instanceof PluginExecutionException )
                     }
                 }
 
-                if ( StringUtils.isEmpty( reference ) )
+                if ( isEmpty( reference ) )
                 {
                     reference = getReference( cause );
                 }
 
-                if ( StringUtils.isEmpty( reference ) )
+                if ( isEmpty( reference ) )
                 {
                     reference = exception.getClass().getSimpleName();
                 }
@@ -236,7 +238,7 @@ else if ( isNoteworthyException( exception ) )
             }
         }
 
-        if ( StringUtils.isNotEmpty( reference ) && !reference.startsWith( "http:" ) )
+        if ( isNotEmpty( reference ) && !reference.startsWith( "http:" ) )
         {
             reference = "http://cwiki.apache.org/confluence/display/MAVEN/" + reference;
         }
@@ -276,9 +278,9 @@ private String getMessage( String message, Throwable exception )
             if ( t instanceof AbstractMojoExecutionException )
             {
                 String longMessage = ( (AbstractMojoExecutionException) t ).getLongMessage();
-                if ( StringUtils.isNotEmpty( longMessage ) )
+                if ( isNotEmpty( longMessage ) )
                 {
-                    if ( StringUtils.isEmpty( exceptionMessage ) || longMessage.contains( exceptionMessage ) )
+                    if ( isEmpty( exceptionMessage ) || longMessage.contains( exceptionMessage ) )
                     {
                         exceptionMessage = longMessage;
                     }
@@ -289,7 +291,7 @@ else if ( !exceptionMessage.contains( longMessage ) )
                 }
             }
 
-            if ( StringUtils.isEmpty( exceptionMessage ) )
+            if ( isEmpty( exceptionMessage ) )
             {
                 exceptionMessage = t.getClass().getSimpleName();
             }
@@ -311,14 +313,14 @@ private String join( String message1, String message2 )
     {
         String message = "";
 
-        if ( StringUtils.isNotEmpty( message1 ) )
+        if ( isNotEmpty( message1 ) )
         {
             message = message1.trim();
         }
 
-        if ( StringUtils.isNotEmpty( message2 ) )
+        if ( isNotEmpty( message2 ) )
         {
-            if ( StringUtils.isNotEmpty( message ) )
+            if ( isNotEmpty( message ) )
             {
                 if ( message.endsWith( "." ) || message.endsWith( "!" ) || message.endsWith( ":" ) )
                 {
diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java
index ec9419c98d..06b623893b 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequestPopulator.java
@@ -47,7 +47,8 @@
 //
 import org.apache.maven.toolchain.model.PersistedToolchains;
 import org.apache.maven.toolchain.model.ToolchainModel;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
 
 /**
  * Assists in populating an execution request for invocation of Maven.
@@ -188,7 +189,7 @@ private ArtifactRepository createLocalRepository( MavenExecutionRequest request
             localRepositoryPath = request.getLocalRepositoryPath().getAbsolutePath();
         }
 
-        if ( StringUtils.isEmpty( localRepositoryPath ) )
+        if ( isEmpty( localRepositoryPath ) )
         {
             localRepositoryPath = RepositorySystem.defaultUserLocalRepository.getAbsolutePath();
         }
diff --git a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
index fb7a9f4506..5e44281fc3 100644
--- a/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
@@ -53,9 +53,10 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * Builds the {@link ProjectDependencyGraph inter-dependencies graph} between projects in the reactor.
  */
@@ -189,7 +190,7 @@ else if ( MavenExecutionRequest.REACTOR_MAKE_BOTH.equals( request.getMakeBehavio
                 makeUpstream = true;
                 makeDownstream = true;
             }
-            else if ( StringUtils.isNotEmpty( request.getMakeBehavior() ) )
+            else if ( isNotEmpty( request.getMakeBehavior() ) )
             {
                 throw new MavenExecutionException( "Invalid reactor make behavior: " + request.getMakeBehavior(),
                                                    request.getPom() );
@@ -282,7 +283,7 @@ else if ( StringUtils.isNotEmpty( request.getMakeBehavior() ) )
     {
         List<MavenProject> result = projects;
 
-        if ( StringUtils.isNotEmpty( request.getResumeFrom() ) )
+        if ( isNotEmpty( request.getResumeFrom() ) )
         {
             File reactorDirectory = null;
             if ( request.getBaseDirectory() != null )
@@ -429,7 +430,7 @@ private void collectProjects( List<MavenProject> projects, List<File> files, Mav
                 for ( ModelProblem problem : result.getProblems() )
                 {
                     String loc = ModelProblemUtils.formatLocation( problem, result.getProjectId() );
-                    logger.warn( problem.getMessage() + ( StringUtils.isNotEmpty( loc ) ? " @ " + loc : "" ) );
+                    logger.warn( problem.getMessage() + ( isNotEmpty( loc ) ? " @ " + loc : "" ) );
                 }
 
                 problems = true;
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java
index a7d9facb2e..8ecada822c 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycles.java
@@ -22,7 +22,6 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -33,6 +32,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import static org.apache.commons.lang3.StringUtils.join;
+
 /**
  * @since 3.0
  * @author Jason van Zyl
@@ -139,7 +140,7 @@ public String getLifecyclePhaseList()
             phases.addAll( lifecycle.getPhases() );
         }
 
-        return StringUtils.join( phases.iterator(), ", " );
+        return join( phases.iterator(), ", " );
     }
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java
index ef60c4eb36..0291713b0b 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleExecutionPlanCalculator.java
@@ -55,11 +55,13 @@
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
  * 
@@ -306,8 +308,8 @@ private void finalizeMojoConfiguration( MojoExecution mojoExecution )
                 {
                     parameterConfiguration = new Xpp3Dom( parameterConfiguration, parameter.getName() );
 
-                    if ( StringUtils.isEmpty( parameterConfiguration.getAttribute( "implementation" ) )
-                        && StringUtils.isNotEmpty( parameter.getImplementation() ) )
+                    if ( isEmpty( parameterConfiguration.getAttribute( "implementation" ) )
+                        && isNotEmpty( parameter.getImplementation() ) )
                     {
                         parameterConfiguration.setAttribute( "implementation", parameter.getImplementation() );
                     }
@@ -364,7 +366,7 @@ private void calculateForkedExecutions( MojoExecution mojoExecution, MavenSessio
 
             List<MojoExecution> forkedExecutions;
 
-            if ( StringUtils.isNotEmpty( mojoDescriptor.getExecutePhase() ) )
+            if ( isNotEmpty( mojoDescriptor.getExecutePhase() ) )
             {
                 forkedExecutions =
                     calculateForkedLifecycle( mojoExecution, session, forkedProject, alreadyForkedExecutions );
@@ -447,7 +449,7 @@ private void injectLifecycleOverlay( Map<String, List<MojoExecution>> lifecycleM
 
         String forkedLifecycle = mojoDescriptor.getExecuteLifecycle();
 
-        if ( StringUtils.isEmpty( forkedLifecycle ) )
+        if ( isEmpty( forkedLifecycle ) )
         {
             return;
         }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
index 14653b7d25..7452cea484 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java
@@ -30,7 +30,6 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 import java.util.ArrayList;
@@ -42,6 +41,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import static org.apache.commons.lang3.StringUtils.split;
+
 /**
  * <strong>NOTE:</strong> This class is not part of any public api and can be changed or deleted without prior notice.
  * 
@@ -208,7 +209,7 @@ private GoalSpec parseGoalSpec( String goalSpec )
     {
         GoalSpec gs = new GoalSpec();
 
-        String[] p = StringUtils.split( goalSpec.trim(), ":" );
+        String[] p = split( goalSpec.trim(), ":" );
 
         if ( p.length == 3 )
         {
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java
index cb49050c71..0f50b07052 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleTaskSegmentCalculator.java
@@ -33,12 +33,14 @@
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.split;
+
 /**
  * <p>
  * Calculates the task segments in the build
@@ -75,9 +77,9 @@ public DefaultLifecycleTaskSegmentCalculator()
 
         List<String> tasks = session.getGoals();
 
-        if ( ( tasks == null || tasks.isEmpty() ) && !StringUtils.isEmpty( rootProject.getDefaultGoal() ) )
+        if ( ( tasks == null || tasks.isEmpty() ) && !isEmpty( rootProject.getDefaultGoal() ) )
         {
-            tasks = Arrays.asList( StringUtils.split( rootProject.getDefaultGoal() ) );
+            tasks = Arrays.asList( split( rootProject.getDefaultGoal() ) );
         }
 
         return calculateTaskSegments( session, tasks );
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java
index 176ba320a7..5842789a75 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultMojoExecutionConfigurator.java
@@ -27,9 +27,10 @@
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * @since 3.3.1, MNG-5753
  */
@@ -91,7 +92,7 @@ private Plugin findPlugin( String groupId, String artifactId, Collection<Plugin>
 
     private PluginExecution findPluginExecution( String executionId, Collection<PluginExecution> executions )
     {
-        if ( StringUtils.isNotEmpty( executionId ) )
+        if ( isNotEmpty( executionId ) )
         {
             for ( PluginExecution execution : executions )
             {
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java
index 69b7c10a58..e44a8b8f32 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDebugLogger.java
@@ -27,7 +27,6 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.util.Iterator;
 import java.util.List;
@@ -35,6 +34,8 @@
 import java.util.Set;
 import java.util.TreeSet;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * <p>
  * Logs debug output from the various lifecycle phases.
@@ -164,13 +165,13 @@ private void debugDependencyRequirements( List<MojoExecution> mojoExecutions )
             MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
 
             String scopeToCollect = mojoDescriptor.getDependencyCollectionRequired();
-            if ( StringUtils.isNotEmpty( scopeToCollect ) )
+            if ( isNotEmpty( scopeToCollect ) )
             {
                 scopesToCollect.add( scopeToCollect );
             }
 
             String scopeToResolve = mojoDescriptor.getDependencyResolutionRequired();
-            if ( StringUtils.isNotEmpty( scopeToResolve ) )
+            if ( isNotEmpty( scopeToResolve ) )
             {
                 scopesToResolve.add( scopeToResolve );
             }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
index 766aed1469..9a2019a781 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
@@ -38,7 +38,6 @@
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -49,6 +48,8 @@
 import java.util.Set;
 import java.util.TreeSet;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * <p>
  * Executes an individual mojo
@@ -105,7 +106,7 @@ private void collectDependencyRequirements( Set<String> scopesToResolve, Set<Str
 
     private Collection<String> toScopes( String classpath )
     {
-        if ( StringUtils.isNotEmpty( classpath ) )
+        if ( isNotEmpty( classpath ) )
         {
             if ( Artifact.SCOPE_COMPILE.equals( classpath ) )
             {
@@ -284,11 +285,11 @@ private ArtifactFilter getArtifactFilter( MojoDescriptor mojoDescriptor )
         String scopeToCollect = mojoDescriptor.getDependencyCollectionRequired();
 
         List<String> scopes = new ArrayList<>( 2 );
-        if ( StringUtils.isNotEmpty( scopeToCollect ) )
+        if ( isNotEmpty( scopeToCollect ) )
         {
             scopes.add( scopeToCollect );
         }
-        if ( StringUtils.isNotEmpty( scopeToResolve ) )
+        if ( isNotEmpty( scopeToResolve ) )
         {
             scopes.add( scopeToResolve );
         }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java
index bf052c741b..1a23ae98ba 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java
@@ -25,7 +25,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.codehaus.plexus.util.StringUtils;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+import static org.apache.commons.lang3.StringUtils.split;
 
 /**
  * LifecyclePhase
@@ -58,9 +59,9 @@ public void set( String goals )
     {
         mojos = new ArrayList<>();
         
-        if ( StringUtils.isNotEmpty( goals ) )
+        if ( isNotEmpty( goals ) )
         {
-            String[] mojoGoals = StringUtils.split( goals, "," );
+            String[] mojoGoals = split( goals, "," );
             
             for ( String mojoGoal: mojoGoals )
             {
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java
index a99fbbc196..344a1fc1f6 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginExecutionException.java
@@ -21,7 +21,8 @@
 
 import org.apache.maven.project.DuplicateArtifactAttachmentException;
 import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * Exception in the plugin manager.
@@ -78,7 +79,7 @@ private static String constructMessage( MojoExecution mojoExecution, Throwable c
             message = "Mojo execution failed";
         }
 
-        if ( cause != null && StringUtils.isNotEmpty( cause.getMessage() ) )
+        if ( cause != null && isNotEmpty( cause.getMessage() ) )
         {
             message += ": " + cause.getMessage();
         }
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
index eaf02ecc7b..59fced4993 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
@@ -27,7 +27,9 @@
 
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.Parameter;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * PluginParameterException
@@ -145,14 +147,14 @@ else if ( isMap )
             messageBuffer.append( "</configuration>" );
 
             String alias = param.getAlias();
-            if ( StringUtils.isNotEmpty( alias ) && !alias.equals( param.getName() ) )
+            if ( isNotEmpty( alias ) && !alias.equals( param.getName() ) )
             {
                 messageBuffer.append( "\n\n-OR-\n\n<configuration>\n  ...\n  <" ).append( alias ).append(
                     ">VALUE</" ).append( alias ).append( ">\n</configuration>\n" );
             }
         }
 
-        if ( StringUtils.isEmpty( expression ) )
+        if ( isEmpty( expression ) )
         {
             messageBuffer.append( '.' );
         }
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
index cec6f120db..7d805303ef 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
@@ -79,7 +79,6 @@
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.logging.LoggerManager;
 import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.graph.DependencyFilter;
@@ -107,6 +106,9 @@
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotBlank;
+
 /**
  * Provides basic services to manage Maven plugins and their mojos. This component is kept general in its design such
  * that the plugins/mojos can be used in arbitrary contexts. In particular, the mojos can be used for ordinary build
@@ -299,7 +301,7 @@ public void checkRequiredMavenVersion( PluginDescriptor pluginDescriptor )
         throws PluginIncompatibleException
     {
         String requiredMavenVersion = pluginDescriptor.getRequiredMavenVersion();
-        if ( StringUtils.isNotBlank( requiredMavenVersion ) )
+        if ( isNotBlank( requiredMavenVersion ) )
         {
             try
             {
@@ -613,7 +615,7 @@ private void populatePluginFields( Object mojo, MojoDescriptor mojoDescriptor, C
 
         String configuratorId = mojoDescriptor.getComponentConfigurator();
 
-        if ( StringUtils.isEmpty( configuratorId ) )
+        if ( isEmpty( configuratorId ) )
         {
             configuratorId = "basic";
         }
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
index 82e32fb310..cd88f1e4cd 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
@@ -42,7 +42,6 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.RepositoryEvent.EventType;
 import org.eclipse.aether.RepositoryEvent;
 import org.eclipse.aether.RepositoryListener;
@@ -59,6 +58,9 @@
 import org.eclipse.aether.version.Version;
 import org.eclipse.aether.version.VersionScheme;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+import static org.apache.maven.shared.utils.StringUtils.clean;
+
 /**
  * Resolves a version for a plugin.
  *
@@ -154,12 +156,12 @@ private void selectVersion( DefaultPluginVersionResult result, PluginVersionRequ
         String version = null;
         ArtifactRepository repo = null;
 
-        if ( StringUtils.isNotEmpty( versions.releaseVersion ) )
+        if ( isNotEmpty( versions.releaseVersion ) )
         {
             version = versions.releaseVersion;
             repo = versions.releaseRepository;
         }
-        else if ( StringUtils.isNotEmpty( versions.latestVersion ) )
+        else if ( isNotEmpty( versions.latestVersion ) )
         {
             version = versions.latestVersion;
             repo = versions.latestRepository;
@@ -317,9 +319,9 @@ private void mergeMetadata( Versions versions, Metadata source, ArtifactReposito
         Versioning versioning = source.getVersioning();
         if ( versioning != null )
         {
-            String timestamp = StringUtils.clean( versioning.getLastUpdated() );
+            String timestamp = clean( versioning.getLastUpdated() );
 
-            if ( StringUtils.isNotEmpty( versioning.getRelease() )
+            if ( isNotEmpty( versioning.getRelease() )
                 && timestamp.compareTo( versions.releaseTimestamp ) > 0 )
             {
                 versions.releaseVersion = versioning.getRelease();
@@ -327,7 +329,7 @@ private void mergeMetadata( Versions versions, Metadata source, ArtifactReposito
                 versions.releaseRepository = repository;
             }
 
-            if ( StringUtils.isNotEmpty( versioning.getLatest() )
+            if ( isNotEmpty( versioning.getLatest() )
                 && timestamp.compareTo( versions.latestTimestamp ) > 0 )
             {
                 versions.latestVersion = versioning.getLatest();
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
index 279399add8..1146eeb4c5 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
@@ -63,7 +63,6 @@
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.Os;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.RequestTrace;
 import org.eclipse.aether.impl.RemoteRepositoryManager;
@@ -73,6 +72,8 @@
 import org.eclipse.aether.resolution.ArtifactRequest;
 import org.eclipse.aether.resolution.ArtifactResult;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
 /**
  * DefaultProjectBuilder
  */
@@ -446,7 +447,7 @@ private boolean build( List<ProjectBuildingResult> results, List<InterimResult>
 
                 for ( String module : model.getModules() )
                 {
-                    if ( StringUtils.isEmpty( module ) )
+                    if ( isEmpty( module ) )
                     {
                         continue;
                     }
@@ -771,7 +772,7 @@ private void initProject( MavenProject project, Map<String, MavenProject> projec
             for ( Extension ext : extensions )
             {
                 String version;
-                if ( StringUtils.isEmpty( ext.getVersion() ) )
+                if ( isEmpty( ext.getVersion() ) )
                 {
                     version = "RELEASE";
                 }
@@ -824,7 +825,7 @@ private void initProject( MavenProject project, Map<String, MavenProject> projec
             try
             {
                 DeploymentRepository r = project.getDistributionManagement().getRepository();
-                if ( !StringUtils.isEmpty( r.getId() ) && !StringUtils.isEmpty( r.getUrl() ) )
+                if ( !isEmpty( r.getId() ) && !isEmpty( r.getUrl() ) )
                 {
                     ArtifactRepository repo = repositorySystem.buildArtifactRepository( r );
                     repositorySystem.injectProxy( projectBuildingRequest.getRepositorySession(),
@@ -848,7 +849,7 @@ private void initProject( MavenProject project, Map<String, MavenProject> projec
             try
             {
                 DeploymentRepository r = project.getDistributionManagement().getSnapshotRepository();
-                if ( !StringUtils.isEmpty( r.getId() ) && !StringUtils.isEmpty( r.getUrl() ) )
+                if ( !isEmpty( r.getId() ) && !isEmpty( r.getUrl() ) )
                 {
                     ArtifactRepository repo = repositorySystem.buildArtifactRepository( r );
                     repositorySystem.injectProxy( projectBuildingRequest.getRepositorySession(),
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
index 4bb9609fc2..76c997e3bc 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
@@ -32,7 +32,6 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.Logger;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.DefaultRepositorySystemSession;
 import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.RepositorySystemSession;
@@ -50,6 +49,9 @@
 import org.eclipse.aether.util.artifact.JavaScopes;
 import org.eclipse.aether.util.graph.manager.DependencyManagerUtils;
 
+import static org.apache.commons.lang3.StringUtils.defaultString;
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
 /**
  * @author Benjamin Bentmann
  */
@@ -105,8 +107,8 @@ public DependencyResolutionResult resolve( DependencyResolutionRequest request )
         {
             for ( Dependency dependency : project.getDependencies() )
             {
-                if ( StringUtils.isEmpty( dependency.getGroupId() ) || StringUtils.isEmpty( dependency.getArtifactId() )
-                    || StringUtils.isEmpty( dependency.getVersion() ) )
+                if ( isEmpty( dependency.getGroupId() ) || isEmpty( dependency.getArtifactId() )
+                    || isEmpty( dependency.getVersion() ) )
                 {
                     // guard against case where best-effort resolution for invalid models is requested
                     continue;
@@ -260,7 +262,7 @@ public boolean visitEnter( DependencyNode node )
                 {
                     final String premanagedScope = DependencyManagerUtils.getPremanagedScope( node );
                     buffer.append( " (scope managed from " );
-                    buffer.append( StringUtils.defaultString( premanagedScope, "default" ) );
+                    buffer.append( defaultString( premanagedScope, "default" ) );
                     buffer.append( ')' );
                 }
 
@@ -268,7 +270,7 @@ public boolean visitEnter( DependencyNode node )
                 {
                     final String premanagedVersion = DependencyManagerUtils.getPremanagedVersion( node );
                     buffer.append( " (version managed from " );
-                    buffer.append( StringUtils.defaultString( premanagedVersion, "default" ) );
+                    buffer.append( defaultString( premanagedVersion, "default" ) );
                     buffer.append( ')' );
                 }
 
@@ -276,7 +278,7 @@ public boolean visitEnter( DependencyNode node )
                 {
                     final Boolean premanagedOptional = DependencyManagerUtils.getPremanagedOptional( node );
                     buffer.append( " (optionality managed from " );
-                    buffer.append( StringUtils.defaultString( premanagedOptional, "default" ) );
+                    buffer.append( ( premanagedOptional == null ? "default" : premanagedOptional ) );
                     buffer.append( ')' );
                 }
 
diff --git a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java
index 22a466ff47..d0a30c5f58 100644
--- a/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java
+++ b/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java
@@ -32,12 +32,13 @@
 import org.apache.maven.model.Extension;
 import org.apache.maven.model.Parent;
 import org.apache.maven.model.Plugin;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 import org.codehaus.plexus.util.dag.DAG;
 import org.codehaus.plexus.util.dag.TopologicalSorter;
 import org.codehaus.plexus.util.dag.Vertex;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
 /**
  * ProjectSorter
  */
@@ -233,7 +234,7 @@ private void addEdge( Vertex fromVertex, Vertex toVertex, MavenProject fromProje
 
     private boolean isSpecificVersion( String version )
     {
-        return !( StringUtils.isEmpty( version ) || version.startsWith( "[" ) || version.startsWith( "(" ) );
+        return !( isEmpty( version ) || version.startsWith( "[" ) || version.startsWith( "(" ) );
     }
 
     // TODO !![jc; 28-jul-2005] check this; if we're using '-r' and there are aggregator tasks, this will result in weirdness.
diff --git a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
index d3ffd925ec..8056a61ec1 100644
--- a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
@@ -31,9 +31,10 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
 /**
  * @author jdcasey
  */
@@ -125,7 +126,7 @@ private File getFile( String pathPattern, String basedirSysProp, String altLocat
 
         String path = System.getProperty( altLocationSysProp );
 
-        if ( StringUtils.isEmpty( path ) )
+        if ( isEmpty( path ) )
         {
             // TODO This replacing shouldn't be necessary as user.home should be in the
             // context of the container and thus the value would be interpolated by Plexus
diff --git a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java
index d137af548a..04264c1dae 100644
--- a/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java
+++ b/maven-core/src/test/java/org/apache/maven/project/harness/Xpp3DomNodeIterator.java
@@ -28,9 +28,10 @@
 import org.apache.commons.jxpath.ri.compiler.NodeTypeTest;
 import org.apache.commons.jxpath.ri.model.NodeIterator;
 import org.apache.commons.jxpath.ri.model.NodePointer;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
 /**
  * A node iterator for JXPath to support <code>Xpp3Dom</code>.
  *
@@ -123,7 +124,7 @@ private boolean testNode( Xpp3Dom node )
         if ( test instanceof NodeNameTest )
         {
             String nodeName = node.getName();
-            if ( StringUtils.isEmpty( nodeName ) )
+            if ( isEmpty( nodeName ) )
             {
                 return false;
             }
@@ -139,7 +140,7 @@ private boolean testNode( Xpp3Dom node )
             }
             if ( wildcard || testName.equals( nodeName ) )
             {
-                return StringUtils.isEmpty( namespaceURI ) || StringUtils.isEmpty( testPrefix );
+                return isEmpty( namespaceURI ) || isEmpty( testPrefix );
             }
             return false;
         }
diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java
index 0e054c6a76..91f2a075cb 100644
--- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java
+++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java
@@ -51,9 +51,10 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.RepositorySystemSession;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
 /**
  * @author Benjamin Bentmann
  */
@@ -145,7 +146,7 @@ public Artifact createPluginArtifact( Plugin plugin )
         try
         {
             String version = plugin.getVersion();
-            if ( StringUtils.isEmpty( version ) )
+            if ( isEmpty( version ) )
             {
                 version = "RELEASE";
             }
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index e1a4c2f593..3f926fbf08 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -19,8 +19,6 @@
  * under the License.
  */
 
-import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.text.SimpleDateFormat;
@@ -28,10 +26,12 @@
 import java.util.Locale;
 import java.util.Properties;
 
-import org.apache.commons.lang3.StringUtils;
-import org.codehaus.plexus.util.Os;
+import org.apache.maven.shared.utils.Os;
 import org.slf4j.Logger;
 
+import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
+
 /**
  * Utility class used to report errors, statistics, application version info, etc.
  *
@@ -94,7 +94,7 @@ static String createMavenVersionString( Properties buildProperties )
         {
             msg += " (";
             msg += ( rev != null ? rev : "" );
-            if ( StringUtils.isNotBlank( timestamp ) )
+            if ( isNotBlank( timestamp ) )
             {
                 String ts = formatTimestamp( Long.valueOf( timestamp ) );
                 msg += ( rev != null ? "; " : "" ) + ts;
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index ca8e040732..1e70cfa1af 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -78,7 +78,6 @@
 import org.codehaus.plexus.classworlds.realm.NoSuchRealmException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.logging.LoggerManager;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 import org.eclipse.aether.transfer.TransferListener;
 import org.slf4j.ILoggerFactory;
@@ -113,6 +112,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+import static org.apache.commons.lang3.StringUtils.split;
 import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
 
 // TODO push all common bits back to plexus cli and prepare for transition to Guice. We don't need 50 ways to make CLIs
@@ -572,7 +573,7 @@ else if ( MavenExecutionRequest.CHECKSUM_POLICY_FAIL.equals( cliRequest.request.
             slf4jLogger.debug( "Message scheme: " + ( MessageUtils.isColorEnabled() ? "color" : "plain" ) );
             if ( MessageUtils.isColorEnabled() )
             {
-                MessageBuilder buff = MessageUtils.buffer();
+                MessageBuilder buff = buffer();
                 buff.a( "Message styles: " );
                 buff.a( MessageUtils.level().debug( "debug" ) ).a( ' ' );
                 buff.a( MessageUtils.level().info( "info" ) ).a( ' ' );
@@ -840,9 +841,9 @@ private ClassRealm setupContainerRealm( ClassWorld classWorld, ClassRealm coreRe
 
         List<File> jars = new ArrayList<>();
 
-        if ( StringUtils.isNotEmpty( extClassPath ) )
+        if ( isNotEmpty( extClassPath ) )
         {
-            for ( String jar : StringUtils.split( extClassPath, File.pathSeparator ) )
+            for ( String jar : split( extClassPath, File.pathSeparator ) )
             {
                 File file = resolveFile( new File( jar ), cliRequest.workingDirectory );
 
@@ -1061,7 +1062,7 @@ private void logSummary( ExceptionSummary summary, Map<String, String> reference
     {
         String referenceKey = "";
 
-        if ( StringUtils.isNotEmpty( summary.getReference() ) )
+        if ( isNotEmpty( summary.getReference() ) )
         {
             referenceKey = references.get( summary.getReference() );
             if ( referenceKey == null )
@@ -1073,7 +1074,7 @@ private void logSummary( ExceptionSummary summary, Map<String, String> reference
 
         String msg = summary.getMessage();
 
-        if ( StringUtils.isNotEmpty( referenceKey ) )
+        if ( isNotEmpty( referenceKey ) )
         {
             if ( msg.indexOf( '\n' ) < 0 )
             {
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 00c9164e33..e941dc5ce7 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 import static org.apache.maven.cli.CLIReportingUtils.formatDuration;
 import static org.apache.maven.cli.CLIReportingUtils.formatTimestamp;
 import static org.apache.maven.shared.utils.logging.MessageUtils.buffer;
@@ -37,7 +38,6 @@
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.shared.utils.logging.MessageBuilder;
-import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -405,10 +405,10 @@ private void append( MessageBuilder buffer, MojoExecution me )
     private void appendForkInfo( MessageBuilder buffer, MojoDescriptor md )
     {
         StringBuilder buff = new StringBuilder();
-        if ( StringUtils.isNotEmpty( md.getExecutePhase() ) )
+        if ( isNotEmpty( md.getExecutePhase() ) )
         {
             // forked phase
-            if ( StringUtils.isNotEmpty( md.getExecuteLifecycle() ) )
+            if ( isNotEmpty( md.getExecuteLifecycle() ) )
             {
                 buff.append( '[' );
                 buff.append( md.getExecuteLifecycle() );
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
index 1a68d76f58..6e7829b817 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/Slf4jConfigurationFactory.java
@@ -28,9 +28,10 @@
 import java.util.Set;
 
 import org.apache.maven.cli.logging.impl.UnsupportedSlf4jBindingConfiguration;
-import org.codehaus.plexus.util.PropertyUtils;
 import org.slf4j.ILoggerFactory;
 
+import static org.apache.maven.shared.utils.PropertyUtils.loadOptionalProperties;
+
 /**
  * Slf4jConfiguration factory, loading implementations from <code>META-INF/maven/slf4j-configuration.properties</code>
  * configuration files in class loader: key is the class name of the ILoggerFactory, value is the class name of
@@ -57,7 +58,7 @@ public static Slf4jConfiguration getConfiguration( ILoggerFactory loggerFactory
             {
                 URL resource = resources.nextElement();
 
-                Properties conf = PropertyUtils.loadProperties( resource.openStream() );
+                Properties conf = loadOptionalProperties( resource.openStream() );
 
                 String impl = conf.getProperty( slf4jBinding );
 
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
index 1ad943b7c1..bcc8caf72b 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java
@@ -26,11 +26,12 @@
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
 import org.eclipse.aether.transfer.TransferCancelledException;
 import org.eclipse.aether.transfer.TransferEvent;
 import org.eclipse.aether.transfer.TransferResource;
 
+import static org.apache.commons.lang3.StringUtils.substringAfterLast;
+
 /**
  * Console download progress meter.
  *
@@ -110,7 +111,7 @@ private String getStatus( String resourceName, long complete, long total )
 
         if ( printResourceNames )
         {
-            status.append( StringUtils.substringAfterLast( resourceName,  "/" ) );
+            status.append( substringAfterLast( resourceName,  "/" ) );
             status.append( " (" );
         }
 
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java
index f58d75b3ff..c68d10b4e8 100644
--- a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java
@@ -29,7 +29,8 @@
 
 import org.apache.commons.cli.Option;
 import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.util.FileUtils;
+
+import static org.apache.maven.shared.utils.io.FileUtils.fileWrite;
 
 /**
  * Pseudo test to generate documentation fragment about supported CLI options. TODO such documentation generation code
@@ -101,7 +102,7 @@ public void testOptionsAsHtml()
         throws IOException
     {
         File options = getTestFile( "target/test-classes/options.html" );
-        FileUtils.fileWrite( options, "UTF-8", getOptionsAsHtml() );
+        fileWrite( options, "UTF-8", getOptionsAsHtml() );
     }
 
 }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
index 890c8450f1..8ac54c4cf1 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java
@@ -37,7 +37,8 @@
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isBlank;
 
 /**
  * Handles inheritance of model values.
@@ -149,7 +150,7 @@ protected String extrapolateChildUrl( String parentUrl, Map<Object, Object> cont
             Object childDirectory = context.get( CHILD_DIRECTORY );
             Object childPathAdjustment = context.get( CHILD_PATH_ADJUSTMENT );
 
-            if ( StringUtils.isBlank( parentUrl ) || childDirectory == null || childPathAdjustment == null )
+            if ( isBlank( parentUrl ) || childDirectory == null || childPathAdjustment == null )
             {
                 return parentUrl;
             }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java b/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java
index d0da9a3fa8..173bb6d3fc 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/io/DefaultModelWriter.java
@@ -32,6 +32,8 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.WriterFactory;
 
+import static org.apache.commons.lang3.StringUtils.defaultIfEmpty;
+
 /**
  * Handles serialization of a model into some kind of textual format like XML.
  *
@@ -74,12 +76,7 @@ public void write( OutputStream output, Map<String, Object> options, Model model
         Objects.requireNonNull( output, "output cannot be null" );
         Objects.requireNonNull( model, "model cannot be null" );
 
-        String encoding = model.getModelEncoding();
-        // TODO Use StringUtils here
-        if ( encoding == null || encoding.length() <= 0 )
-        {
-            encoding = "UTF-8";
-        }
+        String encoding = defaultIfEmpty ( model.getModelEncoding(), "UTF-8" );
 
         try ( final Writer out = new OutputStreamWriter( output, encoding ) )
         {
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
index d625bb5acb..82a6550aa3 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/normalization/DefaultModelNormalizer.java
@@ -33,7 +33,8 @@
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.merge.MavenModelMerger;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
 
 /**
  * Handles normalization of a model.
@@ -127,7 +128,7 @@ private void injectDependencyDefaults( List<Dependency> dependencies )
     {
         for ( Dependency dependency : dependencies )
         {
-            if ( StringUtils.isEmpty( dependency.getScope() ) )
+            if ( isEmpty( dependency.getScope() ) )
             {
                 // we cannot set this directly in the MDO due to the interactions with dependency management
                 dependency.setScope( "compile" );
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
index 8bfa580802..ce6ee1954c 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
@@ -32,9 +32,10 @@
 import org.apache.maven.model.building.ModelProblem.Severity;
 import org.apache.maven.model.building.ModelProblem.Version;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+
 /**
  * Handles conversion of the <code>&lt;reporting&gt;</code> section into the configuration of Maven Site Plugin 3.x,
  * i.e. <code>reportPlugins</code> and <code>outputDirectory</code> parameters.
@@ -233,7 +234,7 @@ private Xpp3Dom convert( ReportSet reportSet )
 
     private void addDom( Xpp3Dom parent, String childName, String childValue )
     {
-        if ( StringUtils.isNotEmpty( childValue ) )
+        if ( isNotEmpty( childValue ) )
         {
             parent.addChild( newDom( childName, childValue ) );
         }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
index a7da86cf96..d903bd5c88 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
@@ -35,7 +35,8 @@
 import org.codehaus.plexus.interpolation.AbstractValueSource;
 import org.codehaus.plexus.interpolation.MapBasedValueSource;
 import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * Determines profile activation based on the existence/absence of some file.
@@ -83,12 +84,12 @@ public boolean isActive( Profile profile, ProfileActivationContext context, Mode
         String path;
         boolean missing;
 
-        if ( StringUtils.isNotEmpty( file.getExists() ) )
+        if ( isNotEmpty( file.getExists() ) )
         {
             path = file.getExists();
             missing = false;
         }
-        else if ( StringUtils.isNotEmpty( file.getMissing() ) )
+        else if ( isNotEmpty( file.getMissing() ) )
         {
             path = file.getMissing();
             missing = true;
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java
index ba7886f074..67e41ea35d 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java
@@ -28,7 +28,8 @@
 import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.profile.ProfileActivationContext;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
 
 /**
  * Determines profile activation based on the existence or value of some execution property.
@@ -82,7 +83,7 @@ public boolean isActive( Profile profile, ProfileActivationContext context, Mode
         }
 
         String propValue = property.getValue();
-        if ( StringUtils.isNotEmpty( propValue ) )
+        if ( isNotEmpty( propValue ) )
         {
             boolean reverseValue = false;
             if ( propValue.startsWith( "!" ) )
@@ -98,7 +99,7 @@ public boolean isActive( Profile profile, ProfileActivationContext context, Mode
         }
         else
         {
-            boolean result = StringUtils.isNotEmpty( sysValue );
+            boolean result = isNotEmpty( sysValue );
 
             return reverseName ? !result : result;
         }
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index 4018618f9b..ce74b6f437 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -56,7 +56,13 @@
 import org.apache.maven.model.building.ModelProblemCollectorRequest;
 import org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.defaultString;
+import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
+import static org.codehaus.plexus.util.StringUtils.clean;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -234,12 +240,12 @@ private void validate30RawProfileActivation( ModelProblemCollector problems, Act
             String path;
             boolean missing;
 
-            if ( StringUtils.isNotEmpty( file.getExists() ) )
+            if ( isNotEmpty( file.getExists() ) )
             {
                 path = file.getExists();
                 missing = false;
             }
-            else if ( StringUtils.isNotEmpty( file.getMissing() ) )
+            else if ( isNotEmpty( file.getMissing() ) )
             {
                 path = file.getMissing();
                 missing = true;
@@ -349,7 +355,7 @@ public void validateEffectiveModel( Model m, ModelBuildingRequest request, Model
             for ( int i = 0, n = m.getModules().size(); i < n; i++ )
             {
                 String module = m.getModules().get( i );
-                if ( StringUtils.isBlank( module ) )
+                if ( isBlank( module ) )
                 {
                     addViolation( problems, Severity.ERROR, Version.BASE, "modules.module[" + i + "]", null,
                                   "has been specified without a path to the project directory.",
@@ -477,7 +483,7 @@ private void validate20RawDependencies( ModelProblemCollector problems, List<Dep
                     addViolation( problems, Severity.WARNING, Version.V20, prefix + ".type", key,
                                   "must be 'pom' to import the managed dependencies.", dependency );
                 }
-                else if ( StringUtils.isNotEmpty( dependency.getClassifier() ) )
+                else if ( isNotEmpty( dependency.getClassifier() ) )
                 {
                     addViolation( problems, errOn30, Version.V20, prefix + ".classifier", key,
                                   "must be empty, imported POM cannot have a classifier.", dependency );
@@ -493,7 +499,7 @@ else if ( "system".equals( dependency.getScope() ) )
                 }
 
                 String sysPath = dependency.getSystemPath();
-                if ( StringUtils.isNotEmpty( sysPath ) )
+                if ( isNotEmpty( sysPath ) )
                 {
                     if ( !hasExpression( sysPath ) )
                     {
@@ -524,12 +530,12 @@ else if ( sysPath.contains( "${basedir}" ) || sysPath.contains( "${project.based
                 if ( equals( existing.getVersion(), dependency.getVersion() ) )
                 {
                     msg = "duplicate declaration of version "
-                        + StringUtils.defaultString( dependency.getVersion(), "(?)" );
+                        + defaultString( dependency.getVersion(), "(?)" );
                 }
                 else
                 {
-                    msg = "version " + StringUtils.defaultString( existing.getVersion(), "(?)" ) + " vs "
-                        + StringUtils.defaultString( dependency.getVersion(), "(?)" );
+                    msg = "version " + defaultString( existing.getVersion(), "(?)" ) + " vs "
+                        + defaultString( dependency.getVersion(), "(?)" );
                 }
 
                 addViolation( problems, errOn31, Version.V20, prefix + ".(groupId:artifactId:type:classifier)", null,
@@ -664,7 +670,7 @@ private void validateEffectiveDependency( ModelProblemCollector problems, Depend
         {
             String systemPath = d.getSystemPath();
 
-            if ( StringUtils.isEmpty( systemPath ) )
+            if ( isEmpty( systemPath ) )
             {
                 addViolation( problems, Severity.ERROR, Version.BASE, prefix + "systemPath", d.getManagementKey(),
                               "is missing.", d );
@@ -692,7 +698,7 @@ else if ( !sysFile.isFile() )
                 }
             }
         }
-        else if ( StringUtils.isNotEmpty( d.getSystemPath() ) )
+        else if ( isNotEmpty( d.getSystemPath() ) )
         {
             addViolation( problems, Severity.ERROR, Version.BASE, prefix + "systemPath", d.getManagementKey(),
                           "must be omitted." + " This field may only be specified for a dependency with system scope.",
@@ -1155,7 +1161,7 @@ private static InputLocation getLocation( String fieldName, InputLocationTracker
 
     private static boolean equals( String s1, String s2 )
     {
-        return StringUtils.clean( s1 ).equals( StringUtils.clean( s2 ) );
+        return clean( s1 ).equals( clean( s2 ) );
     }
 
     private static Severity getSeverity( ModelBuildingRequest request, int errorThreshold )
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
index 1896005ed1..37e9f610be 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
@@ -23,7 +23,6 @@
 import org.apache.maven.artifact.repository.metadata.SnapshotVersion;
 import org.apache.maven.artifact.repository.metadata.Versioning;
 import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader;
-import org.codehaus.plexus.util.StringUtils;
 import org.eclipse.aether.RepositoryCache;
 import org.eclipse.aether.RepositoryEvent;
 import org.eclipse.aether.RepositoryEvent.EventType;
@@ -70,6 +69,10 @@
 import java.util.Map;
 import java.util.Objects;
 
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+import static org.apache.commons.lang3.StringUtils.isNotEmpty;
+import static org.codehaus.plexus.util.StringUtils.clean;
+
 /**
  * @author Benjamin Bentmann
  */
@@ -292,7 +295,7 @@ else if ( LATEST.equals( version ) )
                 }
             }
 
-            if ( StringUtils.isEmpty( result.getVersion() ) )
+            if ( isEmpty( result.getVersion() ) )
             {
                 throw new VersionResolutionException( result );
             }
@@ -383,19 +386,19 @@ private void invalidMetadata( RepositorySystemSession session, RequestTrace trac
     private void merge( Artifact artifact, Map<String, VersionInfo> infos, Versioning versioning,
                         ArtifactRepository repository )
     {
-        if ( StringUtils.isNotEmpty( versioning.getRelease() ) )
+        if ( isNotEmpty( versioning.getRelease() ) )
         {
             merge( RELEASE, infos, versioning.getLastUpdated(), versioning.getRelease(), repository );
         }
 
-        if ( StringUtils.isNotEmpty( versioning.getLatest() ) )
+        if ( isNotEmpty( versioning.getLatest() ) )
         {
             merge( LATEST, infos, versioning.getLastUpdated(), versioning.getLatest(), repository );
         }
 
         for ( SnapshotVersion sv : versioning.getSnapshotVersions() )
         {
-            if ( StringUtils.isNotEmpty( sv.getVersion() ) )
+            if ( isNotEmpty( sv.getVersion() ) )
             {
                 String key = getKey( sv.getClassifier(), sv.getExtension() );
                 merge( SNAPSHOT + key, infos, sv.getUpdated(), sv.getVersion(), repository );
@@ -446,7 +449,7 @@ private void merge( Map<String, VersionInfo> infos, String srcKey, String dstKey
 
     private String getKey( String classifier, String extension )
     {
-        return StringUtils.clean( classifier ) + ':' + StringUtils.clean( extension );
+        return clean( classifier ) + ':' + clean( extension );
     }
 
     private boolean isSafelyCacheable( RepositorySystemSession session, Artifact artifact )
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
index 2e277f0e4c..1ca1e0ba94 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RelocatedArtifact.java
@@ -26,6 +26,8 @@
 import org.eclipse.aether.artifact.AbstractArtifact;
 import org.eclipse.aether.artifact.Artifact;
 
+import static org.apache.commons.lang3.StringUtils.defaultIfEmpty;
+
 /**
  * @author Benjamin Bentmann
  */
@@ -44,10 +46,9 @@
     RelocatedArtifact( Artifact artifact, String groupId, String artifactId, String version )
     {
         this.artifact = Objects.requireNonNull( artifact, "artifact cannot be null" );
-        // TODO Use StringUtils here
-        this.groupId = ( groupId != null && groupId.length() > 0 ) ? groupId : null;
-        this.artifactId = ( artifactId != null && artifactId.length() > 0 ) ? artifactId : null;
-        this.version = ( version != null && version.length() > 0 ) ? version : null;
+        this.groupId = defaultIfEmpty( groupId, null );
+        this.artifactId = defaultIfEmpty( artifactId, null );
+        this.version = defaultIfEmpty ( version, null );
     }
 
     public String getGroupId()
diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java
index 96af1a340a..f2aa01fb52 100644
--- a/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java
+++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/io/DefaultSettingsWriter.java
@@ -32,6 +32,8 @@
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.WriterFactory;
 
+import static org.apache.commons.lang3.StringUtils.defaultIfEmpty;
+
 /**
  * Handles serialization of settings into the default textual format.
  *
@@ -74,12 +76,7 @@ public void write( OutputStream output, Map<String, Object> options, Settings se
         Objects.requireNonNull( output, "output cannot be null" );
         Objects.requireNonNull( settings, "settings cannot be null" );
 
-        String encoding = settings.getModelEncoding();
-        // TODO Use StringUtils here
-        if ( encoding == null || encoding.length() <= 0 )
-        {
-            encoding = "UTF-8";
-        }
+        String encoding = defaultIfEmpty ( settings.getModelEncoding(), "UTF-8" );
 
         try ( final Writer out = new OutputStreamWriter( output, encoding ) )
         {
diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java
index 8d9f67b1fc..30e3fa84ff 100644
--- a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java
+++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java
@@ -26,7 +26,8 @@
 
 import org.apache.maven.settings.IdentifiableBase;
 import org.apache.maven.settings.Settings;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isEmpty;
 
 /**
  * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
@@ -90,7 +91,7 @@ public void merge( Settings dominant, Settings recessive, String recessiveSource
             }
         }
 
-        if ( StringUtils.isEmpty( dominant.getLocalRepository() ) )
+        if ( isEmpty( dominant.getLocalRepository() ) )
         {
             dominant.setLocalRepository( recessive.getLocalRepository() );
         }
diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java
index 1e31f504ff..c8a97864fe 100644
--- a/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java
+++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java
@@ -32,7 +32,8 @@
 import org.apache.maven.settings.building.SettingsProblem.Severity;
 import org.apache.maven.settings.building.SettingsProblemCollector;
 import org.codehaus.plexus.component.annotations.Component;
-import org.codehaus.plexus.util.StringUtils;
+
+import static org.apache.commons.lang3.StringUtils.isBlank;
 
 /**
  * @author Milos Kleint
@@ -64,7 +65,7 @@ public void validate( Settings settings, SettingsProblemCollector problems )
             {
                 String pluginGroup = pluginGroups.get( i ).trim();
 
-                if ( StringUtils.isBlank( pluginGroup ) )
+                if ( isBlank( pluginGroup ) )
                 {
                     addViolation( problems, Severity.ERROR, "pluginGroups.pluginGroup[" + i + "]", null,
                                   "must not be empty" );


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Use maven-shared-utils in Maven core to replace plexus-utils
> ------------------------------------------------------------
>
>                 Key: MNG-5378
>                 URL: https://issues.apache.org/jira/browse/MNG-5378
>             Project: Maven
>          Issue Type: Task
>            Reporter: Jason van Zyl
>            Assignee: Kristian Rosenvold
>            Priority: Major
>             Fix For: Issues to be reviewed for 4.x
>
>
> see http://maven.apache.org/shared/maven-shared-utils/ for the rationale



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Mime
View raw message