You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2022/11/22 20:22:56 UTC

[maven-dependency-plugin] 02/02: Reformat code after parent 38

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch MDEP-837
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 8f3620e2f75ab807074bd500ff73049967e9aceb
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Tue Nov 22 20:52:13 2022 +0100

    Reformat code after parent 38
---
 pom.xml                                            |  81 +-
 .../plugins/dependency/AbstractDependencyMojo.java | 321 ++++----
 .../plugins/dependency/DisplayAncestorsMojo.java   |  53 +-
 .../apache/maven/plugins/dependency/GetMojo.java   | 226 +++---
 .../maven/plugins/dependency/ListClassesMojo.java  | 217 +++---
 .../maven/plugins/dependency/PropertiesMojo.java   |  45 +-
 .../dependency/PurgeLocalRepositoryMojo.java       | 527 ++++++-------
 .../dependency/analyze/AbstractAnalyzeMojo.java    | 400 ++++------
 .../plugins/dependency/analyze/AnalyzeDepMgt.java  | 183 ++---
 .../dependency/analyze/AnalyzeDuplicateMojo.java   | 102 +--
 .../plugins/dependency/analyze/AnalyzeMojo.java    |  13 +-
 .../dependency/analyze/AnalyzeOnlyMojo.java        |  24 +-
 .../dependency/analyze/AnalyzeReportMojo.java      |  82 +-
 .../dependency/analyze/AnalyzeReportView.java      | 118 ++-
 .../AbstractFromConfigurationMojo.java             | 242 +++---
 .../dependency/fromConfiguration/ArtifactItem.java | 154 ++--
 .../dependency/fromConfiguration/CopyMojo.java     | 100 ++-
 .../ProcessArtifactItemsRequest.java               |  49 +-
 .../dependency/fromConfiguration/UnpackMojo.java   | 128 ++-
 .../AbstractDependencyFilterMojo.java              | 279 +++----
 .../AbstractFromDependenciesMojo.java              |  82 +-
 .../fromDependencies/BuildClasspathMojo.java       | 279 +++----
 .../fromDependencies/CopyDependenciesMojo.java     | 266 +++----
 .../fromDependencies/UnpackDependenciesMojo.java   | 110 ++-
 .../dependency/resolvers/AbstractResolveMojo.java  |  63 +-
 .../resolvers/CollectDependenciesMojo.java         |  20 +-
 .../ExcludeReactorProjectsArtifactFilter.java      |  64 +-
 .../ExcludeReactorProjectsDependencyFilter.java    |  50 +-
 .../dependency/resolvers/GoOfflineMojo.java        | 152 ++--
 .../plugins/dependency/resolvers/ListMojo.java     |  13 +-
 .../dependency/resolvers/ListRepositoriesMojo.java | 142 ++--
 .../resolvers/ResolveDependenciesMojo.java         | 312 ++++----
 .../resolvers/ResolveDependencySourcesMojo.java    |  26 +-
 .../dependency/resolvers/ResolvePluginsMojo.java   | 138 ++--
 .../tree/AbstractSerializingVisitor.java           |  20 +-
 .../tree/BuildingDependencyNodeVisitor.java        | 116 +--
 .../dependency/tree/DOTDependencyNodeVisitor.java  |  42 +-
 .../tree/GraphmlDependencyNodeVisitor.java         |  77 +-
 .../dependency/tree/TGFDependencyNodeVisitor.java  |  68 +-
 .../maven/plugins/dependency/tree/TreeMojo.java    | 269 +++----
 .../dependency/utils/DependencySilentLog.java      | 106 +--
 .../dependency/utils/DependencyStatusSets.java     |  77 +-
 .../plugins/dependency/utils/DependencyUtil.java   | 205 +++--
 .../utils/filters/ArtifactItemFilter.java          |  13 +-
 .../dependency/utils/filters/DestFileFilter.java   | 173 ++--
 .../dependency/utils/filters/MarkerFileFilter.java |  67 +-
 .../utils/filters/ResolveFileFilter.java           |  33 +-
 .../utils/markers/DefaultFileMarkerHandler.java    | 104 +--
 .../dependency/utils/markers/MarkerHandler.java    |  25 +-
 .../utils/markers/SourcesFileMarkerHandler.java    | 115 +--
 .../utils/markers/UnpackFileMarkerHandler.java     |  56 +-
 .../utils/translators/ArtifactTranslator.java      |  15 +-
 .../translators/ClassifierTypeTranslator.java      |  71 +-
 .../dependency/AbstractDependencyMojoTest.java     | 116 ++-
 .../dependency/AbstractDependencyMojoTestCase.java |  73 +-
 .../maven/plugins/dependency/TestCollectMojo.java  |  90 +--
 .../maven/plugins/dependency/TestGetMojo.java      | 224 +++---
 .../plugins/dependency/TestListClassesMojo.java    | 111 ++-
 .../plugins/dependency/TestPropertiesMojo.java     |  50 +-
 .../apache/maven/plugins/dependency/TestSkip.java  | 175 ++---
 .../dependency/analyze/TestAnalyzeDepMgt.java      | 171 ++--
 .../analyze/TestAnalyzeDuplicateMojo.java          | 178 ++---
 .../fromConfiguration/TestArtifactItem.java        |  46 +-
 .../dependency/fromConfiguration/TestCopyMojo.java | 866 +++++++++------------
 .../TestIncludeExcludeUnpackMojo.java              | 326 ++++----
 .../fromConfiguration/TestUnpackMojo.java          | 666 +++++++---------
 .../fromDependencies/TestBuildClasspathMojo.java   | 171 ++--
 .../fromDependencies/TestCopyDependenciesMojo.java | 652 +++++++---------
 .../TestCopyDependenciesMojo2.java                 | 387 ++++-----
 .../TestIncludeExcludeUnpackDependenciesMojo.java  | 159 ++--
 .../TestUnpackDependenciesMojo.java                | 565 ++++++--------
 .../TestUnpackDependenciesMojo2.java               | 188 ++---
 .../ExcludeReactorProjectsArtifactFilterTest.java  |  72 +-
 ...ExcludeReactorProjectsDependencyFilterTest.java | 103 ++-
 .../resolvers/ResolveDependenciesMojoTest.java     | 226 +++---
 .../dependency/resolvers/TestResolveMojo.java      |  64 +-
 .../testUtils/DependencyArtifactStubFactory.java   |  89 +--
 .../testUtils/stubs/DependencyProjectStub.java     | 638 +++++----------
 .../stubs/DuplicateDependencies2ProjectStub.java   |  50 +-
 .../stubs/DuplicateDependenciesProjectStub.java    |  50 +-
 .../stubs/StubDefaultFileMarkerHandler.java        |  25 +-
 .../dependency/testUtils/stubs/StubMarkerFile.java |  39 +-
 .../stubs/StubSourcesFileMarkerHandler.java        |  33 +-
 .../stubs/StubUnpackFileMarkerHandler.java         |  46 +-
 .../plugins/dependency/tree/TestTreeMojo.java      | 181 ++---
 .../tree/TestTreeMojo_ContainsVersion.java         |  36 +-
 .../dependency/utils/TestDependencyStatusSets.java |  21 +-
 .../dependency/utils/TestDependencyUtil.java       | 358 ++++-----
 .../plugins/dependency/utils/TestSilentLog.java    |  63 +-
 .../utils/filters/TestDestFileFilter.java          | 278 +++----
 .../utils/filters/TestMarkerFileFilter.java        | 173 ++--
 .../utils/filters/TestResolveMarkerFileFilter.java |  56 +-
 .../markers/TestDefaultMarkerFileHandler.java      | 161 ++--
 .../markers/TestSourcesMarkerFileHandler.java      | 249 +++---
 .../utils/markers/TestUnpackMarkerFileHandler.java | 270 +++----
 .../translators/TestClassifierTypeTranslator.java  | 151 ++--
 .../unit/build-classpath-test/plugin-config.xml    |   2 +-
 .../resources/unit/collect-test/plugin-config.xml  |   2 +-
 .../unit/copy-dependencies-test/plugin-config.xml  |   2 +-
 .../resources/unit/copy-test/plugin-config.xml     |   2 +-
 src/test/resources/unit/get-test/plugin-config.xml |   2 +-
 .../unit/properties-test/plugin-config.xml         |   2 +-
 .../resources/unit/resolve-test/plugin-config.xml  |   2 +-
 .../resources/unit/tree-test/plugin-config.xml     |   2 +-
 .../unpack-dependencies-test/plugin-config.xml     |   2 +-
 .../unit/unpack-dependencies-test/test.txt         |   2 +-
 .../resources/unit/unpack-test/plugin-config.xml   |   2 +-
 107 files changed, 6455 insertions(+), 8926 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1b124e8e..f52d7fff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
@@ -18,7 +17,6 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
-
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
@@ -36,31 +34,6 @@ under the License.
   <name>Apache Maven Dependency Plugin</name>
   <description>Provides utility goals to work with dependencies like copying, unpacking, analyzing, resolving and many more.</description>
 
-  <prerequisites>
-    <maven>${mavenVersion}</maven>
-  </prerequisites>
-
-  <scm>
-    <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git</connection>
-    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git</developerConnection>
-    <url>https://github.com/apache/maven-dependency-plugin/tree/${project.scm.tag}</url>
-    <tag>HEAD</tag>
-  </scm>
-  <issueManagement>
-    <system>JIRA</system>
-    <url>https://issues.apache.org/jira/browse/MDEP</url>
-  </issueManagement>
-  <ciManagement>
-    <system>Jenkins</system>
-    <url>https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-dependency-plugin/</url>
-  </ciManagement>
-  <distributionManagement>
-    <site>
-      <id>apache.website</id>
-      <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>
-    </site>
-  </distributionManagement>
-
   <contributors>
     <contributor>
       <name>Bakito</name>
@@ -88,6 +61,31 @@ under the License.
     </contributor>
   </contributors>
 
+  <prerequisites>
+    <maven>${mavenVersion}</maven>
+  </prerequisites>
+
+  <scm>
+    <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git</connection>
+    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git</developerConnection>
+    <tag>HEAD</tag>
+    <url>https://github.com/apache/maven-dependency-plugin/tree/${project.scm.tag}</url>
+  </scm>
+  <issueManagement>
+    <system>JIRA</system>
+    <url>https://issues.apache.org/jira/browse/MDEP</url>
+  </issueManagement>
+  <ciManagement>
+    <system>Jenkins</system>
+    <url>https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-dependency-plugin/</url>
+  </ciManagement>
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>
+    </site>
+  </distributionManagement>
+
   <properties>
     <mavenVersion>3.2.5</mavenVersion>
     <jettyVersion>9.4.49.v20220914</jettyVersion>
@@ -160,7 +158,7 @@ under the License.
       <version>${mavenVersion}</version>
       <scope>provided</scope>
     </dependency>
-    
+
     <!-- reporting -->
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
@@ -235,7 +233,7 @@ under the License.
       <artifactId>maven-plugin-annotations</artifactId>
       <scope>provided</scope>
     </dependency>
-    
+
     <dependency>
       <groupId>org.eclipse.aether</groupId>
       <artifactId>aether-api</artifactId>
@@ -252,10 +250,11 @@ under the License.
     <dependency>
       <groupId>org.sonatype.plexus</groupId>
       <artifactId>plexus-build-api</artifactId>
-      <version>0.0.7</version><!-- stick with old GAV until https://github.com/eclipse-m2e/m2e-core/issues/944 is fixed -->
+      <version>0.0.7</version>
+      <!-- stick with old GAV until https://github.com/eclipse-m2e/m2e-core/issues/944 is fixed -->
       <scope>compile</scope>
     </dependency>
-    
+
     <!-- test -->
     <dependency>
       <groupId>org.eclipse.aether</groupId>
@@ -427,14 +426,6 @@ under the License.
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>mrm-maven-plugin</artifactId>
             <version>1.4.1</version>
-            <executions>
-              <execution>
-                <goals>
-                  <goal>start</goal>
-                  <goal>stop</goal>
-                </goals>
-              </execution>
-            </executions>
             <configuration>
               <propertyName>repository.proxy.url</propertyName>
               <repositories>
@@ -444,9 +435,17 @@ under the License.
                 <localRepo>
                   <source>${project.build.directory}/local-repo</source>
                 </localRepo>
-                <proxyRepo />
+                <proxyRepo/>
               </repositories>
             </configuration>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>start</goal>
+                  <goal>stop</goal>
+                </goals>
+              </execution>
+            </executions>
           </plugin>
         </plugins>
       </build>
diff --git a/src/main/java/org/apache/maven/plugins/dependency/AbstractDependencyMojo.java b/src/main/java/org/apache/maven/plugins/dependency/AbstractDependencyMojo.java
index 5294bef8..66c64c8e 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/AbstractDependencyMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/AbstractDependencyMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,12 +16,12 @@ package org.apache.maven.plugins.dependency;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency;
 
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Field;
 import java.util.List;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.execution.MavenSession;
@@ -51,16 +49,13 @@ import org.sonatype.plexus.build.incremental.BuildContext;
 /**
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
-public abstract class AbstractDependencyMojo
-    extends AbstractMojo
-{
+public abstract class AbstractDependencyMojo extends AbstractMojo {
     /**
      * To look up Archiver/UnArchiver implementations
      */
     @Component
     private ArchiverManager archiverManager;
 
-
     /**
      * For IDE build support
      */
@@ -69,11 +64,11 @@ public abstract class AbstractDependencyMojo
 
     /**
      * Skip plugin execution only during incremental builds (e.g. triggered from M2E).
-     * 
+     *
      * @since 3.4.0
      * @see #skip
      */
-    @Parameter( defaultValue = "false" )
+    @Parameter(defaultValue = "false")
     private boolean skipDuringIncrementalBuild;
 
     /**
@@ -81,48 +76,48 @@ public abstract class AbstractDependencyMojo
      * will use the jvm chmod, this is available for user and all level group level will be ignored
      * </p>
      * <b>since 2.6 is on by default</b>
-     * 
+     *
      * @since 2.5.1
      */
-    @Parameter( property = "dependency.useJvmChmod", defaultValue = "true" )
+    @Parameter(property = "dependency.useJvmChmod", defaultValue = "true")
     private boolean useJvmChmod = true;
 
     /**
      * ignore to set file permissions when unpacking a dependency
-     * 
+     *
      * @since 2.7
      */
-    @Parameter( property = "dependency.ignorePermissions", defaultValue = "false" )
+    @Parameter(property = "dependency.ignorePermissions", defaultValue = "false")
     private boolean ignorePermissions;
 
     /**
      * POM
      */
-    @Parameter( defaultValue = "${project}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project}", readonly = true, required = true)
     private MavenProject project;
 
     /**
      * Remote repositories which will be searched for artifacts.
      */
-    @Parameter( defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true)
     private List<ArtifactRepository> remoteRepositories;
 
     /**
      * Remote repositories which will be searched for plugins.
      */
-    @Parameter( defaultValue = "${project.pluginArtifactRepositories}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project.pluginArtifactRepositories}", readonly = true, required = true)
     private List<ArtifactRepository> remotePluginRepositories;
 
     /**
      * Contains the full list of projects in the reactor.
      */
-    @Parameter( defaultValue = "${reactorProjects}", readonly = true )
+    @Parameter(defaultValue = "${reactorProjects}", readonly = true)
     protected List<MavenProject> reactorProjects;
 
     /**
      * The Maven session
      */
-    @Parameter( defaultValue = "${session}", readonly = true, required = true )
+    @Parameter(defaultValue = "${session}", readonly = true, required = true)
     protected MavenSession session;
 
     /**
@@ -130,7 +125,7 @@ public abstract class AbstractDependencyMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "silent", defaultValue = "false" )
+    @Parameter(property = "silent", defaultValue = "false")
     private boolean silent;
 
     /**
@@ -138,7 +133,7 @@ public abstract class AbstractDependencyMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "outputAbsoluteArtifactFilename", defaultValue = "false" )
+    @Parameter(property = "outputAbsoluteArtifactFilename", defaultValue = "false")
     protected boolean outputAbsoluteArtifactFilename;
 
     /**
@@ -146,7 +141,7 @@ public abstract class AbstractDependencyMojo
      *
      * @since 2.7
      */
-    @Parameter( property = "mdep.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.skip", defaultValue = "false")
     private boolean skip;
 
     // Mojo methods -----------------------------------------------------------
@@ -155,12 +150,9 @@ public abstract class AbstractDependencyMojo
      * @see org.apache.maven.plugin.Mojo#execute()
      */
     @Override
-    public final void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-        if ( isSkip() )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public final void execute() throws MojoExecutionException, MojoFailureException {
+        if (isSkip()) {
+            getLog().info("Skipping plugin execution");
             return;
         }
 
@@ -171,14 +163,12 @@ public abstract class AbstractDependencyMojo
      * @throws MojoExecutionException {@link MojoExecutionException}
      * @throws MojoFailureException {@link MojoFailureException}
      */
-    protected abstract void doExecute()
-        throws MojoExecutionException, MojoFailureException;
+    protected abstract void doExecute() throws MojoExecutionException, MojoFailureException;
 
     /**
      * @return Returns the archiverManager.
      */
-    public ArchiverManager getArchiverManager()
-    {
+    public ArchiverManager getArchiverManager() {
         return this.archiverManager;
     }
 
@@ -189,28 +179,22 @@ public abstract class AbstractDependencyMojo
      * @param destFile file name of destination file.
      * @throws MojoExecutionException with a message if an error occurs.
      */
-    protected void copyFile( File artifact, File destFile )
-        throws MojoExecutionException
-    {
-        try
-        {
-            getLog().info( "Copying "
-                + ( this.outputAbsoluteArtifactFilename ? artifact.getAbsolutePath() : artifact.getName() ) + " to "
-                + destFile );
-
-            if ( artifact.isDirectory() )
-            {
+    protected void copyFile(File artifact, File destFile) throws MojoExecutionException {
+        try {
+            getLog().info("Copying "
+                    + (this.outputAbsoluteArtifactFilename ? artifact.getAbsolutePath() : artifact.getName()) + " to "
+                    + destFile);
+
+            if (artifact.isDirectory()) {
                 // usual case is a future jar packaging, but there are special cases: classifier and other packaging
-                throw new MojoExecutionException( "Artifact has not been packaged yet. When used on reactor artifact, "
-                    + "copy should be executed after packaging: see MDEP-187." );
+                throw new MojoExecutionException("Artifact has not been packaged yet. When used on reactor artifact, "
+                        + "copy should be executed after packaging: see MDEP-187.");
             }
 
-            FileUtils.copyFile( artifact, destFile );
-            buildContext.refresh( destFile );
-        }
-        catch ( IOException e )
-        {
-            throw new MojoExecutionException( "Error copying artifact from " + artifact + " to " + destFile, e );
+            FileUtils.copyFile(artifact, destFile);
+            buildContext.refresh(destFile);
+        } catch (IOException e) {
+            throw new MojoExecutionException("Error copying artifact from " + artifact + " to " + destFile, e);
         }
     }
 
@@ -222,10 +206,9 @@ public abstract class AbstractDependencyMojo
      *                    shall happen.
      * @throws MojoExecutionException in case of an error.
      */
-    protected void unpack( Artifact artifact, File location, String encoding, FileMapper[] fileMappers )
-        throws MojoExecutionException
-    {
-        unpack( artifact, location, null, null, encoding, fileMappers );
+    protected void unpack(Artifact artifact, File location, String encoding, FileMapper[] fileMappers)
+            throws MojoExecutionException {
+        unpack(artifact, location, null, null, encoding, fileMappers);
     }
 
     /**
@@ -242,10 +225,15 @@ public abstract class AbstractDependencyMojo
      *                    shall happen.
      * @throws MojoExecutionException In case of errors.
      */
-    protected void unpack( Artifact artifact, File location, String includes, String excludes, String encoding,
-                           FileMapper[] fileMappers ) throws MojoExecutionException
-    {
-        unpack( artifact, artifact.getType(), location, includes, excludes, encoding, fileMappers );
+    protected void unpack(
+            Artifact artifact,
+            File location,
+            String includes,
+            String excludes,
+            String encoding,
+            FileMapper[] fileMappers)
+            throws MojoExecutionException {
+        unpack(artifact, artifact.getType(), location, includes, excludes, encoding, fileMappers);
     }
 
     /**
@@ -259,107 +247,93 @@ public abstract class AbstractDependencyMojo
      *                    shall happen.
      * @throws MojoExecutionException in case of an error.
      */
-    protected void unpack( Artifact artifact, String type, File location, String includes, String excludes,
-                           String encoding, FileMapper[] fileMappers )
-        throws MojoExecutionException
-    {
+    protected void unpack(
+            Artifact artifact,
+            String type,
+            File location,
+            String includes,
+            String excludes,
+            String encoding,
+            FileMapper[] fileMappers)
+            throws MojoExecutionException {
         File file = artifact.getFile();
-        try
-        {
-            logUnpack( file, location, includes, excludes );
+        try {
+            logUnpack(file, location, includes, excludes);
 
             location.mkdirs();
-            if ( !location.exists() )
-            {
-                throw new MojoExecutionException( "Location to write unpacked files to could not be created: "
-                    + location );
+            if (!location.exists()) {
+                throw new MojoExecutionException(
+                        "Location to write unpacked files to could not be created: " + location);
             }
 
-            if ( file.isDirectory() )
-            {
+            if (file.isDirectory()) {
                 // usual case is a future jar packaging, but there are special cases: classifier and other packaging
-                throw new MojoExecutionException( "Artifact has not been packaged yet. When used on reactor artifact, "
-                    + "unpack should be executed after packaging: see MDEP-98." );
+                throw new MojoExecutionException("Artifact has not been packaged yet. When used on reactor artifact, "
+                        + "unpack should be executed after packaging: see MDEP-98.");
             }
 
             UnArchiver unArchiver;
 
-            try
-            {
-                unArchiver = archiverManager.getUnArchiver( type );
-                getLog().debug( "Found unArchiver by type: " + unArchiver );
-            }
-            catch ( NoSuchArchiverException e )
-            {
-                unArchiver = archiverManager.getUnArchiver( file );
-                getLog().debug( "Found unArchiver by extension: " + unArchiver );
+            try {
+                unArchiver = archiverManager.getUnArchiver(type);
+                getLog().debug("Found unArchiver by type: " + unArchiver);
+            } catch (NoSuchArchiverException e) {
+                unArchiver = archiverManager.getUnArchiver(file);
+                getLog().debug("Found unArchiver by extension: " + unArchiver);
             }
 
-            if ( encoding != null && unArchiver instanceof ZipUnArchiver )
-            {
-                ( (ZipUnArchiver) unArchiver ).setEncoding( encoding );
-                getLog().info( "Unpacks '" + type + "' with encoding '" + encoding + "'." );
+            if (encoding != null && unArchiver instanceof ZipUnArchiver) {
+                ((ZipUnArchiver) unArchiver).setEncoding(encoding);
+                getLog().info("Unpacks '" + type + "' with encoding '" + encoding + "'.");
             }
 
-            unArchiver.setIgnorePermissions( ignorePermissions );
+            unArchiver.setIgnorePermissions(ignorePermissions);
 
-            unArchiver.setSourceFile( file );
+            unArchiver.setSourceFile(file);
 
-            unArchiver.setDestDirectory( location );
+            unArchiver.setDestDirectory(location);
 
-            if ( StringUtils.isNotEmpty( excludes ) || StringUtils.isNotEmpty( includes ) )
-            {
+            if (StringUtils.isNotEmpty(excludes) || StringUtils.isNotEmpty(includes)) {
                 // Create the selectors that will filter
                 // based on include/exclude parameters
                 // MDEP-47
                 IncludeExcludeFileSelector[] selectors =
-                    new IncludeExcludeFileSelector[] { new IncludeExcludeFileSelector() };
+                        new IncludeExcludeFileSelector[] {new IncludeExcludeFileSelector()};
 
-                if ( StringUtils.isNotEmpty( excludes ) )
-                {
-                    selectors[0].setExcludes( excludes.split( "," ) );
+                if (StringUtils.isNotEmpty(excludes)) {
+                    selectors[0].setExcludes(excludes.split(","));
                 }
 
-                if ( StringUtils.isNotEmpty( includes ) )
-                {
-                    selectors[0].setIncludes( includes.split( "," ) );
+                if (StringUtils.isNotEmpty(includes)) {
+                    selectors[0].setIncludes(includes.split(","));
                 }
 
-                unArchiver.setFileSelectors( selectors );
+                unArchiver.setFileSelectors(selectors);
             }
-            if ( this.silent )
-            {
-                silenceUnarchiver( unArchiver );
+            if (this.silent) {
+                silenceUnarchiver(unArchiver);
             }
 
-            unArchiver.setFileMappers( fileMappers );
+            unArchiver.setFileMappers(fileMappers);
 
             unArchiver.extract();
+        } catch (NoSuchArchiverException e) {
+            throw new MojoExecutionException("Unknown archiver type", e);
+        } catch (ArchiverException e) {
+            throw new MojoExecutionException("Error unpacking file: " + file + " to: " + location, e);
         }
-        catch ( NoSuchArchiverException e )
-        {
-            throw new MojoExecutionException( "Unknown archiver type", e );
-        }
-        catch ( ArchiverException e )
-        {
-            throw new MojoExecutionException( "Error unpacking file: " + file + " to: " + location, e );
-        }
-        buildContext.refresh( location );
+        buildContext.refresh(location);
     }
 
-    private void silenceUnarchiver( UnArchiver unArchiver )
-    {
+    private void silenceUnarchiver(UnArchiver unArchiver) {
         // dangerous but handle any errors. It's the only way to silence the unArchiver.
-        try
-        {
-            Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses( "logger", unArchiver.getClass() );
+        try {
+            Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses("logger", unArchiver.getClass());
 
-            field.setAccessible( true );
+            field.setAccessible(true);
 
-            field.set( unArchiver, this.getLog() );
-        }
-        catch ( Exception e )
-        {
+            field.set(unArchiver, this.getLog());
+        } catch (Exception e) {
             // was a nice try. Don't bother logging because the log is silent.
         }
     }
@@ -368,26 +342,22 @@ public abstract class AbstractDependencyMojo
      * @return Returns a new ProjectBuildingRequest populated from the current session and the current project remote
      *         repositories, used to resolve artifacts.
      */
-    public ProjectBuildingRequest newResolveArtifactProjectBuildingRequest()
-    {
-        return newProjectBuildingRequest( remoteRepositories );
+    public ProjectBuildingRequest newResolveArtifactProjectBuildingRequest() {
+        return newProjectBuildingRequest(remoteRepositories);
     }
 
     /**
      * @return Returns a new ProjectBuildingRequest populated from the current session and the current project remote
      *         repositories, used to resolve plugins.
      */
-    protected ProjectBuildingRequest newResolvePluginProjectBuildingRequest()
-    {
-        return newProjectBuildingRequest( remotePluginRepositories );
+    protected ProjectBuildingRequest newResolvePluginProjectBuildingRequest() {
+        return newProjectBuildingRequest(remotePluginRepositories);
     }
 
-    private ProjectBuildingRequest newProjectBuildingRequest( List<ArtifactRepository> repositories )
-    {
-        ProjectBuildingRequest buildingRequest =
-            new DefaultProjectBuildingRequest( session.getProjectBuildingRequest() );
+    private ProjectBuildingRequest newProjectBuildingRequest(List<ArtifactRepository> repositories) {
+        ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest(session.getProjectBuildingRequest());
 
-        buildingRequest.setRemoteRepositories( repositories );
+        buildingRequest.setRemoteRepositories(repositories);
 
         return buildingRequest;
     }
@@ -395,42 +365,36 @@ public abstract class AbstractDependencyMojo
     /**
      * @return Returns the project.
      */
-    public MavenProject getProject()
-    {
+    public MavenProject getProject() {
         return this.project;
     }
 
     /**
      * @param archiverManager The archiverManager to set.
      */
-    public void setArchiverManager( ArchiverManager archiverManager )
-    {
+    public void setArchiverManager(ArchiverManager archiverManager) {
         this.archiverManager = archiverManager;
     }
 
     /**
      * @return {@link #useJvmChmod}
      */
-    public boolean isUseJvmChmod()
-    {
+    public boolean isUseJvmChmod() {
         return useJvmChmod;
     }
 
     /**
      * @param useJvmChmod {@link #useJvmChmod}
      */
-    public void setUseJvmChmod( boolean useJvmChmod )
-    {
+    public void setUseJvmChmod(boolean useJvmChmod) {
         this.useJvmChmod = useJvmChmod;
     }
 
     /**
      * @return {@link #skip}
      */
-    public boolean isSkip()
-    {
-        if ( skipDuringIncrementalBuild && buildContext.isIncremental() )
-        {
+    public boolean isSkip() {
+        if (skipDuringIncrementalBuild && buildContext.isIncremental()) {
             return true;
         }
         return skip;
@@ -439,65 +403,54 @@ public abstract class AbstractDependencyMojo
     /**
      * @param skip {@link #skip}
      */
-    public void setSkip( boolean skip )
-    {
+    public void setSkip(boolean skip) {
         this.skip = skip;
     }
 
     /**
      * @return {@link #silent}
      */
-    protected final boolean isSilent()
-    {
+    protected final boolean isSilent() {
         return silent;
     }
 
     /**
      * @param silent {@link #silent}
      */
-    public void setSilent( boolean silent )
-    {
+    public void setSilent(boolean silent) {
         this.silent = silent;
-        if ( silent )
-        {
-            setLog( new DependencySilentLog() );
+        if (silent) {
+            setLog(new DependencySilentLog());
         }
     }
 
-    private void logUnpack( File file, File location, String includes, String excludes )
-    {
-        if ( !getLog().isInfoEnabled() )
-        {
+    private void logUnpack(File file, File location, String includes, String excludes) {
+        if (!getLog().isInfoEnabled()) {
             return;
         }
 
         StringBuilder msg = new StringBuilder();
-        msg.append( "Unpacking " );
-        msg.append( file );
-        msg.append( " to " );
-        msg.append( location );
-
-        if ( includes != null && excludes != null )
-        {
-            msg.append( " with includes \"" );
-            msg.append( includes );
-            msg.append( "\" and excludes \"" );
-            msg.append( excludes );
-            msg.append( "\"" );
-        }
-        else if ( includes != null )
-        {
-            msg.append( " with includes \"" );
-            msg.append( includes );
-            msg.append( "\"" );
-        }
-        else if ( excludes != null )
-        {
-            msg.append( " with excludes \"" );
-            msg.append( excludes );
-            msg.append( "\"" );
+        msg.append("Unpacking ");
+        msg.append(file);
+        msg.append(" to ");
+        msg.append(location);
+
+        if (includes != null && excludes != null) {
+            msg.append(" with includes \"");
+            msg.append(includes);
+            msg.append("\" and excludes \"");
+            msg.append(excludes);
+            msg.append("\"");
+        } else if (includes != null) {
+            msg.append(" with includes \"");
+            msg.append(includes);
+            msg.append("\"");
+        } else if (excludes != null) {
+            msg.append(" with excludes \"");
+            msg.append(excludes);
+            msg.append("\"");
         }
 
-        getLog().info( msg.toString() );
+        getLog().info(msg.toString());
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java b/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java
index 4c2ea9ea..e85c0388 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,7 +16,11 @@ package org.apache.maven.plugins.dependency;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -28,10 +30,6 @@ import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
 /**
  * Displays all ancestor POMs of the project. This may be useful in a continuous integration system where you want to
  * know all parent poms of the project.
@@ -39,50 +37,43 @@ import java.util.Locale;
  * @author Mirko Friedenhagen
  * @since 2.9
  */
-@Mojo( name = "display-ancestors", threadSafe = true, requiresProject = true, defaultPhase = LifecyclePhase.VALIDATE )
-public class DisplayAncestorsMojo
-    extends AbstractMojo
-{
+@Mojo(name = "display-ancestors", threadSafe = true, requiresProject = true, defaultPhase = LifecyclePhase.VALIDATE)
+public class DisplayAncestorsMojo extends AbstractMojo {
 
     /**
      * POM
      */
-    @Parameter( defaultValue = "${project}", readonly = true )
+    @Parameter(defaultValue = "${project}", readonly = true)
     private MavenProject project;
 
     @Override
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
+    public void execute() throws MojoExecutionException, MojoFailureException {
         final List<String> ancestors = collectAncestors();
 
-        if ( ancestors.isEmpty() )
-        {
-            getLog().info( "No Ancestor POMs!" );
+        if (ancestors.isEmpty()) {
+            getLog().info("No Ancestor POMs!");
+        } else {
+            getLog().info(String.format(Locale.US, "Ancestor POMs: %s", StringUtils.join(ancestors, " <- ")));
         }
-        else
-        {
-            getLog().info( String.format( Locale.US, "Ancestor POMs: %s", StringUtils.join( ancestors, " <- " ) ) );
-        }
-
     }
 
-    private ArrayList<String> collectAncestors()
-    {
+    private ArrayList<String> collectAncestors() {
         final ArrayList<String> ancestors = new ArrayList<>();
 
         MavenProject currentAncestor = project.getParent();
-        while ( currentAncestor != null )
-        {
-            final String gav = String.format( Locale.US, "%s:%s:%s", currentAncestor.getGroupId(),
-                                              currentAncestor.getArtifactId(), currentAncestor.getVersion() );
+        while (currentAncestor != null) {
+            final String gav = String.format(
+                    Locale.US,
+                    "%s:%s:%s",
+                    currentAncestor.getGroupId(),
+                    currentAncestor.getArtifactId(),
+                    currentAncestor.getVersion());
 
-            ancestors.add( gav );
+            ancestors.add(gav);
 
             currentAncestor = currentAncestor.getParent();
         }
 
         return ancestors;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java b/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
index 9ddbff35..283c753c 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,13 +16,13 @@ package org.apache.maven.plugins.dependency;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -56,13 +54,11 @@ import org.codehaus.plexus.util.StringUtils;
  * Resolves a single artifact, eventually transitively, from the specified remote repositories. Caveat: will always
  * check the central repository defined in the super pom. You could use a mirror entry in your <code>settings.xml</code>
  */
-@Mojo( name = "get", requiresProject = false, threadSafe = true )
-public class GetMojo
-    extends AbstractMojo
-{
-    private static final Pattern ALT_REPO_SYNTAX_PATTERN = Pattern.compile( "(.+)::(.*)::(.+)" );
+@Mojo(name = "get", requiresProject = false, threadSafe = true)
+public class GetMojo extends AbstractMojo {
+    private static final Pattern ALT_REPO_SYNTAX_PATTERN = Pattern.compile("(.+)::(.*)::(.+)");
 
-    @Parameter( defaultValue = "${session}", required = true, readonly = true )
+    @Parameter(defaultValue = "${session}", required = true, readonly = true)
     private MavenSession session;
 
     @Component
@@ -77,7 +73,7 @@ public class GetMojo
     /**
      * Map that contains the layouts.
      */
-    @Component( role = ArtifactRepositoryLayout.class )
+    @Component(role = ArtifactRepositoryLayout.class)
     private Map<String, ArtifactRepositoryLayout> repositoryLayouts;
 
     /**
@@ -91,19 +87,19 @@ public class GetMojo
     /**
      * The groupId of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "groupId" )
+    @Parameter(property = "groupId")
     private String groupId;
 
     /**
      * The artifactId of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "artifactId" )
+    @Parameter(property = "artifactId")
     private String artifactId;
 
     /**
      * The version of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "version" )
+    @Parameter(property = "version")
     private String version;
 
     /**
@@ -111,38 +107,38 @@ public class GetMojo
      *
      * @since 2.3
      */
-    @Parameter( property = "classifier" )
+    @Parameter(property = "classifier")
     private String classifier;
 
     /**
      * The packaging of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "packaging", defaultValue = "jar" )
+    @Parameter(property = "packaging", defaultValue = "jar")
     private String packaging = "jar";
 
     /**
      * Repositories in the format id::[layout]::url or just url, separated by comma. ie.
      * central::default::https://repo.maven.apache.org/maven2,myrepo::::https://repo.acme.com,https://repo.acme2.com
      */
-    @Parameter( property = "remoteRepositories" )
+    @Parameter(property = "remoteRepositories")
     private String remoteRepositories;
 
     /**
      * A string of the form groupId:artifactId:version[:packaging[:classifier]].
      */
-    @Parameter( property = "artifact" )
+    @Parameter(property = "artifact")
     private String artifact;
 
     /**
      *
      */
-    @Parameter( defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true)
     private List<ArtifactRepository> pomRemoteRepositories;
 
     /**
      * Download transitively, retrieving the specified artifact and all of its dependencies.
      */
-    @Parameter( property = "transitive", defaultValue = "true" )
+    @Parameter(property = "transitive", defaultValue = "true")
     private boolean transitive = true;
 
     /**
@@ -150,143 +146,118 @@ public class GetMojo
      *
      * @since 2.7
      */
-    @Parameter( property = "mdep.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.skip", defaultValue = "false")
     private boolean skip;
 
     @Override
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-        if ( isSkip() )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        if (isSkip()) {
+            getLog().info("Skipping plugin execution");
             return;
         }
 
-        if ( coordinate.getArtifactId() == null && artifact == null )
-        {
-            throw new MojoFailureException( "You must specify an artifact, "
-                + "e.g. -Dartifact=org.apache.maven.plugins:maven-downloader-plugin:1.0" );
+        if (coordinate.getArtifactId() == null && artifact == null) {
+            throw new MojoFailureException("You must specify an artifact, "
+                    + "e.g. -Dartifact=org.apache.maven.plugins:maven-downloader-plugin:1.0");
         }
-        if ( artifact != null )
-        {
-            String[] tokens = StringUtils.split( artifact, ":" );
-            if ( tokens.length < 3 || tokens.length > 5 )
-            {
-                throw new MojoFailureException( "Invalid artifact, you must specify "
-                    + "groupId:artifactId:version[:packaging[:classifier]] " + artifact );
+        if (artifact != null) {
+            String[] tokens = StringUtils.split(artifact, ":");
+            if (tokens.length < 3 || tokens.length > 5) {
+                throw new MojoFailureException("Invalid artifact, you must specify "
+                        + "groupId:artifactId:version[:packaging[:classifier]] " + artifact);
             }
-            coordinate.setGroupId( tokens[0] );
-            coordinate.setArtifactId( tokens[1] );
-            coordinate.setVersion( tokens[2] );
-            if ( tokens.length >= 4 )
-            {
-                coordinate.setType( tokens[3] );
+            coordinate.setGroupId(tokens[0]);
+            coordinate.setArtifactId(tokens[1]);
+            coordinate.setVersion(tokens[2]);
+            if (tokens.length >= 4) {
+                coordinate.setType(tokens[3]);
             }
-            if ( tokens.length == 5 )
-            {
-                coordinate.setClassifier( tokens[4] );
+            if (tokens.length == 5) {
+                coordinate.setClassifier(tokens[4]);
             }
         }
 
-        ArtifactRepositoryPolicy always =
-            new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
-                                          ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );
+        ArtifactRepositoryPolicy always = new ArtifactRepositoryPolicy(
+                true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN);
 
         List<ArtifactRepository> repoList = new ArrayList<>();
 
-        if ( pomRemoteRepositories != null )
-        {
-            repoList.addAll( pomRemoteRepositories );
+        if (pomRemoteRepositories != null) {
+            repoList.addAll(pomRemoteRepositories);
         }
 
-        if ( remoteRepositories != null )
-        {
+        if (remoteRepositories != null) {
             // Use the same format as in the deploy plugin id::layout::url
-            String[] repos = StringUtils.split( remoteRepositories, "," );
-            for ( String repo : repos )
-            {
-                repoList.add( parseRepository( repo, always ) );
+            String[] repos = StringUtils.split(remoteRepositories, ",");
+            for (String repo : repos) {
+                repoList.add(parseRepository(repo, always));
             }
         }
 
-        try
-        {
+        try {
             ProjectBuildingRequest buildingRequest =
-                new DefaultProjectBuildingRequest( session.getProjectBuildingRequest() );
+                    new DefaultProjectBuildingRequest(session.getProjectBuildingRequest());
 
             Settings settings = session.getSettings();
-            repositorySystem.injectMirror( repoList, settings.getMirrors() );
-            repositorySystem.injectProxy( repoList, settings.getProxies() );
-            repositorySystem.injectAuthentication( repoList, settings.getServers() );
-
-            buildingRequest.setRemoteRepositories( repoList );
-
-            if ( transitive )
-            {
-                getLog().info( "Resolving " + coordinate + " with transitive dependencies" );
-                dependencyResolver.resolveDependencies( buildingRequest, coordinate, null );
-            }
-            else
-            {
-                getLog().info( "Resolving " + coordinate );
-                artifactResolver.resolveArtifact( buildingRequest, toArtifactCoordinate( coordinate ) );
+            repositorySystem.injectMirror(repoList, settings.getMirrors());
+            repositorySystem.injectProxy(repoList, settings.getProxies());
+            repositorySystem.injectAuthentication(repoList, settings.getServers());
+
+            buildingRequest.setRemoteRepositories(repoList);
+
+            if (transitive) {
+                getLog().info("Resolving " + coordinate + " with transitive dependencies");
+                dependencyResolver.resolveDependencies(buildingRequest, coordinate, null);
+            } else {
+                getLog().info("Resolving " + coordinate);
+                artifactResolver.resolveArtifact(buildingRequest, toArtifactCoordinate(coordinate));
             }
-        }
-        catch ( ArtifactResolverException | DependencyResolverException e )
-        {
-            throw new MojoExecutionException( "Couldn't download artifact: " + e.getMessage(), e );
+        } catch (ArtifactResolverException | DependencyResolverException e) {
+            throw new MojoExecutionException("Couldn't download artifact: " + e.getMessage(), e);
         }
     }
 
-    private ArtifactCoordinate toArtifactCoordinate( DependableCoordinate dependableCoordinate )
-    {
-        ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler( dependableCoordinate.getType() );
+    private ArtifactCoordinate toArtifactCoordinate(DependableCoordinate dependableCoordinate) {
+        ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler(dependableCoordinate.getType());
         DefaultArtifactCoordinate artifactCoordinate = new DefaultArtifactCoordinate();
-        artifactCoordinate.setGroupId( dependableCoordinate.getGroupId() );
-        artifactCoordinate.setArtifactId( dependableCoordinate.getArtifactId() );
-        artifactCoordinate.setVersion( dependableCoordinate.getVersion() );
-        artifactCoordinate.setClassifier( dependableCoordinate.getClassifier() );
-        artifactCoordinate.setExtension( artifactHandler.getExtension() );
+        artifactCoordinate.setGroupId(dependableCoordinate.getGroupId());
+        artifactCoordinate.setArtifactId(dependableCoordinate.getArtifactId());
+        artifactCoordinate.setVersion(dependableCoordinate.getVersion());
+        artifactCoordinate.setClassifier(dependableCoordinate.getClassifier());
+        artifactCoordinate.setExtension(artifactHandler.getExtension());
         return artifactCoordinate;
     }
 
-    ArtifactRepository parseRepository( String repo, ArtifactRepositoryPolicy policy )
-        throws MojoFailureException
-    {
+    ArtifactRepository parseRepository(String repo, ArtifactRepositoryPolicy policy) throws MojoFailureException {
         // if it's a simple url
         String id = "temp";
-        ArtifactRepositoryLayout layout = getLayout( "default" );
+        ArtifactRepositoryLayout layout = getLayout("default");
         String url = repo;
 
         // if it's an extended repo URL of the form id::layout::url
-        if ( repo.contains( "::" ) )
-        {
-            Matcher matcher = ALT_REPO_SYNTAX_PATTERN.matcher( repo );
-            if ( !matcher.matches() )
-            {
-                throw new MojoFailureException( repo, "Invalid syntax for repository: " + repo,
-                                                "Invalid syntax for repository. Use \"id::layout::url\" or \"URL\"." );
+        if (repo.contains("::")) {
+            Matcher matcher = ALT_REPO_SYNTAX_PATTERN.matcher(repo);
+            if (!matcher.matches()) {
+                throw new MojoFailureException(
+                        repo,
+                        "Invalid syntax for repository: " + repo,
+                        "Invalid syntax for repository. Use \"id::layout::url\" or \"URL\".");
             }
 
-            id = matcher.group( 1 ).trim();
-            if ( !StringUtils.isEmpty( matcher.group( 2 ) ) )
-            {
-                layout = getLayout( matcher.group( 2 ).trim() );
+            id = matcher.group(1).trim();
+            if (!StringUtils.isEmpty(matcher.group(2))) {
+                layout = getLayout(matcher.group(2).trim());
             }
-            url = matcher.group( 3 ).trim();
+            url = matcher.group(3).trim();
         }
-        return new MavenArtifactRepository( id, url, layout, policy, policy );
+        return new MavenArtifactRepository(id, url, layout, policy, policy);
     }
 
-    private ArtifactRepositoryLayout getLayout( String id )
-        throws MojoFailureException
-    {
-        ArtifactRepositoryLayout layout = repositoryLayouts.get( id );
+    private ArtifactRepositoryLayout getLayout(String id) throws MojoFailureException {
+        ArtifactRepositoryLayout layout = repositoryLayouts.get(id);
 
-        if ( layout == null )
-        {
-            throw new MojoFailureException( id, "Invalid repository layout", "Invalid repository layout: " + id );
+        if (layout == null) {
+            throw new MojoFailureException(id, "Invalid repository layout", "Invalid repository layout: " + id);
         }
 
         return layout;
@@ -295,49 +266,42 @@ public class GetMojo
     /**
      * @return {@link #skip}
      */
-    protected boolean isSkip()
-    {
+    protected boolean isSkip() {
         return skip;
     }
 
     /**
      * @param groupId The groupId.
      */
-    public void setGroupId( String groupId )
-    {
-        this.coordinate.setGroupId( groupId );
+    public void setGroupId(String groupId) {
+        this.coordinate.setGroupId(groupId);
     }
 
     /**
      * @param artifactId The artifactId.
      */
-    public void setArtifactId( String artifactId )
-    {
-        this.coordinate.setArtifactId( artifactId );
+    public void setArtifactId(String artifactId) {
+        this.coordinate.setArtifactId(artifactId);
     }
 
     /**
      * @param version The version.
      */
-    public void setVersion( String version )
-    {
-        this.coordinate.setVersion( version );
+    public void setVersion(String version) {
+        this.coordinate.setVersion(version);
     }
 
     /**
      * @param classifier The classifier to be used.
      */
-    public void setClassifier( String classifier )
-    {
-        this.coordinate.setClassifier( classifier );
+    public void setClassifier(String classifier) {
+        this.coordinate.setClassifier(classifier);
     }
 
     /**
      * @param type packaging.
      */
-    public void setPackaging( String type )
-    {
-        this.coordinate.setType( type );
+    public void setPackaging(String type) {
+        this.coordinate.setType(type);
     }
-
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/ListClassesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/ListClassesMojo.java
index 250806c4..18b11b0d 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/ListClassesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/ListClassesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -28,7 +27,6 @@ import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -56,17 +54,14 @@ import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
 import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver;
 import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolverException;
 
-
 /**
  * Retrieves and lists all classes contained in the specified artifact from the specified remote repositories.
  */
-@Mojo( name = "list-classes", requiresProject = false, threadSafe = true )
-public class ListClassesMojo
-    extends AbstractMojo
-{
-    private static final Pattern ALT_REPO_SYNTAX_PATTERN = Pattern.compile( "(.+)::(.*)::(.+)" );
+@Mojo(name = "list-classes", requiresProject = false, threadSafe = true)
+public class ListClassesMojo extends AbstractMojo {
+    private static final Pattern ALT_REPO_SYNTAX_PATTERN = Pattern.compile("(.+)::(.*)::(.+)");
 
-    @Parameter( defaultValue = "${session}", required = true, readonly = true )
+    @Parameter(defaultValue = "${session}", required = true, readonly = true)
     private MavenSession session;
 
     @Component
@@ -81,7 +76,7 @@ public class ListClassesMojo
     /**
      * Map that contains the layouts.
      */
-    @Component( role = ArtifactRepositoryLayout.class )
+    @Component(role = ArtifactRepositoryLayout.class)
     private Map<String, ArtifactRepositoryLayout> repositoryLayouts;
 
     /**
@@ -95,19 +90,19 @@ public class ListClassesMojo
     /**
      * The group ID of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "groupId" )
+    @Parameter(property = "groupId")
     private String groupId;
 
     /**
      * The artifact ID of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "artifactId" )
+    @Parameter(property = "artifactId")
     private String artifactId;
 
     /**
      * The version of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "version" )
+    @Parameter(property = "version")
     private String version;
 
     /**
@@ -115,209 +110,179 @@ public class ListClassesMojo
      *
      * @since 2.3
      */
-    @Parameter( property = "classifier" )
+    @Parameter(property = "classifier")
     private String classifier;
 
     /**
      * The packaging of the artifact to download. Ignored if {@link #artifact} is used.
      */
-    @Parameter( property = "packaging", defaultValue = "jar" )
+    @Parameter(property = "packaging", defaultValue = "jar")
     private String packaging = "jar";
 
     /**
      * Repositories in the format id::[layout]::url or just URLs, separated by comma. That is,
      * central::default::https://repo.maven.apache.org/maven2,myrepo::::https://repo.acme.com,https://repo.acme2.com
      */
-    @Parameter( property = "remoteRepositories" )
+    @Parameter(property = "remoteRepositories")
     private String remoteRepositories;
 
     /**
      * A string of the form groupId:artifactId:version[:packaging[:classifier]].
      */
-    @Parameter( property = "artifact" )
+    @Parameter(property = "artifact")
     private String artifact;
 
-    @Parameter( defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project.remoteArtifactRepositories}", readonly = true, required = true)
     private List<ArtifactRepository> pomRemoteRepositories;
 
     /**
      * Download transitively, retrieving the specified artifact and all of its dependencies.
      */
-    @Parameter( property = "transitive", defaultValue = "false" )
+    @Parameter(property = "transitive", defaultValue = "false")
     private boolean transitive = false;
 
     /**
      * Skip plugin execution completely.
      */
-    @Parameter( property = "mdep.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.skip", defaultValue = "false")
     private boolean skip;
 
     @Override
-    public void execute() throws MojoExecutionException, MojoFailureException
-    {
+    public void execute() throws MojoExecutionException, MojoFailureException {
         ProjectBuildingRequest buildingRequest = makeBuildingRequest();
 
-        try
-        {
-            if ( transitive )
-            {
-                Iterable<ArtifactResult> artifacts = dependencyResolver
-                        .resolveDependencies( buildingRequest, coordinate, null );
+        try {
+            if (transitive) {
+                Iterable<ArtifactResult> artifacts =
+                        dependencyResolver.resolveDependencies(buildingRequest, coordinate, null);
 
-                for ( ArtifactResult result : artifacts )
-                {
-                    printClassesFromArtifactResult( result );
+                for (ArtifactResult result : artifacts) {
+                    printClassesFromArtifactResult(result);
                 }
-            }
-            else
-            {
-                ArtifactResult result = artifactResolver
-                        .resolveArtifact( buildingRequest, toArtifactCoordinate( coordinate ) );
+            } else {
+                ArtifactResult result =
+                        artifactResolver.resolveArtifact(buildingRequest, toArtifactCoordinate(coordinate));
 
-                printClassesFromArtifactResult( result );
+                printClassesFromArtifactResult(result);
             }
-        }
-        catch ( ArtifactResolverException | DependencyResolverException | IOException e )
-        {
-            throw new MojoExecutionException( "Couldn't download artifact: " + e.getMessage(), e );
+        } catch (ArtifactResolverException | DependencyResolverException | IOException e) {
+            throw new MojoExecutionException("Couldn't download artifact: " + e.getMessage(), e);
         }
     }
 
-    private void printClassesFromArtifactResult( ArtifactResult result )
-            throws IOException
-    {
+    private void printClassesFromArtifactResult(ArtifactResult result) throws IOException {
         // open jar file in try-with-resources statement to guarantee the file closes after use regardless of errors
-        try ( JarFile jarFile = new JarFile( result.getArtifact().getFile() ) )
-        {
+        try (JarFile jarFile = new JarFile(result.getArtifact().getFile())) {
             Enumeration<JarEntry> entries = jarFile.entries();
 
-            while ( entries.hasMoreElements() )
-            {
+            while (entries.hasMoreElements()) {
                 JarEntry entry = entries.nextElement();
                 String entryName = entry.getName();
 
                 // filter out files that do not end in .class
-                if ( !entryName.endsWith( ".class" ) )
-                {
+                if (!entryName.endsWith(".class")) {
                     continue;
                 }
 
                 // remove .class from the end and change format to use periods instead of forward slashes
-                String className = entryName.substring( 0, entryName.length() - 6 ).replace( '/', '.' );
-                getLog().info( className );
+                String className =
+                        entryName.substring(0, entryName.length() - 6).replace('/', '.');
+                getLog().info(className);
             }
         }
     }
 
-    private ProjectBuildingRequest makeBuildingRequest()
-            throws MojoExecutionException, MojoFailureException
-    {
-        if ( artifact == null )
-        {
-            throw new MojoFailureException( "You must specify an artifact, "
-                    + "e.g. -Dartifact=org.apache.maven.plugins:maven-downloader-plugin:1.0" );
+    private ProjectBuildingRequest makeBuildingRequest() throws MojoExecutionException, MojoFailureException {
+        if (artifact == null) {
+            throw new MojoFailureException("You must specify an artifact, "
+                    + "e.g. -Dartifact=org.apache.maven.plugins:maven-downloader-plugin:1.0");
         }
 
-        String[] tokens = artifact.split( ":" );
-        if ( tokens.length < 3 || tokens.length > 5 )
-        {
-            throw new MojoFailureException( "Invalid artifact, you must specify "
-                    + "groupId:artifactId:version[:packaging[:classifier]] " + artifact );
+        String[] tokens = artifact.split(":");
+        if (tokens.length < 3 || tokens.length > 5) {
+            throw new MojoFailureException("Invalid artifact, you must specify "
+                    + "groupId:artifactId:version[:packaging[:classifier]] " + artifact);
         }
-        coordinate.setGroupId( tokens[0] );
-        coordinate.setArtifactId( tokens[1] );
-        coordinate.setVersion( tokens[2] );
-        if ( tokens.length >= 4 )
-        {
-            coordinate.setType( tokens[3] );
+        coordinate.setGroupId(tokens[0]);
+        coordinate.setArtifactId(tokens[1]);
+        coordinate.setVersion(tokens[2]);
+        if (tokens.length >= 4) {
+            coordinate.setType(tokens[3]);
         }
-        if ( tokens.length == 5 )
-        {
-            coordinate.setClassifier( tokens[4] );
+        if (tokens.length == 5) {
+            coordinate.setClassifier(tokens[4]);
         }
 
-
-        ArtifactRepositoryPolicy always =
-                new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS,
-                        ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN );
+        ArtifactRepositoryPolicy always = new ArtifactRepositoryPolicy(
+                true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN);
 
         List<ArtifactRepository> repoList = new ArrayList<>();
 
-        if ( pomRemoteRepositories != null )
-        {
-            repoList.addAll( pomRemoteRepositories );
+        if (pomRemoteRepositories != null) {
+            repoList.addAll(pomRemoteRepositories);
         }
 
-        if ( remoteRepositories != null )
-        {
+        if (remoteRepositories != null) {
             // Use the same format as in the deploy plugin id::layout::url
-            String[] repos = remoteRepositories.split( "," );
-            for ( String repo : repos )
-            {
-                repoList.add( parseRepository( repo, always ) );
+            String[] repos = remoteRepositories.split(",");
+            for (String repo : repos) {
+                repoList.add(parseRepository(repo, always));
             }
         }
 
-        ProjectBuildingRequest buildingRequest =
-                new DefaultProjectBuildingRequest( session.getProjectBuildingRequest() );
+        ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest(session.getProjectBuildingRequest());
 
         Settings settings = session.getSettings();
-        repositorySystem.injectMirror( repoList, settings.getMirrors() );
-        repositorySystem.injectProxy( repoList, settings.getProxies() );
-        repositorySystem.injectAuthentication( repoList, settings.getServers() );
+        repositorySystem.injectMirror(repoList, settings.getMirrors());
+        repositorySystem.injectProxy(repoList, settings.getProxies());
+        repositorySystem.injectAuthentication(repoList, settings.getServers());
 
-        buildingRequest.setRemoteRepositories( repoList );
+        buildingRequest.setRemoteRepositories(repoList);
 
         return buildingRequest;
     }
 
-    private ArtifactCoordinate toArtifactCoordinate( DependableCoordinate dependableCoordinate )
-    {
-        ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler( dependableCoordinate.getType() );
+    private ArtifactCoordinate toArtifactCoordinate(DependableCoordinate dependableCoordinate) {
+        ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler(dependableCoordinate.getType());
         DefaultArtifactCoordinate artifactCoordinate = new DefaultArtifactCoordinate();
-        artifactCoordinate.setGroupId( dependableCoordinate.getGroupId() );
-        artifactCoordinate.setArtifactId( dependableCoordinate.getArtifactId() );
-        artifactCoordinate.setVersion( dependableCoordinate.getVersion() );
-        artifactCoordinate.setClassifier( dependableCoordinate.getClassifier() );
-        artifactCoordinate.setExtension( artifactHandler.getExtension() );
+        artifactCoordinate.setGroupId(dependableCoordinate.getGroupId());
+        artifactCoordinate.setArtifactId(dependableCoordinate.getArtifactId());
+        artifactCoordinate.setVersion(dependableCoordinate.getVersion());
+        artifactCoordinate.setClassifier(dependableCoordinate.getClassifier());
+        artifactCoordinate.setExtension(artifactHandler.getExtension());
         return artifactCoordinate;
     }
 
-    protected ArtifactRepository parseRepository( String repo, ArtifactRepositoryPolicy policy )
-            throws MojoFailureException
-    {
+    protected ArtifactRepository parseRepository(String repo, ArtifactRepositoryPolicy policy)
+            throws MojoFailureException {
         // if it's a simple url
         String id = "temp";
-        ArtifactRepositoryLayout layout = getLayout( "default" );
+        ArtifactRepositoryLayout layout = getLayout("default");
 
         // if it's an extended repo URL of the form id::layout::url
-        if ( repo.contains( "::" ) )
-        {
-            Matcher matcher = ALT_REPO_SYNTAX_PATTERN.matcher( repo );
-            if ( !matcher.matches() )
-            {
-                throw new MojoFailureException( repo, "Invalid syntax for repository: " + repo,
-                        "Invalid syntax for repository. Use \"id::layout::url\" or \"URL\"." );
+        if (repo.contains("::")) {
+            Matcher matcher = ALT_REPO_SYNTAX_PATTERN.matcher(repo);
+            if (!matcher.matches()) {
+                throw new MojoFailureException(
+                        repo,
+                        "Invalid syntax for repository: " + repo,
+                        "Invalid syntax for repository. Use \"id::layout::url\" or \"URL\".");
             }
 
-            id = matcher.group( 1 ).trim();
-            if ( !( matcher.group( 2 ) == null || matcher.group( 2 ).trim().isEmpty() ) )
-            {
-                layout = getLayout( matcher.group( 2 ).trim() );
+            id = matcher.group(1).trim();
+            if (!(matcher.group(2) == null || matcher.group(2).trim().isEmpty())) {
+                layout = getLayout(matcher.group(2).trim());
             }
-            repo = matcher.group( 3 ).trim();
+            repo = matcher.group(3).trim();
         }
-        return new MavenArtifactRepository( id, repo, layout, policy, policy );
+        return new MavenArtifactRepository(id, repo, layout, policy, policy);
     }
 
-    private ArtifactRepositoryLayout getLayout( String id )
-            throws MojoFailureException
-    {
-        ArtifactRepositoryLayout layout = repositoryLayouts.get( id );
+    private ArtifactRepositoryLayout getLayout(String id) throws MojoFailureException {
+        ArtifactRepositoryLayout layout = repositoryLayouts.get(id);
 
-        if ( layout == null )
-        {
-            throw new MojoFailureException( id, "Invalid repository layout", "Invalid repository layout: " + id );
+        if (layout == null) {
+            throw new MojoFailureException(id, "Invalid repository layout", "Invalid repository layout: " + id);
         }
 
         return layout;
diff --git a/src/main/java/org/apache/maven/plugins/dependency/PropertiesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/PropertiesMojo.java
index 2961599d..54c0eeee 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/PropertiesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/PropertiesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,9 +16,9 @@ package org.apache.maven.plugins.dependency;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency;
 
 import java.util.Set;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -38,17 +36,19 @@ import org.apache.maven.project.MavenProject;
  * @author Paul Gier
  * @since 2.2
  */
-//CHECKSTYLE_OFF: LineLength
-@Mojo( name = "properties", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INITIALIZE, threadSafe = true )
-//CHECKSTYLE_ON: LineLength
-public class PropertiesMojo
-    extends AbstractMojo
-{
+// CHECKSTYLE_OFF: LineLength
+@Mojo(
+        name = "properties",
+        requiresDependencyResolution = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.INITIALIZE,
+        threadSafe = true)
+// CHECKSTYLE_ON: LineLength
+public class PropertiesMojo extends AbstractMojo {
 
     /**
      * The current Maven project
      */
-    @Parameter( defaultValue = "${project}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project}", readonly = true, required = true)
     private MavenProject project;
 
     /**
@@ -56,7 +56,7 @@ public class PropertiesMojo
      *
      * @since 2.7
      */
-    @Parameter( property = "mdep.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.skip", defaultValue = "false")
     private boolean skip;
 
     /**
@@ -65,29 +65,26 @@ public class PropertiesMojo
      * @throws MojoExecutionException with a message if an error occurs.
      */
     @Override
-    public void execute()
-        throws MojoExecutionException
-    {
-        if ( isSkip() )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public void execute() throws MojoExecutionException {
+        if (isSkip()) {
+            getLog().info("Skipping plugin execution");
             return;
         }
 
         Set<Artifact> artifacts = project.getArtifacts();
 
-        for ( Artifact artifact : artifacts )
-        {
-            project.getProperties().setProperty( artifact.getDependencyConflictId(),
-                                                 artifact.getFile().getAbsolutePath() );
+        for (Artifact artifact : artifacts) {
+            project.getProperties()
+                    .setProperty(
+                            artifact.getDependencyConflictId(),
+                            artifact.getFile().getAbsolutePath());
         }
     }
 
     /**
      * @return {@link #skip}
      */
-    public boolean isSkip()
-    {
+    public boolean isSkip() {
         return skip;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java b/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
index d76f0691..01be0639 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency;
 
 import java.io.File;
 import java.io.IOException;
@@ -27,7 +26,6 @@ import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
@@ -72,10 +70,8 @@ import org.codehaus.plexus.util.StringUtils;
  * @author jdcasey
  * @since 2.0
  */
-@Mojo( name = "purge-local-repository", threadSafe = true, requiresProject = false )
-public class PurgeLocalRepositoryMojo
-    extends AbstractMojo
-{
+@Mojo(name = "purge-local-repository", threadSafe = true, requiresProject = false)
+public class PurgeLocalRepositoryMojo extends AbstractMojo {
 
     private static final String VERSION_FUZZINESS = "version";
 
@@ -86,22 +82,22 @@ public class PurgeLocalRepositoryMojo
     /**
      * The Maven projects in the reactor.
      */
-    @Parameter( defaultValue = "${reactorProjects}", readonly = true, required = true )
+    @Parameter(defaultValue = "${reactorProjects}", readonly = true, required = true)
     private List<MavenProject> reactorProjects;
 
     /**
      * The current Maven project.
      */
-    @Parameter( defaultValue = "${project}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project}", readonly = true, required = true)
     private MavenProject project;
 
-    @Parameter( defaultValue = "${session}", readonly = true, required = true )
+    @Parameter(defaultValue = "${session}", readonly = true, required = true)
     private MavenSession session;
 
     /**
      * This mojo execution, used to determine if it was launched from the lifecycle or the command-line.
      */
-    @Parameter( defaultValue = "${mojo}", required = true, readonly = true )
+    @Parameter(defaultValue = "${mojo}", required = true, readonly = true)
     private MojoExecution mojoExecution;
 
     /**
@@ -128,7 +124,7 @@ public class PurgeLocalRepositoryMojo
      *
      * @since 2.6
      */
-    @Parameter( property = "manualInclude" )
+    @Parameter(property = "manualInclude")
     private String manualInclude;
 
     /**
@@ -146,7 +142,7 @@ public class PurgeLocalRepositoryMojo
      *
      * @since 2.6
      */
-    @Parameter( property = "include" )
+    @Parameter(property = "include")
     private String include;
 
     /**
@@ -160,20 +156,20 @@ public class PurgeLocalRepositoryMojo
      * deletion/refresh. This is a command-line alternative to the <code>excludes</code> parameter, since List
      * parameters are not currently compatible with CLI specification.
      */
-    @Parameter( property = "exclude" )
+    @Parameter(property = "exclude")
     private String exclude;
 
     /**
      * Whether to re-resolve the artifacts once they have been deleted from the local repository. If you are running
      * this mojo from the command-line, you may want to disable this. By default, artifacts will be re-resolved.
      */
-    @Parameter( property = "reResolve", defaultValue = "true" )
+    @Parameter(property = "reResolve", defaultValue = "true")
     private boolean reResolve;
 
     /**
      * The local repository, from which to delete artifacts.
      */
-    @Parameter( defaultValue = "${localRepository}", readonly = true, required = true )
+    @Parameter(defaultValue = "${localRepository}", readonly = true, required = true)
     private ArtifactRepository localRepository;
 
     /**
@@ -197,19 +193,19 @@ public class PurgeLocalRepositoryMojo
      * <li><b>groupId</b> - Eliminate all files associated with the artifact's groupId.</li>
      * </ul>
      */
-    @Parameter( property = "resolutionFuzziness", defaultValue = "version" )
+    @Parameter(property = "resolutionFuzziness", defaultValue = "version")
     private String resolutionFuzziness;
 
     /**
      * Whether this mojo should act on all transitive dependencies. Default value is true.
      */
-    @Parameter( property = "actTransitively", defaultValue = "true" )
+    @Parameter(property = "actTransitively", defaultValue = "true")
     private boolean actTransitively;
 
     /**
      * Whether this plugin should output verbose messages. Default is false.
      */
-    @Parameter( property = "verbose", defaultValue = "false" )
+    @Parameter(property = "verbose", defaultValue = "false")
     private boolean verbose;
 
     /**
@@ -217,7 +213,7 @@ public class PurgeLocalRepositoryMojo
      *
      * @since 2.4
      */
-    @Parameter( property = "snapshotsOnly", defaultValue = "false" )
+    @Parameter(property = "snapshotsOnly", defaultValue = "false")
     private boolean snapshotsOnly;
 
     /**
@@ -225,15 +221,13 @@ public class PurgeLocalRepositoryMojo
      *
      * @since 2.7
      */
-    @Parameter( property = "skip", defaultValue = "false" )
+    @Parameter(property = "skip", defaultValue = "false")
     private boolean skip;
 
     /**
      * Includes only direct project dependencies.
      */
-    private class DirectDependencyFilter
-        extends AbstractFilter
-    {
+    private class DirectDependencyFilter extends AbstractFilter {
         private final Artifact projectArtifact;
 
         private final List<Dependency> directDependencies;
@@ -243,24 +237,19 @@ public class PurgeLocalRepositoryMojo
          *
          * @param directDependencies Set of dependencies objects which represent the direct dependencies of the project
          */
-        DirectDependencyFilter( Artifact projectArtifact, List<Dependency> directDependencies )
-        {
+        DirectDependencyFilter(Artifact projectArtifact, List<Dependency> directDependencies) {
             this.projectArtifact = projectArtifact;
             this.directDependencies = directDependencies;
         }
 
         @Override
-        public boolean accept( Node node, List<Node> parents )
-        {
+        public boolean accept(Node node, List<Node> parents) {
 
-            if ( artifactsGAMatch( node, projectArtifact.getGroupId(), projectArtifact.getArtifactId() ) )
-            {
+            if (artifactsGAMatch(node, projectArtifact.getGroupId(), projectArtifact.getArtifactId())) {
                 return true;
             }
-            for ( Dependency dep : directDependencies )
-            {
-                if ( this.artifactsGAMatch( node, dep.getGroupId(), dep.getArtifactId() ) )
-                {
+            for (Dependency dep : directDependencies) {
+                if (this.artifactsGAMatch(node, dep.getGroupId(), dep.getArtifactId())) {
                     return true;
                 }
             }
@@ -270,21 +259,17 @@ public class PurgeLocalRepositoryMojo
         /*
          * Compare the groupId:artifactId of two artifacts.
          */
-        private boolean artifactsGAMatch( Node node, String groupId, String artifactId )
-        {
-            if ( node.getDependency() == null )
-            {
+        private boolean artifactsGAMatch(Node node, String groupId, String artifactId) {
+            if (node.getDependency() == null) {
                 return false;
             }
 
-            if ( !node.getDependency().getGroupId().equals( groupId ) )
-            {
-                getLog().debug( "Different groupId: " + node.getDependency() + "  " + groupId );
+            if (!node.getDependency().getGroupId().equals(groupId)) {
+                getLog().debug("Different groupId: " + node.getDependency() + "  " + groupId);
                 return false;
             }
-            if ( !node.getDependency().getArtifactId().equals( artifactId ) )
-            {
-                getLog().debug( "Different artifactId: " + node.getDependency() + "  " + artifactId );
+            if (!node.getDependency().getArtifactId().equals(artifactId)) {
+                getLog().debug("Different artifactId: " + node.getDependency() + "  " + artifactId);
                 return false;
             }
             return true;
@@ -294,55 +279,40 @@ public class PurgeLocalRepositoryMojo
     /**
      * Includes only snapshot artifacts
      */
-    private static class SnapshotsFilter
-        extends AbstractFilter
-    {
+    private static class SnapshotsFilter extends AbstractFilter {
         @Override
-        public boolean accept( Node node, List<Node> parents )
-        {
-            if ( node.getDependency() == null )
-            {
+        public boolean accept(Node node, List<Node> parents) {
+            if (node.getDependency() == null) {
                 return false;
-            }
-            else
-            {
-                return ArtifactUtils.isSnapshot( node.getDependency().getVersion() );
+            } else {
+                return ArtifactUtils.isSnapshot(node.getDependency().getVersion());
             }
         }
     }
 
     @Override
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-        if ( isSkip() )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        if (isSkip()) {
+            getLog().info("Skipping plugin execution");
             return;
         }
 
-        if ( !StringUtils.isEmpty( manualInclude ) )
-        {
-            manualIncludes = this.parseIncludes( manualInclude );
+        if (!StringUtils.isEmpty(manualInclude)) {
+            manualIncludes = this.parseIncludes(manualInclude);
         }
         // If it's a manual purge, the only step is to delete from the local repo
-        if ( manualIncludes != null && manualIncludes.size() > 0 )
-        {
-            manualPurge( manualIncludes );
+        if (manualIncludes != null && manualIncludes.size() > 0) {
+            manualPurge(manualIncludes);
             return;
         }
 
         Set<Artifact> purgedArtifacts = new HashSet<>();
-        if ( shouldPurgeAllProjectsInReactor() )
-        {
-            for ( MavenProject reactorProject : reactorProjects )
-            {
-                purgeLocalRepository( reactorProject, purgedArtifacts );
+        if (shouldPurgeAllProjectsInReactor()) {
+            for (MavenProject reactorProject : reactorProjects) {
+                purgeLocalRepository(reactorProject, purgedArtifacts);
             }
-        }
-        else
-        {
-            purgeLocalRepository( project, purgedArtifacts );
+        } else {
+            purgeLocalRepository(project, purgedArtifacts);
         }
     }
 
@@ -352,8 +322,7 @@ public class PurgeLocalRepositoryMojo
      *
      * @return <code>true</code> if all projects in the reactor should be purged, <code>false</code> otherwise.
      */
-    private boolean shouldPurgeAllProjectsInReactor()
-    {
+    private boolean shouldPurgeAllProjectsInReactor() {
         Source source = mojoExecution.getSource();
         return reactorProjects.size() > 1 && source == Source.CLI;
     }
@@ -365,36 +334,30 @@ public class PurgeLocalRepositoryMojo
      * @param purgedArtifacts The artifacts that were already purged.
      * @throws MojoFailureException in case of errors during the purge.
      */
-    private void purgeLocalRepository( MavenProject theProject, Set<Artifact> purgedArtifacts )
-        throws MojoFailureException
-    {
+    private void purgeLocalRepository(MavenProject theProject, Set<Artifact> purgedArtifacts)
+            throws MojoFailureException {
         List<Dependency> dependencies = theProject.getDependencies();
 
-        TransformableFilter dependencyFilter = createPurgeArtifactsFilter( theProject, dependencies, purgedArtifacts );
+        TransformableFilter dependencyFilter = createPurgeArtifactsFilter(theProject, dependencies, purgedArtifacts);
 
         Set<Artifact> resolvedArtifactsToPurge =
-            getFilteredResolvedArtifacts( theProject, dependencies, dependencyFilter );
+                getFilteredResolvedArtifacts(theProject, dependencies, dependencyFilter);
 
-        if ( resolvedArtifactsToPurge.isEmpty() )
-        {
-            getLog().info( "No artifacts included for purge for project: " + getProjectKey( theProject ) );
+        if (resolvedArtifactsToPurge.isEmpty()) {
+            getLog().info("No artifacts included for purge for project: " + getProjectKey(theProject));
             return;
         }
 
-        purgeArtifacts( theProject, resolvedArtifactsToPurge );
-        purgedArtifacts.addAll( resolvedArtifactsToPurge );
+        purgeArtifacts(theProject, resolvedArtifactsToPurge);
+        purgedArtifacts.addAll(resolvedArtifactsToPurge);
 
-        if ( reResolve )
-        {
-            getLog().info( "Re-resolving dependencies" );
-            try
-            {
-                reResolveArtifacts( theProject, resolvedArtifactsToPurge );
-            }
-            catch ( ArtifactResolutionException e )
-            {
+        if (reResolve) {
+            getLog().info("Re-resolving dependencies");
+            try {
+                reResolveArtifacts(theProject, resolvedArtifactsToPurge);
+            } catch (ArtifactResolutionException e) {
                 String failureMessage = "Failed to refresh project dependencies for: " + theProject.getId();
-                throw new MojoFailureException( failureMessage, e );
+                throw new MojoFailureException(failureMessage, e);
             }
         }
     }
@@ -405,49 +368,40 @@ public class PurgeLocalRepositoryMojo
      * @param theIncludes The includes.
      * @throws MojoExecutionException in case of an error.
      */
-    private void manualPurge( List<String> theIncludes )
-        throws MojoExecutionException
-    {
+    private void manualPurge(List<String> theIncludes) throws MojoExecutionException {
         MessageBuilder messageBuilder = MessageUtils.buffer();
 
-        getLog().info( messageBuilder.a( "Deleting " ).strong( theIncludes.size() )
-            .a( " manual " )
-            .a( theIncludes.size() != 1 ? "dependencies" : "dependency" )
-            .a( " from " )
-            .strong( localRepository.getBasedir() )
-            .toString() );
-
-        for ( String gavPattern : theIncludes )
-        {
-            if ( StringUtils.isEmpty( gavPattern ) )
-            {
-                getLog().debug( "Skipping empty gav pattern" );
+        getLog().info(messageBuilder
+                .a("Deleting ")
+                .strong(theIncludes.size())
+                .a(" manual ")
+                .a(theIncludes.size() != 1 ? "dependencies" : "dependency")
+                .a(" from ")
+                .strong(localRepository.getBasedir())
+                .toString());
+
+        for (String gavPattern : theIncludes) {
+            if (StringUtils.isEmpty(gavPattern)) {
+                getLog().debug("Skipping empty gav pattern");
                 continue;
             }
 
-            String relativePath = gavToPath( gavPattern );
-            if ( StringUtils.isEmpty( relativePath ) )
-            {
-                getLog().debug( "Skipping empty relative path for gav pattern: " + gavPattern );
+            String relativePath = gavToPath(gavPattern);
+            if (StringUtils.isEmpty(relativePath)) {
+                getLog().debug("Skipping empty relative path for gav pattern: " + gavPattern);
                 continue;
             }
 
-            File purgeDir = new File( localRepository.getBasedir(), relativePath );
-            if ( purgeDir.exists() )
-            {
-                getLog().debug( "Deleting directory: " + purgeDir );
-                try
-                {
-                    FileUtils.deleteDirectory( purgeDir );
-                }
-                catch ( IOException e )
-                {
-                    throw new MojoExecutionException( "Unable to purge directory: " + purgeDir );
+            File purgeDir = new File(localRepository.getBasedir(), relativePath);
+            if (purgeDir.exists()) {
+                getLog().debug("Deleting directory: " + purgeDir);
+                try {
+                    FileUtils.deleteDirectory(purgeDir);
+                } catch (IOException e) {
+                    throw new MojoExecutionException("Unable to purge directory: " + purgeDir);
                 }
-            }
-            else
-            {
-                getLog().debug( "Directory: " + purgeDir + " doesn't exist" );
+            } else {
+                getLog().debug("Directory: " + purgeDir + " doesn't exist");
             }
         }
     }
@@ -458,20 +412,17 @@ public class PurgeLocalRepositoryMojo
      * @param gav the groupId:artifactId:version string
      * @return the corresponding path
      */
-    private String gavToPath( String gav )
-    {
-        if ( StringUtils.isEmpty( gav ) )
-        {
+    private String gavToPath(String gav) {
+        if (StringUtils.isEmpty(gav)) {
             return null;
         }
 
-        String[] pathComponents = gav.split( ":" );
+        String[] pathComponents = gav.split(":");
 
-        StringBuilder path = new StringBuilder( pathComponents[0].replace( '.', '/' ) );
+        StringBuilder path = new StringBuilder(pathComponents[0].replace('.', '/'));
 
-        for ( int i = 1; i < pathComponents.length; ++i )
-        {
-            path.append( "/" ).append( pathComponents[i] );
+        for (int i = 1; i < pathComponents.length; ++i) {
+            path.append("/").append(pathComponents[i]);
         }
 
         return path.toString();
@@ -486,57 +437,48 @@ public class PurgeLocalRepositoryMojo
      * @param purgedArtifacts The artifacts already purged.
      * @return the created filter
      */
-    private TransformableFilter createPurgeArtifactsFilter( MavenProject theProject, List<Dependency> dependencies,
-                                                            Set<Artifact> purgedArtifacts )
-    {
+    private TransformableFilter createPurgeArtifactsFilter(
+            MavenProject theProject, List<Dependency> dependencies, Set<Artifact> purgedArtifacts) {
         List<TransformableFilter> subFilters = new ArrayList<>();
 
         // System dependencies should never be purged
-        subFilters.add( ScopeFilter.excluding( Artifact.SCOPE_SYSTEM ) );
+        subFilters.add(ScopeFilter.excluding(Artifact.SCOPE_SYSTEM));
 
-        if ( this.snapshotsOnly )
-        {
-            subFilters.add( new SnapshotsFilter() );
+        if (this.snapshotsOnly) {
+            subFilters.add(new SnapshotsFilter());
         }
 
         // The CLI includes/excludes overrides configuration in the pom
-        if ( !StringUtils.isEmpty( this.include ) )
-        {
-            this.includes = parseIncludes( this.include );
+        if (!StringUtils.isEmpty(this.include)) {
+            this.includes = parseIncludes(this.include);
         }
-        if ( this.includes != null )
-        {
-            subFilters.add( new PatternInclusionsFilter( includes ) );
+        if (this.includes != null) {
+            subFilters.add(new PatternInclusionsFilter(includes));
         }
 
-        if ( !StringUtils.isEmpty( this.exclude ) )
-        {
-            this.excludes = parseIncludes( this.exclude );
+        if (!StringUtils.isEmpty(this.exclude)) {
+            this.excludes = parseIncludes(this.exclude);
         }
-        if ( this.excludes != null )
-        {
-            subFilters.add( new PatternExclusionsFilter( excludes ) );
+        if (this.excludes != null) {
+            subFilters.add(new PatternExclusionsFilter(excludes));
         }
 
-        if ( !actTransitively )
-        {
-            subFilters.add( new DirectDependencyFilter( theProject.getArtifact(), dependencies ) );
+        if (!actTransitively) {
+            subFilters.add(new DirectDependencyFilter(theProject.getArtifact(), dependencies));
         }
 
-        List<String> exclusions = new ArrayList<>( reactorProjects.size() );
+        List<String> exclusions = new ArrayList<>(reactorProjects.size());
         // It doesn't make sense to include projects from the reactor here since they're likely not able to be resolved
-        for ( MavenProject reactorProject : reactorProjects )
-        {
-            exclusions.add( toPatternExcludes( reactorProject.getArtifact() ) );
+        for (MavenProject reactorProject : reactorProjects) {
+            exclusions.add(toPatternExcludes(reactorProject.getArtifact()));
         }
         // There is no need to consider a second time artifacts that were already purged (re-resolved or not)
-        for ( Artifact purgedArtifact : purgedArtifacts )
-        {
-            exclusions.add( toPatternExcludes( purgedArtifact ) );
+        for (Artifact purgedArtifact : purgedArtifacts) {
+            exclusions.add(toPatternExcludes(purgedArtifact));
         }
-        subFilters.add( new PatternExclusionsFilter( exclusions ) );
+        subFilters.add(new PatternExclusionsFilter(exclusions));
 
-        return new AndFilter( subFilters );
+        return new AndFilter(subFilters);
     }
 
     /**
@@ -545,10 +487,9 @@ public class PurgeLocalRepositoryMojo
      * @param artifact Artifact.
      * @return String representation of a pattern for an exclude filter for the given artifact.
      */
-    private String toPatternExcludes( Artifact artifact )
-    {
+    private String toPatternExcludes(Artifact artifact) {
         return artifact.getGroupId() + ":" + artifact.getArtifactId() + ":"
-            + artifact.getArtifactHandler().getExtension() + ":" + artifact.getVersion();
+                + artifact.getArtifactHandler().getExtension() + ":" + artifact.getVersion();
     }
 
     /**
@@ -557,184 +498,155 @@ public class PurgeLocalRepositoryMojo
      * @param theInclude The list of includes
      * @return the includes list
      */
-    private List<String> parseIncludes( String theInclude )
-    {
+    private List<String> parseIncludes(String theInclude) {
         List<String> theIncludes = new ArrayList<>();
 
-        if ( theInclude != null )
-        {
-            String[] elements = theInclude.split( "," );
-            theIncludes.addAll( Arrays.asList( elements ) );
+        if (theInclude != null) {
+            String[] elements = theInclude.split(",");
+            theIncludes.addAll(Arrays.asList(elements));
         }
 
         return theIncludes;
     }
 
-    private Set<Artifact> getFilteredResolvedArtifacts( MavenProject theProject, List<Dependency> dependencies,
-                                                        TransformableFilter filter )
-    {
-        try
-        {
-            Iterable<ArtifactResult> results =
-                dependencyResolver.resolveDependencies( session.getProjectBuildingRequest(), theProject.getModel(),
-                                                        filter );
+    private Set<Artifact> getFilteredResolvedArtifacts(
+            MavenProject theProject, List<Dependency> dependencies, TransformableFilter filter) {
+        try {
+            Iterable<ArtifactResult> results = dependencyResolver.resolveDependencies(
+                    session.getProjectBuildingRequest(), theProject.getModel(), filter);
 
             Set<Artifact> resolvedArtifacts = new LinkedHashSet<>();
 
-            for ( ArtifactResult artResult : results )
-            {
-                resolvedArtifacts.add( artResult.getArtifact() );
+            for (ArtifactResult artResult : results) {
+                resolvedArtifacts.add(artResult.getArtifact());
             }
 
             return resolvedArtifacts;
-        }
-        catch ( DependencyResolverException e )
-        {
-            getLog().info( "Unable to resolve all dependencies for: " + getProjectKey( theProject )
-                + ". Falling back to non-transitive mode for initial artifact resolution." );
+        } catch (DependencyResolverException e) {
+            getLog().info("Unable to resolve all dependencies for: " + getProjectKey(theProject)
+                    + ". Falling back to non-transitive mode for initial artifact resolution.");
         }
 
         Set<Artifact> resolvedArtifacts = new LinkedHashSet<>();
 
-        ArtifactFilter artifactFilter = filter.transform( new ArtifactIncludeFilterTransformer() );
+        ArtifactFilter artifactFilter = filter.transform(new ArtifactIncludeFilterTransformer());
 
-        for ( Dependency dependency : dependencies )
-        {
+        for (Dependency dependency : dependencies) {
             DefaultArtifactCoordinate coordinate = new DefaultArtifactCoordinate();
-            coordinate.setGroupId( dependency.getGroupId() );
-            coordinate.setArtifactId( dependency.getArtifactId() );
-            coordinate.setVersion( dependency.getVersion() );
-            coordinate.setExtension( artifactHandlerManager.getArtifactHandler( dependency.getType() ).getExtension() );
-            try
-            {
-                Artifact artifact =
-                    artifactResolver.resolveArtifact( session.getProjectBuildingRequest(), coordinate ).getArtifact();
-                if ( artifactFilter.include( artifact ) )
-                {
-                    resolvedArtifacts.add( artifact );
+            coordinate.setGroupId(dependency.getGroupId());
+            coordinate.setArtifactId(dependency.getArtifactId());
+            coordinate.setVersion(dependency.getVersion());
+            coordinate.setExtension(artifactHandlerManager
+                    .getArtifactHandler(dependency.getType())
+                    .getExtension());
+            try {
+                Artifact artifact = artifactResolver
+                        .resolveArtifact(session.getProjectBuildingRequest(), coordinate)
+                        .getArtifact();
+                if (artifactFilter.include(artifact)) {
+                    resolvedArtifacts.add(artifact);
                 }
-            }
-            catch ( ArtifactResolverException e )
-            {
-                getLog().debug( "Unable to resolve artifact: " + coordinate );
+            } catch (ArtifactResolverException e) {
+                getLog().debug("Unable to resolve artifact: " + coordinate);
             }
         }
         return resolvedArtifacts;
     }
 
-    private void purgeArtifacts( MavenProject theProject, Set<Artifact> artifacts )
-    {
+    private void purgeArtifacts(MavenProject theProject, Set<Artifact> artifacts) {
         MessageBuilder messageBuilder = MessageUtils.buffer();
 
-        getLog().info( messageBuilder.a( "Deleting " ).strong( artifacts.size() )
-            .a( " " ).strong( actTransitively ? "transitive" : "direct" )
-            .a( artifacts.size() != 1 ? " dependencies" : " dependency" )
-            .a( " for project " ).strong( getProjectKey( theProject ) )
-            .a( " from " ).strong( localRepository.getBasedir() )
-            .a( " with artifact " ).strong( resolutionFuzziness ).a( " resolution fuzziness" )
-            .toString() );
-
-        for ( Artifact artifact : artifacts )
-        {
-            verbose( "Purging artifact: " + artifact.getId() );
-
-            File deleteTarget = findDeleteTarget( artifact );
-
-            verbose( "Deleting: " + deleteTarget );
-
-            if ( deleteTarget.isDirectory() )
-            {
-                try
-                {
-                    FileUtils.deleteDirectory( deleteTarget );
-                }
-                catch ( IOException e )
-                {
-                    getLog().warn( "Unable to purge local repository location: " + deleteTarget, e );
+        getLog().info(messageBuilder
+                .a("Deleting ")
+                .strong(artifacts.size())
+                .a(" ")
+                .strong(actTransitively ? "transitive" : "direct")
+                .a(artifacts.size() != 1 ? " dependencies" : " dependency")
+                .a(" for project ")
+                .strong(getProjectKey(theProject))
+                .a(" from ")
+                .strong(localRepository.getBasedir())
+                .a(" with artifact ")
+                .strong(resolutionFuzziness)
+                .a(" resolution fuzziness")
+                .toString());
+
+        for (Artifact artifact : artifacts) {
+            verbose("Purging artifact: " + artifact.getId());
+
+            File deleteTarget = findDeleteTarget(artifact);
+
+            verbose("Deleting: " + deleteTarget);
+
+            if (deleteTarget.isDirectory()) {
+                try {
+                    FileUtils.deleteDirectory(deleteTarget);
+                } catch (IOException e) {
+                    getLog().warn("Unable to purge local repository location: " + deleteTarget, e);
                 }
-            }
-            else
-            {
-                if ( !deleteTarget.delete() )
-                {
+            } else {
+                if (!deleteTarget.delete()) {
                     deleteTarget.deleteOnExit();
-                    getLog().warn( "Unable to purge local repository location immediately: " + deleteTarget );
+                    getLog().warn("Unable to purge local repository location immediately: " + deleteTarget);
                 }
             }
-            artifact.setResolved( false );
+            artifact.setResolved(false);
         }
     }
 
-    private void reResolveArtifacts( MavenProject theProject, Set<Artifact> artifacts )
-        throws ArtifactResolutionException
-    {
+    private void reResolveArtifacts(MavenProject theProject, Set<Artifact> artifacts)
+            throws ArtifactResolutionException {
         // Always need to re-resolve the poms in case they were purged along with the artifact
         // because Maven 2 will not automatically re-resolve them when resolving the artifact
-        for ( Artifact artifact : artifacts )
-        {
-            verbose( "Resolving artifact: " + artifact.getId() );
-
-            try
-            {
-                //CHECKSTYLE_OFF: LineLength
-                artifactResolver.resolveArtifact( session.getProjectBuildingRequest(),
-                                                  TransferUtils.toArtifactCoordinate( artifact ) );
-                //CHECKSTYLE_ON: LineLength
-            }
-            catch ( ArtifactResolverException e )
-            {
-                verbose( e.getMessage() );
+        for (Artifact artifact : artifacts) {
+            verbose("Resolving artifact: " + artifact.getId());
+
+            try {
+                // CHECKSTYLE_OFF: LineLength
+                artifactResolver.resolveArtifact(
+                        session.getProjectBuildingRequest(), TransferUtils.toArtifactCoordinate(artifact));
+                // CHECKSTYLE_ON: LineLength
+            } catch (ArtifactResolverException e) {
+                verbose(e.getMessage());
             }
         }
 
         List<Artifact> missingArtifacts = new ArrayList<>();
 
-        for ( Artifact artifact : artifacts )
-        {
-            try
-            {
-                artifactResolver.resolveArtifact( session.getProjectBuildingRequest(), artifact );
-            }
-            catch ( ArtifactResolverException e )
-            {
-                verbose( e.getMessage() );
-                missingArtifacts.add( artifact );
+        for (Artifact artifact : artifacts) {
+            try {
+                artifactResolver.resolveArtifact(session.getProjectBuildingRequest(), artifact);
+            } catch (ArtifactResolverException e) {
+                verbose(e.getMessage());
+                missingArtifacts.add(artifact);
             }
         }
 
-        if ( missingArtifacts.size() > 0 )
-        {
-            StringBuilder message = new StringBuilder( "required artifacts missing:" );
-            message.append( System.lineSeparator() );
-            for ( Artifact missingArtifact : missingArtifacts )
-            {
-                message.append( "  " ).append( missingArtifact.getId() ).append( System.lineSeparator() );
+        if (missingArtifacts.size() > 0) {
+            StringBuilder message = new StringBuilder("required artifacts missing:");
+            message.append(System.lineSeparator());
+            for (Artifact missingArtifact : missingArtifacts) {
+                message.append("  ").append(missingArtifact.getId()).append(System.lineSeparator());
             }
-            message.append( System.lineSeparator() );
-            message.append( "for the artifact:" );
+            message.append(System.lineSeparator());
+            message.append("for the artifact:");
 
-            throw new ArtifactResolutionException( message.toString(), theProject.getArtifact(),
-                                                   theProject.getRemoteArtifactRepositories() );
+            throw new ArtifactResolutionException(
+                    message.toString(), theProject.getArtifact(), theProject.getRemoteArtifactRepositories());
         }
     }
 
-    private File findDeleteTarget( Artifact artifact )
-    {
+    private File findDeleteTarget(Artifact artifact) {
         // Use localRepository.pathOf() in case artifact.getFile() is not set
-        File deleteTarget = new File( localRepository.getBasedir(), localRepository.pathOf( artifact ) );
+        File deleteTarget = new File(localRepository.getBasedir(), localRepository.pathOf(artifact));
 
-        if ( GROUP_ID_FUZZINESS.equals( resolutionFuzziness ) )
-        {
+        if (GROUP_ID_FUZZINESS.equals(resolutionFuzziness)) {
             // get the groupId dir.
             deleteTarget = deleteTarget.getParentFile().getParentFile().getParentFile();
-        }
-        else if ( ARTIFACT_ID_FUZZINESS.equals( resolutionFuzziness ) )
-        {
+        } else if (ARTIFACT_ID_FUZZINESS.equals(resolutionFuzziness)) {
             // get the artifactId dir.
             deleteTarget = deleteTarget.getParentFile().getParentFile();
-        }
-        else if ( VERSION_FUZZINESS.equals( resolutionFuzziness ) )
-        {
+        } else if (VERSION_FUZZINESS.equals(resolutionFuzziness)) {
             // get the version dir.
             deleteTarget = deleteTarget.getParentFile();
         }
@@ -742,32 +654,27 @@ public class PurgeLocalRepositoryMojo
         return deleteTarget;
     }
 
-    private void verbose( String message )
-    {
-        if ( verbose || getLog().isDebugEnabled() )
-        {
-            getLog().info( message );
+    private void verbose(String message) {
+        if (verbose || getLog().isDebugEnabled()) {
+            getLog().info(message);
         }
     }
 
-    private String getProjectKey( MavenProject project )
-    {
+    private String getProjectKey(MavenProject project) {
         return project.getArtifactId();
     }
 
     /**
      * @return {@link #skip}
      */
-    public boolean isSkip()
-    {
+    public boolean isSkip() {
         return skip;
     }
 
     /**
      * @param skip {@link #skip}
      */
-    public void setSkip( boolean skip )
-    {
+    public void setSkip(boolean skip) {
         this.skip = skip;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
index e069bd46..00186de9 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.analyze;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.analyze;
 
 import java.io.File;
 import java.io.StringWriter;
@@ -29,7 +28,6 @@ import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
@@ -55,10 +53,7 @@ import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
  * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
  * @since 2.0-alpha-5
  */
-public abstract class AbstractAnalyzeMojo
-    extends AbstractMojo
-    implements Contextualizable
-{
+public abstract class AbstractAnalyzeMojo extends AbstractMojo implements Contextualizable {
     // fields -----------------------------------------------------------------
 
     /**
@@ -70,7 +65,7 @@ public abstract class AbstractAnalyzeMojo
     /**
      * The Maven project to analyze.
      */
-    @Parameter( defaultValue = "${project}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project}", readonly = true, required = true)
     private MavenProject project;
 
     /**
@@ -81,19 +76,19 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 2.2
      */
-    @Parameter( property = "analyzer", defaultValue = "default" )
+    @Parameter(property = "analyzer", defaultValue = "default")
     private String analyzer;
 
     /**
      * Whether to fail the build if a dependency warning is found.
      */
-    @Parameter( property = "failOnWarning", defaultValue = "false" )
+    @Parameter(property = "failOnWarning", defaultValue = "false")
     private boolean failOnWarning;
 
     /**
      * Output used dependencies.
      */
-    @Parameter( property = "verbose", defaultValue = "false" )
+    @Parameter(property = "verbose", defaultValue = "false")
     private boolean verbose;
 
     /**
@@ -101,7 +96,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * <code><b>Non-test scoped</b></code> list will be not affected.
      */
-    @Parameter( property = "ignoreNonCompile", defaultValue = "false" )
+    @Parameter(property = "ignoreNonCompile", defaultValue = "false")
     private boolean ignoreNonCompile;
 
     /**
@@ -109,7 +104,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 3.2.0
      */
-    @Parameter( property = "ignoreUnusedRuntime", defaultValue = "false" )
+    @Parameter(property = "ignoreUnusedRuntime", defaultValue = "false")
     private boolean ignoreUnusedRuntime;
 
     /**
@@ -120,7 +115,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 3.3.1-SNAPSHOT
      */
-    @Parameter( property = "ignoreAllNonTestScoped", defaultValue = "false" )
+    @Parameter(property = "ignoreAllNonTestScoped", defaultValue = "false")
     private boolean ignoreAllNonTestScoped;
 
     /**
@@ -128,7 +123,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 2.0-alpha-5
      */
-    @Parameter( property = "outputXML", defaultValue = "false" )
+    @Parameter(property = "outputXML", defaultValue = "false")
     private boolean outputXML;
 
     /**
@@ -136,7 +131,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 2.0-alpha-5
      */
-    @Parameter( property = "scriptableOutput", defaultValue = "false" )
+    @Parameter(property = "scriptableOutput", defaultValue = "false")
     private boolean scriptableOutput;
 
     /**
@@ -144,7 +139,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 2.0-alpha-5
      */
-    @Parameter( property = "scriptableFlag", defaultValue = "$$$%%%" )
+    @Parameter(property = "scriptableFlag", defaultValue = "$$$%%%")
     private String scriptableFlag;
 
     /**
@@ -152,7 +147,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 2.0-alpha-5
      */
-    @Parameter( defaultValue = "${basedir}", readonly = true )
+    @Parameter(defaultValue = "${basedir}", readonly = true)
     private File baseDir;
 
     /**
@@ -160,7 +155,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 2.0-alpha-5
      */
-    @Parameter( defaultValue = "${project.build.directory}", readonly = true )
+    @Parameter(defaultValue = "${project.build.directory}", readonly = true)
     private File outputDirectory;
 
     /**
@@ -177,7 +172,7 @@ public abstract class AbstractAnalyzeMojo
      *
      * @since 2.7
      */
-    @Parameter( property = "mdep.analyze.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.analyze.skip", defaultValue = "false")
     private boolean skip;
 
     /**
@@ -268,7 +263,7 @@ public abstract class AbstractAnalyzeMojo
     // defaultValue value on @Parameter - not work with Maven 3.2.5
     // When is set defaultValue always win, and there is no possibility to override by plugin configuration.
     @Parameter
-    private List<String> ignoredPackagings = Arrays.asList( "pom", "ear" );
+    private List<String> ignoredPackagings = Arrays.asList("pom", "ear");
 
     // Mojo methods -----------------------------------------------------------
 
@@ -276,32 +271,26 @@ public abstract class AbstractAnalyzeMojo
      * @see org.apache.maven.plugin.Mojo#execute()
      */
     @Override
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-        if ( isSkip() )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        if (isSkip()) {
+            getLog().info("Skipping plugin execution");
             return;
         }
 
-        if ( ignoredPackagings.contains( project.getPackaging() ) )
-        {
-            getLog().info( "Skipping " + project.getPackaging() + " project" );
+        if (ignoredPackagings.contains(project.getPackaging())) {
+            getLog().info("Skipping " + project.getPackaging() + " project");
             return;
         }
 
-        if ( outputDirectory == null || !outputDirectory.exists() )
-        {
-            getLog().info( "Skipping project with no build directory" );
+        if (outputDirectory == null || !outputDirectory.exists()) {
+            getLog().info("Skipping project with no build directory");
             return;
         }
 
         boolean warning = checkDependencies();
 
-        if ( warning && failOnWarning )
-        {
-            throw new MojoExecutionException( "Dependency problems found" );
+        if (warning && failOnWarning) {
+            throw new MojoExecutionException("Dependency problems found");
         }
     }
 
@@ -309,344 +298,277 @@ public abstract class AbstractAnalyzeMojo
      * @return {@link ProjectDependencyAnalyzer}
      * @throws MojoExecutionException in case of an error.
      */
-    protected ProjectDependencyAnalyzer createProjectDependencyAnalyzer()
-        throws MojoExecutionException
-    {
-        try
-        {
-            final PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
-            return container.lookup( ProjectDependencyAnalyzer.class, analyzer );
-        }
-        catch ( Exception exception )
-        {
-            throw new MojoExecutionException( "Failed to instantiate ProjectDependencyAnalyser"
-                + " / role-hint " + analyzer, exception );
+    protected ProjectDependencyAnalyzer createProjectDependencyAnalyzer() throws MojoExecutionException {
+        try {
+            final PlexusContainer container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
+            return container.lookup(ProjectDependencyAnalyzer.class, analyzer);
+        } catch (Exception exception) {
+            throw new MojoExecutionException(
+                    "Failed to instantiate ProjectDependencyAnalyser" + " / role-hint " + analyzer, exception);
         }
     }
 
     @Override
-    public void contextualize( Context theContext )
-    {
+    public void contextualize(Context theContext) {
         this.context = theContext;
     }
 
     /**
      * @return {@link #skip}
      */
-    protected final boolean isSkip()
-    {
+    protected final boolean isSkip() {
         return skip;
     }
 
     // private methods --------------------------------------------------------
 
-    private boolean checkDependencies()
-        throws MojoExecutionException
-    {
+    private boolean checkDependencies() throws MojoExecutionException {
         ProjectDependencyAnalysis analysis;
-        try
-        {
-            analysis = createProjectDependencyAnalyzer().analyze( project );
+        try {
+            analysis = createProjectDependencyAnalyzer().analyze(project);
 
-            if ( usedDependencies != null )
-            {
-                analysis = analysis.forceDeclaredDependenciesUsage( usedDependencies );
+            if (usedDependencies != null) {
+                analysis = analysis.forceDeclaredDependenciesUsage(usedDependencies);
             }
-        }
-        catch ( ProjectDependencyAnalyzerException exception )
-        {
-            throw new MojoExecutionException( "Cannot analyze dependencies", exception );
+        } catch (ProjectDependencyAnalyzerException exception) {
+            throw new MojoExecutionException("Cannot analyze dependencies", exception);
         }
 
-        if ( ignoreNonCompile )
-        {
+        if (ignoreNonCompile) {
             analysis = analysis.ignoreNonCompile();
         }
 
-        Set<Artifact> usedDeclared = new LinkedHashSet<>( analysis.getUsedDeclaredArtifacts() );
+        Set<Artifact> usedDeclared = new LinkedHashSet<>(analysis.getUsedDeclaredArtifacts());
         Map<Artifact, Set<String>> usedUndeclaredWithClasses =
-                new LinkedHashMap<>( analysis.getUsedUndeclaredArtifactsWithClasses() );
-        Set<Artifact> unusedDeclared = new LinkedHashSet<>( analysis.getUnusedDeclaredArtifacts() );
-        Set<Artifact> nonTestScope = new LinkedHashSet<>( analysis.getTestArtifactsWithNonTestScope() );
+                new LinkedHashMap<>(analysis.getUsedUndeclaredArtifactsWithClasses());
+        Set<Artifact> unusedDeclared = new LinkedHashSet<>(analysis.getUnusedDeclaredArtifacts());
+        Set<Artifact> nonTestScope = new LinkedHashSet<>(analysis.getTestArtifactsWithNonTestScope());
 
         Set<Artifact> ignoredUsedUndeclared = new LinkedHashSet<>();
         Set<Artifact> ignoredUnusedDeclared = new LinkedHashSet<>();
         Set<Artifact> ignoredNonTestScope = new LinkedHashSet<>();
 
-        if ( ignoreUnusedRuntime )
-        {
-            filterArtifactsByScope( unusedDeclared, Artifact.SCOPE_RUNTIME );
+        if (ignoreUnusedRuntime) {
+            filterArtifactsByScope(unusedDeclared, Artifact.SCOPE_RUNTIME);
         }
 
-        ignoredUsedUndeclared.addAll( filterDependencies( usedUndeclaredWithClasses.keySet(), ignoredDependencies ) );
-        ignoredUsedUndeclared.addAll( filterDependencies( usedUndeclaredWithClasses.keySet(),
-                ignoredUsedUndeclaredDependencies ) );
+        ignoredUsedUndeclared.addAll(filterDependencies(usedUndeclaredWithClasses.keySet(), ignoredDependencies));
+        ignoredUsedUndeclared.addAll(
+                filterDependencies(usedUndeclaredWithClasses.keySet(), ignoredUsedUndeclaredDependencies));
 
-        ignoredUnusedDeclared.addAll( filterDependencies( unusedDeclared, ignoredDependencies ) );
-        ignoredUnusedDeclared.addAll( filterDependencies( unusedDeclared, ignoredUnusedDeclaredDependencies ) );
+        ignoredUnusedDeclared.addAll(filterDependencies(unusedDeclared, ignoredDependencies));
+        ignoredUnusedDeclared.addAll(filterDependencies(unusedDeclared, ignoredUnusedDeclaredDependencies));
 
-        if ( ignoreAllNonTestScoped )
-        {
-            ignoredNonTestScope.addAll( filterDependencies ( nonTestScope, new String [] { "*" } ) );
-        }
-        else
-        {
-            ignoredNonTestScope.addAll( filterDependencies( nonTestScope, ignoredDependencies ) );
-            ignoredNonTestScope.addAll( filterDependencies( nonTestScope, ignoredNonTestScopedDependencies ) );
+        if (ignoreAllNonTestScoped) {
+            ignoredNonTestScope.addAll(filterDependencies(nonTestScope, new String[] {"*"}));
+        } else {
+            ignoredNonTestScope.addAll(filterDependencies(nonTestScope, ignoredDependencies));
+            ignoredNonTestScope.addAll(filterDependencies(nonTestScope, ignoredNonTestScopedDependencies));
         }
 
         boolean reported = false;
         boolean warning = false;
 
-        if ( verbose && !usedDeclared.isEmpty() )
-        {
-            getLog().info( "Used declared dependencies found:" );
+        if (verbose && !usedDeclared.isEmpty()) {
+            getLog().info("Used declared dependencies found:");
 
-            logArtifacts( analysis.getUsedDeclaredArtifacts(), false );
+            logArtifacts(analysis.getUsedDeclaredArtifacts(), false);
             reported = true;
         }
 
-        if ( !usedUndeclaredWithClasses.isEmpty() )
-        {
-            logDependencyWarning( "Used undeclared dependencies found:" );
+        if (!usedUndeclaredWithClasses.isEmpty()) {
+            logDependencyWarning("Used undeclared dependencies found:");
 
-            if ( verbose )
-            {
-                logArtifacts( usedUndeclaredWithClasses, true );
-            }
-            else
-            {
-                logArtifacts( usedUndeclaredWithClasses.keySet(), true );
+            if (verbose) {
+                logArtifacts(usedUndeclaredWithClasses, true);
+            } else {
+                logArtifacts(usedUndeclaredWithClasses.keySet(), true);
             }
             reported = true;
             warning = true;
         }
 
-        if ( !unusedDeclared.isEmpty() )
-        {
-            logDependencyWarning( "Unused declared dependencies found:" );
+        if (!unusedDeclared.isEmpty()) {
+            logDependencyWarning("Unused declared dependencies found:");
 
-            logArtifacts( unusedDeclared, true );
+            logArtifacts(unusedDeclared, true);
             reported = true;
             warning = true;
         }
 
-        if ( !nonTestScope.isEmpty() )
-        {
-            logDependencyWarning( "Non-test scoped test only dependencies found:" );
+        if (!nonTestScope.isEmpty()) {
+            logDependencyWarning("Non-test scoped test only dependencies found:");
 
-            logArtifacts( nonTestScope, true );
+            logArtifacts(nonTestScope, true);
             reported = true;
             warning = true;
         }
 
-        if ( verbose && !ignoredUsedUndeclared.isEmpty() )
-        {
-            getLog().info( "Ignored used undeclared dependencies:" );
+        if (verbose && !ignoredUsedUndeclared.isEmpty()) {
+            getLog().info("Ignored used undeclared dependencies:");
 
-            logArtifacts( ignoredUsedUndeclared, false );
+            logArtifacts(ignoredUsedUndeclared, false);
             reported = true;
         }
 
-        if ( verbose && !ignoredUnusedDeclared.isEmpty() )
-        {
-            getLog().info( "Ignored unused declared dependencies:" );
+        if (verbose && !ignoredUnusedDeclared.isEmpty()) {
+            getLog().info("Ignored unused declared dependencies:");
 
-            logArtifacts( ignoredUnusedDeclared, false );
+            logArtifacts(ignoredUnusedDeclared, false);
             reported = true;
         }
 
-        if ( verbose && !ignoredNonTestScope.isEmpty() )
-        {
-            getLog().info( "Ignored non-test scoped test only dependencies:" );
+        if (verbose && !ignoredNonTestScope.isEmpty()) {
+            getLog().info("Ignored non-test scoped test only dependencies:");
 
-            logArtifacts( ignoredNonTestScope, false );
+            logArtifacts(ignoredNonTestScope, false);
             reported = true;
         }
 
-        if ( outputXML )
-        {
-            writeDependencyXML( usedUndeclaredWithClasses.keySet() );
+        if (outputXML) {
+            writeDependencyXML(usedUndeclaredWithClasses.keySet());
         }
 
-        if ( scriptableOutput )
-        {
-            writeScriptableOutput( usedUndeclaredWithClasses.keySet() );
+        if (scriptableOutput) {
+            writeScriptableOutput(usedUndeclaredWithClasses.keySet());
         }
 
-        if ( !reported )
-        {
-            getLog().info( "No dependency problems found" );
+        if (!reported) {
+            getLog().info("No dependency problems found");
         }
 
         return warning;
     }
 
-    private void filterArtifactsByScope( Set<Artifact> artifacts, String scope )
-    {
-        artifacts.removeIf( artifact -> artifact.getScope().equals( scope ) );
+    private void filterArtifactsByScope(Set<Artifact> artifacts, String scope) {
+        artifacts.removeIf(artifact -> artifact.getScope().equals(scope));
     }
 
-    private void logArtifacts( Set<Artifact> artifacts, boolean warn )
-    {
-        if ( artifacts.isEmpty() )
-        {
-            getLog().info( "   None" );
-        }
-        else
-        {
-            for ( Artifact artifact : artifacts )
-            {
+    private void logArtifacts(Set<Artifact> artifacts, boolean warn) {
+        if (artifacts.isEmpty()) {
+            getLog().info("   None");
+        } else {
+            for (Artifact artifact : artifacts) {
                 // called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961
                 artifact.isSnapshot();
 
-                if ( warn )
-                {
-                    logDependencyWarning( "   " + artifact );
-                }
-                else
-                {
-                    getLog().info( "   " + artifact );
+                if (warn) {
+                    logDependencyWarning("   " + artifact);
+                } else {
+                    getLog().info("   " + artifact);
                 }
-
             }
         }
     }
 
-    private void logArtifacts( Map<Artifact, Set<String>> artifacts, boolean warn )
-    {
-        if ( artifacts.isEmpty() )
-        {
-            getLog().info( "   None" );
-        }
-        else
-        {
-            for ( Map.Entry<Artifact, Set<String>> entry : artifacts.entrySet() )
-            {
+    private void logArtifacts(Map<Artifact, Set<String>> artifacts, boolean warn) {
+        if (artifacts.isEmpty()) {
+            getLog().info("   None");
+        } else {
+            for (Map.Entry<Artifact, Set<String>> entry : artifacts.entrySet()) {
                 // called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961
                 entry.getKey().isSnapshot();
 
-                if ( warn )
-                {
-                    logDependencyWarning( "   " + entry.getKey() );
-                    for ( String clazz : entry.getValue() )
-                    {
-                        logDependencyWarning( "      class " + clazz );
+                if (warn) {
+                    logDependencyWarning("   " + entry.getKey());
+                    for (String clazz : entry.getValue()) {
+                        logDependencyWarning("      class " + clazz);
                     }
-                }
-                else
-                {
-                    getLog().info( "   " + entry.getKey() );
-                    for ( String clazz : entry.getValue() )
-                    {
-                        getLog().info( "      class " + clazz );
+                } else {
+                    getLog().info("   " + entry.getKey());
+                    for (String clazz : entry.getValue()) {
+                        getLog().info("      class " + clazz);
                     }
                 }
-
             }
         }
     }
 
-    private void logDependencyWarning( CharSequence content )
-    {
-        if ( failOnWarning )
-        {
-            getLog().error( content );
-        }
-        else
-        {
-            getLog().warn( content );
+    private void logDependencyWarning(CharSequence content) {
+        if (failOnWarning) {
+            getLog().error(content);
+        } else {
+            getLog().warn(content);
         }
     }
 
-    private void writeDependencyXML( Set<Artifact> artifacts )
-    {
-        if ( !artifacts.isEmpty() )
-        {
-            getLog().info( "Add the following to your pom to correct the missing dependencies: " );
+    private void writeDependencyXML(Set<Artifact> artifacts) {
+        if (!artifacts.isEmpty()) {
+            getLog().info("Add the following to your pom to correct the missing dependencies: ");
 
             StringWriter out = new StringWriter();
-            PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter( out );
+            PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter(out);
 
-            for ( Artifact artifact : artifacts )
-            {
+            for (Artifact artifact : artifacts) {
                 // called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961
                 artifact.isSnapshot();
 
-                writer.startElement( "dependency" );
-                writer.startElement( "groupId" );
-                writer.writeText( artifact.getGroupId() );
+                writer.startElement("dependency");
+                writer.startElement("groupId");
+                writer.writeText(artifact.getGroupId());
                 writer.endElement();
-                writer.startElement( "artifactId" );
-                writer.writeText( artifact.getArtifactId() );
+                writer.startElement("artifactId");
+                writer.writeText(artifact.getArtifactId());
                 writer.endElement();
-                writer.startElement( "version" );
-                writer.writeText( artifact.getBaseVersion() );
-                if ( !StringUtils.isBlank( artifact.getClassifier() ) )
-                {
-                    writer.startElement( "classifier" );
-                    writer.writeText( artifact.getClassifier() );
+                writer.startElement("version");
+                writer.writeText(artifact.getBaseVersion());
+                if (!StringUtils.isBlank(artifact.getClassifier())) {
+                    writer.startElement("classifier");
+                    writer.writeText(artifact.getClassifier());
                     writer.endElement();
                 }
                 writer.endElement();
 
-                if ( !Artifact.SCOPE_COMPILE.equals( artifact.getScope() ) )
-                {
-                    writer.startElement( "scope" );
-                    writer.writeText( artifact.getScope() );
+                if (!Artifact.SCOPE_COMPILE.equals(artifact.getScope())) {
+                    writer.startElement("scope");
+                    writer.writeText(artifact.getScope());
                     writer.endElement();
                 }
                 writer.endElement();
             }
 
-            getLog().info( System.lineSeparator() + out.getBuffer() );
+            getLog().info(System.lineSeparator() + out.getBuffer());
         }
     }
 
-    private void writeScriptableOutput( Set<Artifact> artifacts )
-    {
-        if ( !artifacts.isEmpty() )
-        {
-            getLog().info( "Missing dependencies: " );
+    private void writeScriptableOutput(Set<Artifact> artifacts) {
+        if (!artifacts.isEmpty()) {
+            getLog().info("Missing dependencies: ");
             String pomFile = baseDir.getAbsolutePath() + File.separatorChar + "pom.xml";
             StringBuilder buf = new StringBuilder();
 
-            for ( Artifact artifact : artifacts )
-            {
+            for (Artifact artifact : artifacts) {
                 // called because artifact will set the version to -SNAPSHOT only if I do this. MNG-2961
                 artifact.isSnapshot();
 
-                //CHECKSTYLE_OFF: LineLength
-                buf.append( scriptableFlag )
-                   .append( ":" )
-                   .append( pomFile )
-                   .append( ":" )
-                   .append( artifact.getDependencyConflictId() )
-                   .append( ":" )
-                   .append( artifact.getClassifier() )
-                   .append( ":" )
-                   .append( artifact.getBaseVersion() )
-                   .append( ":" )
-                   .append( artifact.getScope() )
-                   .append( System.lineSeparator() );
-                //CHECKSTYLE_ON: LineLength
+                // CHECKSTYLE_OFF: LineLength
+                buf.append(scriptableFlag)
+                        .append(":")
+                        .append(pomFile)
+                        .append(":")
+                        .append(artifact.getDependencyConflictId())
+                        .append(":")
+                        .append(artifact.getClassifier())
+                        .append(":")
+                        .append(artifact.getBaseVersion())
+                        .append(":")
+                        .append(artifact.getScope())
+                        .append(System.lineSeparator());
+                // CHECKSTYLE_ON: LineLength
             }
-            getLog().info( System.lineSeparator() + buf );
+            getLog().info(System.lineSeparator() + buf);
         }
     }
 
-    private List<Artifact> filterDependencies( Set<Artifact> artifacts, String[] excludes )
-    {
-        ArtifactFilter filter = new StrictPatternExcludesArtifactFilter( Arrays.asList( excludes ) );
+    private List<Artifact> filterDependencies(Set<Artifact> artifacts, String[] excludes) {
+        ArtifactFilter filter = new StrictPatternExcludesArtifactFilter(Arrays.asList(excludes));
         List<Artifact> result = new ArrayList<>();
 
-        for ( Iterator<Artifact> it = artifacts.iterator(); it.hasNext(); )
-        {
+        for (Iterator<Artifact> it = artifacts.iterator(); it.hasNext(); ) {
             Artifact artifact = it.next();
-            if ( !filter.include( artifact ) )
-            {
+            if (!filter.include(artifact)) {
                 it.remove();
-                result.add( artifact );
+                result.add(artifact);
             }
         }
 
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java
index cdc7b963..afb52f99 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDepMgt.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.analyze;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.analyze;
 
 import java.util.Collections;
 import java.util.HashMap;
@@ -26,7 +25,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.DependencyManagement;
@@ -48,28 +46,26 @@ import org.codehaus.plexus.util.StringUtils;
  * @author <a href="mailto:brianefox@gmail.com">Brian Fox</a>
  * @since 2.0-alpha-3
  */
-@Mojo( name = "analyze-dep-mgt", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-public class AnalyzeDepMgt
-    extends AbstractMojo
-{
+@Mojo(name = "analyze-dep-mgt", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true)
+public class AnalyzeDepMgt extends AbstractMojo {
     // fields -----------------------------------------------------------------
 
     /**
      *
      */
-    @Parameter( defaultValue = "${project}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project}", readonly = true, required = true)
     private MavenProject project;
 
     /**
      * Fail the build if a problem is detected.
      */
-    @Parameter( property = "mdep.analyze.failBuild", defaultValue = "false" )
+    @Parameter(property = "mdep.analyze.failBuild", defaultValue = "false")
     private boolean failBuild = false;
 
     /**
      * Ignore Direct Dependency Overrides of dependencyManagement section.
      */
-    @Parameter( property = "mdep.analyze.ignore.direct", defaultValue = "true" )
+    @Parameter(property = "mdep.analyze.ignore.direct", defaultValue = "true")
     private boolean ignoreDirect = true;
 
     /**
@@ -77,7 +73,7 @@ public class AnalyzeDepMgt
      *
      * @since 2.7
      */
-    @Parameter( property = "mdep.analyze.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.analyze.skip", defaultValue = "false")
     private boolean skip;
 
     // Mojo methods -----------------------------------------------------------
@@ -86,26 +82,19 @@ public class AnalyzeDepMgt
      * @see org.apache.maven.plugin.Mojo#execute()
      */
     @Override
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-        if ( skip )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        if (skip) {
+            getLog().info("Skipping plugin execution");
             return;
         }
 
         boolean result = checkDependencyManagement();
-        if ( result )
-        {
-            if ( this.failBuild )
+        if (result) {
+            if (this.failBuild) {
 
-            {
-                throw new MojoExecutionException( "Found Dependency errors." );
-            }
-            else
-            {
-                getLog().warn( "Potential problems found in Dependency Management " );
+                throw new MojoExecutionException("Found Dependency errors.");
+            } else {
+                getLog().warn("Potential problems found in Dependency Management ");
             }
         }
     }
@@ -116,71 +105,60 @@ public class AnalyzeDepMgt
      * @return true if errors are found.
      * @throws MojoExecutionException
      */
-    private boolean checkDependencyManagement()
-        throws MojoExecutionException
-    {
+    private boolean checkDependencyManagement() throws MojoExecutionException {
         boolean foundError = false;
 
-        getLog().info( "Found Resolved Dependency/DependencyManagement mismatches:" );
+        getLog().info("Found Resolved Dependency/DependencyManagement mismatches:");
 
         List<Dependency> depMgtDependencies = null;
 
         DependencyManagement depMgt = project.getDependencyManagement();
-        if ( depMgt != null )
-        {
+        if (depMgt != null) {
             depMgtDependencies = depMgt.getDependencies();
         }
 
-        if ( depMgtDependencies != null && !depMgtDependencies.isEmpty() )
-        {
+        if (depMgtDependencies != null && !depMgtDependencies.isEmpty()) {
             // put all the dependencies from depMgt into a map for quick lookup
             Map<String, Dependency> depMgtMap = new HashMap<>();
             Map<String, Exclusion> exclusions = new HashMap<>();
-            for ( Dependency depMgtDependency : depMgtDependencies )
-            {
-                depMgtMap.put( depMgtDependency.getManagementKey(), depMgtDependency );
+            for (Dependency depMgtDependency : depMgtDependencies) {
+                depMgtMap.put(depMgtDependency.getManagementKey(), depMgtDependency);
 
                 // now put all the exclusions into a map for quick lookup
-                exclusions.putAll( addExclusions( depMgtDependency.getExclusions() ) );
+                exclusions.putAll(addExclusions(depMgtDependency.getExclusions()));
             }
 
             // get dependencies for the project (including transitive)
-            Set<Artifact> allDependencyArtifacts = new LinkedHashSet<>( project.getArtifacts() );
+            Set<Artifact> allDependencyArtifacts = new LinkedHashSet<>(project.getArtifacts());
 
             // don't warn if a dependency that is directly listed overrides
             // depMgt. That's ok.
-            if ( this.ignoreDirect )
-            {
-                getLog().info( "\tIgnoring Direct Dependencies." );
+            if (this.ignoreDirect) {
+                getLog().info("\tIgnoring Direct Dependencies.");
                 Set<Artifact> directDependencies = project.getDependencyArtifacts();
-                allDependencyArtifacts.removeAll( directDependencies );
+                allDependencyArtifacts.removeAll(directDependencies);
             }
 
             // log exclusion errors
-            List<Artifact> exclusionErrors = getExclusionErrors( exclusions, allDependencyArtifacts );
-            for ( Artifact exclusion : exclusionErrors )
-            {
-                getLog().info( StringUtils.stripEnd( getArtifactManagementKey( exclusion ), ":" )
-                    + " was excluded in DepMgt, but version " + exclusion.getVersion()
-                    + " has been found in the dependency tree." );
+            List<Artifact> exclusionErrors = getExclusionErrors(exclusions, allDependencyArtifacts);
+            for (Artifact exclusion : exclusionErrors) {
+                getLog().info(StringUtils.stripEnd(getArtifactManagementKey(exclusion), ":")
+                        + " was excluded in DepMgt, but version " + exclusion.getVersion()
+                        + " has been found in the dependency tree.");
                 foundError = true;
             }
 
             // find and log version mismatches
-            Map<Artifact, Dependency> mismatch = getMismatch( depMgtMap, allDependencyArtifacts );
-            for ( Map.Entry<Artifact, Dependency> entry : mismatch.entrySet() )
-            {
-                logMismatch( entry.getKey(), entry.getValue() );
+            Map<Artifact, Dependency> mismatch = getMismatch(depMgtMap, allDependencyArtifacts);
+            for (Map.Entry<Artifact, Dependency> entry : mismatch.entrySet()) {
+                logMismatch(entry.getKey(), entry.getValue());
                 foundError = true;
             }
-            if ( !foundError )
-            {
-                getLog().info( "\tNone" );
+            if (!foundError) {
+                getLog().info("\tNone");
             }
-        }
-        else
-        {
-            getLog().info( "\tNothing in DepMgt." );
+        } else {
+            getLog().info("\tNothing in DepMgt.");
         }
 
         return foundError;
@@ -192,12 +170,9 @@ public class AnalyzeDepMgt
      * @param exclusionList to be added to the map.
      * @return a map of the exclusions using the Dependency ManagementKey as the keyset.
      */
-    public Map<String, Exclusion> addExclusions( List<Exclusion> exclusionList )
-    {
-        if ( exclusionList != null )
-        {
-            return exclusionList.stream()
-                    .collect( Collectors.toMap( this::getExclusionKey, exclusion -> exclusion ) );
+    public Map<String, Exclusion> addExclusions(List<Exclusion> exclusionList) {
+        if (exclusionList != null) {
+            return exclusionList.stream().collect(Collectors.toMap(this::getExclusionKey, exclusion -> exclusion));
         }
         return Collections.emptyMap();
     }
@@ -210,19 +185,17 @@ public class AnalyzeDepMgt
      * @param allDependencyArtifacts resolved artifacts to be compared.
      * @return list of artifacts that should have been excluded.
      */
-    public List<Artifact> getExclusionErrors( Map<String, Exclusion> exclusions, Set<Artifact> allDependencyArtifacts )
-    {
+    public List<Artifact> getExclusionErrors(Map<String, Exclusion> exclusions, Set<Artifact> allDependencyArtifacts) {
         return allDependencyArtifacts.stream()
-                .filter( artifact -> exclusions.containsKey( getExclusionKey( artifact ) ) )
-                .collect( Collectors.toList( ) );
+                .filter(artifact -> exclusions.containsKey(getExclusionKey(artifact)))
+                .collect(Collectors.toList());
     }
 
     /**
      * @param artifact {@link Artifact}
      * @return The resulting GA.
      */
-    public String getExclusionKey( Artifact artifact )
-    {
+    public String getExclusionKey(Artifact artifact) {
         return artifact.getGroupId() + ":" + artifact.getArtifactId();
     }
 
@@ -230,8 +203,7 @@ public class AnalyzeDepMgt
      * @param ex The exclusion key.
      * @return The resulting combination of groupId+artifactId.
      */
-    public String getExclusionKey( Exclusion ex )
-    {
+    public String getExclusionKey(Exclusion ex) {
         return ex.getGroupId() + ":" + ex.getArtifactId();
     }
 
@@ -242,23 +214,19 @@ public class AnalyzeDepMgt
      * @param allDependencyArtifacts contains the set of all artifacts to compare.
      * @return a map containing the resolved artifact as the key and the listed dependency as the value.
      */
-    public Map<Artifact, Dependency> getMismatch( Map<String, Dependency> depMgtMap,
-                                                  Set<Artifact> allDependencyArtifacts )
-    {
+    public Map<Artifact, Dependency> getMismatch(
+            Map<String, Dependency> depMgtMap, Set<Artifact> allDependencyArtifacts) {
         Map<Artifact, Dependency> mismatchMap = new HashMap<>();
 
-        for ( Artifact dependencyArtifact : allDependencyArtifacts )
-        {
-            Dependency depFromDepMgt = depMgtMap.get( getArtifactManagementKey( dependencyArtifact ) );
-            if ( depFromDepMgt != null )
-            {
+        for (Artifact dependencyArtifact : allDependencyArtifacts) {
+            Dependency depFromDepMgt = depMgtMap.get(getArtifactManagementKey(dependencyArtifact));
+            if (depFromDepMgt != null) {
                 // workaround for MNG-2961
                 dependencyArtifact.isSnapshot();
 
-                if ( depFromDepMgt.getVersion() != null
-                    && !depFromDepMgt.getVersion().equals( dependencyArtifact.getBaseVersion() ) )
-                {
-                    mismatchMap.put( dependencyArtifact, depFromDepMgt );
+                if (depFromDepMgt.getVersion() != null
+                        && !depFromDepMgt.getVersion().equals(dependencyArtifact.getBaseVersion())) {
+                    mismatchMap.put(dependencyArtifact, depFromDepMgt);
                 }
             }
         }
@@ -273,18 +241,16 @@ public class AnalyzeDepMgt
      * @param dependencyFromDepMgt the dependency listed in the DependencyManagement section.
      * @throws MojoExecutionException in case of errors.
      */
-    public void logMismatch( Artifact dependencyArtifact, Dependency dependencyFromDepMgt )
-        throws MojoExecutionException
-    {
-        if ( dependencyArtifact == null || dependencyFromDepMgt == null )
-        {
-            throw new MojoExecutionException( "Invalid params: Artifact: " + dependencyArtifact + " Dependency: "
-                + dependencyFromDepMgt );
+    public void logMismatch(Artifact dependencyArtifact, Dependency dependencyFromDepMgt)
+            throws MojoExecutionException {
+        if (dependencyArtifact == null || dependencyFromDepMgt == null) {
+            throw new MojoExecutionException(
+                    "Invalid params: Artifact: " + dependencyArtifact + " Dependency: " + dependencyFromDepMgt);
         }
 
-        getLog().info( "\tDependency: " + StringUtils.stripEnd( dependencyFromDepMgt.getManagementKey(), ":" ) );
-        getLog().info( "\t\tDepMgt  : " + dependencyFromDepMgt.getVersion() );
-        getLog().info( "\t\tResolved: " + dependencyArtifact.getBaseVersion() );
+        getLog().info("\tDependency: " + StringUtils.stripEnd(dependencyFromDepMgt.getManagementKey(), ":"));
+        getLog().info("\t\tDepMgt  : " + dependencyFromDepMgt.getVersion());
+        getLog().info("\t\tResolved: " + dependencyArtifact.getBaseVersion());
     }
 
     /**
@@ -293,57 +259,50 @@ public class AnalyzeDepMgt
      * @param artifact to gen the key for
      * @return a string in the form: groupId:ArtifactId:Type[:Classifier]
      */
-    public String getArtifactManagementKey( Artifact artifact )
-    {
+    public String getArtifactManagementKey(Artifact artifact) {
         return artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getType()
-            + ( ( artifact.getClassifier() != null ) ? ":" + artifact.getClassifier() : "" );
+                + ((artifact.getClassifier() != null) ? ":" + artifact.getClassifier() : "");
     }
 
     /**
      * @return the failBuild
      */
-    protected final boolean isFailBuild()
-    {
+    protected final boolean isFailBuild() {
         return this.failBuild;
     }
 
     /**
      * @param theFailBuild the failBuild to set
      */
-    public void setFailBuild( boolean theFailBuild )
-    {
+    public void setFailBuild(boolean theFailBuild) {
         this.failBuild = theFailBuild;
     }
 
     /**
      * @return the project
      */
-    protected final MavenProject getProject()
-    {
+    protected final MavenProject getProject() {
         return this.project;
     }
 
     /**
      * @param theProject the project to set
      */
-    public void setProject( MavenProject theProject )
-    {
+    public void setProject(MavenProject theProject) {
         this.project = theProject;
     }
 
     /**
      * @return the ignoreDirect
      */
-    protected final boolean isIgnoreDirect()
-    {
+    protected final boolean isIgnoreDirect() {
         return this.ignoreDirect;
     }
 
     /**
      * @param theIgnoreDirect the ignoreDirect to set
      */
-    public void setIgnoreDirect( boolean theIgnoreDirect )
-    {
+    public void setIgnoreDirect(boolean theIgnoreDirect) {
         this.ignoreDirect = theIgnoreDirect;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDuplicateMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDuplicateMojo.java
index 552f4981..fe6aa872 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDuplicateMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeDuplicateMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.analyze;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.analyze;
 
 import java.io.IOException;
 import java.io.Reader;
@@ -27,7 +26,6 @@ import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
-
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Model;
@@ -47,119 +45,99 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
  *
  * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
  */
-@Mojo( name = "analyze-duplicate", aggregator = false, threadSafe = true )
-public class AnalyzeDuplicateMojo
-    extends AbstractMojo
-{
+@Mojo(name = "analyze-duplicate", aggregator = false, threadSafe = true)
+public class AnalyzeDuplicateMojo extends AbstractMojo {
     public static final String MESSAGE_DUPLICATE_DEP_IN_DEPENDENCIES =
-        "List of duplicate dependencies defined in <dependencies/> in your pom.xml:\n";
+            "List of duplicate dependencies defined in <dependencies/> in your pom.xml:\n";
 
     public static final String MESSAGE_DUPLICATE_DEP_IN_DEPMGMT =
-        "List of duplicate dependencies defined in <dependencyManagement/> in your pom.xml:\n";
+            "List of duplicate dependencies defined in <dependencyManagement/> in your pom.xml:\n";
 
     /**
      * Skip plugin execution completely.
      *
      * @since 2.7
      */
-    @Parameter( property = "mdep.analyze.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.analyze.skip", defaultValue = "false")
     private boolean skip;
 
     /**
      * The Maven project to analyze.
      */
-    @Parameter( defaultValue = "${project}", readonly = true, required = true )
+    @Parameter(defaultValue = "${project}", readonly = true, required = true)
     private MavenProject project;
 
     /**
      * {@inheritDoc}
      */
     @Override
-    public void execute()
-        throws MojoExecutionException, MojoFailureException
-    {
-        if ( skip )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        if (skip) {
+            getLog().info("Skipping plugin execution");
             return;
         }
 
         MavenXpp3Reader pomReader = new MavenXpp3Reader();
         Model model;
-        try ( Reader reader = ReaderFactory.newXmlReader( project.getFile() ) )
-        {
-            model = pomReader.read( reader );
-        }
-        catch ( IOException | XmlPullParserException e )
-        {
-            throw new MojoExecutionException( "Exception: " + e.getMessage(), e );
+        try (Reader reader = ReaderFactory.newXmlReader(project.getFile())) {
+            model = pomReader.read(reader);
+        } catch (IOException | XmlPullParserException e) {
+            throw new MojoExecutionException("Exception: " + e.getMessage(), e);
         }
 
         Set<String> duplicateDependencies = Collections.emptySet();
-        if ( model.getDependencies() != null )
-        {
-            duplicateDependencies = findDuplicateDependencies( model.getDependencies() );
+        if (model.getDependencies() != null) {
+            duplicateDependencies = findDuplicateDependencies(model.getDependencies());
         }
 
         Set<String> duplicateDependenciesManagement = Collections.emptySet();
-        if ( model.getDependencyManagement() != null && model.getDependencyManagement().getDependencies() != null )
-        {
+        if (model.getDependencyManagement() != null
+                && model.getDependencyManagement().getDependencies() != null) {
             duplicateDependenciesManagement =
-                findDuplicateDependencies( model.getDependencyManagement().getDependencies() );
+                    findDuplicateDependencies(model.getDependencyManagement().getDependencies());
         }
 
-        if ( getLog().isInfoEnabled() )
-        {
+        if (getLog().isInfoEnabled()) {
             StringBuilder sb = new StringBuilder();
 
-            createMessage( duplicateDependencies, sb, MESSAGE_DUPLICATE_DEP_IN_DEPENDENCIES );
-            createMessage( duplicateDependenciesManagement, sb, MESSAGE_DUPLICATE_DEP_IN_DEPMGMT );
+            createMessage(duplicateDependencies, sb, MESSAGE_DUPLICATE_DEP_IN_DEPENDENCIES);
+            createMessage(duplicateDependenciesManagement, sb, MESSAGE_DUPLICATE_DEP_IN_DEPMGMT);
 
-            if ( sb.length() > 0 )
-            {
-                getLog().info( sb.toString() );
-            }
-            else
-            {
-                getLog().info( "No duplicate dependencies found in <dependencies/> or in <dependencyManagement/>" );
+            if (sb.length() > 0) {
+                getLog().info(sb.toString());
+            } else {
+                getLog().info("No duplicate dependencies found in <dependencies/> or in <dependencyManagement/>");
             }
         }
     }
 
-    private void createMessage( Set<String> duplicateDependencies, StringBuilder sb,
-                                String messageDuplicateDepInDependencies )
-    {
-        if ( !duplicateDependencies.isEmpty() )
-        {
-            if ( sb.length() > 0 )
-            {
-                sb.append( "\n" );
+    private void createMessage(
+            Set<String> duplicateDependencies, StringBuilder sb, String messageDuplicateDepInDependencies) {
+        if (!duplicateDependencies.isEmpty()) {
+            if (sb.length() > 0) {
+                sb.append("\n");
             }
-            sb.append( messageDuplicateDepInDependencies );
-            for ( Iterator<String> it = duplicateDependencies.iterator(); it.hasNext(); )
-            {
+            sb.append(messageDuplicateDepInDependencies);
+            for (Iterator<String> it = duplicateDependencies.iterator(); it.hasNext(); ) {
                 String dup = it.next();
 
-                sb.append( "\to " ).append( dup );
-                if ( it.hasNext() )
-                {
-                    sb.append( "\n" );
+                sb.append("\to ").append(dup);
+                if (it.hasNext()) {
+                    sb.append("\n");
                 }
             }
         }
     }
 
-    private Set<String> findDuplicateDependencies( List<Dependency> modelDependencies )
-    {
+    private Set<String> findDuplicateDependencies(List<Dependency> modelDependencies) {
         List<String> modelDependencies2 = new ArrayList<>();
-        for ( Dependency dep : modelDependencies )
-        {
-            modelDependencies2.add( dep.getManagementKey() );
+        for (Dependency dep : modelDependencies) {
+            modelDependencies2.add(dep.getManagementKey());
         }
 
         // @formatter:off
         return new LinkedHashSet<>(
-                CollectionUtils.disjunction( modelDependencies2, new LinkedHashSet<>( modelDependencies2 ) ) );
+                CollectionUtils.disjunction(modelDependencies2, new LinkedHashSet<>(modelDependencies2)));
         // @formatter:on
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeMojo.java
index 2bd43414..84907bb6 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.analyze;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.analyze;
 
 import org.apache.maven.plugins.annotations.Execute;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
@@ -38,10 +37,8 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
  * @see AnalyzeOnlyMojo
  * @since 2.0-alpha-3
  */
-@Mojo( name = "analyze", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-@Execute( phase = LifecyclePhase.TEST_COMPILE )
-public class AnalyzeMojo
-    extends AbstractAnalyzeMojo
-{
+@Mojo(name = "analyze", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true)
+@Execute(phase = LifecyclePhase.TEST_COMPILE)
+public class AnalyzeMojo extends AbstractAnalyzeMojo {
     // subclassed to provide annotations
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeOnlyMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeOnlyMojo.java
index 0265661d..43d1e302 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeOnlyMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeOnlyMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.analyze;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.analyze;
 
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
@@ -38,16 +37,13 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
  * @see AnalyzeMojo
  * @since 2.0
  */
-//@formatter:off
-@Mojo( 
-    name = "analyze-only", 
-    requiresDependencyResolution = ResolutionScope.TEST, 
-    defaultPhase = LifecyclePhase.VERIFY, 
-    threadSafe = true 
-)
-//@formatter:on
-public class AnalyzeOnlyMojo
-    extends AbstractAnalyzeMojo
-{
+// @formatter:off
+@Mojo(
+        name = "analyze-only",
+        requiresDependencyResolution = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.VERIFY,
+        threadSafe = true)
+// @formatter:on
+public class AnalyzeOnlyMojo extends AbstractAnalyzeMojo {
     // subclassed to provide annotations
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportMojo.java
index fd51491f..5e3e40fa 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.analyze;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,7 +16,10 @@ package org.apache.maven.plugins.dependency.analyze;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.analyze;
 
+import java.util.Locale;
+import java.util.ResourceBundle;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Execute;
@@ -32,20 +33,15 @@ import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis;
 import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalyzer;
 import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalyzerException;
 
-import java.util.Locale;
-import java.util.ResourceBundle;
-
 /**
  * Analyzes the dependencies of this project and produces a report that summarizes which are: used and declared; used
  * and undeclared; unused and declared.
  *
  * @since 2.0-alpha-5
  */
-@Mojo( name = "analyze-report", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-@Execute( phase = LifecyclePhase.TEST_COMPILE )
-public class AnalyzeReportMojo
-    extends AbstractMavenReport
-{
+@Mojo(name = "analyze-report", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true)
+@Execute(phase = LifecyclePhase.TEST_COMPILE)
+public class AnalyzeReportMojo extends AbstractMavenReport {
     // fields -----------------------------------------------------------------
 
     /**
@@ -59,7 +55,7 @@ public class AnalyzeReportMojo
      *
      * @since 2.2
      */
-    @Parameter( property = "ignoreNonCompile", defaultValue = "false" )
+    @Parameter(property = "ignoreNonCompile", defaultValue = "false")
     private boolean ignoreNonCompile;
 
     /**
@@ -76,7 +72,7 @@ public class AnalyzeReportMojo
      *
      * @since 2.7
      */
-    @Parameter( property = "mdep.analyze.skip", defaultValue = "false" )
+    @Parameter(property = "mdep.analyze.skip", defaultValue = "false")
     private boolean skip;
 
     // Mojo methods -----------------------------------------------------------
@@ -85,56 +81,45 @@ public class AnalyzeReportMojo
      * @see org.apache.maven.plugin.Mojo#execute()
      */
     @Override
-    public void executeReport( Locale locale )
-        throws MavenReportException
-    {
+    public void executeReport(Locale locale) throws MavenReportException {
         // Step 1: Analyze the project
         ProjectDependencyAnalysis analysis;
-        try
-        {
-            analysis = analyzer.analyze( project );
+        try {
+            analysis = analyzer.analyze(project);
 
-            if ( usedDependencies != null )
-            {
-                analysis = analysis.forceDeclaredDependenciesUsage( usedDependencies );
+            if (usedDependencies != null) {
+                analysis = analysis.forceDeclaredDependenciesUsage(usedDependencies);
             }
-        }
-        catch ( ProjectDependencyAnalyzerException exception )
-        {
-            throw new MavenReportException( "Cannot analyze dependencies", exception );
+        } catch (ProjectDependencyAnalyzerException exception) {
+            throw new MavenReportException("Cannot analyze dependencies", exception);
         }
 
         // remove everything that's not in the compile scope
-        if ( ignoreNonCompile )
-        {
+        if (ignoreNonCompile) {
             analysis = analysis.ignoreNonCompile();
         }
 
         // Step 2: Create sink and bundle
         Sink sink = getSink();
-        ResourceBundle bundle = getBundle( locale );
+        ResourceBundle bundle = getBundle(locale);
 
         // Step 3: Generate the report
         AnalyzeReportView analyzethis = new AnalyzeReportView();
-        analyzethis.generateReport( analysis, sink, bundle );
+        analyzethis.generateReport(analysis, sink, bundle);
     }
 
     // MavenReport methods ----------------------------------------------------
 
-
     @Override
-    public boolean canGenerateReport()
-    {
-        if ( skip )
-        {
-            getLog().info( "Skipping plugin execution" );
+    public boolean canGenerateReport() {
+        if (skip) {
+            getLog().info("Skipping plugin execution");
             return false;
         }
 
         // Step 0: Checking pom availability
-        if ( "pom".equals( project.getPackaging() ) )
-        {
-            getLog().info( "Skipping pom project" );
+        if ("pom".equals(project.getPackaging())) {
+            getLog().info("Skipping pom project");
             return false;
         }
 
@@ -145,8 +130,7 @@ public class AnalyzeReportMojo
      * @see org.apache.maven.reporting.AbstractMavenReport#getOutputName()
      */
     @Override
-    public String getOutputName()
-    {
+    public String getOutputName() {
         return "dependency-analysis";
     }
 
@@ -154,18 +138,16 @@ public class AnalyzeReportMojo
      * @see org.apache.maven.reporting.AbstractMavenReport#getName(java.util.Locale)
      */
     @Override
-    public String getName( Locale locale )
-    {
-        return getBundle( locale ).getString( "analyze.report.name" );
+    public String getName(Locale locale) {
+        return getBundle(locale).getString("analyze.report.name");
     }
 
     /*
      * @see org.apache.maven.reporting.AbstractMavenReport#getDescription(java.util.Locale)
      */
     @Override
-    public String getDescription( Locale locale )
-    {
-        return getBundle( locale ).getString( "analyze.report.description" );
+    public String getDescription(Locale locale) {
+        return getBundle(locale).getString("analyze.report.description");
     }
 
     // protected methods ------------------------------------------------------
@@ -174,8 +156,8 @@ public class AnalyzeReportMojo
      * @param locale the current locale
      * @return The resource bundle {@link ResourceBundle}
      */
-    protected ResourceBundle getBundle( Locale locale )
-    {
-        return ResourceBundle.getBundle( "analyze-report", locale, this.getClass().getClassLoader() );
+    protected ResourceBundle getBundle(Locale locale) {
+        return ResourceBundle.getBundle(
+                "analyze-report", locale, this.getClass().getClassLoader());
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java
index 571be741..4bcc3d47 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.analyze;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.analyze;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,10 +16,10 @@ package org.apache.maven.plugins.dependency.analyze;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.analyze;
 
 import java.util.Iterator;
 import java.util.ResourceBundle;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis;
@@ -30,20 +28,18 @@ import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis;
  * This is the view part of the analyze-report mojo. It generates the HTML report for the project website. The HTML
  * output is same as the CLI output.
  */
-public class AnalyzeReportView
-{
+public class AnalyzeReportView {
     /**
      * Generates the HTML report.
-     * 
+     *
      * @param analysis {@link ProjectDependencyAnalysis}
      * @param sink {@link Sink}
      * @param bundle {@link ResourceBundle}
      */
-    public void generateReport( ProjectDependencyAnalysis analysis, Sink sink, ResourceBundle bundle )
-    {
+    public void generateReport(ProjectDependencyAnalysis analysis, Sink sink, ResourceBundle bundle) {
         sink.head();
         sink.title();
-        sink.text( bundle.getString( "analyze.report.header" ) );
+        sink.text(bundle.getString("analyze.report.header"));
         sink.title_();
         sink.head_();
         sink.body();
@@ -51,78 +47,69 @@ public class AnalyzeReportView
         // Generate title
         sink.section1();
         sink.sectionTitle1();
-        sink.text( bundle.getString( "analyze.report.mainTitle" ) );
+        sink.text(bundle.getString("analyze.report.mainTitle"));
         sink.sectionTitle1_();
 
         // Generate Used Declared dependencies:
         sink.section2();
         sink.sectionTitle2();
-        sink.text( bundle.getString( "analyze.report.UsedDeclaredDependencies" ) );
+        sink.text(bundle.getString("analyze.report.UsedDeclaredDependencies"));
         sink.sectionTitle2_();
-        if ( analysis.getUsedDeclaredArtifacts().isEmpty() )
-        {
+        if (analysis.getUsedDeclaredArtifacts().isEmpty()) {
             sink.paragraph();
-            sink.text( bundle.getString( "analyze.report.noDependency" ) );
+            sink.text(bundle.getString("analyze.report.noDependency"));
             sink.paragraph_();
             sink.horizontalRule();
-        }
-        else
-        {
-            generateDependenciesTable( sink, analysis.getUsedDeclaredArtifacts().iterator() );
+        } else {
+            generateDependenciesTable(sink, analysis.getUsedDeclaredArtifacts().iterator());
         }
         sink.section2_();
 
         // Generate Used Undeclared dependencies:
         sink.section2();
         sink.sectionTitle2();
-        sink.text( bundle.getString( "analyze.report.UsedUndeclaredDependencies" ) );
+        sink.text(bundle.getString("analyze.report.UsedUndeclaredDependencies"));
         sink.sectionTitle2_();
-        if ( analysis.getUsedUndeclaredArtifacts().isEmpty() )
-        {
+        if (analysis.getUsedUndeclaredArtifacts().isEmpty()) {
             sink.paragraph();
-            sink.text( bundle.getString( "analyze.report.noDependency" ) );
+            sink.text(bundle.getString("analyze.report.noDependency"));
             sink.paragraph_();
             sink.horizontalRule();
-        }
-        else
-        {
-            generateDependenciesTable( sink, analysis.getUsedUndeclaredArtifacts().iterator() );
+        } else {
+            generateDependenciesTable(
+                    sink, analysis.getUsedUndeclaredArtifacts().iterator());
         }
         sink.section2_();
 
         // Generate Unused declared dependencies:
         sink.section2();
         sink.sectionTitle2();
-        sink.text( bundle.getString( "analyze.report.UnusedDeclaredDependencies" ) );
+        sink.text(bundle.getString("analyze.report.UnusedDeclaredDependencies"));
         sink.sectionTitle2_();
-        if ( analysis.getUnusedDeclaredArtifacts().isEmpty() )
-        {
+        if (analysis.getUnusedDeclaredArtifacts().isEmpty()) {
             sink.paragraph();
-            sink.text( bundle.getString( "analyze.report.noDependency" ) );
+            sink.text(bundle.getString("analyze.report.noDependency"));
             sink.paragraph_();
             sink.horizontalRule();
-        }
-        else
-        {
-            generateDependenciesTable( sink, analysis.getUnusedDeclaredArtifacts().iterator() );
+        } else {
+            generateDependenciesTable(
+                    sink, analysis.getUnusedDeclaredArtifacts().iterator());
         }
         sink.section2_();
 
         // Generate Non-Test Scoped Test Dependencies:
         sink.section2();
         sink.sectionTitle2();
-        sink.text( "Compile Scoped Test Dependencies" );
+        sink.text("Compile Scoped Test Dependencies");
         sink.sectionTitle2_();
-        if ( analysis.getTestArtifactsWithNonTestScope().isEmpty() )
-        {
+        if (analysis.getTestArtifactsWithNonTestScope().isEmpty()) {
             sink.paragraph();
-            sink.text( "None" );
+            sink.text("None");
             sink.paragraph_();
             sink.horizontalRule();
-        }
-        else
-        {
-            generateDependenciesTable( sink, analysis.getTestArtifactsWithNonTestScope().iterator() );
+        } else {
+            generateDependenciesTable(
+                    sink, analysis.getTestArtifactsWithNonTestScope().iterator());
         }
         sink.section2_();
 
@@ -136,89 +123,84 @@ public class AnalyzeReportView
 
     /**
      * Generate a table for the given dependencies iterator.
-     * 
+     *
      * @param sink {@link Sink}
      * @param iter {@link Artifact}
      */
-    public void generateDependenciesTable( Sink sink, Iterator<Artifact> iter )
-    {
+    public void generateDependenciesTable(Sink sink, Iterator<Artifact> iter) {
         sink.table();
 
         sink.tableRow();
         sink.tableCell();
         sink.bold();
-        sink.text( "GroupId" );
+        sink.text("GroupId");
         sink.bold_();
         sink.tableCell_();
 
         sink.tableCell();
         sink.bold();
-        sink.text( "ArtifactId" );
+        sink.text("ArtifactId");
         sink.bold_();
         sink.tableCell_();
 
         sink.tableCell();
         sink.bold();
-        sink.text( "Version" );
+        sink.text("Version");
         sink.bold_();
         sink.tableCell_();
 
         sink.tableCell();
         sink.bold();
-        sink.text( "Scope" );
+        sink.text("Scope");
         sink.bold_();
         sink.tableCell_();
 
         sink.tableCell();
         sink.bold();
-        sink.text( "Classifier" );
+        sink.text("Classifier");
         sink.bold_();
         sink.tableCell_();
 
         sink.tableCell();
         sink.bold();
-        sink.text( "Type" );
+        sink.text("Type");
         sink.bold_();
         sink.tableCell_();
 
         sink.tableCell();
         sink.bold();
-        sink.text( "Optional" );
+        sink.text("Optional");
         sink.bold_();
         sink.tableCell_();
 
         sink.tableRow_();
-        while ( iter.hasNext() )
-        {
+        while (iter.hasNext()) {
             Artifact artifact = iter.next();
 
             sink.tableRow();
             sink.tableCell();
-            sink.text( artifact.getGroupId() );
+            sink.text(artifact.getGroupId());
             sink.tableCell_();
             sink.tableCell();
-            sink.text( artifact.getArtifactId() );
+            sink.text(artifact.getArtifactId());
             sink.tableCell_();
             sink.tableCell();
-            sink.text( artifact.getVersion() );
+            sink.text(artifact.getVersion());
             sink.tableCell_();
             sink.tableCell();
-            sink.text( artifact.getScope() );
+            sink.text(artifact.getScope());
             sink.tableCell_();
             sink.tableCell();
-            sink.text( artifact.getClassifier() );
+            sink.text(artifact.getClassifier());
             sink.tableCell_();
             sink.tableCell();
-            sink.text( artifact.getType() );
+            sink.text(artifact.getType());
             sink.tableCell_();
             sink.tableCell();
-            if ( artifact.isOptional() )
-            {
-                sink.text( "" );
-            }
-            else
-            {
-                sink.text( "false" );
+            if (artifact.isOptional()) {
+                sink.text("");
+            } else {
+                sink.text("false");
             }
 
             sink.tableCell_();
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java
index eed76219..6e6dd527 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromConfiguration;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,12 +16,12 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromConfiguration;
 
 import java.io.File;
 import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.handler.ArtifactHandler;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
@@ -51,15 +49,13 @@ import org.codehaus.plexus.util.StringUtils;
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @see ArtifactItem
  */
-public abstract class AbstractFromConfigurationMojo
-    extends AbstractDependencyMojo
-{
+public abstract class AbstractFromConfigurationMojo extends AbstractDependencyMojo {
     /**
      * Default output location used for mojo, unless overridden in ArtifactItem.
      *
      * @since 1.0
      */
-    @Parameter( property = "outputDirectory", defaultValue = "${project.build.directory}/dependency" )
+    @Parameter(property = "outputDirectory", defaultValue = "${project.build.directory}/dependency")
     private File outputDirectory;
 
     /**
@@ -67,7 +63,7 @@ public abstract class AbstractFromConfigurationMojo
      *
      * @since 1.0
      */
-    @Parameter( property = "mdep.overWriteReleases", defaultValue = "false" )
+    @Parameter(property = "mdep.overWriteReleases", defaultValue = "false")
     private boolean overWriteReleases;
 
     /**
@@ -75,7 +71,7 @@ public abstract class AbstractFromConfigurationMojo
      *
      * @since 1.0
      */
-    @Parameter( property = "mdep.overWriteSnapshots", defaultValue = "false" )
+    @Parameter(property = "mdep.overWriteSnapshots", defaultValue = "false")
     private boolean overWriteSnapshots;
 
     /**
@@ -83,7 +79,7 @@ public abstract class AbstractFromConfigurationMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.overIfNewer", defaultValue = "true" )
+    @Parameter(property = "mdep.overIfNewer", defaultValue = "true")
     private boolean overWriteIfNewer;
 
     /**
@@ -113,19 +109,16 @@ public abstract class AbstractFromConfigurationMojo
     @Component
     private ArtifactHandlerManager artifactHandlerManager;
 
-    abstract ArtifactItemFilter getMarkedArtifactFilter( ArtifactItem item );
+    abstract ArtifactItemFilter getMarkedArtifactFilter(ArtifactItem item);
 
     /**
      * artifactItems is filled by either field injection or by setArtifact().
-     * 
+     *
      * @throws MojoFailureException in case of an error.
      */
-    protected void verifyRequirements()
-        throws MojoFailureException
-    {
-        if ( artifactItems == null || artifactItems.isEmpty() )
-        {
-            throw new MojoFailureException( "Either artifact or artifactItems is required " );
+    protected void verifyRequirements() throws MojoFailureException {
+        if (artifactItems == null || artifactItems.isEmpty()) {
+            throw new MojoFailureException("Either artifact or artifactItems is required ");
         }
     }
 
@@ -138,63 +131,51 @@ public abstract class AbstractFromConfigurationMojo
      * @throws MojoExecutionException with a message if an error occurs.
      * @see ArtifactItem
      */
-    protected List<ArtifactItem> getProcessedArtifactItems( ProcessArtifactItemsRequest processArtifactItemsRequest )
-        throws MojoExecutionException
-    {
+    protected List<ArtifactItem> getProcessedArtifactItems(ProcessArtifactItemsRequest processArtifactItemsRequest)
+            throws MojoExecutionException {
 
         boolean removeVersion = processArtifactItemsRequest.isRemoveVersion(),
-                        prependGroupId = processArtifactItemsRequest.isPrependGroupId(),
-                        useBaseVersion = processArtifactItemsRequest.isUseBaseVersion();
+                prependGroupId = processArtifactItemsRequest.isPrependGroupId(),
+                useBaseVersion = processArtifactItemsRequest.isUseBaseVersion();
 
         boolean removeClassifier = processArtifactItemsRequest.isRemoveClassifier();
 
-        if ( artifactItems == null || artifactItems.size() < 1 )
-        {
-            throw new MojoExecutionException( "There are no artifactItems configured." );
+        if (artifactItems == null || artifactItems.size() < 1) {
+            throw new MojoExecutionException("There are no artifactItems configured.");
         }
 
-        for ( ArtifactItem artifactItem : artifactItems )
-        {
-            this.getLog().info( "Configured Artifact: " + artifactItem.toString() );
+        for (ArtifactItem artifactItem : artifactItems) {
+            this.getLog().info("Configured Artifact: " + artifactItem.toString());
 
-            if ( artifactItem.getOutputDirectory() == null )
-            {
-                artifactItem.setOutputDirectory( this.outputDirectory );
+            if (artifactItem.getOutputDirectory() == null) {
+                artifactItem.setOutputDirectory(this.outputDirectory);
             }
             artifactItem.getOutputDirectory().mkdirs();
 
             // make sure we have a version.
-            if ( StringUtils.isEmpty( artifactItem.getVersion() ) )
-            {
-                fillMissingArtifactVersion( artifactItem );
+            if (StringUtils.isEmpty(artifactItem.getVersion())) {
+                fillMissingArtifactVersion(artifactItem);
             }
 
-            artifactItem.setArtifact( this.getArtifact( artifactItem ) );
+            artifactItem.setArtifact(this.getArtifact(artifactItem));
 
-            if ( StringUtils.isEmpty( artifactItem.getDestFileName() ) )
-            {
-                artifactItem.setDestFileName( DependencyUtil.getFormattedFileName( artifactItem.getArtifact(),
-                                                                                   removeVersion, prependGroupId,
-                                                                                   useBaseVersion, removeClassifier ) );
+            if (StringUtils.isEmpty(artifactItem.getDestFileName())) {
+                artifactItem.setDestFileName(DependencyUtil.getFormattedFileName(
+                        artifactItem.getArtifact(), removeVersion, prependGroupId, useBaseVersion, removeClassifier));
             }
 
-            try
-            {
-                artifactItem.setNeedsProcessing( checkIfProcessingNeeded( artifactItem ) );
-            }
-            catch ( ArtifactFilterException e )
-            {
-                throw new MojoExecutionException( e.getMessage(), e );
+            try {
+                artifactItem.setNeedsProcessing(checkIfProcessingNeeded(artifactItem));
+            } catch (ArtifactFilterException e) {
+                throw new MojoExecutionException(e.getMessage(), e);
             }
         }
         return artifactItems;
     }
 
-    private boolean checkIfProcessingNeeded( ArtifactItem item )
-        throws MojoExecutionException, ArtifactFilterException
-    {
-        return StringUtils.equalsIgnoreCase( item.getOverWrite(), "true" )
-            || getMarkedArtifactFilter( item ).isArtifactIncluded( item );
+    private boolean checkIfProcessingNeeded(ArtifactItem item) throws MojoExecutionException, ArtifactFilterException {
+        return StringUtils.equalsIgnoreCase(item.getOverWrite(), "true")
+                || getMarkedArtifactFilter(item).isArtifactIncluded(item);
     }
 
     /**
@@ -205,13 +186,10 @@ public abstract class AbstractFromConfigurationMojo
      * @return Artifact object representing the specified file.
      * @throws MojoExecutionException with a message if the version can't be found in DependencyManagement.
      */
-    protected Artifact getArtifact( ArtifactItem artifactItem )
-        throws MojoExecutionException
-    {
+    protected Artifact getArtifact(ArtifactItem artifactItem) throws MojoExecutionException {
         Artifact artifact;
 
-        try
-        {
+        try {
             // mdep-50 - rolledback for now because it's breaking some functionality.
             /*
              * List listeners = new ArrayList(); Set theSet = new HashSet(); theSet.add( artifact );
@@ -224,36 +202,32 @@ public abstract class AbstractFromConfigurationMojo
 
             ProjectBuildingRequest buildingRequest = newResolveArtifactProjectBuildingRequest();
 
-            if ( localRepositoryDirectory != null )
-            {
+            if (localRepositoryDirectory != null) {
                 buildingRequest =
-                    repositoryManager.setLocalRepositoryBasedir( buildingRequest, localRepositoryDirectory );
+                        repositoryManager.setLocalRepositoryBasedir(buildingRequest, localRepositoryDirectory);
             }
 
             // Map dependency to artifact coordinate
             DefaultArtifactCoordinate coordinate = new DefaultArtifactCoordinate();
-            coordinate.setGroupId( artifactItem.getGroupId() );
-            coordinate.setArtifactId( artifactItem.getArtifactId() );
-            coordinate.setVersion( artifactItem.getVersion() );
-            coordinate.setClassifier( artifactItem.getClassifier() );
+            coordinate.setGroupId(artifactItem.getGroupId());
+            coordinate.setArtifactId(artifactItem.getArtifactId());
+            coordinate.setVersion(artifactItem.getVersion());
+            coordinate.setClassifier(artifactItem.getClassifier());
 
             final String extension;
-            ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler( artifactItem.getType() );
-            if ( artifactHandler != null )
-            {
+            ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler(artifactItem.getType());
+            if (artifactHandler != null) {
                 extension = artifactHandler.getExtension();
-            }
-            else
-            {
+            } else {
                 extension = artifactItem.getType();
             }
-            coordinate.setExtension( extension );
+            coordinate.setExtension(extension);
 
-            artifact = artifactResolver.resolveArtifact( buildingRequest, coordinate ).getArtifact();
-        }
-        catch ( ArtifactResolverException e )
-        {
-            throw new MojoExecutionException( "Unable to find/resolve artifact.", e );
+            artifact = artifactResolver
+                    .resolveArtifact(buildingRequest, coordinate)
+                    .getArtifact();
+        } catch (ArtifactResolverException e) {
+            throw new MojoExecutionException("Unable to find/resolve artifact.", e);
         }
 
         return artifact;
@@ -267,21 +241,19 @@ public abstract class AbstractFromConfigurationMojo
      * @param artifact representing configured file.
      * @throws MojoExecutionException
      */
-    private void fillMissingArtifactVersion( ArtifactItem artifact )
-        throws MojoExecutionException
-    {
+    private void fillMissingArtifactVersion(ArtifactItem artifact) throws MojoExecutionException {
         MavenProject project = getProject();
         List<Dependency> deps = project.getDependencies();
-        List<Dependency> depMngt = project.getDependencyManagement() == null ? Collections.emptyList()
-                        : project.getDependencyManagement().getDependencies();
-
-        if ( !findDependencyVersion( artifact, deps, false )
-            && ( project.getDependencyManagement() == null || !findDependencyVersion( artifact, depMngt, false ) )
-            && !findDependencyVersion( artifact, deps, true )
-            && ( project.getDependencyManagement() == null || !findDependencyVersion( artifact, depMngt, true ) ) )
-        {
-            throw new MojoExecutionException( "Unable to find artifact version of " + artifact.getGroupId() + ":"
-                + artifact.getArtifactId() + " in either dependency list or in project's dependency management." );
+        List<Dependency> depMngt = project.getDependencyManagement() == null
+                ? Collections.emptyList()
+                : project.getDependencyManagement().getDependencies();
+
+        if (!findDependencyVersion(artifact, deps, false)
+                && (project.getDependencyManagement() == null || !findDependencyVersion(artifact, depMngt, false))
+                && !findDependencyVersion(artifact, deps, true)
+                && (project.getDependencyManagement() == null || !findDependencyVersion(artifact, depMngt, true))) {
+            throw new MojoExecutionException("Unable to find artifact version of " + artifact.getGroupId() + ":"
+                    + artifact.getArtifactId() + " in either dependency list or in project's dependency management.");
         }
     }
 
@@ -294,16 +266,13 @@ public abstract class AbstractFromConfigurationMojo
      * @param looseMatch only look at artifactId and groupId
      * @return the found dependency
      */
-    private boolean findDependencyVersion( ArtifactItem artifact, List<Dependency> dependencies, boolean looseMatch )
-    {
-        for ( Dependency dependency : dependencies )
-        {
-            if ( Objects.equals( dependency.getArtifactId(), artifact.getArtifactId() )
-                && Objects.equals( dependency.getGroupId(), artifact.getGroupId() )
-                && ( looseMatch || Objects.equals( dependency.getClassifier(), artifact.getClassifier() ) )
-                && ( looseMatch || Objects.equals( dependency.getType(), artifact.getType() ) ) )
-            {
-                artifact.setVersion( dependency.getVersion() );
+    private boolean findDependencyVersion(ArtifactItem artifact, List<Dependency> dependencies, boolean looseMatch) {
+        for (Dependency dependency : dependencies) {
+            if (Objects.equals(dependency.getArtifactId(), artifact.getArtifactId())
+                    && Objects.equals(dependency.getGroupId(), artifact.getGroupId())
+                    && (looseMatch || Objects.equals(dependency.getClassifier(), artifact.getClassifier()))
+                    && (looseMatch || Objects.equals(dependency.getType(), artifact.getType()))) {
+                artifact.setVersion(dependency.getVersion());
 
                 return true;
             }
@@ -315,88 +284,77 @@ public abstract class AbstractFromConfigurationMojo
     /**
      * @return Returns the artifactItems.
      */
-    public List<ArtifactItem> getArtifactItems()
-    {
+    public List<ArtifactItem> getArtifactItems() {
         return this.artifactItems;
     }
 
     /**
      * @param theArtifactItems The artifactItems to set.
      */
-    public void setArtifactItems( List<ArtifactItem> theArtifactItems )
-    {
+    public void setArtifactItems(List<ArtifactItem> theArtifactItems) {
         this.artifactItems = theArtifactItems;
     }
 
     /**
      * @return Returns the outputDirectory.
      */
-    public File getOutputDirectory()
-    {
+    public File getOutputDirectory() {
         return this.outputDirectory;
     }
 
     /**
      * @param theOutputDirectory The outputDirectory to set.
      */
-    public void setOutputDirectory( File theOutputDirectory )
-    {
+    public void setOutputDirectory(File theOutputDirectory) {
         this.outputDirectory = theOutputDirectory;
     }
 
     /**
      * @return Returns the overWriteIfNewer.
      */
-    public boolean isOverWriteIfNewer()
-    {
+    public boolean isOverWriteIfNewer() {
         return this.overWriteIfNewer;
     }
 
     /**
      * @param theOverWriteIfNewer The overWriteIfNewer to set.
      */
-    public void setOverWriteIfNewer( boolean theOverWriteIfNewer )
-    {
+    public void setOverWriteIfNewer(boolean theOverWriteIfNewer) {
         this.overWriteIfNewer = theOverWriteIfNewer;
     }
 
     /**
      * @return Returns the overWriteReleases.
      */
-    public boolean isOverWriteReleases()
-    {
+    public boolean isOverWriteReleases() {
         return this.overWriteReleases;
     }
 
     /**
      * @param theOverWriteReleases The overWriteReleases to set.
      */
-    public void setOverWriteReleases( boolean theOverWriteReleases )
-    {
+    public void setOverWriteReleases(boolean theOverWriteReleases) {
         this.overWriteReleases = theOverWriteReleases;
     }
 
     /**
      * @return Returns the overWriteSnapshots.
      */
-    public boolean isOverWriteSnapshots()
-    {
+    public boolean isOverWriteSnapshots() {
         return this.overWriteSnapshots;
     }
 
     /**
      * @param theOverWriteSnapshots The overWriteSnapshots to set.
      */
-    public void setOverWriteSnapshots( boolean theOverWriteSnapshots )
-    {
+    public void setOverWriteSnapshots(boolean theOverWriteSnapshots) {
         this.overWriteSnapshots = theOverWriteSnapshots;
     }
 
     /**
      * @param localRepositoryDirectory {@link #localRepositoryDirectory}
      */
-    public void setLocalRepositoryDirectory( File localRepositoryDirectory )
-    {
+    public void setLocalRepositoryDirectory(File localRepositoryDirectory) {
         this.localRepositoryDirectory = localRepositoryDirectory;
     }
 
@@ -404,43 +362,35 @@ public abstract class AbstractFromConfigurationMojo
      * @param artifact The artifact.
      * @throws MojoFailureException in case of an error.
      */
-    public void setArtifact( String artifact )
-        throws MojoFailureException
-    {
-        if ( artifact != null )
-        {
+    public void setArtifact(String artifact) throws MojoFailureException {
+        if (artifact != null) {
             String packaging = "jar";
             String classifier;
-            String[] tokens = StringUtils.split( artifact, ":" );
-            if ( tokens.length < 3 || tokens.length > 5 )
-            {
-                throw new MojoFailureException( "Invalid artifact, "
-                    + "you must specify groupId:artifactId:version[:packaging[:classifier]] " + artifact );
+            String[] tokens = StringUtils.split(artifact, ":");
+            if (tokens.length < 3 || tokens.length > 5) {
+                throw new MojoFailureException("Invalid artifact, "
+                        + "you must specify groupId:artifactId:version[:packaging[:classifier]] " + artifact);
             }
             String groupId = tokens[0];
             String artifactId = tokens[1];
             String version = tokens[2];
-            if ( tokens.length >= 4 )
-            {
+            if (tokens.length >= 4) {
                 packaging = tokens[3];
             }
-            if ( tokens.length == 5 )
-            {
+            if (tokens.length == 5) {
                 classifier = tokens[4];
-            }
-            else
-            {
+            } else {
                 classifier = null;
             }
 
             ArtifactItem artifactItem = new ArtifactItem();
-            artifactItem.setGroupId( groupId );
-            artifactItem.setArtifactId( artifactId );
-            artifactItem.setVersion( version );
-            artifactItem.setType( packaging );
-            artifactItem.setClassifier( classifier );
+            artifactItem.setGroupId(groupId);
+            artifactItem.setArtifactId(artifactId);
+            artifactItem.setVersion(version);
+            artifactItem.setType(packaging);
+            artifactItem.setClassifier(classifier);
 
-            setArtifactItems( Collections.singletonList( artifactItem ) );
+            setArtifactItems(Collections.singletonList(artifactItem));
         }
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ArtifactItem.java b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ArtifactItem.java
index 6a834665..214ca924 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ArtifactItem.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ArtifactItem.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromConfiguration;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,10 +16,10 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromConfiguration;
 
 import java.io.File;
 import java.util.Objects;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.plugins.dependency.utils.DependencyUtil;
@@ -34,9 +32,7 @@ import org.codehaus.plexus.components.io.filemappers.FileMapper;
  * @since 1.0
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
-public class ArtifactItem
-    implements DependableCoordinate
-{
+public class ArtifactItem implements DependableCoordinate {
     /**
      * Group Id of Artifact
      *
@@ -133,28 +129,24 @@ public class ArtifactItem
     /**
      * Default ctor.
      */
-    public ArtifactItem()
-    {
+    public ArtifactItem() {
         // default constructor
     }
 
     /**
      * @param artifact {@link Artifact}
      */
-    public ArtifactItem( Artifact artifact )
-    {
-        this.setArtifact( artifact );
-        this.setArtifactId( artifact.getArtifactId() );
-        this.setClassifier( artifact.getClassifier() );
-        this.setGroupId( artifact.getGroupId() );
-        this.setType( artifact.getType() );
-        this.setVersion( artifact.getVersion() );
+    public ArtifactItem(Artifact artifact) {
+        this.setArtifact(artifact);
+        this.setArtifactId(artifact.getArtifactId());
+        this.setClassifier(artifact.getClassifier());
+        this.setGroupId(artifact.getGroupId());
+        this.setType(artifact.getType());
+        this.setVersion(artifact.getVersion());
     }
 
-    private String filterEmptyString( String in )
-    {
-        if ( "".equals( in ) )
-        {
+    private String filterEmptyString(String in) {
+        if ("".equals(in)) {
             return null;
         }
         return in;
@@ -163,166 +155,142 @@ public class ArtifactItem
     /**
      * @return Returns the artifactId.
      */
-    public String getArtifactId()
-    {
+    public String getArtifactId() {
         return artifactId;
     }
 
     /**
      * @param theArtifact The artifactId to set.
      */
-    public void setArtifactId( String theArtifact )
-    {
-        this.artifactId = filterEmptyString( theArtifact );
+    public void setArtifactId(String theArtifact) {
+        this.artifactId = filterEmptyString(theArtifact);
     }
 
     /**
      * @return Returns the groupId.
      */
-    public String getGroupId()
-    {
+    public String getGroupId() {
         return groupId;
     }
 
     /**
      * @param groupId The groupId to set.
      */
-    public void setGroupId( String groupId )
-    {
-        this.groupId = filterEmptyString( groupId );
+    public void setGroupId(String groupId) {
+        this.groupId = filterEmptyString(groupId);
     }
 
     /**
      * @return Returns the type.
      */
-    public String getType()
-    {
+    public String getType() {
         return type;
     }
 
     /**
      * @param type The type to set.
      */
-    public void setType( String type )
-    {
-        this.type = filterEmptyString( type );
+    public void setType(String type) {
+        this.type = filterEmptyString(type);
     }
 
     /**
      * @return Returns the version.
      */
-    public String getVersion()
-    {
+    public String getVersion() {
         return version;
     }
 
     /**
      * @param version The version to set.
      */
-    public void setVersion( String version )
-    {
-        this.version = filterEmptyString( version );
+    public void setVersion(String version) {
+        this.version = filterEmptyString(version);
     }
 
     /**
      * @return Returns the base version.
      */
-    public String getBaseVersion()
-    {
-        return ArtifactUtils.toSnapshotVersion( version );
+    public String getBaseVersion() {
+        return ArtifactUtils.toSnapshotVersion(version);
     }
 
     /**
      * @return Classifier.
      */
-    public String getClassifier()
-    {
+    public String getClassifier() {
         return classifier;
     }
 
     /**
      * @param classifier Classifier.
      */
-    public void setClassifier( String classifier )
-    {
-        this.classifier = filterEmptyString( classifier );
+    public void setClassifier(String classifier) {
+        this.classifier = filterEmptyString(classifier);
     }
 
     @Override
-    public String toString()
-    {
-        if ( this.classifier == null )
-        {
-            return groupId + ":" + artifactId + ":" + Objects.toString( version, "?" ) + ":" + type;
-        }
-        else
-        {
-            return groupId + ":" + artifactId + ":" + classifier + ":" + Objects.toString( version, "?" ) + ":"
-                + type;
+    public String toString() {
+        if (this.classifier == null) {
+            return groupId + ":" + artifactId + ":" + Objects.toString(version, "?") + ":" + type;
+        } else {
+            return groupId + ":" + artifactId + ":" + classifier + ":" + Objects.toString(version, "?") + ":" + type;
         }
     }
 
     /**
      * @return Returns the location.
      */
-    public File getOutputDirectory()
-    {
+    public File getOutputDirectory() {
         return outputDirectory;
     }
 
     /**
      * @param outputDirectory The outputDirectory to set.
      */
-    public void setOutputDirectory( File outputDirectory )
-    {
+    public void setOutputDirectory(File outputDirectory) {
         this.outputDirectory = outputDirectory;
     }
 
     /**
      * @return Returns the location.
      */
-    public String getDestFileName()
-    {
+    public String getDestFileName() {
         return destFileName;
     }
 
     /**
      * @param destFileName The destFileName to set.
      */
-    public void setDestFileName( String destFileName )
-    {
-        this.destFileName = filterEmptyString( destFileName );
+    public void setDestFileName(String destFileName) {
+        this.destFileName = filterEmptyString(destFileName);
     }
 
     /**
      * @return Returns the needsProcessing.
      */
-    public boolean isNeedsProcessing()
-    {
+    public boolean isNeedsProcessing() {
         return this.needsProcessing;
     }
 
     /**
      * @param needsProcessing The needsProcessing to set.
      */
-    public void setNeedsProcessing( boolean needsProcessing )
-    {
+    public void setNeedsProcessing(boolean needsProcessing) {
         this.needsProcessing = needsProcessing;
     }
 
     /**
      * @return Returns the overWriteSnapshots.
      */
-    public String getOverWrite()
-    {
+    public String getOverWrite() {
         return this.overWrite;
     }
 
     /**
      * @param overWrite The overWrite to set.
      */
-    public void setOverWrite( String overWrite )
-    {
+    public void setOverWrite(String overWrite) {
         this.overWrite = overWrite;
     }
 
@@ -330,8 +298,7 @@ public class ArtifactItem
      * @return Returns the encoding.
      * @since 3.0
      */
-    public String getEncoding()
-    {
+    public String getEncoding() {
         return this.encoding;
     }
 
@@ -339,56 +306,49 @@ public class ArtifactItem
      * @param encoding The encoding to set.
      * @since 3.0
      */
-    public void setEncoding( String encoding )
-    {
+    public void setEncoding(String encoding) {
         this.encoding = encoding;
     }
 
     /**
      * @return Returns the artifact.
      */
-    public Artifact getArtifact()
-    {
+    public Artifact getArtifact() {
         return this.artifact;
     }
 
     /**
      * @param artifact The artifact to set.
      */
-    public void setArtifact( Artifact artifact )
-    {
+    public void setArtifact(Artifact artifact) {
         this.artifact = artifact;
     }
 
     /**
      * @return Returns a comma separated list of excluded items
      */
-    public String getExcludes()
-    {
-        return DependencyUtil.cleanToBeTokenizedString( this.excludes );
+    public String getExcludes() {
+        return DependencyUtil.cleanToBeTokenizedString(this.excludes);
     }
 
     /**
      * @param excludes A comma separated list of items to exclude i.e. <code>**\/*.xml, **\/*.properties</code>
      */
-    public void setExcludes( String excludes )
-    {
+    public void setExcludes(String excludes) {
         this.excludes = excludes;
     }
 
     /**
      * @return Returns a comma separated list of included items
      */
-    public String getIncludes()
-    {
-        return DependencyUtil.cleanToBeTokenizedString( this.includes );
+    public String getIncludes() {
+        return DependencyUtil.cleanToBeTokenizedString(this.includes);
     }
 
     /**
      * @param includes A comma separated list of items to include i.e. <code>**\/*.xml, **\/*.properties</code>
      */
-    public void setIncludes( String includes )
-    {
+    public void setIncludes(String includes) {
         this.includes = includes;
     }
 
@@ -398,8 +358,7 @@ public class ArtifactItem
      *
      * @since 3.1.2
      */
-    public FileMapper[] getFileMappers()
-    {
+    public FileMapper[] getFileMappers() {
         return this.fileMappers;
     }
 
@@ -409,8 +368,7 @@ public class ArtifactItem
      *
      * @since 3.1.2
      */
-    public void setFileMappers( FileMapper[] fileMappers )
-    {
+    public void setFileMappers(FileMapper[] fileMappers) {
         this.fileMappers = fileMappers;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/CopyMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/CopyMojo.java
index e95d350d..b6ccb480 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/CopyMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/CopyMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromConfiguration;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,17 +16,17 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromConfiguration;
 
+import java.io.File;
+import java.util.List;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.dependency.utils.filters.ArtifactItemFilter;
-import org.apache.maven.plugins.dependency.utils.filters.DestFileFilter;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-
-import java.io.File;
-import java.util.List;
+import org.apache.maven.plugins.dependency.utils.filters.ArtifactItemFilter;
+import org.apache.maven.plugins.dependency.utils.filters.DestFileFilter;
 
 /**
  * Goal that copies a list of artifacts from the repository to defined locations.
@@ -36,45 +34,43 @@ import java.util.List;
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 1.0
  */
-@Mojo( name = "copy", defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = false, threadSafe = true )
-public class CopyMojo
-    extends AbstractFromConfigurationMojo
-{
+@Mojo(name = "copy", defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = false, threadSafe = true)
+public class CopyMojo extends AbstractFromConfigurationMojo {
 
     /**
      * Strip artifact version during copy
      */
-    @Parameter( property = "mdep.stripVersion", defaultValue = "false" )
+    @Parameter(property = "mdep.stripVersion", defaultValue = "false")
     private boolean stripVersion = false;
 
     /**
      * Strip artifact classifier during copy
      */
-    @Parameter( property = "mdep.stripClassifier", defaultValue = "false" )
+    @Parameter(property = "mdep.stripClassifier", defaultValue = "false")
     private boolean stripClassifier = false;
 
     /**
      * Prepend artifact groupId during copy
-     * 
+     *
      * @since 2.7
      */
-    @Parameter( property = "mdep.prependGroupId", defaultValue = "false" )
+    @Parameter(property = "mdep.prependGroupId", defaultValue = "false")
     private boolean prependGroupId = false;
 
     /**
      * Use artifact baseVersion during copy
-     * 
+     *
      * @since 2.7
      */
-    @Parameter( property = "mdep.useBaseVersion", defaultValue = "false" )
+    @Parameter(property = "mdep.useBaseVersion", defaultValue = "false")
     private boolean useBaseVersion = false;
 
     /**
      * The artifact to copy from command line. A string of the form groupId:artifactId:version[:packaging[:classifier]].
      * Use {@link #artifactItems} within the POM configuration.
      */
-    @SuppressWarnings( "unused" ) // marker-field, setArtifact(String) does the magic
-    @Parameter( property = "artifact" )
+    @SuppressWarnings("unused") // marker-field, setArtifact(String) does the magic
+    @Parameter(property = "artifact")
     private String artifact;
 
     /**
@@ -99,23 +95,16 @@ public class CopyMojo
      * @see #copyArtifact(ArtifactItem)
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException, MojoFailureException
-    {
+    protected void doExecute() throws MojoExecutionException, MojoFailureException {
         verifyRequirements();
 
-        List<ArtifactItem> theArtifactItems =
-            getProcessedArtifactItems( new ProcessArtifactItemsRequest( stripVersion, prependGroupId, useBaseVersion,
-                                                                        stripClassifier ) );
-        for ( ArtifactItem artifactItem : theArtifactItems )
-        {
-            if ( artifactItem.isNeedsProcessing() )
-            {
-                copyArtifact( artifactItem );
-            }
-            else
-            {
-                this.getLog().info( artifactItem + " already exists in " + artifactItem.getOutputDirectory() );
+        List<ArtifactItem> theArtifactItems = getProcessedArtifactItems(
+                new ProcessArtifactItemsRequest(stripVersion, prependGroupId, useBaseVersion, stripClassifier));
+        for (ArtifactItem artifactItem : theArtifactItems) {
+            if (artifactItem.isNeedsProcessing()) {
+                copyArtifact(artifactItem);
+            } else {
+                this.getLog().info(artifactItem + " already exists in " + artifactItem.getOutputDirectory());
             }
         }
     }
@@ -127,59 +116,60 @@ public class CopyMojo
      * @throws MojoExecutionException with a message if an error occurs.
      * @see #copyFile(File, File)
      */
-    protected void copyArtifact( ArtifactItem artifactItem )
-        throws MojoExecutionException
-    {
-        File destFile = new File( artifactItem.getOutputDirectory(), artifactItem.getDestFileName() );
+    protected void copyArtifact(ArtifactItem artifactItem) throws MojoExecutionException {
+        File destFile = new File(artifactItem.getOutputDirectory(), artifactItem.getDestFileName());
 
-        copyFile( artifactItem.getArtifact().getFile(), destFile );
+        copyFile(artifactItem.getArtifact().getFile(), destFile);
     }
 
     @Override
-    protected ArtifactItemFilter getMarkedArtifactFilter( ArtifactItem item )
-    {
-        return new DestFileFilter( this.isOverWriteReleases(), this.isOverWriteSnapshots(), this.isOverWriteIfNewer(),
-                            false, false, false, false, this.stripVersion, prependGroupId, useBaseVersion,
-                            item.getOutputDirectory() );
+    protected ArtifactItemFilter getMarkedArtifactFilter(ArtifactItem item) {
+        return new DestFileFilter(
+                this.isOverWriteReleases(),
+                this.isOverWriteSnapshots(),
+                this.isOverWriteIfNewer(),
+                false,
+                false,
+                false,
+                false,
+                this.stripVersion,
+                prependGroupId,
+                useBaseVersion,
+                item.getOutputDirectory());
     }
 
     /**
      * @return Returns the stripVersion.
      */
-    public boolean isStripVersion()
-    {
+    public boolean isStripVersion() {
         return this.stripVersion;
     }
 
     /**
      * @param stripVersion The stripVersion to set.
      */
-    public void setStripVersion( boolean stripVersion )
-    {
+    public void setStripVersion(boolean stripVersion) {
         this.stripVersion = stripVersion;
     }
 
     /**
      * @return Returns the stripClassifier.
      */
-    public boolean isStripClassifier()
-    {
+    public boolean isStripClassifier() {
         return this.stripClassifier;
     }
 
     /**
      * @param stripClassifier The stripClassifier to set.
      */
-    public void setStripClassifier( boolean stripClassifier )
-    {
+    public void setStripClassifier(boolean stripClassifier) {
         this.stripClassifier = stripClassifier;
     }
 
     /**
      * @param useBaseVersion The useBaseVersion to set.
      */
-    public void setUseBaseVersion( boolean useBaseVersion )
-    {
+    public void setUseBaseVersion(boolean useBaseVersion) {
         this.useBaseVersion = useBaseVersion;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ProcessArtifactItemsRequest.java b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ProcessArtifactItemsRequest.java
index 0e27b553..e70897d5 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ProcessArtifactItemsRequest.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/ProcessArtifactItemsRequest.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromConfiguration;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,13 +16,13 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromConfiguration;
 
 /**
  * @author Olivier Lamy
  * @since 2.7
  */
-public class ProcessArtifactItemsRequest
-{
+public class ProcessArtifactItemsRequest {
     /**
      * remove the version from the filename.
      */
@@ -48,8 +46,7 @@ public class ProcessArtifactItemsRequest
     /**
      * Default ctor.
      */
-    public ProcessArtifactItemsRequest()
-    {
+    public ProcessArtifactItemsRequest() {
         // no op
     }
 
@@ -59,9 +56,8 @@ public class ProcessArtifactItemsRequest
      * @param useBaseVersion {@link #useBaseVersion}
      * @param removeClassifier {@link #removeClassifier}
      */
-    public ProcessArtifactItemsRequest( boolean removeVersion, boolean prependGroupId, boolean useBaseVersion,
-                                        boolean removeClassifier )
-    {
+    public ProcessArtifactItemsRequest(
+            boolean removeVersion, boolean prependGroupId, boolean useBaseVersion, boolean removeClassifier) {
         this.removeVersion = removeVersion;
         this.prependGroupId = prependGroupId;
         this.useBaseVersion = useBaseVersion;
@@ -71,32 +67,28 @@ public class ProcessArtifactItemsRequest
     /**
      * @return {@link #removeVersion}
      */
-    public boolean isRemoveVersion()
-    {
+    public boolean isRemoveVersion() {
         return removeVersion;
     }
 
     /**
      * @param removeVersion {@link #removeVersion}
      */
-    public void setRemoveVersion( boolean removeVersion )
-    {
+    public void setRemoveVersion(boolean removeVersion) {
         this.removeVersion = removeVersion;
     }
 
     /**
      * @return {@link #removeClassifier}
      */
-    public boolean isRemoveClassifier()
-    {
+    public boolean isRemoveClassifier() {
         return removeClassifier;
     }
 
     /**
      * @param removeClassifier {@link #removeClassifier}
      */
-    public void setRemoveClassifier( boolean removeClassifier )
-    {
+    public void setRemoveClassifier(boolean removeClassifier) {
         this.removeClassifier = removeClassifier;
     }
 
@@ -104,8 +96,7 @@ public class ProcessArtifactItemsRequest
      * @param theRemoveVersion {@link #removeVersion}
      * @return {@link ProcessArtifactItemsRequest}
      */
-    public ProcessArtifactItemsRequest removeVersion( boolean theRemoveVersion )
-    {
+    public ProcessArtifactItemsRequest removeVersion(boolean theRemoveVersion) {
         this.removeVersion = theRemoveVersion;
         return this;
     }
@@ -113,16 +104,14 @@ public class ProcessArtifactItemsRequest
     /**
      * @return {@link #prependGroupId}
      */
-    public boolean isPrependGroupId()
-    {
+    public boolean isPrependGroupId() {
         return prependGroupId;
     }
 
     /**
      * @param prependGroupId {@link #prependGroupId}
      */
-    public void setPrependGroupId( boolean prependGroupId )
-    {
+    public void setPrependGroupId(boolean prependGroupId) {
         this.prependGroupId = prependGroupId;
     }
 
@@ -130,8 +119,7 @@ public class ProcessArtifactItemsRequest
      * @param thePrependGroupId {@link #prependGroupId}
      * @return {@link ProcessArtifactItemsRequest}
      */
-    public ProcessArtifactItemsRequest prependGroupId( boolean thePrependGroupId )
-    {
+    public ProcessArtifactItemsRequest prependGroupId(boolean thePrependGroupId) {
         this.prependGroupId = thePrependGroupId;
         return this;
     }
@@ -139,16 +127,14 @@ public class ProcessArtifactItemsRequest
     /**
      * @return {@link #useBaseVersion}
      */
-    public boolean isUseBaseVersion()
-    {
+    public boolean isUseBaseVersion() {
         return useBaseVersion;
     }
 
     /**
      * @param useBaseVersion {@link #useBaseVersion}
      */
-    public void setUseBaseVersion( boolean useBaseVersion )
-    {
+    public void setUseBaseVersion(boolean useBaseVersion) {
         this.useBaseVersion = useBaseVersion;
     }
 
@@ -156,8 +142,7 @@ public class ProcessArtifactItemsRequest
      * @param theUseBaseVersion {@link #useBaseVersion}
      * @return {@link ProcessArtifactItemsRequest}
      */
-    public ProcessArtifactItemsRequest useBaseVersion( boolean theUseBaseVersion )
-    {
+    public ProcessArtifactItemsRequest useBaseVersion(boolean theUseBaseVersion) {
         this.useBaseVersion = theUseBaseVersion;
         return this;
     }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/UnpackMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/UnpackMojo.java
index 8f852767..b76add1e 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/UnpackMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/UnpackMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromConfiguration;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,37 +16,35 @@ package org.apache.maven.plugins.dependency.fromConfiguration;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromConfiguration;
 
+import java.io.File;
+import java.util.List;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.dependency.utils.filters.ArtifactItemFilter;
 import org.apache.maven.plugins.dependency.utils.filters.MarkerFileFilter;
 import org.apache.maven.plugins.dependency.utils.markers.MarkerHandler;
 import org.apache.maven.plugins.dependency.utils.markers.UnpackFileMarkerHandler;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
 import org.codehaus.plexus.components.io.filemappers.FileMapper;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-import java.util.List;
-
 /**
  * Goal that retrieves a list of artifacts from the repository and unpacks them in a defined location.
  *
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 1.0
  */
-@Mojo( name = "unpack", defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = false, threadSafe = true )
-public class UnpackMojo
-    extends AbstractFromConfigurationMojo
-{
+@Mojo(name = "unpack", defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = false, threadSafe = true)
+public class UnpackMojo extends AbstractFromConfigurationMojo {
 
     /**
      * Directory to store flag files after unpack
      */
-    @Parameter( defaultValue = "${project.build.directory}/dependency-maven-plugin-markers" )
+    @Parameter(defaultValue = "${project.build.directory}/dependency-maven-plugin-markers")
     private File markersDirectory;
 
     /**
@@ -58,7 +54,7 @@ public class UnpackMojo
      *
      * @since 2.0-alpha-5
      */
-    @Parameter( property = "mdep.unpack.includes" )
+    @Parameter(property = "mdep.unpack.includes")
     private String includes;
 
     /**
@@ -68,7 +64,7 @@ public class UnpackMojo
      *
      * @since 2.0-alpha-5
      */
-    @Parameter( property = "mdep.unpack.excludes" )
+    @Parameter(property = "mdep.unpack.excludes")
     private String excludes;
 
     /**
@@ -76,7 +72,7 @@ public class UnpackMojo
      *
      * @since 3.1.2
      */
-    @Parameter( property = "mdep.unpack.filemappers" )
+    @Parameter(property = "mdep.unpack.filemappers")
     private FileMapper[] fileMappers;
 
     /**
@@ -84,8 +80,8 @@ public class UnpackMojo
      * <code>groupId:artifactId:version[:packaging[:classifier]]</code>. Use {@link #artifactItems} within the POM
      * configuration.
      */
-    @SuppressWarnings( "unused" ) // marker-field, setArtifact(String) does the magic
-    @Parameter( property = "artifact" )
+    @SuppressWarnings("unused") // marker-field, setArtifact(String) does the magic
+    @Parameter(property = "artifact")
     private String artifact;
 
     /**
@@ -98,26 +94,19 @@ public class UnpackMojo
      * @see #unpackArtifact(ArtifactItem)
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException, MojoFailureException
-    {
-        if ( isSkip() )
-        {
+    protected void doExecute() throws MojoExecutionException, MojoFailureException {
+        if (isSkip()) {
             return;
         }
 
         verifyRequirements();
 
-        List<ArtifactItem> processedItems = getProcessedArtifactItems( false );
-        for ( ArtifactItem artifactItem : processedItems )
-        {
-            if ( artifactItem.isNeedsProcessing() )
-            {
-                unpackArtifact( artifactItem );
-            }
-            else
-            {
-                this.getLog().info( artifactItem.getArtifact().getFile().getName() + " already unpacked." );
+        List<ArtifactItem> processedItems = getProcessedArtifactItems(false);
+        for (ArtifactItem artifactItem : processedItems) {
+            if (artifactItem.isNeedsProcessing()) {
+                unpackArtifact(artifactItem);
+            } else {
+                this.getLog().info(artifactItem.getArtifact().getFile().getName() + " already unpacked.");
             }
         }
     }
@@ -129,24 +118,26 @@ public class UnpackMojo
      * @throws MojoExecutionException with a message if an error occurs.
      * @see #getArtifact
      */
-    private void unpackArtifact( ArtifactItem artifactItem )
-        throws MojoExecutionException
-    {
-        MarkerHandler handler = new UnpackFileMarkerHandler( artifactItem, this.markersDirectory );
-
-        unpack( artifactItem.getArtifact(), artifactItem.getType(), artifactItem.getOutputDirectory(),
-                artifactItem.getIncludes(), artifactItem.getExcludes(), artifactItem.getEncoding(),
-                artifactItem.getFileMappers() );
+    private void unpackArtifact(ArtifactItem artifactItem) throws MojoExecutionException {
+        MarkerHandler handler = new UnpackFileMarkerHandler(artifactItem, this.markersDirectory);
+
+        unpack(
+                artifactItem.getArtifact(),
+                artifactItem.getType(),
+                artifactItem.getOutputDirectory(),
+                artifactItem.getIncludes(),
+                artifactItem.getExcludes(),
+                artifactItem.getEncoding(),
+                artifactItem.getFileMappers());
         handler.setMarker();
     }
 
     @Override
-    ArtifactItemFilter getMarkedArtifactFilter( ArtifactItem item )
-    {
-        MarkerHandler handler = new UnpackFileMarkerHandler( item, this.markersDirectory );
+    ArtifactItemFilter getMarkedArtifactFilter(ArtifactItem item) {
+        MarkerHandler handler = new UnpackFileMarkerHandler(item, this.markersDirectory);
 
-        return new MarkerFileFilter( this.isOverWriteReleases(), this.isOverWriteSnapshots(), this.isOverWriteIfNewer(),
-                                     handler );
+        return new MarkerFileFilter(
+                this.isOverWriteReleases(), this.isOverWriteSnapshots(), this.isOverWriteIfNewer(), handler);
     }
 
     /**
@@ -154,20 +145,15 @@ public class UnpackMojo
      * @return list of {@link ArtifactItem}
      * @throws MojoExecutionException in case of an error.
      */
-    protected List<ArtifactItem> getProcessedArtifactItems( boolean removeVersion )
-        throws MojoExecutionException
-    {
+    protected List<ArtifactItem> getProcessedArtifactItems(boolean removeVersion) throws MojoExecutionException {
         List<ArtifactItem> items =
-            super.getProcessedArtifactItems( new ProcessArtifactItemsRequest( removeVersion, false, false, false ) );
-        for ( ArtifactItem artifactItem : items )
-        {
-            if ( StringUtils.isEmpty( artifactItem.getIncludes() ) )
-            {
-                artifactItem.setIncludes( getIncludes() );
+                super.getProcessedArtifactItems(new ProcessArtifactItemsRequest(removeVersion, false, false, false));
+        for (ArtifactItem artifactItem : items) {
+            if (StringUtils.isEmpty(artifactItem.getIncludes())) {
+                artifactItem.setIncludes(getIncludes());
             }
-            if ( StringUtils.isEmpty( artifactItem.getExcludes() ) )
-            {
-                artifactItem.setExcludes( getExcludes() );
+            if (StringUtils.isEmpty(artifactItem.getExcludes())) {
+                artifactItem.setExcludes(getExcludes());
             }
         }
         return items;
@@ -176,48 +162,42 @@ public class UnpackMojo
     /**
      * @return Returns the markersDirectory.
      */
-    public File getMarkersDirectory()
-    {
+    public File getMarkersDirectory() {
         return this.markersDirectory;
     }
 
     /**
      * @param theMarkersDirectory The markersDirectory to set.
      */
-    public void setMarkersDirectory( File theMarkersDirectory )
-    {
+    public void setMarkersDirectory(File theMarkersDirectory) {
         this.markersDirectory = theMarkersDirectory;
     }
 
     /**
      * @return Returns a comma separated list of excluded items
      */
-    public String getExcludes()
-    {
+    public String getExcludes() {
         return this.excludes;
     }
 
     /**
      * @param excludes A comma separated list of items to exclude i.e. **\/*.xml, **\/*.properties
      */
-    public void setExcludes( String excludes )
-    {
+    public void setExcludes(String excludes) {
         this.excludes = excludes;
     }
 
     /**
      * @return Returns a comma separated list of included items
      */
-    public String getIncludes()
-    {
+    public String getIncludes() {
         return this.includes;
     }
 
     /**
      * @param includes A comma separated list of items to include i.e. **\/*.xml, **\/*.properties
      */
-    public void setIncludes( String includes )
-    {
+    public void setIncludes(String includes) {
         this.includes = includes;
     }
 
@@ -227,8 +207,7 @@ public class UnpackMojo
      *
      * @since 3.1.2
      */
-    public FileMapper[] getFileMappers()
-    {
+    public FileMapper[] getFileMappers() {
         return this.fileMappers;
     }
 
@@ -238,8 +217,7 @@ public class UnpackMojo
      *
      * @since 3.1.2
      */
-    public void setFileMappers( FileMapper[] fileMappers )
-    {
+    public void setFileMappers(FileMapper[] fileMappers) {
         this.fileMappers = fileMappers;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java
index 93e96c8c..7d1ab01a 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromDependencies;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,13 +16,13 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromDependencies;
 
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.LinkedHashSet;
 import java.util.Set;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -61,9 +59,7 @@ import org.codehaus.plexus.util.StringUtils;
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @see org.apache.maven.plugins.dependency.AbstractDependencyMojo
  */
-public abstract class AbstractDependencyFilterMojo
-    extends AbstractDependencyMojo
-{
+public abstract class AbstractDependencyFilterMojo extends AbstractDependencyMojo {
     @Component
     private ArtifactResolver artifactResolver;
 
@@ -78,7 +74,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 1.0
      */
-    @Parameter( property = "overWriteReleases", defaultValue = "false" )
+    @Parameter(property = "overWriteReleases", defaultValue = "false")
     protected boolean overWriteReleases;
 
     /**
@@ -86,7 +82,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 1.0
      */
-    @Parameter( property = "overWriteSnapshots", defaultValue = "false" )
+    @Parameter(property = "overWriteSnapshots", defaultValue = "false")
     protected boolean overWriteSnapshots;
 
     /**
@@ -94,7 +90,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "overWriteIfNewer", defaultValue = "true" )
+    @Parameter(property = "overWriteIfNewer", defaultValue = "true")
     protected boolean overWriteIfNewer;
 
     /**
@@ -102,7 +98,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "excludeTransitive", defaultValue = "false" )
+    @Parameter(property = "excludeTransitive", defaultValue = "false")
     protected boolean excludeTransitive;
 
     /**
@@ -110,7 +106,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "includeTypes", defaultValue = "" )
+    @Parameter(property = "includeTypes", defaultValue = "")
     protected String includeTypes;
 
     /**
@@ -118,7 +114,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "excludeTypes", defaultValue = "" )
+    @Parameter(property = "excludeTypes", defaultValue = "")
     protected String excludeTypes;
 
     /**
@@ -135,7 +131,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "includeScope", defaultValue = "" )
+    @Parameter(property = "includeScope", defaultValue = "")
     protected String includeScope;
 
     /**
@@ -154,7 +150,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "excludeScope", defaultValue = "" )
+    @Parameter(property = "excludeScope", defaultValue = "")
     protected String excludeScope;
 
     /**
@@ -162,7 +158,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "includeClassifiers", defaultValue = "" )
+    @Parameter(property = "includeClassifiers", defaultValue = "")
     protected String includeClassifiers;
 
     /**
@@ -170,7 +166,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "excludeClassifiers", defaultValue = "" )
+    @Parameter(property = "excludeClassifiers", defaultValue = "")
     protected String excludeClassifiers;
 
     /**
@@ -178,7 +174,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "classifier", defaultValue = "" )
+    @Parameter(property = "classifier", defaultValue = "")
     protected String classifier;
 
     /**
@@ -186,7 +182,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "type", defaultValue = "" )
+    @Parameter(property = "type", defaultValue = "")
     protected String type;
 
     /**
@@ -194,7 +190,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "excludeArtifactIds", defaultValue = "" )
+    @Parameter(property = "excludeArtifactIds", defaultValue = "")
     protected String excludeArtifactIds;
 
     /**
@@ -202,7 +198,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "includeArtifactIds", defaultValue = "" )
+    @Parameter(property = "includeArtifactIds", defaultValue = "")
     protected String includeArtifactIds;
 
     /**
@@ -210,7 +206,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "excludeGroupIds", defaultValue = "" )
+    @Parameter(property = "excludeGroupIds", defaultValue = "")
     protected String excludeGroupIds;
 
     /**
@@ -218,7 +214,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "includeGroupIds", defaultValue = "" )
+    @Parameter(property = "includeGroupIds", defaultValue = "")
     protected String includeGroupIds;
 
     /**
@@ -226,9 +222,11 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.0
      */
-    //CHECKSTYLE_OFF: LineLength
-    @Parameter( property = "markersDirectory", defaultValue = "${project.build.directory}/dependency-maven-plugin-markers" )
-    //CHECKSTYLE_ON: LineLength
+    // CHECKSTYLE_OFF: LineLength
+    @Parameter(
+            property = "markersDirectory",
+            defaultValue = "${project.build.directory}/dependency-maven-plugin-markers")
+    // CHECKSTYLE_ON: LineLength
     protected File markersDirectory;
 
     /**
@@ -236,7 +234,7 @@ public abstract class AbstractDependencyFilterMojo
      *
      * @since 2.2
      */
-    @Parameter( property = "mdep.prependGroupId", defaultValue = "false" )
+    @Parameter(property = "mdep.prependGroupId", defaultValue = "false")
     protected boolean prependGroupId = false;
 
     @Component
@@ -259,11 +257,9 @@ public abstract class AbstractDependencyFilterMojo
      * @return A set of artifacts
      * @throws MojoExecutionException in case of errors.
      */
-    protected Set<Artifact> getResolvedDependencies( boolean stopOnFailure )
-        throws MojoExecutionException
+    protected Set<Artifact> getResolvedDependencies(boolean stopOnFailure) throws MojoExecutionException {
 
-    {
-        DependencyStatusSets status = getDependencySets( stopOnFailure );
+        DependencyStatusSets status = getDependencySets(stopOnFailure);
 
         return status.getResolvedDependencies();
     }
@@ -273,10 +269,8 @@ public abstract class AbstractDependencyFilterMojo
      * @return {@link DependencyStatusSets}
      * @throws MojoExecutionException in case of an error.
      */
-    protected DependencyStatusSets getDependencySets( boolean stopOnFailure )
-        throws MojoExecutionException
-    {
-        return getDependencySets( stopOnFailure, false );
+    protected DependencyStatusSets getDependencySets(boolean stopOnFailure) throws MojoExecutionException {
+        return getDependencySets(stopOnFailure, false);
     }
 
     /**
@@ -288,112 +282,97 @@ public abstract class AbstractDependencyFilterMojo
      * @return DependencyStatusSets - Bean of TreeSets that contains information on the projects dependencies
      * @throws MojoExecutionException in case of errors.
      */
-    protected DependencyStatusSets getDependencySets( boolean stopOnFailure, boolean includeParents )
-        throws MojoExecutionException
-    {
+    protected DependencyStatusSets getDependencySets(boolean stopOnFailure, boolean includeParents)
+            throws MojoExecutionException {
         // add filters in well known order, least specific to most specific
         FilterArtifacts filter = new FilterArtifacts();
 
-        filter.addFilter( new ProjectTransitivityFilter( getProject().getDependencyArtifacts(),
-                                                         this.excludeTransitive ) );
+        filter.addFilter(new ProjectTransitivityFilter(getProject().getDependencyArtifacts(), this.excludeTransitive));
 
-        if ( "test".equals( this.excludeScope ) )
-        {
-            throw new MojoExecutionException( "Excluding every artifact inside 'test' resolution scope means "
-                + "excluding everything: you probably want includeScope='compile', "
-                + "read parameters documentation for detailed explanations" );
+        if ("test".equals(this.excludeScope)) {
+            throw new MojoExecutionException("Excluding every artifact inside 'test' resolution scope means "
+                    + "excluding everything: you probably want includeScope='compile', "
+                    + "read parameters documentation for detailed explanations");
         }
-        filter.addFilter( new ScopeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeScope ),
-                                           DependencyUtil.cleanToBeTokenizedString( this.excludeScope ) ) );
+        filter.addFilter(new ScopeFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeScope),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeScope)));
 
-        filter.addFilter( new TypeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeTypes ),
-                                          DependencyUtil.cleanToBeTokenizedString( this.excludeTypes ) ) );
+        filter.addFilter(new TypeFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeTypes),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeTypes)));
 
-        filter.addFilter( new ClassifierFilter( DependencyUtil.cleanToBeTokenizedString( this.includeClassifiers ),
-                                                DependencyUtil.cleanToBeTokenizedString( this.excludeClassifiers ) ) );
+        filter.addFilter(new ClassifierFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeClassifiers),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeClassifiers)));
 
-        filter.addFilter( new GroupIdFilter( DependencyUtil.cleanToBeTokenizedString( this.includeGroupIds ),
-                                             DependencyUtil.cleanToBeTokenizedString( this.excludeGroupIds ) ) );
+        filter.addFilter(new GroupIdFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeGroupIds),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeGroupIds)));
 
-        filter.addFilter( new ArtifactIdFilter( DependencyUtil.cleanToBeTokenizedString( this.includeArtifactIds ),
-                                                DependencyUtil.cleanToBeTokenizedString( this.excludeArtifactIds ) ) );
+        filter.addFilter(new ArtifactIdFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeArtifactIds),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeArtifactIds)));
 
         // start with all artifacts.
         Set<Artifact> artifacts = getProject().getArtifacts();
 
-        if ( includeParents )
-        {
+        if (includeParents) {
             // add dependencies parents
-            for ( Artifact dep : new ArrayList<>( artifacts ) )
-            {
-                addParentArtifacts( buildProjectFromArtifact( dep ), artifacts );
+            for (Artifact dep : new ArrayList<>(artifacts)) {
+                addParentArtifacts(buildProjectFromArtifact(dep), artifacts);
             }
 
             // add current project parent
-            addParentArtifacts( getProject(), artifacts );
+            addParentArtifacts(getProject(), artifacts);
         }
 
         // perform filtering
-        try
-        {
-            artifacts = filter.filter( artifacts );
-        }
-        catch ( ArtifactFilterException e )
-        {
-            throw new MojoExecutionException( e.getMessage(), e );
+        try {
+            artifacts = filter.filter(artifacts);
+        } catch (ArtifactFilterException e) {
+            throw new MojoExecutionException(e.getMessage(), e);
         }
 
         // transform artifacts if classifier is set
         DependencyStatusSets status;
-        if ( StringUtils.isNotEmpty( classifier ) )
-        {
-            status = getClassifierTranslatedDependencies( artifacts, stopOnFailure );
-        }
-        else
-        {
-            status = filterMarkedDependencies( artifacts );
+        if (StringUtils.isNotEmpty(classifier)) {
+            status = getClassifierTranslatedDependencies(artifacts, stopOnFailure);
+        } else {
+            status = filterMarkedDependencies(artifacts);
         }
 
         return status;
     }
 
-    private MavenProject buildProjectFromArtifact( Artifact artifact )
-        throws MojoExecutionException
-    {
-        try
-        {
-            return projectBuilder.build( artifact, session.getProjectBuildingRequest() ).getProject();
-        }
-        catch ( ProjectBuildingException e )
-        {
-            throw new MojoExecutionException( e.getMessage(), e );
+    private MavenProject buildProjectFromArtifact(Artifact artifact) throws MojoExecutionException {
+        try {
+            return projectBuilder
+                    .build(artifact, session.getProjectBuildingRequest())
+                    .getProject();
+        } catch (ProjectBuildingException e) {
+            throw new MojoExecutionException(e.getMessage(), e);
         }
     }
 
-    private void addParentArtifacts( MavenProject project, Set<Artifact> artifacts )
-        throws MojoExecutionException
-    {
-        while ( project.hasParent() )
-        {
+    private void addParentArtifacts(MavenProject project, Set<Artifact> artifacts) throws MojoExecutionException {
+        while (project.hasParent()) {
             project = project.getParent();
 
-            if ( artifacts.contains( project.getArtifact() ) )
-            {
+            if (artifacts.contains(project.getArtifact())) {
                 // artifact already in the set
                 break;
             }
-            try
-            {
+            try {
                 ProjectBuildingRequest buildingRequest = newResolveArtifactProjectBuildingRequest();
 
-                Artifact resolvedArtifact =
-                    artifactResolver.resolveArtifact( buildingRequest, project.getArtifact() ).getArtifact();
+                Artifact resolvedArtifact = artifactResolver
+                        .resolveArtifact(buildingRequest, project.getArtifact())
+                        .getArtifact();
 
-                artifacts.add( resolvedArtifact );
-            }
-            catch ( ArtifactResolverException e )
-            {
-                throw new MojoExecutionException( e.getMessage(), e );
+                artifacts.add(resolvedArtifact);
+            } catch (ArtifactResolverException e) {
+                throw new MojoExecutionException(e.getMessage(), e);
             }
         }
     }
@@ -406,9 +385,8 @@ public abstract class AbstractDependencyFilterMojo
      * @return DependencyStatusSets - Bean of TreeSets that contains information on the projects dependencies
      * @throws MojoExecutionException in case of an error.
      */
-    protected DependencyStatusSets getClassifierTranslatedDependencies( Set<Artifact> artifacts, boolean stopOnFailure )
-        throws MojoExecutionException
-    {
+    protected DependencyStatusSets getClassifierTranslatedDependencies(Set<Artifact> artifacts, boolean stopOnFailure)
+            throws MojoExecutionException {
         Set<Artifact> unResolvedArtifacts = new LinkedHashSet<>();
         Set<Artifact> resolvedArtifacts = artifacts;
         DependencyStatusSets status = new DependencyStatusSets();
@@ -416,28 +394,27 @@ public abstract class AbstractDependencyFilterMojo
         // possibly translate artifacts into a new set of artifacts based on the
         // classifier and type
         // if this did something, we need to resolve the new artifacts
-        if ( StringUtils.isNotEmpty( classifier ) )
-        {
+        if (StringUtils.isNotEmpty(classifier)) {
             ArtifactTranslator translator =
-                new ClassifierTypeTranslator( artifactHandlerManager, this.classifier, this.type );
-            Collection<ArtifactCoordinate> coordinates = translator.translate( artifacts, getLog() );
+                    new ClassifierTypeTranslator(artifactHandlerManager, this.classifier, this.type);
+            Collection<ArtifactCoordinate> coordinates = translator.translate(artifacts, getLog());
 
-            status = filterMarkedDependencies( artifacts );
+            status = filterMarkedDependencies(artifacts);
 
             // the unskipped artifacts are in the resolved set.
             artifacts = status.getResolvedDependencies();
 
             // resolve the rest of the artifacts
-            resolvedArtifacts = resolve( new LinkedHashSet<>( coordinates ), stopOnFailure );
+            resolvedArtifacts = resolve(new LinkedHashSet<>(coordinates), stopOnFailure);
 
             // calculate the artifacts not resolved.
-            unResolvedArtifacts.addAll( artifacts );
-            unResolvedArtifacts.removeAll( resolvedArtifacts );
+            unResolvedArtifacts.addAll(artifacts);
+            unResolvedArtifacts.removeAll(resolvedArtifacts);
         }
 
         // return a bean of all 3 sets.
-        status.setResolvedDependencies( resolvedArtifacts );
-        status.setUnResolvedDependencies( unResolvedArtifacts );
+        status.setResolvedDependencies(resolvedArtifacts);
+        status.setUnResolvedDependencies(unResolvedArtifacts);
 
         return status;
     }
@@ -449,29 +426,24 @@ public abstract class AbstractDependencyFilterMojo
      * @return status set {@link DependencyStatusSets}.
      * @throws MojoExecutionException in case of an error.
      */
-    protected DependencyStatusSets filterMarkedDependencies( Set<Artifact> artifacts )
-        throws MojoExecutionException
-    {
+    protected DependencyStatusSets filterMarkedDependencies(Set<Artifact> artifacts) throws MojoExecutionException {
         // remove files that have markers already
         FilterArtifacts filter = new FilterArtifacts();
         filter.clearFilters();
-        filter.addFilter( getMarkedArtifactFilter() );
+        filter.addFilter(getMarkedArtifactFilter());
 
         Set<Artifact> unMarkedArtifacts;
-        try
-        {
-            unMarkedArtifacts = filter.filter( artifacts );
-        }
-        catch ( ArtifactFilterException e )
-        {
-            throw new MojoExecutionException( e.getMessage(), e );
+        try {
+            unMarkedArtifacts = filter.filter(artifacts);
+        } catch (ArtifactFilterException e) {
+            throw new MojoExecutionException(e.getMessage(), e);
         }
 
         // calculate the skipped artifacts
-        Set<Artifact> skippedArtifacts = new LinkedHashSet<>( artifacts );
-        skippedArtifacts.removeAll( unMarkedArtifacts );
+        Set<Artifact> skippedArtifacts = new LinkedHashSet<>(artifacts);
+        skippedArtifacts.removeAll(unMarkedArtifacts);
 
-        return new DependencyStatusSets( unMarkedArtifacts, null, skippedArtifacts );
+        return new DependencyStatusSets(unMarkedArtifacts, null, skippedArtifacts);
     }
 
     /**
@@ -481,27 +453,23 @@ public abstract class AbstractDependencyFilterMojo
      * @return the resolved artifacts. {@link Artifact}.
      * @throws MojoExecutionException in case of error.
      */
-    protected Set<Artifact> resolve( Set<ArtifactCoordinate> coordinates, boolean stopOnFailure )
-        throws MojoExecutionException
-    {
+    protected Set<Artifact> resolve(Set<ArtifactCoordinate> coordinates, boolean stopOnFailure)
+            throws MojoExecutionException {
         ProjectBuildingRequest buildingRequest = newResolveArtifactProjectBuildingRequest();
 
         Set<Artifact> resolvedArtifacts = new LinkedHashSet<>();
-        for ( ArtifactCoordinate coordinate : coordinates )
-        {
-            try
-            {
-                Artifact artifact = artifactResolver.resolveArtifact( buildingRequest, coordinate ).getArtifact();
-                resolvedArtifacts.add( artifact );
-            }
-            catch ( ArtifactResolverException ex )
-            {
+        for (ArtifactCoordinate coordinate : coordinates) {
+            try {
+                Artifact artifact = artifactResolver
+                        .resolveArtifact(buildingRequest, coordinate)
+                        .getArtifact();
+                resolvedArtifacts.add(artifact);
+            } catch (ArtifactResolverException ex) {
                 // an error occurred during resolution, log it an continue
-                getLog().debug( "error resolving: " + coordinate );
-                getLog().debug( ex );
-                if ( stopOnFailure )
-                {
-                    throw new MojoExecutionException( "error resolving: " + coordinate, ex );
+                getLog().debug("error resolving: " + coordinate);
+                getLog().debug(ex);
+                if (stopOnFailure) {
+                    throw new MojoExecutionException("error resolving: " + coordinate, ex);
                 }
             }
         }
@@ -511,16 +479,14 @@ public abstract class AbstractDependencyFilterMojo
     /**
      * @return Returns the markersDirectory.
      */
-    public File getMarkersDirectory()
-    {
+    public File getMarkersDirectory() {
         return this.markersDirectory;
     }
 
     /**
      * @param theMarkersDirectory The markersDirectory to set.
      */
-    public void setMarkersDirectory( File theMarkersDirectory )
-    {
+    public void setMarkersDirectory(File theMarkersDirectory) {
         this.markersDirectory = theMarkersDirectory;
     }
 
@@ -529,40 +495,35 @@ public abstract class AbstractDependencyFilterMojo
     /**
      * @return true, if the groupId should be prepended to the filename.
      */
-    public boolean isPrependGroupId()
-    {
+    public boolean isPrependGroupId() {
         return prependGroupId;
     }
 
     /**
      * @param prependGroupId - true if the groupId must be prepended during the copy.
      */
-    public void setPrependGroupId( boolean prependGroupId )
-    {
+    public void setPrependGroupId(boolean prependGroupId) {
         this.prependGroupId = prependGroupId;
     }
 
     /**
      * @return {@link #artifactResolver}
      */
-    protected final ArtifactResolver getArtifactResolver()
-    {
+    protected final ArtifactResolver getArtifactResolver() {
         return artifactResolver;
     }
 
     /**
      * @return {@link #dependencyResolver}
      */
-    protected final DependencyResolver getDependencyResolver()
-    {
+    protected final DependencyResolver getDependencyResolver() {
         return dependencyResolver;
     }
 
     /**
      * @return {@link #repositoryManager}
      */
-    protected final RepositoryManager getRepositoryManager()
-    {
+    protected final RepositoryManager getRepositoryManager() {
         return repositoryManager;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java
index aad0cb63..1226c8ad 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractFromDependenciesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromDependencies;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,31 +16,29 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import org.apache.maven.plugins.annotations.Parameter;
+package org.apache.maven.plugins.dependency.fromDependencies;
 
 import java.io.File;
+import org.apache.maven.plugins.annotations.Parameter;
 
 /**
  * Abstract Parent class used by mojos that get Artifact information from the project dependencies.
  *
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
-public abstract class AbstractFromDependenciesMojo
-    extends AbstractDependencyFilterMojo
-{
+public abstract class AbstractFromDependenciesMojo extends AbstractDependencyFilterMojo {
     /**
      * Output location.
      *
      * @since 1.0
      */
-    @Parameter( property = "outputDirectory", defaultValue = "${project.build.directory}/dependency" )
+    @Parameter(property = "outputDirectory", defaultValue = "${project.build.directory}/dependency")
     protected File outputDirectory;
 
     /**
      * Strip artifact version during copy
      */
-    @Parameter( property = "mdep.stripVersion", defaultValue = "false" )
+    @Parameter(property = "mdep.stripVersion", defaultValue = "false")
     protected boolean stripVersion = false;
 
     /**
@@ -50,13 +46,13 @@ public abstract class AbstractFromDependenciesMojo
      *
      * @since 3.4.0
      */
-    @Parameter( property = "mdep.stripType", defaultValue = "false" )
+    @Parameter(property = "mdep.stripType", defaultValue = "false")
     protected boolean stripType = false;
 
     /**
      * Strip artifact classifier during copy
      */
-    @Parameter( property = "mdep.stripClassifier", defaultValue = "false" )
+    @Parameter(property = "mdep.stripClassifier", defaultValue = "false")
     protected boolean stripClassifier = false;
 
     /**
@@ -66,14 +62,14 @@ public abstract class AbstractFromDependenciesMojo
      * <p>
      * example:
      * </p>
-     * 
+     *
      * <pre>
      *   /outputDirectory/junit/junit/3.8.1/junit-3.8.1.jar
      * </pre>
      *
      * @since 2.0-alpha-2
      */
-    @Parameter( property = "mdep.useRepositoryLayout", defaultValue = "false" )
+    @Parameter(property = "mdep.useRepositoryLayout", defaultValue = "false")
     protected boolean useRepositoryLayout;
 
     /**
@@ -82,7 +78,7 @@ public abstract class AbstractFromDependenciesMojo
      *
      * @since 2.2
      */
-    @Parameter( property = "mdep.useSubDirectoryPerScope", defaultValue = "false" )
+    @Parameter(property = "mdep.useSubDirectoryPerScope", defaultValue = "false")
     protected boolean useSubDirectoryPerScope;
 
     /**
@@ -90,7 +86,7 @@ public abstract class AbstractFromDependenciesMojo
      *
      * @since 2.0-alpha-1
      */
-    @Parameter( property = "mdep.useSubDirectoryPerType", defaultValue = "false" )
+    @Parameter(property = "mdep.useSubDirectoryPerType", defaultValue = "false")
     protected boolean useSubDirectoryPerType;
 
     /**
@@ -98,7 +94,7 @@ public abstract class AbstractFromDependenciesMojo
      *
      * @since 2.0-alpha-1
      */
-    @Parameter( property = "mdep.useSubDirectoryPerArtifact", defaultValue = "false" )
+    @Parameter(property = "mdep.useSubDirectoryPerArtifact", defaultValue = "false")
     protected boolean useSubDirectoryPerArtifact;
 
     /**
@@ -106,136 +102,118 @@ public abstract class AbstractFromDependenciesMojo
      *
      * @since 2.0-alpha-2
      */
-    @Parameter( property = "mdep.failOnMissingClassifierArtifact", defaultValue = "false" )
+    @Parameter(property = "mdep.failOnMissingClassifierArtifact", defaultValue = "false")
     protected boolean failOnMissingClassifierArtifact = true;
 
     /**
      * @return Returns the outputDirectory.
      */
-    public File getOutputDirectory()
-    {
+    public File getOutputDirectory() {
         return this.outputDirectory;
     }
 
     /**
      * @param theOutputDirectory The outputDirectory to set.
      */
-    public void setOutputDirectory( File theOutputDirectory )
-    {
+    public void setOutputDirectory(File theOutputDirectory) {
         this.outputDirectory = theOutputDirectory;
     }
 
     /**
      * @return Returns the useSubDirectoryPerArtifact.
      */
-    public boolean isUseSubDirectoryPerArtifact()
-    {
+    public boolean isUseSubDirectoryPerArtifact() {
         return this.useSubDirectoryPerArtifact;
     }
 
     /**
      * @param theUseSubDirectoryPerArtifact The useSubDirectoryPerArtifact to set.
      */
-    public void setUseSubDirectoryPerArtifact( boolean theUseSubDirectoryPerArtifact )
-    {
+    public void setUseSubDirectoryPerArtifact(boolean theUseSubDirectoryPerArtifact) {
         this.useSubDirectoryPerArtifact = theUseSubDirectoryPerArtifact;
     }
 
     /**
      * @return Returns the useSubDirectoryPerScope
      */
-    public boolean isUseSubDirectoryPerScope()
-    {
+    public boolean isUseSubDirectoryPerScope() {
         return this.useSubDirectoryPerScope;
     }
 
     /**
      * @param theUseSubDirectoryPerScope The useSubDirectoryPerScope to set.
      */
-    public void setUseSubDirectoryPerScope( boolean theUseSubDirectoryPerScope )
-    {
+    public void setUseSubDirectoryPerScope(boolean theUseSubDirectoryPerScope) {
         this.useSubDirectoryPerScope = theUseSubDirectoryPerScope;
     }
 
     /**
      * @return Returns the useSubDirectoryPerType.
      */
-    public boolean isUseSubDirectoryPerType()
-    {
+    public boolean isUseSubDirectoryPerType() {
         return this.useSubDirectoryPerType;
     }
 
     /**
      * @param theUseSubDirectoryPerType The useSubDirectoryPerType to set.
      */
-    public void setUseSubDirectoryPerType( boolean theUseSubDirectoryPerType )
-    {
+    public void setUseSubDirectoryPerType(boolean theUseSubDirectoryPerType) {
         this.useSubDirectoryPerType = theUseSubDirectoryPerType;
     }
 
     /**
      * @return {@link #failOnMissingClassifierArtifact}
      */
-    public boolean isFailOnMissingClassifierArtifact()
-    {
+    public boolean isFailOnMissingClassifierArtifact() {
         return failOnMissingClassifierArtifact;
     }
 
     /**
      * @param failOnMissingClassifierArtifact {@link #failOnMissingClassifierArtifact}
      */
-    public void setFailOnMissingClassifierArtifact( boolean failOnMissingClassifierArtifact )
-    {
+    public void setFailOnMissingClassifierArtifact(boolean failOnMissingClassifierArtifact) {
         this.failOnMissingClassifierArtifact = failOnMissingClassifierArtifact;
     }
 
     /**
      * @return {@link #stripVersion}
      */
-    public boolean isStripVersion()
-    {
+    public boolean isStripVersion() {
         return stripVersion;
     }
 
     /**
      * @param stripVersion {@link #stripVersion}
      */
-    public void setStripVersion( boolean stripVersion )
-    {
+    public void setStripVersion(boolean stripVersion) {
         this.stripVersion = stripVersion;
     }
 
-
     /**
      * @return {@link #stripType}
      */
-    public boolean isStripType()
-    {
+    public boolean isStripType() {
         return stripType;
     }
 
     /**
      * @param stripType {@link #stripType}
      */
-    public void setStripType( boolean stripType )
-    {
+    public void setStripType(boolean stripType) {
         this.stripType = stripType;
     }
 
-
     /**
      * @return true, if dependencies must be planted in a repository layout
      */
-    public boolean isUseRepositoryLayout()
-    {
+    public boolean isUseRepositoryLayout() {
         return useRepositoryLayout;
     }
 
     /**
      * @param useRepositoryLayout - true if dependencies must be planted in a repository layout
      */
-    public void setUseRepositoryLayout( boolean useRepositoryLayout )
-    {
+    public void setUseRepositoryLayout(boolean useRepositoryLayout) {
         this.useRepositoryLayout = useRepositoryLayout;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java
index 4a4176a9..8424f708 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/BuildClasspathMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromDependencies;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromDependencies;
 
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
@@ -36,7 +35,6 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Component;
@@ -58,51 +56,52 @@ import org.codehaus.plexus.util.StringUtils;
  * @since 2.0-alpha-2
  */
 // CHECKSTYLE_OFF: LineLength
-@Mojo( name = "build-classpath", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true )
+@Mojo(
+        name = "build-classpath",
+        requiresDependencyResolution = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.GENERATE_SOURCES,
+        threadSafe = true)
 // CHECKSTYLE_ON: LineLength
-public class BuildClasspathMojo
-    extends AbstractDependencyFilterMojo
-    implements Comparator<Artifact>
-{
+public class BuildClasspathMojo extends AbstractDependencyFilterMojo implements Comparator<Artifact> {
 
-    @Parameter( property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}" )
+    @Parameter(property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}")
     private String outputEncoding;
-    
+
     /**
      * Strip artifact version during copy (only works if prefix is set)
      */
-    @Parameter( property = "mdep.stripVersion", defaultValue = "false" )
+    @Parameter(property = "mdep.stripVersion", defaultValue = "false")
     private boolean stripVersion = false;
 
     /**
      * Strip artifact classifier during copy (only works if prefix is set)
      */
-    @Parameter( property = "mdep.stripClassifier", defaultValue = "false" )
+    @Parameter(property = "mdep.stripClassifier", defaultValue = "false")
     private boolean stripClassifier = false;
 
     /**
      * The prefix to prepend on each dependent artifact. If undefined, the paths refer to the actual files store in the
      * local repository (the stripVersion parameter does nothing then).
      */
-    @Parameter( property = "mdep.prefix" )
+    @Parameter(property = "mdep.prefix")
     private String prefix;
 
     /**
      * A property to set to the content of the classpath string.
      */
-    @Parameter( property = "mdep.outputProperty" )
+    @Parameter(property = "mdep.outputProperty")
     private String outputProperty;
 
     /**
      * The file to write the classpath string. If undefined, it just prints the classpath as [INFO].
      */
-    @Parameter( property = "mdep.outputFile" )
+    @Parameter(property = "mdep.outputFile")
     private File outputFile;
 
     /**
      * If 'true', it skips the up-to-date-check, and always regenerates the classpath file.
      */
-    @Parameter( property = "mdep.regenerateFile", defaultValue = "false" )
+    @Parameter(property = "mdep.regenerateFile", defaultValue = "false")
     private boolean regenerateFile;
 
     /**
@@ -112,7 +111,7 @@ public class BuildClasspathMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.fileSeparator", defaultValue = "" )
+    @Parameter(property = "mdep.fileSeparator", defaultValue = "")
     private String fileSeparator;
 
     /**
@@ -123,7 +122,7 @@ public class BuildClasspathMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.pathSeparator", defaultValue = "" )
+    @Parameter(property = "mdep.pathSeparator", defaultValue = "")
     private String pathSeparator;
 
     /**
@@ -132,7 +131,7 @@ public class BuildClasspathMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.localRepoProperty", defaultValue = "" )
+    @Parameter(property = "mdep.localRepoProperty", defaultValue = "")
     private String localRepoProperty;
 
     /**
@@ -140,7 +139,7 @@ public class BuildClasspathMojo
      *
      * @since 2.0
      */
-    @Parameter( defaultValue = "false" )
+    @Parameter(defaultValue = "false")
     private boolean attach;
 
     /**
@@ -148,16 +147,16 @@ public class BuildClasspathMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.outputFilterFile", defaultValue = "false" )
+    @Parameter(property = "mdep.outputFilterFile", defaultValue = "false")
     private boolean outputFilterFile;
 
     /**
      * Either append the artifact's baseVersion or uniqueVersion to the filename. Will only be used if
      * {@link #isStripVersion()} is {@code false}.
-     * 
+     *
      * @since 2.6
      */
-    @Parameter( property = "mdep.useBaseVersion", defaultValue = "true" )
+    @Parameter(property = "mdep.useBaseVersion", defaultValue = "true")
     private boolean useBaseVersion = true;
 
     /**
@@ -176,39 +175,33 @@ public class BuildClasspathMojo
      * @see #getResolvedDependencies(boolean)
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
+    protected void doExecute() throws MojoExecutionException {
         // initialize the separators.
-        boolean isFileSepSet = StringUtils.isNotEmpty( fileSeparator );
-        boolean isPathSepSet = StringUtils.isNotEmpty( pathSeparator );
+        boolean isFileSepSet = StringUtils.isNotEmpty(fileSeparator);
+        boolean isPathSepSet = StringUtils.isNotEmpty(pathSeparator);
 
         // don't allow them to have absolute paths when they attach.
-        if ( attach && StringUtils.isEmpty( localRepoProperty ) )
-        {
+        if (attach && StringUtils.isEmpty(localRepoProperty)) {
             localRepoProperty = "${M2_REPO}";
         }
 
-        Set<Artifact> artifacts = getResolvedDependencies( true );
+        Set<Artifact> artifacts = getResolvedDependencies(true);
 
-        if ( artifacts == null || artifacts.isEmpty() )
-        {
-            getLog().info( "No dependencies found." );
+        if (artifacts == null || artifacts.isEmpty()) {
+            getLog().info("No dependencies found.");
         }
 
-        List<Artifact> artList = new ArrayList<>( artifacts );
+        List<Artifact> artList = new ArrayList<>(artifacts);
 
         StringBuilder sb = new StringBuilder();
         Iterator<Artifact> i = artList.iterator();
 
-        if ( i.hasNext() )
-        {
-            appendArtifactPath( i.next(), sb );
+        if (i.hasNext()) {
+            appendArtifactPath(i.next(), sb);
 
-            while ( i.hasNext() )
-            {
-                sb.append( isPathSepSet ? this.pathSeparator : File.pathSeparator );
-                appendArtifactPath( i.next(), sb );
+            while (i.hasNext()) {
+                sb.append(isPathSepSet ? this.pathSeparator : File.pathSeparator);
+                appendArtifactPath(i.next(), sb);
             }
         }
 
@@ -216,47 +209,36 @@ public class BuildClasspathMojo
 
         // if file separator is set, I need to replace the default one from all
         // the file paths that were pulled from the artifacts
-        if ( isFileSepSet )
-        {
+        if (isFileSepSet) {
             // Escape file separators to be used as literal strings
-            final String pattern = Pattern.quote( File.separator );
-            final String replacement = Matcher.quoteReplacement( fileSeparator );
-            cpString = cpString.replaceAll( pattern, replacement );
+            final String pattern = Pattern.quote(File.separator);
+            final String replacement = Matcher.quoteReplacement(fileSeparator);
+            cpString = cpString.replaceAll(pattern, replacement);
         }
 
         // make the string valid for filtering
-        if ( outputFilterFile )
-        {
+        if (outputFilterFile) {
             cpString = "classpath=" + cpString;
         }
 
-        if ( outputProperty != null )
-        {
-            getProject().getProperties().setProperty( outputProperty, cpString );
-            if ( getLog().isDebugEnabled() )
-            {
-                getLog().debug( outputProperty + " = " + cpString );
+        if (outputProperty != null) {
+            getProject().getProperties().setProperty(outputProperty, cpString);
+            if (getLog().isDebugEnabled()) {
+                getLog().debug(outputProperty + " = " + cpString);
             }
         }
 
-        if ( outputFile == null )
-        {
-            getLog().info( "Dependencies classpath:" + System.lineSeparator() + cpString );
-        }
-        else
-        {
-            if ( regenerateFile || !isUpToDate( cpString ) )
-            {
-                storeClasspathFile( cpString, outputFile );
-            }
-            else
-            {
-                this.getLog().info( "Skipped writing classpath file '" + outputFile + "'.  No changes found." );
+        if (outputFile == null) {
+            getLog().info("Dependencies classpath:" + System.lineSeparator() + cpString);
+        } else {
+            if (regenerateFile || !isUpToDate(cpString)) {
+                storeClasspathFile(cpString, outputFile);
+            } else {
+                this.getLog().info("Skipped writing classpath file '" + outputFile + "'.  No changes found.");
             }
         }
-        if ( attach )
-        {
-            attachFile( cpString );
+        if (attach) {
+            attachFile(cpString);
         }
     }
 
@@ -264,13 +246,11 @@ public class BuildClasspathMojo
      * @param cpString The classpath.
      * @throws MojoExecutionException in case of an error.
      */
-    protected void attachFile( String cpString )
-        throws MojoExecutionException
-    {
-        File attachedFile = new File( getProject().getBuild().getDirectory(), "classpath" );
-        storeClasspathFile( cpString, attachedFile );
+    protected void attachFile(String cpString) throws MojoExecutionException {
+        File attachedFile = new File(getProject().getBuild().getDirectory(), "classpath");
+        storeClasspathFile(cpString, attachedFile);
 
-        projectHelper.attachArtifact( getProject(), attachedFile, "classpath" );
+        projectHelper.attachArtifact(getProject(), attachedFile, "classpath");
     }
 
     /**
@@ -279,28 +259,23 @@ public class BuildClasspathMojo
      * @param art {@link Artifact}
      * @param sb {@link StringBuilder}
      */
-    protected void appendArtifactPath( Artifact art, StringBuilder sb )
-    {
-        if ( prefix == null )
-        {
+    protected void appendArtifactPath(Artifact art, StringBuilder sb) {
+        if (prefix == null) {
             String file = art.getFile().getPath();
             // substitute the property for the local repo path to make the classpath file portable.
-            if ( StringUtils.isNotEmpty( localRepoProperty ) )
-            {
+            if (StringUtils.isNotEmpty(localRepoProperty)) {
                 ProjectBuildingRequest projectBuildingRequest = session.getProjectBuildingRequest();
-                File localBasedir = repositoryManager.getLocalRepositoryBasedir( projectBuildingRequest );
+                File localBasedir = repositoryManager.getLocalRepositoryBasedir(projectBuildingRequest);
 
-                file = StringUtils.replace( file, localBasedir.getAbsolutePath(), localRepoProperty );
+                file = StringUtils.replace(file, localBasedir.getAbsolutePath(), localRepoProperty);
             }
-            sb.append( file );
-        }
-        else
-        {
+            sb.append(file);
+        } else {
             // TODO: add param for prepending groupId and version.
-            sb.append( prefix );
-            sb.append( File.separator );
-            sb.append( DependencyUtil.getFormattedFileName( art, this.stripVersion, this.prependGroupId,
-                                                            this.useBaseVersion, this.stripClassifier ) );
+            sb.append(prefix);
+            sb.append(File.separator);
+            sb.append(DependencyUtil.getFormattedFileName(
+                    art, this.stripVersion, this.prependGroupId, this.useBaseVersion, this.stripClassifier));
         }
     }
 
@@ -310,17 +285,13 @@ public class BuildClasspathMojo
      * @return true if the specified classpath equals the one found inside the file, false otherwise (including when
      *         file does not exist but new classpath does).
      */
-    private boolean isUpToDate( String cpString )
-    {
-        try
-        {
+    private boolean isUpToDate(String cpString) {
+        try {
             String oldCp = readClasspathFile();
-            return Objects.equals( cpString, oldCp );
-        }
-        catch ( IOException ex )
-        {
-            this.getLog().warn( "Error while reading old classpath file '" + outputFile + "' for up-to-date check: "
-                + ex );
+            return Objects.equals(cpString, oldCp);
+        } catch (IOException ex) {
+            this.getLog()
+                    .warn("Error while reading old classpath file '" + outputFile + "' for up-to-date check: " + ex);
 
             return false;
         }
@@ -331,56 +302,42 @@ public class BuildClasspathMojo
      *
      * @param cpString the string to write into the file
      */
-    private void storeClasspathFile( String cpString, File out )
-        throws MojoExecutionException
-    {
+    private void storeClasspathFile(String cpString, File out) throws MojoExecutionException {
         // make sure the parent path exists.
         out.getParentFile().mkdirs();
-        
-        String encoding = Objects.toString( outputEncoding, "UTF-8" );
-
-        try ( Writer w =
-            new BufferedWriter( new OutputStreamWriter( new FileOutputStream( out ), encoding ) ) )
-        {
-            w.write( cpString );
-            getLog().info( "Wrote classpath file '" + out + "'." );
-        }
-        catch ( IOException ex )
-        {
-            throw new MojoExecutionException( "Error while writing to classpath file '" + out,
-                                              ex );
+
+        String encoding = Objects.toString(outputEncoding, "UTF-8");
+
+        try (Writer w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(out), encoding))) {
+            w.write(cpString);
+            getLog().info("Wrote classpath file '" + out + "'.");
+        } catch (IOException ex) {
+            throw new MojoExecutionException("Error while writing to classpath file '" + out, ex);
         }
     }
 
     /**
      * Reads the file specified by the mojo param 'outputFile' into a string. Assumes the field
      * 'outputFile' is not null.
-     * 
+     *
      * @return the string contained in the classpathFile, if it exists, or null otherwise
      * @throws IOException in case of an error
      */
-    protected String readClasspathFile()
-        throws IOException
-    {
-        if ( outputFile == null )
-        {
-            throw new IllegalArgumentException( "The outputFile parameter "
-                + "cannot be null if the file is intended to be read." );
+    protected String readClasspathFile() throws IOException {
+        if (outputFile == null) {
+            throw new IllegalArgumentException(
+                    "The outputFile parameter " + "cannot be null if the file is intended to be read.");
         }
 
-        if ( !outputFile.isFile() )
-        {
+        if (!outputFile.isFile()) {
             return null;
         }
         StringBuilder sb = new StringBuilder();
-        String encoding = Objects.toString( outputEncoding, "UTF-8" );
-
-        try ( BufferedReader r =
-            new BufferedReader( new InputStreamReader( new FileInputStream( outputFile ), encoding ) ) )
-        {
-            for ( String line = r.readLine(); line != null; line = r.readLine() )
-            {
-                sb.append( line );
+        String encoding = Objects.toString(outputEncoding, "UTF-8");
+
+        try (BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(outputFile), encoding))) {
+            for (String line = r.readLine(); line != null; line = r.readLine()) {
+                sb.append(line);
             }
 
             return sb.toString();
@@ -397,102 +354,86 @@ public class BuildClasspathMojo
      *         <code>0</code> if this string is lexicographically greater than the string argument.
      */
     @Override
-    public int compare( Artifact art1, Artifact art2 )
-    {
-        if ( art1 == art2 )
-        {
+    public int compare(Artifact art1, Artifact art2) {
+        if (art1 == art2) {
             return 0;
-        }
-        else if ( art1 == null )
-        {
+        } else if (art1 == null) {
             return -1;
-        }
-        else if ( art2 == null )
-        {
+        } else if (art2 == null) {
             return +1;
         }
 
         String s1 = art1.getGroupId() + art1.getArtifactId() + art1.getVersion();
         String s2 = art2.getGroupId() + art2.getArtifactId() + art2.getVersion();
 
-        return s1.compareTo( s2 );
+        return s1.compareTo(s2);
     }
 
     @Override
-    protected ArtifactsFilter getMarkedArtifactFilter()
-    {
+    protected ArtifactsFilter getMarkedArtifactFilter() {
         return null;
     }
 
     /**
      * @param outputFile the outputFile to set
      */
-    public void setOutputFile( File outputFile )
-    {
+    public void setOutputFile(File outputFile) {
         this.outputFile = outputFile;
     }
 
     /**
      * @param theOutputProperty the outputProperty to set
      */
-    public void setOutputProperty( String theOutputProperty )
-    {
+    public void setOutputProperty(String theOutputProperty) {
         this.outputProperty = theOutputProperty;
     }
 
     /**
      * @param theFileSeparator the fileSeparator to set
      */
-    public void setFileSeparator( String theFileSeparator )
-    {
+    public void setFileSeparator(String theFileSeparator) {
         this.fileSeparator = theFileSeparator;
     }
 
     /**
      * @param thePathSeparator the pathSeparator to set
      */
-    public void setPathSeparator( String thePathSeparator )
-    {
+    public void setPathSeparator(String thePathSeparator) {
         this.pathSeparator = thePathSeparator;
     }
 
     /**
      * @param thePrefix the prefix to set
      */
-    public void setPrefix( String thePrefix )
-    {
+    public void setPrefix(String thePrefix) {
         this.prefix = thePrefix;
     }
 
     /**
      * @param theRegenerateFile the regenerateFile to set
      */
-    public void setRegenerateFile( boolean theRegenerateFile )
-    {
+    public void setRegenerateFile(boolean theRegenerateFile) {
         this.regenerateFile = theRegenerateFile;
     }
 
     /**
      * @return the stripVersion
      */
-    public boolean isStripVersion()
-    {
+    public boolean isStripVersion() {
         return this.stripVersion;
     }
 
     /**
      * @param theStripVersion the stripVersion to set
      */
-    public void setStripVersion( boolean theStripVersion )
-    {
+    public void setStripVersion(boolean theStripVersion) {
         this.stripVersion = theStripVersion;
     }
 
     /**
      * @param localRepoProperty {@link #localRepoProperty}
      */
-    public void setLocalRepoProperty( String localRepoProperty )
-    {
+    public void setLocalRepoProperty(String localRepoProperty) {
         this.localRepoProperty = localRepoProperty;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java
index fd2a6036..31d2477d 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromDependencies;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,12 +16,12 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromDependencies;
 
 import java.io.File;
 import java.util.Collections;
 import java.util.Map;
 import java.util.Set;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -48,18 +46,20 @@ import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverExcepti
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 1.0
  */
-//CHECKSTYLE_OFF: LineLength
-@Mojo( name = "copy-dependencies", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.PROCESS_SOURCES, threadSafe = true )
-//CHECKSTYLE_ON: LineLength
-public class CopyDependenciesMojo
-    extends AbstractFromDependenciesMojo
-{
+// CHECKSTYLE_OFF: LineLength
+@Mojo(
+        name = "copy-dependencies",
+        requiresDependencyResolution = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.PROCESS_SOURCES,
+        threadSafe = true)
+// CHECKSTYLE_ON: LineLength
+public class CopyDependenciesMojo extends AbstractFromDependenciesMojo {
     /**
      * Also copy the pom of each artifact.
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.copyPom", defaultValue = "false" )
+    @Parameter(property = "mdep.copyPom", defaultValue = "false")
     protected boolean copyPom = true;
 
     /**
@@ -71,24 +71,24 @@ public class CopyDependenciesMojo
     /**
      *
      */
-    @Component( role = ArtifactRepositoryLayout.class )
+    @Component(role = ArtifactRepositoryLayout.class)
     private Map<String, ArtifactRepositoryLayout> repositoryLayouts;
 
     /**
      * Either append the artifact's baseVersion or uniqueVersion to the filename. Will only be used if
      * {@link #isStripVersion()} is {@code false}.
-     * 
+     *
      * @since 2.6
      */
-    @Parameter( property = "mdep.useBaseVersion", defaultValue = "true" )
+    @Parameter(property = "mdep.useBaseVersion", defaultValue = "true")
     protected boolean useBaseVersion = true;
 
     /**
      * Add parent poms to the list of copied dependencies (both current project pom parents and dependencies parents).
-     * 
+     *
      * @since 2.8
      */
-    @Parameter( property = "mdep.addParentPoms", defaultValue = "false" )
+    @Parameter(property = "mdep.addParentPoms", defaultValue = "false")
     protected boolean addParentPoms;
 
     /**
@@ -111,89 +111,71 @@ public class CopyDependenciesMojo
      * @see #copyArtifact(Artifact, boolean, boolean, boolean, boolean)
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
-        DependencyStatusSets dss = getDependencySets( this.failOnMissingClassifierArtifact, addParentPoms );
+    protected void doExecute() throws MojoExecutionException {
+        DependencyStatusSets dss = getDependencySets(this.failOnMissingClassifierArtifact, addParentPoms);
         Set<Artifact> artifacts = dss.getResolvedDependencies();
 
-        if ( !useRepositoryLayout )
-        {
-            for ( Artifact artifact : artifacts )
-            {
-                copyArtifact( artifact, isStripVersion(), this.prependGroupId, this.useBaseVersion,
-                              this.stripClassifier );
+        if (!useRepositoryLayout) {
+            for (Artifact artifact : artifacts) {
+                copyArtifact(
+                        artifact, isStripVersion(), this.prependGroupId, this.useBaseVersion, this.stripClassifier);
             }
-        }
-        else
-        {
-            ProjectBuildingRequest buildingRequest =
-                getRepositoryManager().setLocalRepositoryBasedir( session.getProjectBuildingRequest(),
-                                                                  outputDirectory );
+        } else {
+            ProjectBuildingRequest buildingRequest = getRepositoryManager()
+                    .setLocalRepositoryBasedir(session.getProjectBuildingRequest(), outputDirectory);
 
-            artifacts.forEach( artifact -> installArtifact( artifact, buildingRequest ) );
+            artifacts.forEach(artifact -> installArtifact(artifact, buildingRequest));
         }
 
         Set<Artifact> skippedArtifacts = dss.getSkippedDependencies();
-        for ( Artifact artifact : skippedArtifacts )
-        {
-            getLog().info( artifact.getId() + " already exists in destination." );
+        for (Artifact artifact : skippedArtifacts) {
+            getLog().info(artifact.getId() + " already exists in destination.");
         }
 
-        if ( isCopyPom() && !useRepositoryLayout )
-        {
-            copyPoms( getOutputDirectory(), artifacts, this.stripVersion );
-            copyPoms( getOutputDirectory(), skippedArtifacts, this.stripVersion, this.stripClassifier ); // Artifacts
-                                                                                                         // that already
-                                                                                                         // exist may
-                                                                                                         // not yet have
-                                                                                                         // poms
+        if (isCopyPom() && !useRepositoryLayout) {
+            copyPoms(getOutputDirectory(), artifacts, this.stripVersion);
+            copyPoms(getOutputDirectory(), skippedArtifacts, this.stripVersion, this.stripClassifier); // Artifacts
+            // that already
+            // exist may
+            // not yet have
+            // poms
         }
     }
 
     /**
      * install the artifact and the corresponding pom if copyPoms=true
-     * 
+     *
      * @param artifact
      * @param buildingRequest
      */
-    private void installArtifact( Artifact artifact, ProjectBuildingRequest buildingRequest )
-    {
-        try
-        {
-            installer.install( buildingRequest, Collections.singletonList( artifact ) );
-            installBaseSnapshot( artifact, buildingRequest );
-
-            if ( !"pom".equals( artifact.getType() ) && isCopyPom() )
-            {
-                Artifact pomArtifact = getResolvedPomArtifact( artifact );
-                if ( pomArtifact != null && pomArtifact.getFile() != null && pomArtifact.getFile().exists() )
-                {
-                    installer.install( buildingRequest, Collections.singletonList( pomArtifact ) );
-                    installBaseSnapshot( pomArtifact, buildingRequest );
+    private void installArtifact(Artifact artifact, ProjectBuildingRequest buildingRequest) {
+        try {
+            installer.install(buildingRequest, Collections.singletonList(artifact));
+            installBaseSnapshot(artifact, buildingRequest);
+
+            if (!"pom".equals(artifact.getType()) && isCopyPom()) {
+                Artifact pomArtifact = getResolvedPomArtifact(artifact);
+                if (pomArtifact != null
+                        && pomArtifact.getFile() != null
+                        && pomArtifact.getFile().exists()) {
+                    installer.install(buildingRequest, Collections.singletonList(pomArtifact));
+                    installBaseSnapshot(pomArtifact, buildingRequest);
                 }
             }
-        }
-        catch ( ArtifactInstallerException e )
-        {
-            getLog().warn( "unable to install " + artifact, e );
+        } catch (ArtifactInstallerException e) {
+            getLog().warn("unable to install " + artifact, e);
         }
     }
 
-    private void installBaseSnapshot( Artifact artifact, ProjectBuildingRequest buildingRequest )
-        throws ArtifactInstallerException
-    {
-        if ( artifact.isSnapshot() && !artifact.getBaseVersion().equals( artifact.getVersion() ) )
-        {
+    private void installBaseSnapshot(Artifact artifact, ProjectBuildingRequest buildingRequest)
+            throws ArtifactInstallerException {
+        if (artifact.isSnapshot() && !artifact.getBaseVersion().equals(artifact.getVersion())) {
             String version = artifact.getVersion();
-            try
-            {
-                artifact.setVersion( artifact.getBaseVersion() );
-                installer.install( buildingRequest, Collections.singletonList( artifact ) );
-            }
-            finally
-            {
-                artifact.setVersion( version );
+            try {
+                artifact.setVersion(artifact.getBaseVersion());
+                installer.install(buildingRequest, Collections.singletonList(artifact));
+            } finally {
+                artifact.setVersion(version);
             }
         }
     }
@@ -209,11 +191,10 @@ public class CopyDependenciesMojo
      * @throws MojoExecutionException with a message if an error occurs.
      * @see #copyArtifact(Artifact, boolean, boolean, boolean, boolean)
      */
-    protected void copyArtifact( Artifact artifact, boolean removeVersion, boolean prependGroupId,
-                                 boolean theUseBaseVersion )
-        throws MojoExecutionException
-    {
-        copyArtifact( artifact, removeVersion, prependGroupId, theUseBaseVersion, false );
+    protected void copyArtifact(
+            Artifact artifact, boolean removeVersion, boolean prependGroupId, boolean theUseBaseVersion)
+            throws MojoExecutionException {
+        copyArtifact(artifact, removeVersion, prependGroupId, theUseBaseVersion, false);
     }
 
     /**
@@ -229,63 +210,69 @@ public class CopyDependenciesMojo
      * @see #copyFile(File, File)
      * @see DependencyUtil#getFormattedOutputDirectory(boolean, boolean, boolean, boolean, boolean, boolean, File, Artifact)
      */
-    protected void copyArtifact( Artifact artifact, boolean removeVersion, boolean prependGroupId,
-                                 boolean theUseBaseVersion, boolean removeClassifier )
-        throws MojoExecutionException
-    {
-
-        String destFileName = DependencyUtil.getFormattedFileName( artifact, removeVersion, prependGroupId,
-                                                                   theUseBaseVersion, removeClassifier );
-
-        File destDir = DependencyUtil.getFormattedOutputDirectory( useSubDirectoryPerScope, useSubDirectoryPerType,
-                                                              useSubDirectoryPerArtifact, useRepositoryLayout,
-                                                              stripVersion, stripType, outputDirectory, artifact );
-        File destFile = new File( destDir, destFileName );
-
-        copyFile( artifact.getFile(), destFile );
+    protected void copyArtifact(
+            Artifact artifact,
+            boolean removeVersion,
+            boolean prependGroupId,
+            boolean theUseBaseVersion,
+            boolean removeClassifier)
+            throws MojoExecutionException {
+
+        String destFileName = DependencyUtil.getFormattedFileName(
+                artifact, removeVersion, prependGroupId, theUseBaseVersion, removeClassifier);
+
+        File destDir = DependencyUtil.getFormattedOutputDirectory(
+                useSubDirectoryPerScope,
+                useSubDirectoryPerType,
+                useSubDirectoryPerArtifact,
+                useRepositoryLayout,
+                stripVersion,
+                stripType,
+                outputDirectory,
+                artifact);
+        File destFile = new File(destDir, destFileName);
+
+        copyFile(artifact.getFile(), destFile);
     }
 
     /**
      * Copy the pom files associated with the artifacts.
-     * 
+     *
      * @param destDir The destination directory {@link File}.
      * @param artifacts The artifacts {@link Artifact}.
      * @param removeVersion remove version or not.
      * @throws MojoExecutionException in case of errors.
      */
-    public void copyPoms( File destDir, Set<Artifact> artifacts, boolean removeVersion )
-        throws MojoExecutionException
+    public void copyPoms(File destDir, Set<Artifact> artifacts, boolean removeVersion) throws MojoExecutionException {
 
-    {
-        copyPoms( destDir, artifacts, removeVersion, false );
+        copyPoms(destDir, artifacts, removeVersion, false);
     }
 
     /**
      * Copy the pom files associated with the artifacts.
-     * 
+     *
      * @param destDir The destination directory {@link File}.
      * @param artifacts The artifacts {@link Artifact}.
      * @param removeVersion remove version or not.
      * @param removeClassifier remove the classifier or not.
      * @throws MojoExecutionException in case of errors.
      */
-    public void copyPoms( File destDir, Set<Artifact> artifacts, boolean removeVersion, boolean removeClassifier )
-        throws MojoExecutionException
+    public void copyPoms(File destDir, Set<Artifact> artifacts, boolean removeVersion, boolean removeClassifier)
+            throws MojoExecutionException {
 
-    {
-        for ( Artifact artifact : artifacts )
-        {
-            Artifact pomArtifact = getResolvedPomArtifact( artifact );
+        for (Artifact artifact : artifacts) {
+            Artifact pomArtifact = getResolvedPomArtifact(artifact);
 
             // Copy the pom
-            if ( pomArtifact != null && pomArtifact.getFile() != null && pomArtifact.getFile().exists() )
-            {
-                File pomDestFile =
-                    new File( destDir, DependencyUtil.getFormattedFileName( pomArtifact, removeVersion, prependGroupId,
-                                                                            useBaseVersion, removeClassifier ) );
-                if ( !pomDestFile.exists() )
-                {
-                    copyFile( pomArtifact.getFile(), pomDestFile );
+            if (pomArtifact != null
+                    && pomArtifact.getFile() != null
+                    && pomArtifact.getFile().exists()) {
+                File pomDestFile = new File(
+                        destDir,
+                        DependencyUtil.getFormattedFileName(
+                                pomArtifact, removeVersion, prependGroupId, useBaseVersion, removeClassifier));
+                if (!pomDestFile.exists()) {
+                    copyFile(pomArtifact.getFile(), pomDestFile);
                 }
             }
         }
@@ -295,51 +282,54 @@ public class CopyDependenciesMojo
      * @param artifact {@link Artifact}
      * @return {@link Artifact}
      */
-    protected Artifact getResolvedPomArtifact( Artifact artifact )
-    {
+    protected Artifact getResolvedPomArtifact(Artifact artifact) {
         DefaultArtifactCoordinate coordinate = new DefaultArtifactCoordinate();
-        coordinate.setGroupId( artifact.getGroupId() );
-        coordinate.setArtifactId( artifact.getArtifactId() );
-        coordinate.setVersion( artifact.getVersion() );
-        coordinate.setExtension( "pom" );
+        coordinate.setGroupId(artifact.getGroupId());
+        coordinate.setArtifactId(artifact.getArtifactId());
+        coordinate.setVersion(artifact.getVersion());
+        coordinate.setExtension("pom");
 
         Artifact pomArtifact = null;
         // Resolve the pom artifact using repos
-        try
-        {
+        try {
             ProjectBuildingRequest buildingRequest = newResolveArtifactProjectBuildingRequest();
 
-            pomArtifact = getArtifactResolver().resolveArtifact( buildingRequest, coordinate ).getArtifact();
-        }
-        catch ( ArtifactResolverException e )
-        {
-            getLog().info( e.getMessage() );
+            pomArtifact = getArtifactResolver()
+                    .resolveArtifact(buildingRequest, coordinate)
+                    .getArtifact();
+        } catch (ArtifactResolverException e) {
+            getLog().info(e.getMessage());
         }
         return pomArtifact;
     }
 
     @Override
-    protected ArtifactsFilter getMarkedArtifactFilter()
-    {
-        return new DestFileFilter( this.overWriteReleases, this.overWriteSnapshots, this.overWriteIfNewer,
-                                   this.useSubDirectoryPerArtifact, this.useSubDirectoryPerType,
-                                   this.useSubDirectoryPerScope, this.useRepositoryLayout, this.stripVersion,
-                                   this.prependGroupId, this.useBaseVersion, this.outputDirectory );
+    protected ArtifactsFilter getMarkedArtifactFilter() {
+        return new DestFileFilter(
+                this.overWriteReleases,
+                this.overWriteSnapshots,
+                this.overWriteIfNewer,
+                this.useSubDirectoryPerArtifact,
+                this.useSubDirectoryPerType,
+                this.useSubDirectoryPerScope,
+                this.useRepositoryLayout,
+                this.stripVersion,
+                this.prependGroupId,
+                this.useBaseVersion,
+                this.outputDirectory);
     }
 
     /**
      * @return true, if the pom of each artifact must be copied
      */
-    public boolean isCopyPom()
-    {
+    public boolean isCopyPom() {
         return this.copyPom;
     }
 
     /**
      * @param copyPom - true if the pom of each artifact must be copied
      */
-    public void setCopyPom( boolean copyPom )
-    {
+    public void setCopyPom(boolean copyPom) {
         this.copyPom = copyPom;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/UnpackDependenciesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/UnpackDependenciesMojo.java
index 12a574f9..e7c81268 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/UnpackDependenciesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/UnpackDependenciesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.fromDependencies;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,34 +16,36 @@ package org.apache.maven.plugins.dependency.fromDependencies;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.fromDependencies;
 
+import java.io.File;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.dependency.utils.DependencyStatusSets;
-import org.apache.maven.plugins.dependency.utils.DependencyUtil;
-import org.apache.maven.plugins.dependency.utils.filters.MarkerFileFilter;
-import org.apache.maven.plugins.dependency.utils.markers.DefaultFileMarkerHandler;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.plugins.dependency.utils.DependencyStatusSets;
+import org.apache.maven.plugins.dependency.utils.DependencyUtil;
+import org.apache.maven.plugins.dependency.utils.filters.MarkerFileFilter;
+import org.apache.maven.plugins.dependency.utils.markers.DefaultFileMarkerHandler;
 import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
 import org.codehaus.plexus.components.io.filemappers.FileMapper;
 
-import java.io.File;
-
 /**
  * Goal that unpacks the project dependencies from the repository to a defined location.
  *
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 1.0
  */
-//CHECKSTYLE_OFF: LineLength
-@Mojo( name = "unpack-dependencies", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.PROCESS_SOURCES, threadSafe = true )
-//CHECKSTYLE_ON: LineLength
-public class UnpackDependenciesMojo
-    extends AbstractFromDependenciesMojo
-{
+// CHECKSTYLE_OFF: LineLength
+@Mojo(
+        name = "unpack-dependencies",
+        requiresDependencyResolution = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.PROCESS_SOURCES,
+        threadSafe = true)
+// CHECKSTYLE_ON: LineLength
+public class UnpackDependenciesMojo extends AbstractFromDependenciesMojo {
     /**
      * A comma separated list of file patterns to include when unpacking the artifact. i.e.
      * <code>**&#47;*.xml,**&#47;*.properties</code> NOTE: Excludes patterns override the includes. (component code =
@@ -53,7 +53,7 @@ public class UnpackDependenciesMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.unpack.includes" )
+    @Parameter(property = "mdep.unpack.includes")
     private String includes;
 
     /**
@@ -63,15 +63,15 @@ public class UnpackDependenciesMojo
      *
      * @since 2.0
      */
-    @Parameter( property = "mdep.unpack.excludes" )
+    @Parameter(property = "mdep.unpack.excludes")
     private String excludes;
 
     /**
      * Encoding of artifacts.
-     * 
+     *
      * @since 3.0
      */
-    @Parameter( property = "mdep.unpack.encoding" )
+    @Parameter(property = "mdep.unpack.encoding")
     private String encoding;
 
     /**
@@ -79,7 +79,7 @@ public class UnpackDependenciesMojo
      *
      * @since 3.1.2
      */
-    @Parameter( property = "mdep.unpack.filemappers" )
+    @Parameter(property = "mdep.unpack.filemappers")
     private FileMapper[] fileMappers;
 
     /**
@@ -91,63 +91,63 @@ public class UnpackDependenciesMojo
      * @see #unpack(Artifact, File, String, FileMapper[])
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
-        DependencyStatusSets dss = getDependencySets( this.failOnMissingClassifierArtifact );
-
-        for ( Artifact artifact : dss.getResolvedDependencies() )
-        {
-            File destDir = DependencyUtil.getFormattedOutputDirectory( useSubDirectoryPerScope, useSubDirectoryPerType,
-                                                                  useSubDirectoryPerArtifact, useRepositoryLayout,
-                                                                  stripVersion, stripType, outputDirectory, artifact );
-            unpack( artifact, destDir, getIncludes(), getExcludes(), getEncoding(), getFileMappers() );
-            DefaultFileMarkerHandler handler = new DefaultFileMarkerHandler( artifact, this.markersDirectory );
+    protected void doExecute() throws MojoExecutionException {
+        DependencyStatusSets dss = getDependencySets(this.failOnMissingClassifierArtifact);
+
+        for (Artifact artifact : dss.getResolvedDependencies()) {
+            File destDir = DependencyUtil.getFormattedOutputDirectory(
+                    useSubDirectoryPerScope,
+                    useSubDirectoryPerType,
+                    useSubDirectoryPerArtifact,
+                    useRepositoryLayout,
+                    stripVersion,
+                    stripType,
+                    outputDirectory,
+                    artifact);
+            unpack(artifact, destDir, getIncludes(), getExcludes(), getEncoding(), getFileMappers());
+            DefaultFileMarkerHandler handler = new DefaultFileMarkerHandler(artifact, this.markersDirectory);
             handler.setMarker();
         }
 
-        for ( Artifact artifact : dss.getSkippedDependencies() )
-        {
-            getLog().info( artifact.getId() + " already exists in destination." );
+        for (Artifact artifact : dss.getSkippedDependencies()) {
+            getLog().info(artifact.getId() + " already exists in destination.");
         }
     }
 
     @Override
-    protected ArtifactsFilter getMarkedArtifactFilter()
-    {
-        return new MarkerFileFilter( this.overWriteReleases, this.overWriteSnapshots, this.overWriteIfNewer,
-                                     new DefaultFileMarkerHandler( this.markersDirectory ) );
+    protected ArtifactsFilter getMarkedArtifactFilter() {
+        return new MarkerFileFilter(
+                this.overWriteReleases,
+                this.overWriteSnapshots,
+                this.overWriteIfNewer,
+                new DefaultFileMarkerHandler(this.markersDirectory));
     }
 
     /**
      * @return Returns a comma separated list of excluded items
      */
-    public String getExcludes()
-    {
-        return DependencyUtil.cleanToBeTokenizedString( this.excludes );
+    public String getExcludes() {
+        return DependencyUtil.cleanToBeTokenizedString(this.excludes);
     }
 
     /**
      * @param excludes A comma separated list of items to exclude i.e. <code>**\/*.xml, **\/*.properties</code>
      */
-    public void setExcludes( String excludes )
-    {
+    public void setExcludes(String excludes) {
         this.excludes = excludes;
     }
 
     /**
      * @return Returns a comma separated list of included items
      */
-    public String getIncludes()
-    {
-        return DependencyUtil.cleanToBeTokenizedString( this.includes );
+    public String getIncludes() {
+        return DependencyUtil.cleanToBeTokenizedString(this.includes);
     }
 
     /**
      * @param includes A comma separated list of items to include i.e. <code>**\/*.xml, **\/*.properties</code>
      */
-    public void setIncludes( String includes )
-    {
+    public void setIncludes(String includes) {
         this.includes = includes;
     }
 
@@ -155,8 +155,7 @@ public class UnpackDependenciesMojo
      * @param encoding The encoding to set.
      * @since 3.0
      */
-    public void setEncoding( String encoding )
-    {
+    public void setEncoding(String encoding) {
         this.encoding = encoding;
     }
 
@@ -164,8 +163,7 @@ public class UnpackDependenciesMojo
      * @return Returns the encoding.
      * @since 3.0
      */
-    public String getEncoding()
-    {
+    public String getEncoding() {
         return this.encoding;
     }
 
@@ -175,8 +173,7 @@ public class UnpackDependenciesMojo
      *
      * @since 3.1.2
      */
-    public FileMapper[] getFileMappers()
-    {
+    public FileMapper[] getFileMappers() {
         return this.fileMappers;
     }
 
@@ -186,8 +183,7 @@ public class UnpackDependenciesMojo
      *
      * @since 3.1.2
      */
-    public void setFileMappers( FileMapper[] fileMappers )
-    {
+    public void setFileMappers(FileMapper[] fileMappers) {
         this.fileMappers = fileMappers;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java
index 3b65171d..20f5a9b9 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/AbstractResolveMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,11 +16,11 @@ package org.apache.maven.plugins.dependency.resolvers;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
 import java.io.File;
 import java.util.LinkedHashSet;
 import java.util.Set;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo;
@@ -41,16 +39,14 @@ import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolverE
 /**
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  */
-public abstract class AbstractResolveMojo
-    extends AbstractDependencyFilterMojo
-{
+public abstract class AbstractResolveMojo extends AbstractDependencyFilterMojo {
     /**
      * If specified, this parameter causes the dependencies to be written to the path specified instead of
      * the console.
      *
      * @since 2.0
      */
-    @Parameter( property = "outputFile" )
+    @Parameter(property = "outputFile")
     protected File outputFile;
 
     /**
@@ -58,7 +54,7 @@ public abstract class AbstractResolveMojo
      *
      * @since 2.2
      */
-    @Parameter( property = "appendOutput", defaultValue = "false" )
+    @Parameter(property = "appendOutput", defaultValue = "false")
     protected boolean appendOutput;
 
     /**
@@ -66,7 +62,7 @@ public abstract class AbstractResolveMojo
      *
      * @since 2.7
      */
-    @Parameter( property = "excludeReactor", defaultValue = "true" )
+    @Parameter(property = "excludeReactor", defaultValue = "true")
     protected boolean excludeReactor;
 
     /**
@@ -84,31 +80,33 @@ public abstract class AbstractResolveMojo
     /**
      * @return {@link FilterArtifacts}
      */
-    protected FilterArtifacts getArtifactsFilter()
-    {
+    protected FilterArtifacts getArtifactsFilter() {
         final FilterArtifacts filter = new FilterArtifacts();
 
-        if ( excludeReactor )
-        {
-
-            filter.addFilter( new ExcludeReactorProjectsArtifactFilter( reactorProjects, getLog() ) );
+        if (excludeReactor) {
 
+            filter.addFilter(new ExcludeReactorProjectsArtifactFilter(reactorProjects, getLog()));
         }
 
-        filter.addFilter( new ScopeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeScope ),
-                                           DependencyUtil.cleanToBeTokenizedString( this.excludeScope ) ) );
+        filter.addFilter(new ScopeFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeScope),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeScope)));
 
-        filter.addFilter( new TypeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeTypes ),
-                                          DependencyUtil.cleanToBeTokenizedString( this.excludeTypes ) ) );
+        filter.addFilter(new TypeFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeTypes),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeTypes)));
 
-        filter.addFilter( new ClassifierFilter( DependencyUtil.cleanToBeTokenizedString( this.includeClassifiers ),
-                                                DependencyUtil.cleanToBeTokenizedString( this.excludeClassifiers ) ) );
+        filter.addFilter(new ClassifierFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeClassifiers),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeClassifiers)));
 
-        filter.addFilter( new GroupIdFilter( DependencyUtil.cleanToBeTokenizedString( this.includeGroupIds ),
-                                             DependencyUtil.cleanToBeTokenizedString( this.excludeGroupIds ) ) );
+        filter.addFilter(new GroupIdFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeGroupIds),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeGroupIds)));
 
-        filter.addFilter( new ArtifactIdFilter( DependencyUtil.cleanToBeTokenizedString( this.includeArtifactIds ),
-                                                DependencyUtil.cleanToBeTokenizedString( this.excludeArtifactIds ) ) );
+        filter.addFilter(new ArtifactIdFilter(
+                DependencyUtil.cleanToBeTokenizedString(this.includeArtifactIds),
+                DependencyUtil.cleanToBeTokenizedString(this.excludeArtifactIds)));
 
         return filter;
     }
@@ -120,22 +118,19 @@ public abstract class AbstractResolveMojo
      * @return resolved set of dependencies
      * @throws DependencyResolverException in case of error while resolving artifacts.
      */
-    protected Set<Artifact> resolveArtifactDependencies( final DependableCoordinate artifact )
-        throws DependencyResolverException
-    {
+    protected Set<Artifact> resolveArtifactDependencies(final DependableCoordinate artifact)
+            throws DependencyResolverException {
         ProjectBuildingRequest buildingRequest = newResolveArtifactProjectBuildingRequest();
 
         Iterable<ArtifactResult> artifactResults =
-            getDependencyResolver().resolveDependencies( buildingRequest, artifact, null );
+                getDependencyResolver().resolveDependencies(buildingRequest, artifact, null);
 
         Set<Artifact> artifacts = new LinkedHashSet<>();
 
-        for ( final ArtifactResult artifactResult : artifactResults )
-        {
-            artifacts.add( artifactResult.getArtifact() );
+        for (final ArtifactResult artifactResult : artifactResults) {
+            artifacts.add(artifactResult.getArtifact());
         }
 
         return artifacts;
-
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/CollectDependenciesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/CollectDependenciesMojo.java
index 98152a79..bc23a637 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/CollectDependenciesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/CollectDependenciesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
@@ -41,10 +40,11 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 3.0
  */
-//CHECKSTYLE_OFF: LineLength
-@Mojo( name = "collect", requiresDependencyCollection = ResolutionScope.TEST, defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true )
-//CHECKSTYLE_ON: LineLength
-public class CollectDependenciesMojo
-    extends ResolveDependenciesMojo
-{
-}
+// CHECKSTYLE_OFF: LineLength
+@Mojo(
+        name = "collect",
+        requiresDependencyCollection = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.GENERATE_SOURCES,
+        threadSafe = true)
+// CHECKSTYLE_ON: LineLength
+public class CollectDependenciesMojo extends ResolveDependenciesMojo {}
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
index 4c57ca50..42e42fec 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsArtifactFilter.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,7 +16,12 @@ package org.apache.maven.plugins.dependency.resolvers;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
@@ -27,49 +30,35 @@ import org.apache.maven.project.MavenProject;
 import org.apache.maven.shared.artifact.filter.collection.AbstractArtifactsFilter;
 import org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException;
 
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.HashSet;
-import java.util.Set;
-
 /**
  * {@link ArtifactFilter} implementation that excludes artifacts found in the Reactor.
  *
  * @author Maarten Mulders
  */
-public class ExcludeReactorProjectsArtifactFilter extends AbstractArtifactsFilter
-{
+public class ExcludeReactorProjectsArtifactFilter extends AbstractArtifactsFilter {
     private final Log log;
     private final Set<String> reactorArtifactKeys;
 
-    public ExcludeReactorProjectsArtifactFilter( final List<MavenProject> reactorProjects, final Log log )
-    {
+    public ExcludeReactorProjectsArtifactFilter(final List<MavenProject> reactorProjects, final Log log) {
         this.log = log;
-        this.reactorArtifactKeys = new HashSet<>( reactorProjects.size() );
-        for ( final MavenProject project : reactorProjects )
-        {
-            this.reactorArtifactKeys.add( ArtifactUtils.key( project.getArtifact() ) );
+        this.reactorArtifactKeys = new HashSet<>(reactorProjects.size());
+        for (final MavenProject project : reactorProjects) {
+            this.reactorArtifactKeys.add(ArtifactUtils.key(project.getArtifact()));
         }
     }
 
     @Override
-    public Set<Artifact> filter( final Set<Artifact> artifacts ) throws ArtifactFilterException
-    {
-        final Set<Artifact> results = new LinkedHashSet<>( artifacts.size() );
+    public Set<Artifact> filter(final Set<Artifact> artifacts) throws ArtifactFilterException {
+        final Set<Artifact> results = new LinkedHashSet<>(artifacts.size());
 
-        for ( final Artifact artifact : artifacts )
-        {
-            if ( !isArtifactInReactor( artifact ) )
-            {
-                results.add( artifact );
-            }
-            else
-            {
-                if ( log.isDebugEnabled() )
-                {
-                    log.debug( "Skipped artifact "
-                            + ArtifactUtils.key( artifact )
-                            + " because it is present in the reactor" );
+        for (final Artifact artifact : artifacts) {
+            if (!isArtifactInReactor(artifact)) {
+                results.add(artifact);
+            } else {
+                if (log.isDebugEnabled()) {
+                    log.debug("Skipped artifact "
+                            + ArtifactUtils.key(artifact)
+                            + " because it is present in the reactor");
                 }
             }
         }
@@ -77,15 +66,12 @@ public class ExcludeReactorProjectsArtifactFilter extends AbstractArtifactsFilte
         return results;
     }
 
-    private boolean isArtifactInReactor( final Artifact artifact )
-    {
-        for ( final String reactorArtifactKey : this.reactorArtifactKeys )
-        {
-            final String artifactKey = ArtifactUtils.key( artifact );
+    private boolean isArtifactInReactor(final Artifact artifact) {
+        for (final String reactorArtifactKey : this.reactorArtifactKeys) {
+            final String artifactKey = ArtifactUtils.key(artifact);
 
             // This check only includes GAV. Should we take a look at the types, too?
-            if ( reactorArtifactKey.equals( artifactKey ) )
-            {
+            if (reactorArtifactKey.equals(artifactKey)) {
                 return true;
             }
         }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilter.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilter.java
index b429a3ea..98a60bfd 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilter.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilter.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,7 +16,11 @@ package org.apache.maven.plugins.dependency.resolvers;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugin.logging.Log;
@@ -27,44 +29,33 @@ import org.apache.maven.shared.artifact.filter.resolve.AbstractFilter;
 import org.apache.maven.shared.artifact.filter.resolve.Node;
 import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter;
 
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
 /**
  * {@link TransformableFilter} implementation that excludes artifacts found in the Reactor.
  *
  * @author Maarten Mulders
  */
-public class ExcludeReactorProjectsDependencyFilter extends AbstractFilter
-{
+public class ExcludeReactorProjectsDependencyFilter extends AbstractFilter {
     private final Log log;
     private final Set<String> reactorArtifactKeys;
 
-    public ExcludeReactorProjectsDependencyFilter( final List<MavenProject> reactorProjects, final Log log )
-    {
+    public ExcludeReactorProjectsDependencyFilter(final List<MavenProject> reactorProjects, final Log log) {
         this.log = log;
         this.reactorArtifactKeys = reactorProjects.stream()
-                .map( project -> ArtifactUtils.key( project.getArtifact() ) )
-                .collect( Collectors.toSet() );
+                .map(project -> ArtifactUtils.key(project.getArtifact()))
+                .collect(Collectors.toSet());
     }
 
     @Override
-    public boolean accept( final Node node, final List<Node> parents )
-    {
+    public boolean accept(final Node node, final List<Node> parents) {
         final Dependency dependency = node.getDependency();
-        if ( dependency != null )
-        {
-            final String dependencyArtifactKey = ArtifactUtils.key(
-                    dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion() );
+        if (dependency != null) {
+            final String dependencyArtifactKey =
+                    ArtifactUtils.key(dependency.getGroupId(), dependency.getArtifactId(), dependency.getVersion());
 
-            final boolean result = isDependencyArtifactInReactor( dependencyArtifactKey );
+            final boolean result = isDependencyArtifactInReactor(dependencyArtifactKey);
 
-            if ( log.isDebugEnabled() && result )
-            {
-                log.debug( "Skipped dependency "
-                        + dependencyArtifactKey
-                        + " because it is present in the reactor" );
+            if (log.isDebugEnabled() && result) {
+                log.debug("Skipped dependency " + dependencyArtifactKey + " because it is present in the reactor");
             }
 
             return !result;
@@ -72,13 +63,10 @@ public class ExcludeReactorProjectsDependencyFilter extends AbstractFilter
         return true;
     }
 
-    private boolean isDependencyArtifactInReactor( final String dependencyArtifactKey )
-    {
-        for ( final String reactorArtifactKey : this.reactorArtifactKeys )
-        {
+    private boolean isDependencyArtifactInReactor(final String dependencyArtifactKey) {
+        for (final String reactorArtifactKey : this.reactorArtifactKeys) {
             // This check only includes GAV. Should we take a look at the types, too?
-            if ( reactorArtifactKey.equals( dependencyArtifactKey ) )
-            {
+            if (reactorArtifactKey.equals(dependencyArtifactKey)) {
                 return true;
             }
         }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
index a91bd897..a0f8e09a 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
@@ -1,6 +1,4 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -9,22 +7,28 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License.    
+ * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.stream.Collectors;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.dependency.utils.DependencyUtil;
 import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.dependency.utils.DependencyUtil;
 import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
 import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter;
@@ -33,12 +37,6 @@ import org.apache.maven.shared.transfer.dependencies.DefaultDependableCoordinate
 import org.apache.maven.shared.transfer.dependencies.DependableCoordinate;
 import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolverException;
 
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.stream.Collectors;
-
 /**
  * Goal that resolves all project dependencies, including plugins and reports and their dependencies.
  *
@@ -46,10 +44,8 @@ import java.util.stream.Collectors;
  * @author Maarten Mulders
  * @since 2.0
  */
-@Mojo( name = "go-offline", threadSafe = true )
-public class GoOfflineMojo
-    extends AbstractResolveMojo
-{
+@Mojo(name = "go-offline", threadSafe = true)
+public class GoOfflineMojo extends AbstractResolveMojo {
     /**
      * Main entry into mojo. Gets the list of dependencies, resolves all that are not in the Reactor, and iterates
      * through displaying the resolved versions.
@@ -57,37 +53,26 @@ public class GoOfflineMojo
      * @throws MojoExecutionException with a message if an error occurs.
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
+    protected void doExecute() throws MojoExecutionException {
 
-        try
-        {
+        try {
             final Set<Artifact> plugins = resolvePluginArtifacts();
 
             final Set<Artifact> dependencies = resolveDependencyArtifacts();
 
-            if ( !isSilent() )
-            {
-                for ( Artifact artifact : plugins )
-                {
-                    this.getLog().info( "Resolved plugin: "
-                            + DependencyUtil.getFormattedFileName( artifact, false ) );
+            if (!isSilent()) {
+                for (Artifact artifact : plugins) {
+                    this.getLog().info("Resolved plugin: " + DependencyUtil.getFormattedFileName(artifact, false));
                 }
 
-                for ( Artifact artifact : dependencies )
-                {
-                    this.getLog().info( "Resolved dependency: "
-                            + DependencyUtil.getFormattedFileName( artifact, false ) );
+                for (Artifact artifact : dependencies) {
+                    this.getLog().info("Resolved dependency: " + DependencyUtil.getFormattedFileName(artifact, false));
                 }
             }
 
+        } catch (DependencyResolverException e) {
+            throw new MojoExecutionException(e.getMessage(), e);
         }
-        catch ( DependencyResolverException e )
-        {
-            throw new MojoExecutionException( e.getMessage(), e );
-        }
-
     }
 
     /**
@@ -96,57 +81,48 @@ public class GoOfflineMojo
      * @return set of resolved dependency artifacts.
      * @throws DependencyResolverException in case of an error while resolving the artifacts.
      */
-    protected Set<Artifact> resolveDependencyArtifacts()
-            throws DependencyResolverException
-    {
+    protected Set<Artifact> resolveDependencyArtifacts() throws DependencyResolverException {
         Collection<Dependency> dependencies = getProject().getDependencies();
 
         Set<DependableCoordinate> dependableCoordinates = dependencies.stream()
-                .map( this::createDependendableCoordinateFromDependency )
-                .collect( Collectors.toSet() );
+                .map(this::createDependendableCoordinateFromDependency)
+                .collect(Collectors.toSet());
 
         ProjectBuildingRequest buildingRequest = newResolveArtifactProjectBuildingRequest();
 
-        return resolveDependableCoordinate( buildingRequest, dependableCoordinates, "dependencies" );
+        return resolveDependableCoordinate(buildingRequest, dependableCoordinates, "dependencies");
     }
 
-    private Set<Artifact> resolveDependableCoordinate( final ProjectBuildingRequest buildingRequest,
-                                                        final Collection<DependableCoordinate> dependableCoordinates,
-                                                       final String type )
-            throws DependencyResolverException
-    {
+    private Set<Artifact> resolveDependableCoordinate(
+            final ProjectBuildingRequest buildingRequest,
+            final Collection<DependableCoordinate> dependableCoordinates,
+            final String type)
+            throws DependencyResolverException {
         final TransformableFilter filter = getTransformableFilter();
 
-        this.getLog().debug( "Resolving '" + type + "' with following repositories:" );
-        for ( ArtifactRepository repo : buildingRequest.getRemoteRepositories() )
-        {
-            getLog().debug( repo.getId() + " (" + repo.getUrl() + ")" );
+        this.getLog().debug("Resolving '" + type + "' with following repositories:");
+        for (ArtifactRepository repo : buildingRequest.getRemoteRepositories()) {
+            getLog().debug(repo.getId() + " (" + repo.getUrl() + ")");
         }
 
         final Set<Artifact> results = new HashSet<>();
 
-        for ( DependableCoordinate dependableCoordinate : dependableCoordinates )
-        {
-            final Iterable<ArtifactResult> artifactResults = getDependencyResolver().resolveDependencies(
-                    buildingRequest, dependableCoordinate, filter );
+        for (DependableCoordinate dependableCoordinate : dependableCoordinates) {
+            final Iterable<ArtifactResult> artifactResults =
+                    getDependencyResolver().resolveDependencies(buildingRequest, dependableCoordinate, filter);
 
-            for ( final ArtifactResult artifactResult : artifactResults )
-            {
-                results.add( artifactResult.getArtifact() );
+            for (final ArtifactResult artifactResult : artifactResults) {
+                results.add(artifactResult.getArtifact());
             }
         }
 
         return results;
     }
 
-    private TransformableFilter getTransformableFilter()
-    {
-        if ( this.excludeReactor )
-        {
-            return new ExcludeReactorProjectsDependencyFilter( this.reactorProjects, getLog() );
-        }
-        else
-        {
+    private TransformableFilter getTransformableFilter() {
+        if (this.excludeReactor) {
+            return new ExcludeReactorProjectsDependencyFilter(this.reactorProjects, getLog());
+        } else {
             return null;
         }
     }
@@ -157,54 +133,48 @@ public class GoOfflineMojo
      * @return set of resolved plugin artifacts.
      * @throws DependencyResolverException in case of an error while resolving the artifacts.
      */
-    protected Set<Artifact> resolvePluginArtifacts()
-            throws DependencyResolverException
-    {
+    protected Set<Artifact> resolvePluginArtifacts() throws DependencyResolverException {
 
         Set<Artifact> plugins = getProject().getPluginArtifacts();
         Set<Artifact> reports = getProject().getReportArtifacts();
 
         Set<Artifact> artifacts = new LinkedHashSet<>();
-        artifacts.addAll( reports );
-        artifacts.addAll( plugins );
+        artifacts.addAll(reports);
+        artifacts.addAll(plugins);
 
         Set<DependableCoordinate> dependableCoordinates = artifacts.stream()
-                .map( this::createDependendableCoordinateFromArtifact )
-                .collect( Collectors.toSet() );
-
+                .map(this::createDependendableCoordinateFromArtifact)
+                .collect(Collectors.toSet());
 
         ProjectBuildingRequest buildingRequest = newResolvePluginProjectBuildingRequest();
 
-        return resolveDependableCoordinate( buildingRequest, dependableCoordinates, "plugins" );
+        return resolveDependableCoordinate(buildingRequest, dependableCoordinates, "plugins");
     }
 
-    private DependableCoordinate createDependendableCoordinateFromArtifact( final Artifact artifact )
-    {
+    private DependableCoordinate createDependendableCoordinateFromArtifact(final Artifact artifact) {
         final DefaultDependableCoordinate result = new DefaultDependableCoordinate();
-        result.setGroupId( artifact.getGroupId() );
-        result.setArtifactId( artifact.getArtifactId() );
-        result.setVersion( artifact.getVersion() );
-        result.setType( artifact.getType() );
-        result.setClassifier( artifact.getClassifier() );
+        result.setGroupId(artifact.getGroupId());
+        result.setArtifactId(artifact.getArtifactId());
+        result.setVersion(artifact.getVersion());
+        result.setType(artifact.getType());
+        result.setClassifier(artifact.getClassifier());
 
         return result;
     }
 
-    private DependableCoordinate createDependendableCoordinateFromDependency( final Dependency dependency )
-    {
+    private DependableCoordinate createDependendableCoordinateFromDependency(final Dependency dependency) {
         final DefaultDependableCoordinate result = new DefaultDependableCoordinate();
-        result.setGroupId( dependency.getGroupId() );
-        result.setArtifactId( dependency.getArtifactId() );
-        result.setVersion( dependency.getVersion() );
-        result.setType( dependency.getType() );
-        result.setClassifier( dependency.getClassifier() );
+        result.setGroupId(dependency.getGroupId());
+        result.setArtifactId(dependency.getArtifactId());
+        result.setVersion(dependency.getVersion());
+        result.setType(dependency.getType());
+        result.setClassifier(dependency.getClassifier());
 
         return result;
     }
 
     @Override
-    protected ArtifactsFilter getMarkedArtifactFilter()
-    {
+    protected ArtifactsFilter getMarkedArtifactFilter() {
         return null;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListMojo.java
index c4bc2abd..54cb52c4 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,15 +7,16 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License.    
+ * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.ResolutionScope;
@@ -28,9 +27,7 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
  * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
  * @since 2.0-alpha-5
  */
-@Mojo( name = "list", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-public class ListMojo
-    extends ResolveDependenciesMojo
-{
+@Mojo(name = "list", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true)
+public class ListMojo extends ResolveDependenciesMojo {
     // alias for dependency:resolve
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java
index deed8d34..59a785ce 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java
@@ -1,76 +1,66 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.Component;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.plugins.dependency.AbstractDependencyMojo;
-import org.apache.maven.shared.transfer.dependencies.collect.CollectorResult;
-import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollector;
-import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollectorException;
-
-/**
- * Goal that resolves all project dependencies and then lists the repositories used by the build and by the transitive
- * dependencies
- *
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- * @since 2.2
- */
-@Mojo( name = "list-repositories", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-public class ListRepositoriesMojo
-    extends AbstractDependencyMojo
-{
-    /**
-     * Dependency collector, needed to resolve dependencies.
-     */
-    @Component( role = DependencyCollector.class )
-    private DependencyCollector dependencyCollector;
-
-    /**
-     * Displays a list of the repositories used by this build.
-     *
-     * @throws MojoExecutionException with a message if an error occurs.
-     */
-    @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
-        try
-        {
-            CollectorResult collectResult =
-                dependencyCollector.collectDependencies( session.getProjectBuildingRequest(), getProject().getModel() );
-
-            this.getLog().info( "Repositories used by this build:" );
-
-            for ( ArtifactRepository repo : collectResult.getRemoteRepositories() )
-            {
-                this.getLog().info( repo.toString() );
-            }
-        }
-        catch ( DependencyCollectorException e )
-        {
-            throw new MojoExecutionException( "Unable to resolve artifacts", e );
-        }
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugins.dependency.resolvers;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.plugins.dependency.AbstractDependencyMojo;
+import org.apache.maven.shared.transfer.dependencies.collect.CollectorResult;
+import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollector;
+import org.apache.maven.shared.transfer.dependencies.collect.DependencyCollectorException;
+
+/**
+ * Goal that resolves all project dependencies and then lists the repositories used by the build and by the transitive
+ * dependencies
+ *
+ * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
+ * @since 2.2
+ */
+@Mojo(name = "list-repositories", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true)
+public class ListRepositoriesMojo extends AbstractDependencyMojo {
+    /**
+     * Dependency collector, needed to resolve dependencies.
+     */
+    @Component(role = DependencyCollector.class)
+    private DependencyCollector dependencyCollector;
+
+    /**
+     * Displays a list of the repositories used by this build.
+     *
+     * @throws MojoExecutionException with a message if an error occurs.
+     */
+    @Override
+    protected void doExecute() throws MojoExecutionException {
+        try {
+            CollectorResult collectResult = dependencyCollector.collectDependencies(
+                    session.getProjectBuildingRequest(), getProject().getModel());
+
+            this.getLog().info("Repositories used by this build:");
+
+            for (ArtifactRepository repo : collectResult.getRemoteRepositories()) {
+                this.getLog().info(repo.toString());
+            }
+        } catch (DependencyCollectorException e) {
+            throw new MojoExecutionException("Unable to resolve artifacts", e);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojo.java
index c4453527..be09c9af 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependenciesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,21 +16,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * specific language governing permissions and limitations
  * under the License.
  */
-
-import org.apache.maven.artifact.Artifact;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.dependency.utils.DependencyStatusSets;
-import org.apache.maven.plugins.dependency.utils.DependencyUtil;
-import org.apache.maven.plugins.dependency.utils.filters.ResolveFileFilter;
-import org.apache.maven.plugins.dependency.utils.markers.SourcesFileMarkerHandler;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
-import org.apache.maven.shared.utils.logging.MessageBuilder;
-import org.apache.maven.shared.utils.logging.MessageUtils;
+package org.apache.maven.plugins.dependency.resolvers;
 
 import java.io.File;
 import java.io.IOException;
@@ -46,6 +30,19 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.plugins.dependency.utils.DependencyStatusSets;
+import org.apache.maven.plugins.dependency.utils.DependencyUtil;
+import org.apache.maven.plugins.dependency.utils.filters.ResolveFileFilter;
+import org.apache.maven.plugins.dependency.utils.markers.SourcesFileMarkerHandler;
+import org.apache.maven.shared.artifact.filter.collection.ArtifactsFilter;
+import org.apache.maven.shared.utils.logging.MessageBuilder;
+import org.apache.maven.shared.utils.logging.MessageUtils;
 
 /**
  * Goal that resolves the project dependencies from the repository. When using this goal while running on Java 9 the
@@ -54,14 +51,16 @@ import java.util.jar.Manifest;
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 2.0
  */
-//CHECKSTYLE_OFF: LineLength
-@Mojo( name = "resolve", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true )
-//CHECKSTYLE_ON: LineLength
-public class ResolveDependenciesMojo
-    extends AbstractResolveMojo
-{
-
-    @Parameter( property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}" )
+// CHECKSTYLE_OFF: LineLength
+@Mojo(
+        name = "resolve",
+        requiresDependencyResolution = ResolutionScope.TEST,
+        defaultPhase = LifecyclePhase.GENERATE_SOURCES,
+        threadSafe = true)
+// CHECKSTYLE_ON: LineLength
+public class ResolveDependenciesMojo extends AbstractResolveMojo {
+
+    @Parameter(property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}")
     private String outputEncoding;
 
     /**
@@ -69,7 +68,7 @@ public class ResolveDependenciesMojo
      *
      * @since 2.0-alpha-2
      */
-    @Parameter( property = "mdep.outputScope", defaultValue = "true" )
+    @Parameter(property = "mdep.outputScope", defaultValue = "true")
     protected boolean outputScope;
 
     /**
@@ -79,18 +78,18 @@ public class ResolveDependenciesMojo
 
     /**
      * Sort the output list of resolved artifacts alphabetically. The default ordering matches the classpath order.
-     * 
+     *
      * @since 2.8
      */
-    @Parameter( property = "sort", defaultValue = "false" )
+    @Parameter(property = "sort", defaultValue = "false")
     boolean sort;
 
     /**
      * Include parent poms in the dependency resolution list.
-     * 
+     *
      * @since 2.8
      */
-    @Parameter( property = "includeParents", defaultValue = "false" )
+    @Parameter(property = "includeParents", defaultValue = "false")
     boolean includeParents;
 
     /**
@@ -99,43 +98,33 @@ public class ResolveDependenciesMojo
      * @throws MojoExecutionException with a message if an error occurs
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
+    protected void doExecute() throws MojoExecutionException {
         // get sets of dependencies
-        results = this.getDependencySets( false, includeParents );
-
-        String output = getOutput( outputAbsoluteArtifactFilename, outputScope, sort );
-        try
-        {
-            if ( outputFile == null )
-            {
-                DependencyUtil.log( output, getLog() );
+        results = this.getDependencySets(false, includeParents);
+
+        String output = getOutput(outputAbsoluteArtifactFilename, outputScope, sort);
+        try {
+            if (outputFile == null) {
+                DependencyUtil.log(output, getLog());
+            } else {
+                String encoding = Objects.toString(outputEncoding, "UTF-8");
+                DependencyUtil.write(output, outputFile, appendOutput, encoding);
             }
-            else
-            {    
-                String encoding = Objects.toString( outputEncoding, "UTF-8" );
-                DependencyUtil.write( output, outputFile, appendOutput, encoding );
-            }
-        }
-        catch ( IOException e )
-        {
-            throw new MojoExecutionException( e.getMessage(), e );
+        } catch (IOException e) {
+            throw new MojoExecutionException(e.getMessage(), e);
         }
     }
 
     /**
      * @return returns the results
      */
-    public DependencyStatusSets getResults()
-    {
+    public DependencyStatusSets getResults() {
         return this.results;
     }
 
     @Override
-    protected ArtifactsFilter getMarkedArtifactFilter()
-    {
-        return new ResolveFileFilter( new SourcesFileMarkerHandler( this.markersDirectory ) );
+    protected ArtifactsFilter getMarkedArtifactFilter() {
+        return new ResolveFileFilter(new SourcesFileMarkerHandler(this.markersDirectory));
     }
 
     /**
@@ -144,201 +133,162 @@ public class ResolveDependenciesMojo
      * @param theSort sort yes/no
      * @return the output
      */
-    public String getOutput( boolean outputAbsoluteArtifactFilename, boolean theOutputScope, boolean theSort )
-    {
+    public String getOutput(boolean outputAbsoluteArtifactFilename, boolean theOutputScope, boolean theSort) {
         StringBuilder sb = new StringBuilder();
-        sb.append( System.lineSeparator() );
-        sb.append( "The following files have been resolved:" );
-        sb.append( System.lineSeparator() );
-        if ( results.getResolvedDependencies() == null || results.getResolvedDependencies().isEmpty() )
-        {
-            sb.append( "   none" );
-            sb.append( System.lineSeparator() );
-        }
-        else
-        {
-            sb.append( buildArtifactListOutput( results.getResolvedDependencies(), outputAbsoluteArtifactFilename,
-                                                theOutputScope, theSort ) );
+        sb.append(System.lineSeparator());
+        sb.append("The following files have been resolved:");
+        sb.append(System.lineSeparator());
+        if (results.getResolvedDependencies() == null
+                || results.getResolvedDependencies().isEmpty()) {
+            sb.append("   none");
+            sb.append(System.lineSeparator());
+        } else {
+            sb.append(buildArtifactListOutput(
+                    results.getResolvedDependencies(), outputAbsoluteArtifactFilename, theOutputScope, theSort));
         }
 
-        if ( results.getSkippedDependencies() != null && !results.getSkippedDependencies().isEmpty() )
-        {
-            sb.append( System.lineSeparator() );
-            sb.append( "The following files were skipped:" );
-            sb.append( System.lineSeparator() );
-            Set<Artifact> skippedDependencies = new LinkedHashSet<>( results.getSkippedDependencies() );
-            sb.append( buildArtifactListOutput( skippedDependencies, outputAbsoluteArtifactFilename, theOutputScope,
-                                                theSort ) );
+        if (results.getSkippedDependencies() != null
+                && !results.getSkippedDependencies().isEmpty()) {
+            sb.append(System.lineSeparator());
+            sb.append("The following files were skipped:");
+            sb.append(System.lineSeparator());
+            Set<Artifact> skippedDependencies = new LinkedHashSet<>(results.getSkippedDependencies());
+            sb.append(buildArtifactListOutput(
+                    skippedDependencies, outputAbsoluteArtifactFilename, theOutputScope, theSort));
         }
 
-        if ( results.getUnResolvedDependencies() != null && !results.getUnResolvedDependencies().isEmpty() )
-        {
-            sb.append( System.lineSeparator() );
-            sb.append( "The following files have NOT been resolved:" );
-            sb.append( System.lineSeparator() );
-            Set<Artifact> unResolvedDependencies = new LinkedHashSet<>( results.getUnResolvedDependencies() );
-            sb.append( buildArtifactListOutput( unResolvedDependencies, outputAbsoluteArtifactFilename, theOutputScope,
-                                                theSort ) );
+        if (results.getUnResolvedDependencies() != null
+                && !results.getUnResolvedDependencies().isEmpty()) {
+            sb.append(System.lineSeparator());
+            sb.append("The following files have NOT been resolved:");
+            sb.append(System.lineSeparator());
+            Set<Artifact> unResolvedDependencies = new LinkedHashSet<>(results.getUnResolvedDependencies());
+            sb.append(buildArtifactListOutput(
+                    unResolvedDependencies, outputAbsoluteArtifactFilename, theOutputScope, theSort));
         }
-        sb.append( System.lineSeparator() );
+        sb.append(System.lineSeparator());
 
         return sb.toString();
     }
 
-    private StringBuilder buildArtifactListOutput( Set<Artifact> artifacts, boolean outputAbsoluteArtifactFilename,
-                                                   boolean theOutputScope, boolean theSort )
-    {
+    private StringBuilder buildArtifactListOutput(
+            Set<Artifact> artifacts, boolean outputAbsoluteArtifactFilename, boolean theOutputScope, boolean theSort) {
         StringBuilder sb = new StringBuilder();
         List<String> artifactStringList = new ArrayList<>();
-        for ( Artifact artifact : artifacts )
-        {
+        for (Artifact artifact : artifacts) {
             MessageBuilder messageBuilder = MessageUtils.buffer();
 
-            messageBuilder.a( "   " );
+            messageBuilder.a("   ");
 
-            if ( theOutputScope )
-            {
-                messageBuilder.a( artifact.toString() );
-            }
-            else
-            {
-                messageBuilder.a( artifact.getId() );
+            if (theOutputScope) {
+                messageBuilder.a(artifact.toString());
+            } else {
+                messageBuilder.a(artifact.getId());
             }
 
-            if ( outputAbsoluteArtifactFilename )
-            {
-                try
-                {
+            if (outputAbsoluteArtifactFilename) {
+                try {
                     // we want to print the absolute file name here
-                    String artifactFilename = artifact.getFile().getAbsoluteFile().getPath();
+                    String artifactFilename =
+                            artifact.getFile().getAbsoluteFile().getPath();
 
-                    messageBuilder.a( ':' ).a( artifactFilename );
-                }
-                catch ( NullPointerException e )
-                {
+                    messageBuilder.a(':').a(artifactFilename);
+                } catch (NullPointerException e) {
                     // ignore the null pointer, we'll output a null string
                 }
             }
 
-            if ( theOutputScope && artifact.isOptional() )
-            {
-                messageBuilder.a( " (optional)" );
+            if (theOutputScope && artifact.isOptional()) {
+                messageBuilder.a(" (optional)");
             }
 
             // dependencies:collect won't download jars
-            if ( artifact.getFile() != null )
-            {
-                ModuleDescriptor moduleDescriptor = getModuleDescriptor( artifact.getFile() );
-                if ( moduleDescriptor != null )
-                {
-                    messageBuilder.project( " -- module " + moduleDescriptor.name );
-
-                    if ( moduleDescriptor.automatic )
-                    {
-                        if ( "MANIFEST".equals( moduleDescriptor.moduleNameSource ) )
-                        {
-                            messageBuilder.strong( " [auto]" );
-                        }
-                        else
-                        {
-                            messageBuilder.warning( " (auto)" );
+            if (artifact.getFile() != null) {
+                ModuleDescriptor moduleDescriptor = getModuleDescriptor(artifact.getFile());
+                if (moduleDescriptor != null) {
+                    messageBuilder.project(" -- module " + moduleDescriptor.name);
+
+                    if (moduleDescriptor.automatic) {
+                        if ("MANIFEST".equals(moduleDescriptor.moduleNameSource)) {
+                            messageBuilder.strong(" [auto]");
+                        } else {
+                            messageBuilder.warning(" (auto)");
                         }
                     }
                 }
             }
-            artifactStringList.add( messageBuilder + System.lineSeparator() );
+            artifactStringList.add(messageBuilder + System.lineSeparator());
         }
-        if ( theSort )
-        {
-            Collections.sort( artifactStringList );
+        if (theSort) {
+            Collections.sort(artifactStringList);
         }
-        for ( String artifactString : artifactStringList )
-        {
-            sb.append( artifactString );
+        for (String artifactString : artifactStringList) {
+            sb.append(artifactString);
         }
         return sb;
     }
 
-    private ModuleDescriptor getModuleDescriptor( File artifactFile )
-    {
+    private ModuleDescriptor getModuleDescriptor(File artifactFile) {
         ModuleDescriptor moduleDescriptor = null;
-        try
-        {
+        try {
             // Use Java9 code to get moduleName, don't try to do it better with own implementation
-            Class<?> moduleFinderClass = Class.forName( "java.lang.module.ModuleFinder" );
+            Class<?> moduleFinderClass = Class.forName("java.lang.module.ModuleFinder");
 
             java.nio.file.Path path = artifactFile.toPath();
 
-            Method ofMethod = moduleFinderClass.getMethod( "of", java.nio.file.Path[].class );
-            Object moduleFinderInstance = ofMethod.invoke( null, new Object[] { new java.nio.file.Path[] { path } } );
+            Method ofMethod = moduleFinderClass.getMethod("of", java.nio.file.Path[].class);
+            Object moduleFinderInstance = ofMethod.invoke(null, new Object[] {new java.nio.file.Path[] {path}});
 
-            Method findAllMethod = moduleFinderClass.getMethod( "findAll" );
-            Set<Object> moduleReferences = (Set<Object>) findAllMethod.invoke( moduleFinderInstance );
+            Method findAllMethod = moduleFinderClass.getMethod("findAll");
+            Set<Object> moduleReferences = (Set<Object>) findAllMethod.invoke(moduleFinderInstance);
 
             // moduleReferences can be empty when referring to target/classes without module-info.class
-            if ( !moduleReferences.isEmpty() )
-            {
+            if (!moduleReferences.isEmpty()) {
                 Object moduleReference = moduleReferences.iterator().next();
-                Method descriptorMethod = moduleReference.getClass().getMethod( "descriptor" );
-                Object moduleDescriptorInstance = descriptorMethod.invoke( moduleReference );
+                Method descriptorMethod = moduleReference.getClass().getMethod("descriptor");
+                Object moduleDescriptorInstance = descriptorMethod.invoke(moduleReference);
 
-                Method nameMethod = moduleDescriptorInstance.getClass().getMethod( "name" );
-                String name = (String) nameMethod.invoke( moduleDescriptorInstance );
+                Method nameMethod = moduleDescriptorInstance.getClass().getMethod("name");
+                String name = (String) nameMethod.invoke(moduleDescriptorInstance);
 
                 moduleDescriptor = new ModuleDescriptor();
                 moduleDescriptor.name = name;
 
-                Method isAutomaticMethod = moduleDescriptorInstance.getClass().getMethod( "isAutomatic" );
-                moduleDescriptor.automatic = (Boolean) isAutomaticMethod.invoke( moduleDescriptorInstance );
+                Method isAutomaticMethod = moduleDescriptorInstance.getClass().getMethod("isAutomatic");
+                moduleDescriptor.automatic = (Boolean) isAutomaticMethod.invoke(moduleDescriptorInstance);
 
-                if ( moduleDescriptor.automatic )
-                {
-                    if ( artifactFile.isFile() )
-                    {
-                        try ( JarFile jarFile = new JarFile( artifactFile ) )
-                        {
+                if (moduleDescriptor.automatic) {
+                    if (artifactFile.isFile()) {
+                        try (JarFile jarFile = new JarFile(artifactFile)) {
                             Manifest manifest = jarFile.getManifest();
 
-                            if ( manifest != null
-                                && manifest.getMainAttributes().getValue( "Automatic-Module-Name" ) != null )
-                            {
+                            if (manifest != null
+                                    && manifest.getMainAttributes().getValue("Automatic-Module-Name") != null) {
                                 moduleDescriptor.moduleNameSource = "MANIFEST";
-                            }
-                            else
-                            {
+                            } else {
                                 moduleDescriptor.moduleNameSource = "FILENAME";
                             }
-                        }
-                        catch ( IOException e )
-                        {
+                        } catch (IOException e) {
                             // noop
                         }
                     }
                 }
             }
-        }
-        catch ( ClassNotFoundException | SecurityException | IllegalAccessException | IllegalArgumentException e )
-        {
+        } catch (ClassNotFoundException | SecurityException | IllegalAccessException | IllegalArgumentException e) {
             // do nothing
-        }
-        catch ( NoSuchMethodException e )
-        {
+        } catch (NoSuchMethodException e) {
             e.printStackTrace();
-        }
-        catch ( InvocationTargetException e )
-        {
+        } catch (InvocationTargetException e) {
             Throwable cause = e.getCause();
-            while ( cause.getCause() != null )
-            {
+            while (cause.getCause() != null) {
                 cause = cause.getCause();
             }
-            getLog().info( "Can't extract module name from " + artifactFile.getName() + ": " + cause.getMessage() );
+            getLog().info("Can't extract module name from " + artifactFile.getName() + ": " + cause.getMessage());
         }
         return moduleDescriptor;
     }
 
-    private class ModuleDescriptor
-    {
+    private class ModuleDescriptor {
         String name;
 
         boolean automatic = true;
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java
index 95d16880..63acc3e3 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolveDependencySourcesMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -31,12 +30,14 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 2.0-alpha2
  */
-//CHECKSTYLE_OFF: LineLength
-@Mojo( name = "sources", defaultPhase = LifecyclePhase.GENERATE_SOURCES, requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-//CHECKSTYLE_ON: LineLength
-public class ResolveDependencySourcesMojo
-    extends ResolveDependenciesMojo
-{
+// CHECKSTYLE_OFF: LineLength
+@Mojo(
+        name = "sources",
+        defaultPhase = LifecyclePhase.GENERATE_SOURCES,
+        requiresDependencyResolution = ResolutionScope.TEST,
+        threadSafe = true)
+// CHECKSTYLE_ON: LineLength
+public class ResolveDependencySourcesMojo extends ResolveDependenciesMojo {
 
     private static final String SOURCE_CLASSIFIER = "sources";
 
@@ -46,11 +47,8 @@ public class ResolveDependencySourcesMojo
      * @throws MojoExecutionException with a message if an error occurs.
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
-        if ( StringUtils.isEmpty( this.classifier ) )
-        {
+    protected void doExecute() throws MojoExecutionException {
+        if (StringUtils.isEmpty(this.classifier)) {
             this.classifier = SOURCE_CLASSIFIER;
         }
 
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolvePluginsMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolvePluginsMojo.java
index c40c4276..b2393f71 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolvePluginsMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/ResolvePluginsMojo.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.resolvers;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.resolvers;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,12 +16,12 @@ package org.apache.maven.plugins.dependency.resolvers;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.resolvers;
 
 import java.io.IOException;
 import java.util.LinkedHashSet;
 import java.util.Objects;
 import java.util.Set;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
@@ -44,12 +42,10 @@ import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolverE
  * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
  * @since 2.0
  */
-@Mojo( name = "resolve-plugins", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true )
-public class ResolvePluginsMojo
-    extends AbstractResolveMojo
-{
+@Mojo(name = "resolve-plugins", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true)
+public class ResolvePluginsMojo extends AbstractResolveMojo {
 
-    @Parameter( property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}" )
+    @Parameter(property = "outputEncoding", defaultValue = "${project.reporting.outputEncoding}")
     private String outputEncoding;
 
     /**
@@ -58,97 +54,77 @@ public class ResolvePluginsMojo
      * @throws MojoExecutionException with a message if an error occurs.
      */
     @Override
-    protected void doExecute()
-        throws MojoExecutionException
-    {
-        try
-        {
+    protected void doExecute() throws MojoExecutionException {
+        try {
             // ideally this should either be DependencyCoordinates or DependencyNode
             final Set<Artifact> plugins = resolvePluginArtifacts();
 
             StringBuilder sb = new StringBuilder();
-            sb.append( System.lineSeparator() );
-            sb.append( "The following plugins have been resolved:" );
-            sb.append( System.lineSeparator() );
-            if ( plugins == null || plugins.isEmpty() )
-            {
-                sb.append( "   none" );
-                sb.append( System.lineSeparator() );
-            }
-            else
-            {
-                for ( Artifact plugin : plugins )
-                {
+            sb.append(System.lineSeparator());
+            sb.append("The following plugins have been resolved:");
+            sb.append(System.lineSeparator());
+            if (plugins == null || plugins.isEmpty()) {
+                sb.append("   none");
+                sb.append(System.lineSeparator());
+            } else {
+                for (Artifact plugin : plugins) {
                     String artifactFilename = null;
-                    if ( outputAbsoluteArtifactFilename )
-                    {
-                        try
-                        {
+                    if (outputAbsoluteArtifactFilename) {
+                        try {
                             // we want to print the absolute file name here
-                            artifactFilename = plugin.getFile().getAbsoluteFile().getPath();
-                        }
-                        catch ( NullPointerException e )
-                        {
+                            artifactFilename =
+                                    plugin.getFile().getAbsoluteFile().getPath();
+                        } catch (NullPointerException e) {
                             // ignore the null pointer, we'll output a null string
                             artifactFilename = null;
                         }
                     }
 
                     String id = plugin.toString();
-                    sb.append( "   " )
-                            .append( id )
-                            .append( outputAbsoluteArtifactFilename ? ":" + artifactFilename : "" )
-                            .append( System.lineSeparator() );
+                    sb.append("   ")
+                            .append(id)
+                            .append(outputAbsoluteArtifactFilename ? ":" + artifactFilename : "")
+                            .append(System.lineSeparator());
 
-                    if ( !excludeTransitive )
-                    {
+                    if (!excludeTransitive) {
                         DefaultDependableCoordinate pluginCoordinate = new DefaultDependableCoordinate();
-                        pluginCoordinate.setGroupId( plugin.getGroupId() );
-                        pluginCoordinate.setArtifactId( plugin.getArtifactId() );
-                        pluginCoordinate.setVersion( plugin.getVersion() );
+                        pluginCoordinate.setGroupId(plugin.getGroupId());
+                        pluginCoordinate.setArtifactId(plugin.getArtifactId());
+                        pluginCoordinate.setVersion(plugin.getVersion());
 
-                        for ( final Artifact artifact : resolveArtifactDependencies( pluginCoordinate ) )
-                        {
+                        for (final Artifact artifact : resolveArtifactDependencies(pluginCoordinate)) {
                             artifactFilename = null;
-                            if ( outputAbsoluteArtifactFilename )
-                            {
-                                try
-                                {
+                            if (outputAbsoluteArtifactFilename) {
+                                try {
                                     // we want to print the absolute file name here
-                                    artifactFilename = artifact.getFile().getAbsoluteFile().getPath();
-                                }
-                                catch ( NullPointerException e )
-                                {
+                                    artifactFilename =
+                                            artifact.getFile().getAbsoluteFile().getPath();
+                                } catch (NullPointerException e) {
                                     // ignore the null pointer, we'll output a null string
                                     artifactFilename = null;
                                 }
                             }
 
                             id = artifact.toString();
-                            sb.append( "      " )
-                                    .append( id )
-                                    .append( outputAbsoluteArtifactFilename ? ":" + artifactFilename : "" )
-                                    .append( System.lineSeparator() );
+                            sb.append("      ")
+                                    .append(id)
+                                    .append(outputAbsoluteArtifactFilename ? ":" + artifactFilename : "")
+                                    .append(System.lineSeparator());
                         }
                     }
                 }
-                sb.append( System.lineSeparator() );
+                sb.append(System.lineSeparator());
 
                 String output = sb.toString();
-                if ( outputFile == null )
-                {
-                    DependencyUtil.log( output, getLog() );
-                }
-                else
-                {
-                    String encoding = Objects.toString( outputEncoding, "UTF-8" );
-                    DependencyUtil.write( output, outputFile, appendOutput, encoding );
+                if (outputFile == null) {
+                    DependencyUtil.log(output, getLog());
+                } else {
+                    String encoding = Objects.toString(outputEncoding, "UTF-8");
+                    DependencyUtil.write(output, outputFile, appendOutput, encoding);
                 }
             }
-        }
-        catch ( IOException | ArtifactFilterException | ArtifactResolverException | DependencyResolverException e )
-        {
-            throw new MojoExecutionException( e.getMessage(), e );
+        } catch (IOException | ArtifactFilterException | ArtifactResolverException | DependencyResolverException e) {
+            throw new MojoExecutionException(e.getMessage(), e);
         }
     }
 
@@ -159,23 +135,20 @@ public class ResolvePluginsMojo
      * @throws ArtifactFilterException in case of an error
      * @throws ArtifactResolverException in case of an error
      */
-    protected Set<Artifact> resolvePluginArtifacts()
-        throws ArtifactFilterException, ArtifactResolverException
-    {
+    protected Set<Artifact> resolvePluginArtifacts() throws ArtifactFilterException, ArtifactResolverException {
         final Set<Artifact> plugins = getProject().getPluginArtifacts();
         final Set<Artifact> reports = getProject().getReportArtifacts();
 
         Set<Artifact> artifacts = new LinkedHashSet<>();
-        artifacts.addAll( reports );
-        artifacts.addAll( plugins );
+        artifacts.addAll(reports);
+        artifacts.addAll(plugins);
 
         final FilterArtifacts filter = getArtifactsFilter();
-        artifacts = filter.filter( artifacts );
+        artifacts = filter.filter(artifacts);
 
-        Set<Artifact> resolvedArtifacts = new LinkedHashSet<>( artifacts.size() );
+        Set<Artifact> resolvedArtifacts = new LinkedHashSet<>(artifacts.size());
         // final ArtifactFilter filter = getPluginFilter();
-        for ( final Artifact artifact : new LinkedHashSet<>( artifacts ) )
-        {
+        for (final Artifact artifact : new LinkedHashSet<>(artifacts)) {
             // if ( !filter.include( artifact ) )
             // {
             // final String logStr =
@@ -193,14 +166,15 @@ public class ResolvePluginsMojo
             ProjectBuildingRequest buildingRequest = newResolvePluginProjectBuildingRequest();
 
             // resolve the new artifact
-            resolvedArtifacts.add( getArtifactResolver().resolveArtifact( buildingRequest, artifact ).getArtifact() );
+            resolvedArtifacts.add(getArtifactResolver()
+                    .resolveArtifact(buildingRequest, artifact)
+                    .getArtifact());
         }
         return artifacts;
     }
 
     @Override
-    protected ArtifactsFilter getMarkedArtifactFilter()
-    {
+    protected ArtifactsFilter getMarkedArtifactFilter() {
         return null;
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/tree/AbstractSerializingVisitor.java b/src/main/java/org/apache/maven/plugins/dependency/tree/AbstractSerializingVisitor.java
index d71f70e2..8f8f40ed 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/tree/AbstractSerializingVisitor.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/tree/AbstractSerializingVisitor.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.tree;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.tree;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,6 +16,7 @@ package org.apache.maven.plugins.dependency.tree;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.tree;
 
 import java.io.PrintWriter;
 import java.io.Writer;
@@ -27,8 +26,7 @@ import java.io.Writer;
  *
  * @author <a href="mailto:jerome.creignou@gmail.com">Jerome Creignou</a>
  */
-public abstract class AbstractSerializingVisitor
-{
+public abstract class AbstractSerializingVisitor {
 
     /**
      * The writer to serialize to.
@@ -43,15 +41,11 @@ public abstract class AbstractSerializingVisitor
      *
      * @param writer the writer to serialize to.
      */
-    public AbstractSerializingVisitor( Writer writer )
-    {
-        if ( writer instanceof PrintWriter )
-        {
+    public AbstractSerializingVisitor(Writer writer) {
+        if (writer instanceof PrintWriter) {
             this.writer = (PrintWriter) writer;
-        }
-        else
-        {
-            this.writer = new PrintWriter( writer, true );
+        } else {
+            this.writer = new PrintWriter(writer, true);
         }
     }
 }
diff --git a/src/main/java/org/apache/maven/plugins/dependency/tree/BuildingDependencyNodeVisitor.java b/src/main/java/org/apache/maven/plugins/dependency/tree/BuildingDependencyNodeVisitor.java
index ab93c1c0..7834c50d 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/tree/BuildingDependencyNodeVisitor.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/tree/BuildingDependencyNodeVisitor.java
@@ -1,5 +1,3 @@
-package org.apache.maven.plugins.dependency.tree;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,7 +7,7 @@ package org.apache.maven.plugins.dependency.tree;
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
@@ -18,11 +16,11 @@ package org.apache.maven.plugins.dependency.tree;
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.maven.plugins.dependency.tree;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Stack;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Exclusion;
 import org.apache.maven.shared.dependency.graph.DependencyNode;
@@ -34,9 +32,7 @@ import org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor;
  *
  * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
  */
-public class BuildingDependencyNodeVisitor
-        implements DependencyNodeVisitor
-{
+public class BuildingDependencyNodeVisitor implements DependencyNodeVisitor {
     // fields -----------------------------------------------------------------
 
     /**
@@ -59,9 +55,8 @@ public class BuildingDependencyNodeVisitor
     /**
      * Creates a dependency node visitor that clones visited nodes into a new dependency tree.
      */
-    public BuildingDependencyNodeVisitor()
-    {
-        this( null );
+    public BuildingDependencyNodeVisitor() {
+        this(null);
     }
 
     /**
@@ -71,8 +66,7 @@ public class BuildingDependencyNodeVisitor
      * @param visitor the dependency node visitor to apply on the resultant dependency tree, or <code>null</code> for
      *            none
      */
-    public BuildingDependencyNodeVisitor( DependencyNodeVisitor visitor )
-    {
+    public BuildingDependencyNodeVisitor(DependencyNodeVisitor visitor) {
         this.visitor = visitor;
 
         parentNodes = new Stack<DependencyNode>();
@@ -84,8 +78,7 @@ public class BuildingDependencyNodeVisitor
      * {@inheritDoc}
      */
     @Override
-    public boolean visit( DependencyNode node )
-    {
+    public boolean visit(DependencyNode node) {
         // clone the node
         WrapperNode newNode = new WrapperNode(
                 parentNodes.isEmpty() ? null : parentNodes.peek(),
@@ -95,21 +88,17 @@ public class BuildingDependencyNodeVisitor
                 node.getVersionConstraint(),
                 node.getOptional(),
                 node.getExclusions(),
-                node.toNodeString()
-        );
-        newNode.setChildren( new ArrayList<DependencyNode>() );
+                node.toNodeString());
+        newNode.setChildren(new ArrayList<DependencyNode>());
 
-        if ( parentNodes.empty() )
-        {
+        if (parentNodes.empty()) {
             rootNode = newNode;
-        }
-        else
-        {
+        } else {
             DependencyNode parentNode = parentNodes.peek();
-            parentNode.getChildren().add( newNode );
+            parentNode.getChildren().add(newNode);
         }
 
-        parentNodes.push( newNode );
+        parentNodes.push(newNode);
 
         return true;
     }
@@ -118,14 +107,12 @@ public class BuildingDependencyNodeVisitor
      * {@inheritDoc}
      */
     @Override
-    public boolean endVisit( DependencyNode node )
-    {
+    public boolean endVisit(DependencyNode node) {
         parentNodes.pop();
 
         // apply the visitor to the resultant tree on the last visit
-        if ( parentNodes.empty() && visitor != null )
-        {
-            rootNode.accept( visitor );
+        if (parentNodes.empty() && visitor != null) {
+            rootNode.accept(visitor);
         }
 
         return true;
@@ -138,8 +125,7 @@ public class BuildingDependencyNodeVisitor
      *
      * @return the dependency node visitor, or <code>null</code> for none
      */
-    public DependencyNodeVisitor getDependencyNodeVisitor()
-    {
+    public DependencyNodeVisitor getDependencyNodeVisitor() {
         return visitor;
     }
 
@@ -148,13 +134,11 @@ public class BuildingDependencyNodeVisitor
      *
      * @return the root node, or <code>null</code> if the source tree has not yet been visited
      */
-    public DependencyNode getDependencyTree()
-    {
+    public DependencyNode getDependencyTree() {
         return rootNode;
     }
 
-    private static class WrapperNode implements DependencyNode
-    {
+    private static class WrapperNode implements DependencyNode {
 
         private final Artifact artifact;
 
@@ -174,15 +158,15 @@ public class BuildingDependencyNodeVisitor
 
         private final String nodeString;
 
-        private WrapperNode( DependencyNode parent,
-                             Artifact artifact,
-                             String premanagedVersion,
-                             String premanagedScope,
-                             String versionConstraint,
-                             Boolean optional,
-                             List<Exclusion> exclusions,
-                             String nodeString )
-        {
+        private WrapperNode(
+                DependencyNode parent,
+                Artifact artifact,
+                String premanagedVersion,
+                String premanagedScope,
+                String versionConstraint,
+                Boolean optional,
+                List<Exclusion> exclusions,
+                String nodeString) {
             this.artifact = artifact;
             this.parent = parent;
             this.premanagedVersion = premanagedVersion;
@@ -194,78 +178,64 @@ public class BuildingDependencyNodeVisitor
         }
 
         @Override
-        public Artifact getArtifact()
-        {
+        public Artifact getArtifact() {
             return artifact;
         }
 
         @Override
-        public List<DependencyNode> getChildren()
-        {
... 17140 lines suppressed ...