You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2023/03/11 13:47:51 UTC

[maven-shared-io] branch plex created (now 7d54e88)

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

elharo pushed a change to branch plex
in repository https://gitbox.apache.org/repos/asf/maven-shared-io.git


      at 7d54e88  MSHARED-1202 update to parent POM 39

This branch includes the following new commits:

     new 7d54e88  MSHARED-1202 update to parent POM 39

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-shared-io] 01/01: MSHARED-1202 update to parent POM 39

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch plex
in repository https://gitbox.apache.org/repos/asf/maven-shared-io.git

commit 7d54e88f0af5eb9b30e8d592c15286f13ef28c2f
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sat Mar 11 08:45:47 2023 -0500

    MSHARED-1202 update to parent POM 39
---
 pom.xml                                            |   4 +-
 .../shared/io/download/DefaultDownloadManager.java | 168 +++---
 .../io/download/DownloadFailedException.java       |  36 +-
 .../maven/shared/io/download/DownloadManager.java  |  31 +-
 .../maven/shared/io/location/ArtifactLocation.java |  30 +-
 .../io/location/ArtifactLocatorStrategy.java       | 134 ++---
 .../location/ClasspathResourceLocatorStrategy.java |  52 +-
 .../maven/shared/io/location/FileLocation.java     | 107 ++--
 .../shared/io/location/FileLocatorStrategy.java    |  39 +-
 .../apache/maven/shared/io/location/Location.java  |  26 +-
 .../apache/maven/shared/io/location/Locator.java   |  59 +-
 .../maven/shared/io/location/LocatorStrategy.java  |  24 +-
 .../maven/shared/io/location/URLLocation.java      |  46 +-
 .../shared/io/location/URLLocatorStrategy.java     |  48 +-
 .../shared/io/logging/DefaultMessageHolder.java    | 411 ++++++--------
 .../maven/shared/io/logging/MessageHolder.java     |  74 ++-
 .../maven/shared/io/logging/MessageLevels.java     |  70 +--
 .../maven/shared/io/logging/MessageSink.java       |  33 +-
 .../maven/shared/io/logging/MojoLogSink.java       |  52 +-
 .../maven/shared/io/logging/PlexusLoggerSink.java  |  53 +-
 .../io/scan/AbstractResourceInclusionScanner.java  |  61 ++-
 .../shared/io/scan/InclusionScanException.java     |  32 +-
 .../shared/io/scan/ResourceInclusionScanner.java   |  30 +-
 .../io/scan/SimpleResourceInclusionScanner.java    |  39 +-
 .../maven/shared/io/scan/StaleResourceScanner.java |  65 ++-
 .../io/scan/mapping/SingleTargetMapping.java       |  42 +-
 .../shared/io/scan/mapping/SourceMapping.java      |  24 +-
 .../shared/io/scan/mapping/SuffixMapping.java      |  43 +-
 .../io/download/DefaultDownloadManagerTest.java    | 581 +++++++++-----------
 .../io/download/DownloadFailedExceptionTest.java   |  38 +-
 .../shared/io/location/ArtifactLocationTest.java   |  74 ++-
 .../io/location/ArtifactLocatorStrategyTest.java   | 597 ++++++++++-----------
 .../ClasspathResourceLocatorStrategyTest.java      |  52 +-
 .../maven/shared/io/location/FileLocationTest.java | 139 ++---
 .../io/location/FileLocatorStrategyTest.java       |  52 +-
 .../maven/shared/io/location/LocatorTest.java      | 112 ++--
 .../maven/shared/io/location/URLLocationTest.java  |  59 +-
 .../shared/io/location/URLLocatorStrategyTest.java |  56 +-
 .../io/logging/DefaultMessageHolderTest.java       | 213 ++++----
 .../scan/SimpleResourceInclusionScannerTest.java   |  48 +-
 .../shared/io/scan/mapping/SuffixMappingTest.java  | 108 ++--
 41 files changed, 2056 insertions(+), 1906 deletions(-)

diff --git a/pom.xml b/pom.xml
index 31f2a44..3b456d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.shared</groupId>
     <artifactId>maven-shared-components</artifactId>
-    <version>34</version>
+    <version>39</version>
     <relativePath />
   </parent>
 
@@ -110,7 +110,7 @@
       <artifactId>commons-io</artifactId>
       <version>2.11.0</version>
     </dependency>
-    
+
     <dependency>
       <groupId>org.easymock</groupId>
       <artifactId>easymock</artifactId>
diff --git a/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java b/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java
index 1353864..1e8776e 100644
--- a/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java
+++ b/src/main/java/org/apache/maven/shared/io/download/DefaultDownloadManager.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.download;
 
 /*
@@ -46,9 +64,7 @@ import org.apache.maven.wagon.repository.Repository;
  * The Implementation of the {@link DownloadManager}
  *
  */
-public class DefaultDownloadManager
-    implements DownloadManager
-{
+public class DefaultDownloadManager implements DownloadManager {
 
     /**
      * Role hint.
@@ -62,152 +78,116 @@ public class DefaultDownloadManager
     /**
      * Create an instance of the {@code DefaultDownloadManager}.
      */
-    public DefaultDownloadManager()
-    {
-    }
+    public DefaultDownloadManager() {}
 
     /**
      * @param wagonManager {@link org.apache.maven.repository.legacy.WagonManager}
      */
-    public DefaultDownloadManager( WagonManager wagonManager )
-    {
+    public DefaultDownloadManager(WagonManager wagonManager) {
         this.wagonManager = wagonManager;
     }
 
     /** {@inheritDoc} */
-    public File download( String url, MessageHolder messageHolder )
-        throws DownloadFailedException
-    {
-        return download( url, Collections.<TransferListener>emptyList(), messageHolder );
+    public File download(String url, MessageHolder messageHolder) throws DownloadFailedException {
+        return download(url, Collections.<TransferListener>emptyList(), messageHolder);
     }
 
     /** {@inheritDoc} */
-    public File download( String url, List<TransferListener> transferListeners, MessageHolder messageHolder )
-        throws DownloadFailedException
-    {
-        File downloaded = (File) cache.get( url );
+    public File download(String url, List<TransferListener> transferListeners, MessageHolder messageHolder)
+            throws DownloadFailedException {
+        File downloaded = (File) cache.get(url);
 
-        if ( downloaded != null && downloaded.exists() )
-        {
-            messageHolder.addMessage( "Using cached download: " + downloaded.getAbsolutePath() );
+        if (downloaded != null && downloaded.exists()) {
+            messageHolder.addMessage("Using cached download: " + downloaded.getAbsolutePath());
 
             return downloaded;
         }
 
         URL sourceUrl;
-        try
-        {
-            sourceUrl = new URL( url );
-        }
-        catch ( MalformedURLException e )
-        {
-            throw new DownloadFailedException( url, "Download failed due to invalid URL.",
-                                               e );
+        try {
+            sourceUrl = new URL(url);
+        } catch (MalformedURLException e) {
+            throw new DownloadFailedException(url, "Download failed due to invalid URL.", e);
         }
 
         Wagon wagon = null;
 
         // Retrieve the correct Wagon instance used to download the remote archive
-        try
-        {
-            wagon = wagonManager.getWagon( sourceUrl.getProtocol() );
-        }
-        catch ( UnsupportedProtocolException e )
-        {
-            throw new DownloadFailedException( url, "Download failed", e );
+        try {
+            wagon = wagonManager.getWagon(sourceUrl.getProtocol());
+        } catch (UnsupportedProtocolException e) {
+            throw new DownloadFailedException(url, "Download failed", e);
         }
 
-        messageHolder.addMessage( "Using wagon: " + wagon + " to download: " + url );
+        messageHolder.addMessage("Using wagon: " + wagon + " to download: " + url);
 
-        try
-        {
+        try {
             // create the landing file in /tmp for the downloaded source archive
-            downloaded = Files.createTempFile( "download-", null ).toFile();
+            downloaded = Files.createTempFile("download-", null).toFile();
 
             // delete when the JVM exits, to avoid polluting the temp dir...
             downloaded.deleteOnExit();
-        }
-        catch ( IOException e )
-        {
-            throw new DownloadFailedException( url, "Failed to create temporary file target for download.", e );
+        } catch (IOException e) {
+            throw new DownloadFailedException(url, "Failed to create temporary file target for download.", e);
         }
 
-        messageHolder.addMessage( "Download target is: " + downloaded.getAbsolutePath() );
+        messageHolder.addMessage("Download target is: " + downloaded.getAbsolutePath());
 
         // split the download URL into base URL and remote path for connecting, then retrieving.
         String remotePath = sourceUrl.getPath();
-        String baseUrl = url.substring( 0, url.length() - remotePath.length() );
+        String baseUrl = url.substring(0, url.length() - remotePath.length());
 
-        for ( Iterator<TransferListener> it = transferListeners.iterator(); it.hasNext(); )
-        {
-            wagon.addTransferListener( it.next() );
+        for (Iterator<TransferListener> it = transferListeners.iterator(); it.hasNext(); ) {
+            wagon.addTransferListener(it.next());
         }
 
         // connect to the remote site, and retrieve the archive. Note the separate methods in which
         // base URL and remote path are used.
-        Repository repo = new Repository( sourceUrl.getHost(), baseUrl );
+        Repository repo = new Repository(sourceUrl.getHost(), baseUrl);
 
-        messageHolder.addMessage( "Connecting to: " + repo.getHost() + "(baseUrl: " + repo.getUrl() + ")" );
+        messageHolder.addMessage("Connecting to: " + repo.getHost() + "(baseUrl: " + repo.getUrl() + ")");
 
-        try
-        {
-            wagon.connect( repo, wagonManager.getAuthenticationInfo( repo.getId() ),
-                           wagonManager.getProxy( sourceUrl.getProtocol() ) );
-        }
-        catch ( ConnectionException e )
-        {
-            throw new DownloadFailedException( url, "Download failed", e );
-        }
-        catch ( AuthenticationException e )
-        {
-            throw new DownloadFailedException( url, "Download failed", e );
+        try {
+            wagon.connect(
+                    repo,
+                    wagonManager.getAuthenticationInfo(repo.getId()),
+                    wagonManager.getProxy(sourceUrl.getProtocol()));
+        } catch (ConnectionException e) {
+            throw new DownloadFailedException(url, "Download failed", e);
+        } catch (AuthenticationException e) {
+            throw new DownloadFailedException(url, "Download failed", e);
         }
 
-        messageHolder.addMessage( "Getting: " + remotePath );
+        messageHolder.addMessage("Getting: " + remotePath);
 
-        try
-        {
-            wagon.get( remotePath, downloaded );
+        try {
+            wagon.get(remotePath, downloaded);
 
             // cache this for later download requests to the same instance...
-            cache.put( url, downloaded );
+            cache.put(url, downloaded);
 
             return downloaded;
-        }
-        catch ( TransferFailedException e )
-        {
-            throw new DownloadFailedException( url, "Download failed", e );
-        }
-        catch ( ResourceDoesNotExistException e )
-        {
-            throw new DownloadFailedException( url, "Download failed", e );
-        }
-        catch ( AuthorizationException e )
-        {
-            throw new DownloadFailedException( url, "Download failed", e );
-        }
-        finally
-        {
+        } catch (TransferFailedException e) {
+            throw new DownloadFailedException(url, "Download failed", e);
+        } catch (ResourceDoesNotExistException e) {
+            throw new DownloadFailedException(url, "Download failed", e);
+        } catch (AuthorizationException e) {
+            throw new DownloadFailedException(url, "Download failed", e);
+        } finally {
             // ensure the Wagon instance is closed out properly.
-            if ( wagon != null )
-            {
-                try
-                {
-                    messageHolder.addMessage( "Disconnecting." );
+            if (wagon != null) {
+                try {
+                    messageHolder.addMessage("Disconnecting.");
 
                     wagon.disconnect();
-                }
-                catch ( ConnectionException e )
-                {
-                    messageHolder.addMessage( "Failed to disconnect wagon for: " + url, e );
+                } catch (ConnectionException e) {
+                    messageHolder.addMessage("Failed to disconnect wagon for: " + url, e);
                 }
 
-                for ( Iterator<TransferListener> it = transferListeners.iterator(); it.hasNext(); )
-                {
-                    wagon.removeTransferListener( it.next() );
+                for (Iterator<TransferListener> it = transferListeners.iterator(); it.hasNext(); ) {
+                    wagon.removeTransferListener(it.next());
                 }
             }
         }
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/download/DownloadFailedException.java b/src/main/java/org/apache/maven/shared/io/download/DownloadFailedException.java
index 669ce8b..f6d2056 100644
--- a/src/main/java/org/apache/maven/shared/io/download/DownloadFailedException.java
+++ b/src/main/java/org/apache/maven/shared/io/download/DownloadFailedException.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.download;
 
 /*
@@ -23,9 +41,7 @@ package org.apache.maven.shared.io.download;
  * The Download Failed Exception.
  *
  */
-public class DownloadFailedException
-    extends Exception
-{
+public class DownloadFailedException extends Exception {
 
     private static final long serialVersionUID = 1L;
 
@@ -36,9 +52,8 @@ public class DownloadFailedException
      * @param message The message.
      * @param cause The cause of the problem.
      */
-    public DownloadFailedException( String url, String message, Throwable cause )
-    {
-        super( message, cause );
+    public DownloadFailedException(String url, String message, Throwable cause) {
+        super(message, cause);
         this.url = url;
     }
 
@@ -46,18 +61,15 @@ public class DownloadFailedException
      * @param url The url.
      * @param message The message.
      */
-    public DownloadFailedException( String url, String message )
-    {
-        super( message );
+    public DownloadFailedException(String url, String message) {
+        super(message);
         this.url = url;
     }
 
     /**
      * @return The url.
      */
-    public String getUrl()
-    {
+    public String getUrl() {
         return url;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/download/DownloadManager.java b/src/main/java/org/apache/maven/shared/io/download/DownloadManager.java
index 6d2e91a..beee0b3 100644
--- a/src/main/java/org/apache/maven/shared/io/download/DownloadManager.java
+++ b/src/main/java/org/apache/maven/shared/io/download/DownloadManager.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.download;
 
 /*
@@ -29,8 +47,7 @@ import org.apache.maven.wagon.events.TransferListener;
  * The Download Manager interface.
  *
  */
-public interface DownloadManager
-{
+public interface DownloadManager {
     /**
      * The Role.
      */
@@ -42,8 +59,7 @@ public interface DownloadManager
      * @return {@link File}
      * @throws DownloadFailedException in case of exception.
      */
-    File download( String url, MessageHolder messageHolder )
-        throws DownloadFailedException;
+    File download(String url, MessageHolder messageHolder) throws DownloadFailedException;
 
     /**
      * @param url The URL.
@@ -52,7 +68,6 @@ public interface DownloadManager
      * @return {@link File}
      * @throws DownloadFailedException in case of exception.
      */
-    File download( String url, List<TransferListener> transferListeners, MessageHolder messageHolder )
-        throws DownloadFailedException;
-
-}
\ No newline at end of file
+    File download(String url, List<TransferListener> transferListeners, MessageHolder messageHolder)
+            throws DownloadFailedException;
+}
diff --git a/src/main/java/org/apache/maven/shared/io/location/ArtifactLocation.java b/src/main/java/org/apache/maven/shared/io/location/ArtifactLocation.java
index dea6e68..5324b9e 100644
--- a/src/main/java/org/apache/maven/shared/io/location/ArtifactLocation.java
+++ b/src/main/java/org/apache/maven/shared/io/location/ArtifactLocation.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -25,18 +43,14 @@ import org.apache.maven.artifact.Artifact;
  * The artifact location.
  *
  */
-public class ArtifactLocation
-    extends FileLocation
-{
+public class ArtifactLocation extends FileLocation {
 
     /**
      * @param artifact {@link Artifact}
      * @param specification The specification.
      */
-    public ArtifactLocation( Artifact artifact, String specification )
-    {
-        super( specification );
-        setFile( artifact.getFile() );
+    public ArtifactLocation(Artifact artifact, String specification) {
+        super(specification);
+        setFile(artifact.getFile());
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java b/src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java
index 634b371..7e82b96 100644
--- a/src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java
+++ b/src/main/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategy.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -33,9 +51,7 @@ import org.apache.maven.shared.io.logging.MessageHolder;
  * The locator strategy.
  *
  */
-public class ArtifactLocatorStrategy
-    implements LocatorStrategy
-{
+public class ArtifactLocatorStrategy implements LocatorStrategy {
     private final ArtifactFactory factory;
 
     private final ArtifactResolver resolver;
@@ -54,9 +70,11 @@ public class ArtifactLocatorStrategy
      * @param localRepository {@link ArtifactRepository}
      * @param remoteRepositories {@link ArtifactRepository}
      */
-    public ArtifactLocatorStrategy( ArtifactFactory factory, ArtifactResolver resolver,
-                                    ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories )
-    {
+    public ArtifactLocatorStrategy(
+            ArtifactFactory factory,
+            ArtifactResolver resolver,
+            ArtifactRepository localRepository,
+            List<ArtifactRepository> remoteRepositories) {
         this.factory = factory;
         this.resolver = resolver;
         this.localRepository = localRepository;
@@ -70,10 +88,12 @@ public class ArtifactLocatorStrategy
      * @param remoteRepositories {@link ArtifactRepository}
      * @param defaultArtifactType default artifact type.
      */
-    public ArtifactLocatorStrategy( ArtifactFactory factory, ArtifactResolver resolver,
-                                    ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
-                                    String defaultArtifactType )
-    {
+    public ArtifactLocatorStrategy(
+            ArtifactFactory factory,
+            ArtifactResolver resolver,
+            ArtifactRepository localRepository,
+            List<ArtifactRepository> remoteRepositories,
+            String defaultArtifactType) {
         this.factory = factory;
         this.resolver = resolver;
         this.localRepository = localRepository;
@@ -89,10 +109,13 @@ public class ArtifactLocatorStrategy
      * @param defaultArtifactType default artifact type.
      * @param defaultClassifier default classifier.
      */
-    public ArtifactLocatorStrategy( ArtifactFactory factory, ArtifactResolver resolver,
-                                    ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
-                                    String defaultArtifactType, String defaultClassifier )
-    {
+    public ArtifactLocatorStrategy(
+            ArtifactFactory factory,
+            ArtifactResolver resolver,
+            ArtifactRepository localRepository,
+            List<ArtifactRepository> remoteRepositories,
+            String defaultArtifactType,
+            String defaultClassifier) {
         this.factory = factory;
         this.resolver = resolver;
         this.localRepository = localRepository;
@@ -109,85 +132,66 @@ public class ArtifactLocatorStrategy
      * @param messageHolder {@link MessageHolder}
      * @return location.
      */
-    public Location resolve( String locationSpecification, MessageHolder messageHolder )
-    {
-        String[] parts = locationSpecification.split( ":" );
+    public Location resolve(String locationSpecification, MessageHolder messageHolder) {
+        String[] parts = locationSpecification.split(":");
 
         Location location = null;
 
-        if ( parts.length > 2 )
-        {
+        if (parts.length > 2) {
             String groupId = parts[0];
             String artifactId = parts[1];
             String version = parts[2];
 
             String type = defaultArtifactType;
-            if ( parts.length > 3 )
-            {
-                if ( parts[3].trim().length() > 0 )
-                {
+            if (parts.length > 3) {
+                if (parts[3].trim().length() > 0) {
                     type = parts[3];
                 }
             }
 
             String classifier = defaultClassifier;
-            if ( parts.length > 4 )
-            {
+            if (parts.length > 4) {
                 classifier = parts[4];
             }
 
-            if ( parts.length > 5 )
-            {
-                messageHolder.newMessage().append( "Location specification has unused tokens: \'" );
+            if (parts.length > 5) {
+                messageHolder.newMessage().append("Location specification has unused tokens: \'");
 
-                for ( int i = 5; i < parts.length; i++ )
-                {
-                    messageHolder.append( ":" + parts[i] );
+                for (int i = 5; i < parts.length; i++) {
+                    messageHolder.append(":" + parts[i]);
                 }
             }
 
             Artifact artifact;
-            if ( classifier == null )
-            {
-                artifact = factory.createArtifact( groupId, artifactId, version, null, type );
-            }
-            else
-            {
-                artifact = factory.createArtifactWithClassifier( groupId, artifactId, version, type, classifier );
+            if (classifier == null) {
+                artifact = factory.createArtifact(groupId, artifactId, version, null, type);
+            } else {
+                artifact = factory.createArtifactWithClassifier(groupId, artifactId, version, type, classifier);
             }
 
-            try
-            {
-                resolver.resolve( artifact, remoteRepositories, localRepository );
+            try {
+                resolver.resolve(artifact, remoteRepositories, localRepository);
 
-                if ( artifact.getFile() != null )
-                {
-                    location = new ArtifactLocation( artifact, locationSpecification );
-                }
-                else
-                {
-                    messageHolder.addMessage( "Supposedly resolved artifact: " + artifact.getId()
-                        + " does not have an associated file." );
+                if (artifact.getFile() != null) {
+                    location = new ArtifactLocation(artifact, locationSpecification);
+                } else {
+                    messageHolder.addMessage(
+                            "Supposedly resolved artifact: " + artifact.getId() + " does not have an associated file.");
                 }
+            } catch (ArtifactResolutionException e) {
+                messageHolder.addMessage(
+                        "Failed to resolve artifact: " + artifact.getId() + " for location: " + locationSpecification,
+                        e);
+            } catch (ArtifactNotFoundException e) {
+                messageHolder.addMessage(
+                        "Failed to resolve artifact: " + artifact.getId() + " for location: " + locationSpecification,
+                        e);
             }
-            catch ( ArtifactResolutionException e )
-            {
-                messageHolder.addMessage( "Failed to resolve artifact: " + artifact.getId() + " for location: "
-                    + locationSpecification, e );
-            }
-            catch ( ArtifactNotFoundException e )
-            {
-                messageHolder.addMessage( "Failed to resolve artifact: " + artifact.getId() + " for location: "
-                    + locationSpecification, e );
-            }
-        }
-        else
-        {
-            messageHolder.addMessage( "Invalid artifact specification: \'" + locationSpecification
-                + "\'. Must contain at least three fields, separated by ':'." );
+        } else {
+            messageHolder.addMessage("Invalid artifact specification: \'" + locationSpecification
+                    + "\'. Must contain at least three fields, separated by ':'.");
         }
 
         return location;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategy.java b/src/main/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategy.java
index 4d850cf..319e30e 100644
--- a/src/main/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategy.java
+++ b/src/main/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategy.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -27,9 +45,7 @@ import org.apache.maven.shared.io.logging.MessageHolder;
  * classpath resource locator strategy.
  *
  */
-public class ClasspathResourceLocatorStrategy
-    implements LocatorStrategy
-{
+public class ClasspathResourceLocatorStrategy implements LocatorStrategy {
 
     private String tempFilePrefix = "location.";
 
@@ -40,44 +56,36 @@ public class ClasspathResourceLocatorStrategy
     /**
      * Create instance.
      */
-    public ClasspathResourceLocatorStrategy()
-    {
-    }
+    public ClasspathResourceLocatorStrategy() {}
 
     /**
      * @param tempFilePrefix Prefix.
      * @param tempFileSuffix Suffix.
      * @param tempFileDeleteOnExit delete on exit.
      */
-    public ClasspathResourceLocatorStrategy( String tempFilePrefix, String tempFileSuffix,
-                                             boolean tempFileDeleteOnExit )
-    {
+    public ClasspathResourceLocatorStrategy(
+            String tempFilePrefix, String tempFileSuffix, boolean tempFileDeleteOnExit) {
         this.tempFilePrefix = tempFilePrefix;
         this.tempFileSuffix = tempFileSuffix;
         this.tempFileDeleteOnExit = tempFileDeleteOnExit;
     }
 
     /** {@inheritDoc} */
-    public Location resolve( String locationSpecification, MessageHolder messageHolder )
-    {
+    public Location resolve(String locationSpecification, MessageHolder messageHolder) {
         ClassLoader cloader = Thread.currentThread().getContextClassLoader();
 
-        URL resource = cloader.getResource( locationSpecification );
+        URL resource = cloader.getResource(locationSpecification);
 
         Location location = null;
 
-        if ( resource != null )
-        {
-            location = new URLLocation( resource, locationSpecification, tempFilePrefix, tempFileSuffix,
-                                        tempFileDeleteOnExit );
-        }
-        else
-        {
-            messageHolder.addMessage( "Failed to resolve classpath resource: " + locationSpecification
-                + " from classloader: " + cloader );
+        if (resource != null) {
+            location = new URLLocation(
+                    resource, locationSpecification, tempFilePrefix, tempFileSuffix, tempFileDeleteOnExit);
+        } else {
+            messageHolder.addMessage(
+                    "Failed to resolve classpath resource: " + locationSpecification + " from classloader: " + cloader);
         }
 
         return location;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/FileLocation.java b/src/main/java/org/apache/maven/shared/io/location/FileLocation.java
index a8a62e3..4e6f393 100644
--- a/src/main/java/org/apache/maven/shared/io/location/FileLocation.java
+++ b/src/main/java/org/apache/maven/shared/io/location/FileLocation.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -26,14 +44,11 @@ import java.io.InputStream;
 import java.nio.ByteBuffer;
 import java.nio.channels.FileChannel;
 
-
 /**
  * file location implementation.
  *
  */
-public class FileLocation
-    implements Location
-{
+public class FileLocation implements Location {
 
     private File file;
     private FileChannel channel;
@@ -44,8 +59,7 @@ public class FileLocation
      * @param file {@link File}
      * @param specification spec.
      */
-    public FileLocation( File file, String specification )
-    {
+    public FileLocation(File file, String specification) {
         this.file = file;
         this.specification = specification;
     }
@@ -53,43 +67,31 @@ public class FileLocation
     /**
      * @param specification spec.
      */
-    protected FileLocation( String specification )
-    {
+    protected FileLocation(String specification) {
         this.specification = specification;
     }
 
     /** {@inheritDoc} */
-    public void close()
-    {
-        if ( ( channel != null ) && channel.isOpen() )
-        {
-            try
-            {
+    public void close() {
+        if ((channel != null) && channel.isOpen()) {
+            try {
                 channel.close();
-            }
-            catch ( IOException e )
-            {
-                //swallow it.
+            } catch (IOException e) {
+                // swallow it.
             }
         }
 
-        if ( stream != null )
-        {
-            try
-            {
+        if (stream != null) {
+            try {
                 stream.close();
-            }
-            catch ( IOException e )
-            {
+            } catch (IOException e) {
                 // swallow it.
             }
         }
     }
 
     /** {@inheritDoc} */
-    public File getFile()
-        throws IOException
-    {
+    public File getFile() throws IOException {
         initFile();
 
         return unsafeGetFile();
@@ -98,8 +100,7 @@ public class FileLocation
     /**
      * @return {@link File}
      */
-    protected File unsafeGetFile()
-    {
+    protected File unsafeGetFile() {
         return file;
     }
 
@@ -107,70 +108,54 @@ public class FileLocation
      * initialize file.
      * @throws IOException in case error.
      */
-    protected void initFile()
-        throws IOException
-    {
+    protected void initFile() throws IOException {
         // TODO: Log this in the debug log-level...
-        if ( file == null )
-        {
-            file = new File( specification );
+        if (file == null) {
+            file = new File(specification);
         }
     }
 
     /**
      * @param file {@link File}
      */
-    protected void setFile( File file )
-    {
-        if ( channel != null )
-        {
-            throw new IllegalStateException( "Location is already open; cannot setFile(..)." );
+    protected void setFile(File file) {
+        if (channel != null) {
+            throw new IllegalStateException("Location is already open; cannot setFile(..).");
         }
 
         this.file = file;
     }
 
     /** {@inheritDoc} */
-    public String getSpecification()
-    {
+    public String getSpecification() {
         return specification;
     }
 
     /** {@inheritDoc} */
-    public void open()
-        throws IOException
-    {
-        if ( stream == null )
-        {
+    public void open() throws IOException {
+        if (stream == null) {
             initFile();
 
-            stream = new FileInputStream( file );
+            stream = new FileInputStream(file);
             channel = stream.getChannel();
         }
     }
 
     /** {@inheritDoc} */
-    public int read( ByteBuffer buffer )
-        throws IOException
-    {
+    public int read(ByteBuffer buffer) throws IOException {
         open();
-        return channel.read( buffer );
+        return channel.read(buffer);
     }
 
     /** {@inheritDoc} */
-    public int read( byte[] buffer )
-        throws IOException
-    {
+    public int read(byte[] buffer) throws IOException {
         open();
-        return channel.read( ByteBuffer.wrap( buffer ) );
+        return channel.read(ByteBuffer.wrap(buffer));
     }
 
     /** {@inheritDoc} */
-    public InputStream getInputStream()
-        throws IOException
-    {
+    public InputStream getInputStream() throws IOException {
         open();
         return stream;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/FileLocatorStrategy.java b/src/main/java/org/apache/maven/shared/io/location/FileLocatorStrategy.java
index 92aa3dd..fd9fd38 100644
--- a/src/main/java/org/apache/maven/shared/io/location/FileLocatorStrategy.java
+++ b/src/main/java/org/apache/maven/shared/io/location/FileLocatorStrategy.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -27,27 +45,20 @@ import org.apache.maven.shared.io.logging.MessageHolder;
  * file locator strategy.
  *
  */
-public class FileLocatorStrategy
-    implements LocatorStrategy
-{
+public class FileLocatorStrategy implements LocatorStrategy {
 
     /** {@inheritDoc} */
-    public Location resolve( String locationSpecification, MessageHolder messageHolder )
-    {
-        File file = new File( locationSpecification );
+    public Location resolve(String locationSpecification, MessageHolder messageHolder) {
+        File file = new File(locationSpecification);
 
         Location location = null;
 
-        if ( file.exists() )
-        {
-            location = new FileLocation( file, locationSpecification );
-        }
-        else
-        {
-            messageHolder.addMessage( "File: " + file.getAbsolutePath() + " does not exist." );
+        if (file.exists()) {
+            location = new FileLocation(file, locationSpecification);
+        } else {
+            messageHolder.addMessage("File: " + file.getAbsolutePath() + " does not exist.");
         }
 
         return location;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/Location.java b/src/main/java/org/apache/maven/shared/io/location/Location.java
index cfbd4ae..efa872f 100644
--- a/src/main/java/org/apache/maven/shared/io/location/Location.java
+++ b/src/main/java/org/apache/maven/shared/io/location/Location.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -28,8 +46,7 @@ import java.nio.ByteBuffer;
  * The location interface.
  *
  */
-public interface Location
-{
+public interface Location {
 
     /**
      * @return {@link File}.
@@ -53,14 +70,14 @@ public interface Location
      * @return number of read bytes.
      * @throws IOException in case of an error.
      */
-    int read( ByteBuffer buffer ) throws IOException;
+    int read(ByteBuffer buffer) throws IOException;
 
     /**
      * @param buffer The buffer.
      * @return number of read bytes.
      * @throws IOException in case of an error.
      */
-    int read( byte[] buffer ) throws IOException;
+    int read(byte[] buffer) throws IOException;
 
     /**
      * @return the resulting input stream.
@@ -72,5 +89,4 @@ public interface Location
      * @return spec.
      */
     String getSpecification();
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/Locator.java b/src/main/java/org/apache/maven/shared/io/location/Locator.java
index 45f27af..40fd152 100644
--- a/src/main/java/org/apache/maven/shared/io/location/Locator.java
+++ b/src/main/java/org/apache/maven/shared/io/location/Locator.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -30,8 +48,7 @@ import org.apache.maven.shared.io.logging.MessageHolder;
  * The Locator.
  *
  */
-public final class Locator
-{
+public final class Locator {
 
     private List<LocatorStrategy> strategies;
     private final MessageHolder messageHolder;
@@ -40,17 +57,15 @@ public final class Locator
      * @param strategies List of strategies.
      * @param messageHolder {@link MessageHolder}
      */
-    public Locator( List<LocatorStrategy> strategies, MessageHolder messageHolder )
-    {
+    public Locator(List<LocatorStrategy> strategies, MessageHolder messageHolder) {
         this.messageHolder = messageHolder;
-        this.strategies = new ArrayList<LocatorStrategy>( strategies );
+        this.strategies = new ArrayList<LocatorStrategy>(strategies);
     }
 
     /**
      * Create instance.
      */
-    public Locator()
-    {
+    public Locator() {
         this.messageHolder = new DefaultMessageHolder();
         this.strategies = new ArrayList<LocatorStrategy>();
     }
@@ -58,41 +73,36 @@ public final class Locator
     /**
      * @return {@link MessageHolder}
      */
-    public MessageHolder getMessageHolder()
-    {
+    public MessageHolder getMessageHolder() {
         return messageHolder;
     }
 
     /**
      * @param strategy The strategy to be added.
      */
-    public void addStrategy( LocatorStrategy strategy )
-    {
-        this.strategies.add( strategy );
+    public void addStrategy(LocatorStrategy strategy) {
+        this.strategies.add(strategy);
     }
 
     /**
      * @param strategy the strategy to remove.
      */
-    public void removeStrategy( LocatorStrategy strategy )
-    {
-        this.strategies.remove( strategy );
+    public void removeStrategy(LocatorStrategy strategy) {
+        this.strategies.remove(strategy);
     }
 
     /**
      * @param strategies the strategies to be set.
      */
-    public void setStrategies( List<LocatorStrategy> strategies )
-    {
+    public void setStrategies(List<LocatorStrategy> strategies) {
         this.strategies.clear();
-        this.strategies.addAll( strategies );
+        this.strategies.addAll(strategies);
     }
 
     /**
      * @return list of strategies.
      */
-    public List<LocatorStrategy> getStrategies()
-    {
+    public List<LocatorStrategy> getStrategies() {
         return strategies;
     }
 
@@ -100,18 +110,15 @@ public final class Locator
      * @param locationSpecification location spec.
      * @return {@link Location}
      */
-    public Location resolve( String locationSpecification )
-    {
+    public Location resolve(String locationSpecification) {
         Location location = null;
 
-        for ( Iterator<LocatorStrategy> it = strategies.iterator(); location == null && it.hasNext(); )
-        {
+        for (Iterator<LocatorStrategy> it = strategies.iterator(); location == null && it.hasNext(); ) {
             LocatorStrategy strategy = (LocatorStrategy) it.next();
 
-            location = strategy.resolve( locationSpecification, messageHolder );
+            location = strategy.resolve(locationSpecification, messageHolder);
         }
 
         return location;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/LocatorStrategy.java b/src/main/java/org/apache/maven/shared/io/location/LocatorStrategy.java
index 03e9d23..e60736a 100644
--- a/src/main/java/org/apache/maven/shared/io/location/LocatorStrategy.java
+++ b/src/main/java/org/apache/maven/shared/io/location/LocatorStrategy.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -25,14 +43,12 @@ import org.apache.maven.shared.io.logging.MessageHolder;
  * Locator Strategy interface.
  *
  */
-public interface LocatorStrategy
-{
+public interface LocatorStrategy {
 
     /**
      * @param locationSpecification the specification.
      * @param messageHolder {@link MessageHolder}
      * @return {@link Location}
      */
-    Location resolve( String locationSpecification, MessageHolder messageHolder );
-
+    Location resolve(String locationSpecification, MessageHolder messageHolder);
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/URLLocation.java b/src/main/java/org/apache/maven/shared/io/location/URLLocation.java
index c412e52..376ae0a 100644
--- a/src/main/java/org/apache/maven/shared/io/location/URLLocation.java
+++ b/src/main/java/org/apache/maven/shared/io/location/URLLocation.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -29,9 +47,7 @@ import org.apache.commons.io.FileUtils;
 /**
  * The URL Location.
  */
-public class URLLocation
-    extends FileLocation
-{
+public class URLLocation extends FileLocation {
 
     private final URL url;
 
@@ -48,10 +64,9 @@ public class URLLocation
      * @param tempFileSuffix the suffix
      * @param tempFileDeleteOnExit delete on exit
      */
-    public URLLocation( URL url, String specification, String tempFilePrefix, String tempFileSuffix,
-                        boolean tempFileDeleteOnExit )
-    {
-        super( specification );
+    public URLLocation(
+            URL url, String specification, String tempFilePrefix, String tempFileSuffix, boolean tempFileDeleteOnExit) {
+        super(specification);
 
         this.url = url;
         this.tempFilePrefix = tempFilePrefix;
@@ -60,22 +75,17 @@ public class URLLocation
     }
 
     /** {@inheritDoc} */
-    protected void initFile()
-        throws IOException
-    {
-        if ( unsafeGetFile() == null )
-        {
-            File tempFile = Files.createTempFile( tempFilePrefix, tempFileSuffix ).toFile();
+    protected void initFile() throws IOException {
+        if (unsafeGetFile() == null) {
+            File tempFile = Files.createTempFile(tempFilePrefix, tempFileSuffix).toFile();
 
-            if ( tempFileDeleteOnExit )
-            {
+            if (tempFileDeleteOnExit) {
                 tempFile.deleteOnExit();
             }
 
-            FileUtils.copyURLToFile( url, tempFile );
+            FileUtils.copyURLToFile(url, tempFile);
 
-            setFile( tempFile );
+            setFile(tempFile);
         }
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/location/URLLocatorStrategy.java b/src/main/java/org/apache/maven/shared/io/location/URLLocatorStrategy.java
index e7d259d..854405c 100644
--- a/src/main/java/org/apache/maven/shared/io/location/URLLocatorStrategy.java
+++ b/src/main/java/org/apache/maven/shared/io/location/URLLocatorStrategy.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -28,9 +46,7 @@ import org.apache.maven.shared.io.logging.MessageHolder;
  * URL Locator Strategy.
  *
  */
-public class URLLocatorStrategy
-    implements LocatorStrategy
-{
+public class URLLocatorStrategy implements LocatorStrategy {
 
     private String tempFilePrefix = "location.";
 
@@ -41,40 +57,32 @@ public class URLLocatorStrategy
     /**
      * Create instance.
      */
-    public URLLocatorStrategy()
-    {
-    }
+    public URLLocatorStrategy() {}
 
     /**
      * @param tempFilePrefix prefix.
      * @param tempFileSuffix suffix.
      * @param tempFileDeleteOnExit delete on exit.
      */
-    public URLLocatorStrategy( String tempFilePrefix, String tempFileSuffix, boolean tempFileDeleteOnExit )
-    {
+    public URLLocatorStrategy(String tempFilePrefix, String tempFileSuffix, boolean tempFileDeleteOnExit) {
         this.tempFilePrefix = tempFilePrefix;
         this.tempFileSuffix = tempFileSuffix;
         this.tempFileDeleteOnExit = tempFileDeleteOnExit;
     }
 
     /** {@inheritDoc} */
-    public Location resolve( String locationSpecification, MessageHolder messageHolder )
-    {
+    public Location resolve(String locationSpecification, MessageHolder messageHolder) {
         Location location = null;
 
-        try
-        {
-            URL url = new URL( locationSpecification );
+        try {
+            URL url = new URL(locationSpecification);
 
-            location = new URLLocation( url, locationSpecification, tempFilePrefix, tempFileSuffix,
-                                        tempFileDeleteOnExit );
-        }
-        catch ( MalformedURLException e )
-        {
-            messageHolder.addMessage( "Building URL from location: " + locationSpecification, e );
+            location =
+                    new URLLocation(url, locationSpecification, tempFilePrefix, tempFileSuffix, tempFileDeleteOnExit);
+        } catch (MalformedURLException e) {
+            messageHolder.addMessage("Building URL from location: " + locationSpecification, e);
         }
 
         return location;
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/logging/DefaultMessageHolder.java b/src/main/java/org/apache/maven/shared/io/logging/DefaultMessageHolder.java
index 97eeb06..b878ebb 100644
--- a/src/main/java/org/apache/maven/shared/io/logging/DefaultMessageHolder.java
+++ b/src/main/java/org/apache/maven/shared/io/logging/DefaultMessageHolder.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.logging;
 
 /*
@@ -29,9 +47,7 @@ import java.util.List;
  * Default Message Holder.
  *
  */
-public class DefaultMessageHolder
-    implements MessageHolder
-{
+public class DefaultMessageHolder implements MessageHolder {
 
     private List<Message> messages = new ArrayList<Message>();
 
@@ -46,19 +62,17 @@ public class DefaultMessageHolder
     /**
      * Create instance.
      */
-    public DefaultMessageHolder()
-    {
-        this.messageLevelStates = MessageLevels.getLevelStates( MessageLevels.LEVEL_INFO );
+    public DefaultMessageHolder() {
+        this.messageLevelStates = MessageLevels.getLevelStates(MessageLevels.LEVEL_INFO);
     }
 
     /**
      * @param maxMessageLevel max message level.
      * @param defaultMessageLevel default message level.
      */
-    public DefaultMessageHolder( int maxMessageLevel, int defaultMessageLevel )
-    {
+    public DefaultMessageHolder(int maxMessageLevel, int defaultMessageLevel) {
         this.defaultMessageLevel = defaultMessageLevel;
-        this.messageLevelStates = MessageLevels.getLevelStates( maxMessageLevel );
+        this.messageLevelStates = MessageLevels.getLevelStates(maxMessageLevel);
     }
 
     /**
@@ -66,17 +80,15 @@ public class DefaultMessageHolder
      * @param defaultMessageLevel default message level.
      * @param onDemandSink {@link MessageSink}
      */
-    public DefaultMessageHolder( int maxMessageLevel, int defaultMessageLevel, MessageSink onDemandSink )
-    {
+    public DefaultMessageHolder(int maxMessageLevel, int defaultMessageLevel, MessageSink onDemandSink) {
         this.defaultMessageLevel = defaultMessageLevel;
         this.onDemandSink = onDemandSink;
-        this.messageLevelStates = MessageLevels.getLevelStates( maxMessageLevel );
+        this.messageLevelStates = MessageLevels.getLevelStates(maxMessageLevel);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addMessage( CharSequence messagePart, Throwable error )
-    {
-        return addMessage( defaultMessageLevel, messagePart, error );
+    public MessageHolder addMessage(CharSequence messagePart, Throwable error) {
+        return addMessage(defaultMessageLevel, messagePart, error);
     }
 
     /**
@@ -85,19 +97,17 @@ public class DefaultMessageHolder
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    protected MessageHolder addMessage( int level, CharSequence messagePart, Throwable error )
-    {
-        newMessage( level );
-        append( messagePart.toString() );
-        append( error );
+    protected MessageHolder addMessage(int level, CharSequence messagePart, Throwable error) {
+        newMessage(level);
+        append(messagePart.toString());
+        append(error);
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addMessage( CharSequence messagePart )
-    {
-        return addMessage( defaultMessageLevel, messagePart );
+    public MessageHolder addMessage(CharSequence messagePart) {
+        return addMessage(defaultMessageLevel, messagePart);
     }
 
     /**
@@ -105,18 +115,16 @@ public class DefaultMessageHolder
      * @param messagePart message part.
      * @return {@link MessageHolder}
      */
-    protected MessageHolder addMessage( int level, CharSequence messagePart )
-    {
-        newMessage( level );
-        append( messagePart.toString() );
+    protected MessageHolder addMessage(int level, CharSequence messagePart) {
+        newMessage(level);
+        append(messagePart.toString());
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addMessage( Throwable error )
-    {
-        return addMessage( defaultMessageLevel, error );
+    public MessageHolder addMessage(Throwable error) {
+        return addMessage(defaultMessageLevel, error);
     }
 
     /**
@@ -124,50 +132,43 @@ public class DefaultMessageHolder
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    protected MessageHolder addMessage( int level, Throwable error )
-    {
-        newMessage( level );
-        append( error );
+    protected MessageHolder addMessage(int level, Throwable error) {
+        newMessage(level);
+        append(error);
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder append( CharSequence messagePart )
-    {
-        if ( currentMessage == null )
-        {
+    public MessageHolder append(CharSequence messagePart) {
+        if (currentMessage == null) {
             newMessage();
         }
 
-        currentMessage.append( messagePart.toString() );
+        currentMessage.append(messagePart.toString());
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder append( Throwable error )
-    {
-        if ( currentMessage == null )
-        {
+    public MessageHolder append(Throwable error) {
+        if (currentMessage == null) {
             newMessage();
         }
 
-        currentMessage.setError( error );
+        currentMessage.setError(error);
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public boolean isEmpty()
-    {
+    public boolean isEmpty() {
         return messages.isEmpty();
     }
 
     /** {@inheritDoc} */
-    public MessageHolder newMessage()
-    {
-        newMessage( defaultMessageLevel );
+    public MessageHolder newMessage() {
+        newMessage(defaultMessageLevel);
 
         return this;
     }
@@ -175,50 +176,42 @@ public class DefaultMessageHolder
     /**
      * @param messageLevel message level.
      */
-    protected void newMessage( int messageLevel )
-    {
-        if ( onDemandSink != null && currentMessage != null )
-        {
-            renderTo( currentMessage, onDemandSink );
+    protected void newMessage(int messageLevel) {
+        if (onDemandSink != null && currentMessage != null) {
+            renderTo(currentMessage, onDemandSink);
         }
 
-        currentMessage = new Message( messageLevel, onDemandSink );
-        messages.add( currentMessage );
+        currentMessage = new Message(messageLevel, onDemandSink);
+        messages.add(currentMessage);
     }
 
     /** {@inheritDoc} */
-    public String render()
-    {
+    public String render() {
         StringBuffer buffer = new StringBuffer();
 
         int counter = 1;
-        for ( Iterator<Message> it = messages.iterator(); it.hasNext(); )
-        {
+        for (Iterator<Message> it = messages.iterator(); it.hasNext(); ) {
             Message message = (Message) it.next();
 
             int ml = message.getMessageLevel();
 
-            if ( ml >= messageLevelStates.length || ml < 0 )
-            {
+            if (ml >= messageLevelStates.length || ml < 0) {
                 ml = MessageLevels.LEVEL_DEBUG;
             }
 
-            if ( !messageLevelStates[ml] )
-            {
+            if (!messageLevelStates[ml]) {
                 continue;
             }
 
             CharSequence content = message.render();
-            String label = MessageLevels.getLevelLabel( message.getMessageLevel() );
+            String label = MessageLevels.getLevelLabel(message.getMessageLevel());
 
-            if ( content.length() > label.length() + 3 )
-            {
-                buffer.append( '[' ).append( counter++ ).append( "] " );
-                buffer.append( content.toString() );
+            if (content.length() > label.length() + 3) {
+                buffer.append('[').append(counter++).append("] ");
+                buffer.append(content.toString());
 
-                if ( it.hasNext() )
-                {
-                    buffer.append( "\n\n" );
+                if (it.hasNext()) {
+                    buffer.append("\n\n");
                 }
             }
         }
@@ -227,13 +220,11 @@ public class DefaultMessageHolder
     }
 
     /** {@inheritDoc} */
-    public int size()
-    {
+    public int size() {
         return messages.size();
     }
 
-    private static final class Message
-    {
+    private static final class Message {
         private StringBuffer message = new StringBuffer();
 
         private Throwable error;
@@ -242,63 +233,56 @@ public class DefaultMessageHolder
 
         private final MessageSink onDemandSink;
 
-        Message( int messageLevel, MessageSink onDemandSink )
-        {
+        Message(int messageLevel, MessageSink onDemandSink) {
             this.messageLevel = messageLevel;
 
             this.onDemandSink = onDemandSink;
         }
 
-        public Message setError( Throwable pError )
-        {
+        public Message setError(Throwable pError) {
             this.error = pError;
             return this;
         }
 
-        public Message append( CharSequence pMessage )
-        {
-            this.message.append( pMessage.toString() );
+        public Message append(CharSequence pMessage) {
+            this.message.append(pMessage.toString());
             return this;
         }
 
         /**
          * @return message level.
          */
-        public int getMessageLevel()
-        {
+        public int getMessageLevel() {
             return messageLevel;
         }
 
         /**
          * @return Sequence.
          */
-        public CharSequence render()
-        {
+        public CharSequence render() {
             StringBuffer buffer = new StringBuffer();
 
-            if ( onDemandSink == null )
-            {
-                buffer.append( '[' ).append( MessageLevels.getLevelLabel( messageLevel ) ).append( "] " );
+            if (onDemandSink == null) {
+                buffer.append('[')
+                        .append(MessageLevels.getLevelLabel(messageLevel))
+                        .append("] ");
             }
-            if ( message != null && message.length() > 0 )
-            {
-                buffer.append( message );
+            if (message != null && message.length() > 0) {
+                buffer.append(message);
 
-                if ( error != null )
-                {
-                    buffer.append( '\n' );
+                if (error != null) {
+                    buffer.append('\n');
                 }
             }
 
-            if ( error != null )
-            {
-                buffer.append( "Error:\n" );
+            if (error != null) {
+                buffer.append("Error:\n");
 
                 StringWriter sw = new StringWriter();
-                PrintWriter pw = new PrintWriter( sw );
-                error.printStackTrace( pw );
+                PrintWriter pw = new PrintWriter(sw);
+                error.printStackTrace(pw);
 
-                buffer.append( sw.toString() );
+                buffer.append(sw.toString());
             }
 
             return buffer;
@@ -306,143 +290,119 @@ public class DefaultMessageHolder
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addDebugMessage( CharSequence messagePart, Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_DEBUG, messagePart, error );
+    public MessageHolder addDebugMessage(CharSequence messagePart, Throwable error) {
+        return addMessage(MessageLevels.LEVEL_DEBUG, messagePart, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addDebugMessage( CharSequence messagePart )
-    {
-        return addMessage( MessageLevels.LEVEL_DEBUG, messagePart );
+    public MessageHolder addDebugMessage(CharSequence messagePart) {
+        return addMessage(MessageLevels.LEVEL_DEBUG, messagePart);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addDebugMessage( Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_DEBUG, error );
+    public MessageHolder addDebugMessage(Throwable error) {
+        return addMessage(MessageLevels.LEVEL_DEBUG, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addErrorMessage( CharSequence messagePart, Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_ERROR, messagePart, error );
+    public MessageHolder addErrorMessage(CharSequence messagePart, Throwable error) {
+        return addMessage(MessageLevels.LEVEL_ERROR, messagePart, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addErrorMessage( CharSequence messagePart )
-    {
-        return addMessage( MessageLevels.LEVEL_ERROR, messagePart );
+    public MessageHolder addErrorMessage(CharSequence messagePart) {
+        return addMessage(MessageLevels.LEVEL_ERROR, messagePart);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addErrorMessage( Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_ERROR, error );
+    public MessageHolder addErrorMessage(Throwable error) {
+        return addMessage(MessageLevels.LEVEL_ERROR, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addInfoMessage( CharSequence messagePart, Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_INFO, messagePart, error );
+    public MessageHolder addInfoMessage(CharSequence messagePart, Throwable error) {
+        return addMessage(MessageLevels.LEVEL_INFO, messagePart, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addInfoMessage( CharSequence messagePart )
-    {
-        return addMessage( MessageLevels.LEVEL_INFO, messagePart );
+    public MessageHolder addInfoMessage(CharSequence messagePart) {
+        return addMessage(MessageLevels.LEVEL_INFO, messagePart);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addInfoMessage( Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_INFO, error );
+    public MessageHolder addInfoMessage(Throwable error) {
+        return addMessage(MessageLevels.LEVEL_INFO, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addSevereMessage( CharSequence messagePart, Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_SEVERE, messagePart, error );
+    public MessageHolder addSevereMessage(CharSequence messagePart, Throwable error) {
+        return addMessage(MessageLevels.LEVEL_SEVERE, messagePart, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addSevereMessage( CharSequence messagePart )
-    {
-        return addMessage( MessageLevels.LEVEL_SEVERE, messagePart );
+    public MessageHolder addSevereMessage(CharSequence messagePart) {
+        return addMessage(MessageLevels.LEVEL_SEVERE, messagePart);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addSevereMessage( Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_SEVERE, error );
+    public MessageHolder addSevereMessage(Throwable error) {
+        return addMessage(MessageLevels.LEVEL_SEVERE, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addWarningMessage( CharSequence messagePart, Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_WARNING, messagePart, error );
+    public MessageHolder addWarningMessage(CharSequence messagePart, Throwable error) {
+        return addMessage(MessageLevels.LEVEL_WARNING, messagePart, error);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addWarningMessage( CharSequence messagePart )
-    {
-        return addMessage( MessageLevels.LEVEL_WARNING, messagePart );
+    public MessageHolder addWarningMessage(CharSequence messagePart) {
+        return addMessage(MessageLevels.LEVEL_WARNING, messagePart);
     }
 
     /** {@inheritDoc} */
-    public MessageHolder addWarningMessage( Throwable error )
-    {
-        return addMessage( MessageLevels.LEVEL_WARNING, error );
+    public MessageHolder addWarningMessage(Throwable error) {
+        return addMessage(MessageLevels.LEVEL_WARNING, error);
     }
 
     /** {@inheritDoc} */
-    public int countDebugMessages()
-    {
-        return countMessagesOfType( MessageLevels.LEVEL_DEBUG );
+    public int countDebugMessages() {
+        return countMessagesOfType(MessageLevels.LEVEL_DEBUG);
     }
 
     /** {@inheritDoc} */
-    public int countErrorMessages()
-    {
-        return countMessagesOfType( MessageLevels.LEVEL_ERROR );
+    public int countErrorMessages() {
+        return countMessagesOfType(MessageLevels.LEVEL_ERROR);
     }
 
     /** {@inheritDoc} */
-    public int countInfoMessages()
-    {
-        return countMessagesOfType( MessageLevels.LEVEL_INFO );
+    public int countInfoMessages() {
+        return countMessagesOfType(MessageLevels.LEVEL_INFO);
     }
 
     /** {@inheritDoc} */
-    public int countMessages()
-    {
+    public int countMessages() {
         return size();
     }
 
     /** {@inheritDoc} */
-    public int countSevereMessages()
-    {
-        return countMessagesOfType( MessageLevels.LEVEL_SEVERE );
+    public int countSevereMessages() {
+        return countMessagesOfType(MessageLevels.LEVEL_SEVERE);
     }
 
     /** {@inheritDoc} */
-    public int countWarningMessages()
-    {
-        return countMessagesOfType( MessageLevels.LEVEL_WARNING );
+    public int countWarningMessages() {
+        return countMessagesOfType(MessageLevels.LEVEL_WARNING);
     }
 
     /**
      * @param messageLevel leve.
      * @return number of messages.
      */
-    private int countMessagesOfType( int messageLevel )
-    {
+    private int countMessagesOfType(int messageLevel) {
         int count = 0;
 
-        for ( Message message : messages )
-        {
-            if ( messageLevel == message.getMessageLevel() )
-            {
+        for (Message message : messages) {
+            if (messageLevel == message.getMessageLevel()) {
                 count++;
             }
         }
@@ -451,136 +411,112 @@ public class DefaultMessageHolder
     }
 
     /** {@inheritDoc} */
-    public boolean isDebugEnabled()
-    {
+    public boolean isDebugEnabled() {
         return messageLevelStates[MessageLevels.LEVEL_DEBUG];
     }
 
     /** {@inheritDoc} */
-    public boolean isErrorEnabled()
-    {
+    public boolean isErrorEnabled() {
         return messageLevelStates[MessageLevels.LEVEL_ERROR];
     }
 
     /** {@inheritDoc} */
-    public boolean isInfoEnabled()
-    {
+    public boolean isInfoEnabled() {
         return messageLevelStates[MessageLevels.LEVEL_INFO];
     }
 
     /** {@inheritDoc} */
-    public boolean isSevereEnabled()
-    {
+    public boolean isSevereEnabled() {
         return messageLevelStates[MessageLevels.LEVEL_SEVERE];
     }
 
     /** {@inheritDoc} */
-    public boolean isWarningEnabled()
-    {
+    public boolean isWarningEnabled() {
         return messageLevelStates[MessageLevels.LEVEL_WARNING];
     }
 
     /** {@inheritDoc} */
-    public MessageHolder newDebugMessage()
-    {
-        if ( isDebugEnabled() )
-        {
-            newMessage( MessageLevels.LEVEL_DEBUG );
+    public MessageHolder newDebugMessage() {
+        if (isDebugEnabled()) {
+            newMessage(MessageLevels.LEVEL_DEBUG);
         }
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder newErrorMessage()
-    {
-        if ( isErrorEnabled() )
-        {
-            newMessage( MessageLevels.LEVEL_ERROR );
+    public MessageHolder newErrorMessage() {
+        if (isErrorEnabled()) {
+            newMessage(MessageLevels.LEVEL_ERROR);
         }
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder newInfoMessage()
-    {
-        if ( isInfoEnabled() )
-        {
-            newMessage( MessageLevels.LEVEL_INFO );
+    public MessageHolder newInfoMessage() {
+        if (isInfoEnabled()) {
+            newMessage(MessageLevels.LEVEL_INFO);
         }
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder newSevereMessage()
-    {
-        if ( isSevereEnabled() )
-        {
-            newMessage( MessageLevels.LEVEL_SEVERE );
+    public MessageHolder newSevereMessage() {
+        if (isSevereEnabled()) {
+            newMessage(MessageLevels.LEVEL_SEVERE);
         }
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public MessageHolder newWarningMessage()
-    {
-        if ( isWarningEnabled() )
-        {
-            newMessage( MessageLevels.LEVEL_WARNING );
+    public MessageHolder newWarningMessage() {
+        if (isWarningEnabled()) {
+            newMessage(MessageLevels.LEVEL_WARNING);
         }
 
         return this;
     }
 
     /** {@inheritDoc} */
-    public void setDebugEnabled( boolean enabled )
-    {
+    public void setDebugEnabled(boolean enabled) {
         messageLevelStates[MessageLevels.LEVEL_DEBUG] = enabled;
     }
 
     /** {@inheritDoc} */
-    public void setErrorEnabled( boolean enabled )
-    {
+    public void setErrorEnabled(boolean enabled) {
         messageLevelStates[MessageLevels.LEVEL_ERROR] = enabled;
     }
 
     /** {@inheritDoc} */
-    public void setInfoEnabled( boolean enabled )
-    {
+    public void setInfoEnabled(boolean enabled) {
         messageLevelStates[MessageLevels.LEVEL_INFO] = enabled;
     }
 
     /** {@inheritDoc} */
-    public void setSevereEnabled( boolean enabled )
-    {
+    public void setSevereEnabled(boolean enabled) {
         messageLevelStates[MessageLevels.LEVEL_SEVERE] = enabled;
     }
 
     /** {@inheritDoc} */
-    public void setWarningEnabled( boolean enabled )
-    {
+    public void setWarningEnabled(boolean enabled) {
         messageLevelStates[MessageLevels.LEVEL_WARNING] = enabled;
     }
 
     /** {@inheritDoc} */
-    public void flush()
-    {
-        if ( onDemandSink != null && currentMessage != null )
-        {
-            renderTo( currentMessage, onDemandSink );
+    public void flush() {
+        if (onDemandSink != null && currentMessage != null) {
+            renderTo(currentMessage, onDemandSink);
             currentMessage = null;
         }
     }
 
     /** {@inheritDoc} */
-    public void render( MessageSink sink )
-    {
-        for ( Message message : messages )
-        {
-            renderTo( message, sink );
+    public void render(MessageSink sink) {
+        for (Message message : messages) {
+            renderTo(message, sink);
         }
     }
 
@@ -588,29 +524,26 @@ public class DefaultMessageHolder
      * @param message {@link Message}
      * @param sink {@link MessageSink}
      */
-    protected void renderTo( Message message, MessageSink sink )
-    {
-        switch ( message.getMessageLevel() )
-        {
-            case ( MessageLevels.LEVEL_SEVERE ):
-                sink.severe( message.render().toString() );
+    protected void renderTo(Message message, MessageSink sink) {
+        switch (message.getMessageLevel()) {
+            case (MessageLevels.LEVEL_SEVERE):
+                sink.severe(message.render().toString());
                 break;
 
-            case ( MessageLevels.LEVEL_ERROR ):
-                sink.error( message.render().toString() );
+            case (MessageLevels.LEVEL_ERROR):
+                sink.error(message.render().toString());
                 break;
 
-            case ( MessageLevels.LEVEL_WARNING ):
-                sink.warning( message.render().toString() );
+            case (MessageLevels.LEVEL_WARNING):
+                sink.warning(message.render().toString());
                 break;
 
-            case ( MessageLevels.LEVEL_INFO ):
-                sink.info( message.render().toString() );
+            case (MessageLevels.LEVEL_INFO):
+                sink.info(message.render().toString());
                 break;
 
             default:
-                sink.debug( message.render().toString() );
+                sink.debug(message.render().toString());
         }
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/logging/MessageHolder.java b/src/main/java/org/apache/maven/shared/io/logging/MessageHolder.java
index be4f833..546400a 100644
--- a/src/main/java/org/apache/maven/shared/io/logging/MessageHolder.java
+++ b/src/main/java/org/apache/maven/shared/io/logging/MessageHolder.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.logging;
 
 /*
@@ -23,8 +41,7 @@ package org.apache.maven.shared.io.logging;
  * Message Holder class.
  *
  */
-public interface MessageHolder
-{
+public interface MessageHolder {
 
     /**
      * @return {@link MessageHolder}
@@ -60,127 +77,127 @@ public interface MessageHolder
      * @param messagePart message part.
      * @return {@link MessageHolder}
      */
-    MessageHolder append( CharSequence messagePart );
+    MessageHolder append(CharSequence messagePart);
 
     /**
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder append( Throwable error );
+    MessageHolder append(Throwable error);
 
     /**
      * @param messagePart Message Part.
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addMessage( CharSequence messagePart, Throwable error );
+    MessageHolder addMessage(CharSequence messagePart, Throwable error);
 
     /**
      * @param messagePart message part.
      * @return {@link MessageHolder}
      */
-    MessageHolder addMessage( CharSequence messagePart );
+    MessageHolder addMessage(CharSequence messagePart);
 
     /**
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addMessage( Throwable error );
+    MessageHolder addMessage(Throwable error);
 
     /**
      * @param messagePart message part.
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addDebugMessage( CharSequence messagePart, Throwable error );
+    MessageHolder addDebugMessage(CharSequence messagePart, Throwable error);
 
     /**
      * @param messagePart messages part.
      * @return {@link MessageHolder}
      */
-    MessageHolder addDebugMessage( CharSequence messagePart );
+    MessageHolder addDebugMessage(CharSequence messagePart);
 
     /**
      * @param error messages part.
      * @return {@link MessageHolder}
      */
-    MessageHolder addDebugMessage( Throwable error );
+    MessageHolder addDebugMessage(Throwable error);
 
     /**
      * @param messagePart message part.
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addInfoMessage( CharSequence messagePart, Throwable error );
+    MessageHolder addInfoMessage(CharSequence messagePart, Throwable error);
 
     /**
      * @param messagePart messages part.
      * @return {@link MessageHolder}
      */
-    MessageHolder addInfoMessage( CharSequence messagePart );
+    MessageHolder addInfoMessage(CharSequence messagePart);
 
     /**
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addInfoMessage( Throwable error );
+    MessageHolder addInfoMessage(Throwable error);
 
     /**
      * @param messagePart message part.
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addWarningMessage( CharSequence messagePart, Throwable error );
+    MessageHolder addWarningMessage(CharSequence messagePart, Throwable error);
 
     /**
      * @param messagePart message part.
      * @return {@link MessageHolder}
      */
-    MessageHolder addWarningMessage( CharSequence messagePart );
+    MessageHolder addWarningMessage(CharSequence messagePart);
 
     /**
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addWarningMessage( Throwable error );
+    MessageHolder addWarningMessage(Throwable error);
 
     /**
      * @param messagePart message part.
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addErrorMessage( CharSequence messagePart, Throwable error );
+    MessageHolder addErrorMessage(CharSequence messagePart, Throwable error);
 
     /**
      * @param messagePart message part.
      * @return {@link MessageHolder}
      */
-    MessageHolder addErrorMessage( CharSequence messagePart );
+    MessageHolder addErrorMessage(CharSequence messagePart);
 
     /**
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addErrorMessage( Throwable error );
+    MessageHolder addErrorMessage(Throwable error);
 
     /**
      * @param messagePart message part.
      * @param error {@link Throwable}
      * @return {@link MessageHolder}
      */
-    MessageHolder addSevereMessage( CharSequence messagePart, Throwable error );
+    MessageHolder addSevereMessage(CharSequence messagePart, Throwable error);
 
     /**
      * @param messagePart message part.
      * @return {@link MessageHolder}
      */
-    MessageHolder addSevereMessage( CharSequence messagePart );
+    MessageHolder addSevereMessage(CharSequence messagePart);
 
     /**
      * @param error The error.
      * @return {@link MessageHolder}
      */
-    MessageHolder addSevereMessage( Throwable error );
+    MessageHolder addSevereMessage(Throwable error);
 
     /**
      * @return the size.
@@ -225,7 +242,7 @@ public interface MessageHolder
     /**
      * @param enabled enable debug
      */
-    void setDebugEnabled( boolean enabled );
+    void setDebugEnabled(boolean enabled);
 
     /**
      * @return true if info is enabled false otherwise.
@@ -235,7 +252,7 @@ public interface MessageHolder
     /**
      * @param enabled true info enable false otherwise.
      */
-    void setInfoEnabled( boolean enabled );
+    void setInfoEnabled(boolean enabled);
 
     /**
      * @return true if warning is enabled false otherwise.
@@ -245,7 +262,7 @@ public interface MessageHolder
     /**
      * @param enabled enable warning or disable.
      */
-    void setWarningEnabled( boolean enabled );
+    void setWarningEnabled(boolean enabled);
 
     /**
      * @return true if error is enabled false otherwise.
@@ -255,7 +272,7 @@ public interface MessageHolder
     /**
      * @param enabled enable error or disable.
      */
-    void setErrorEnabled( boolean enabled );
+    void setErrorEnabled(boolean enabled);
 
     /**
      * @return true if server is enabled false otherwise.
@@ -265,7 +282,7 @@ public interface MessageHolder
     /**
      * @param enabled enable server or disable.
      */
-    void setSevereEnabled( boolean enabled );
+    void setSevereEnabled(boolean enabled);
 
     /**
      * @return true if empty false otherwise.
@@ -280,11 +297,10 @@ public interface MessageHolder
     /**
      * @param sink {@link MessageSink}
      */
-    void render( MessageSink sink );
+    void render(MessageSink sink);
 
     /**
      * flush.
      */
     void flush();
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/logging/MessageLevels.java b/src/main/java/org/apache/maven/shared/io/logging/MessageLevels.java
index 06fe3de..884e8bf 100644
--- a/src/main/java/org/apache/maven/shared/io/logging/MessageLevels.java
+++ b/src/main/java/org/apache/maven/shared/io/logging/MessageLevels.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.logging;
 
 /*
@@ -25,10 +43,9 @@ import java.util.Collections;
 import java.util.List;
 
 /**
- * 
+ *
  */
-public final class MessageLevels
-{
+public final class MessageLevels {
 
     /**
      * Debug.
@@ -57,43 +74,38 @@ public final class MessageLevels
 
     private static final List<String> LEVEL_NAMES;
 
-    static
-    {
+    static {
         List<String> names = new ArrayList<String>();
-        names.add( "DEBUG" );
-        names.add( "INFO" );
-        names.add( "WARN" );
-        names.add( "ERROR" );
-        names.add( "SEVERE" );
+        names.add("DEBUG");
+        names.add("INFO");
+        names.add("WARN");
+        names.add("ERROR");
+        names.add("SEVERE");
 
-        LEVEL_NAMES = Collections.unmodifiableList( names );
+        LEVEL_NAMES = Collections.unmodifiableList(names);
     }
 
-    private MessageLevels()
-    {
-    }
+    private MessageLevels() {}
 
     /**
      * @param maxMessageLevel for which level.
      * @return level states.
      */
-    public static boolean[] getLevelStates( int maxMessageLevel )
-    {
+    public static boolean[] getLevelStates(int maxMessageLevel) {
         boolean[] states = new boolean[5];
 
-        Arrays.fill( states, false );
+        Arrays.fill(states, false);
 
-        switch ( maxMessageLevel )
-        {
-            case ( LEVEL_DEBUG ):
+        switch (maxMessageLevel) {
+            case (LEVEL_DEBUG):
                 states[LEVEL_DEBUG] = true;
-            case ( LEVEL_INFO ):
+            case (LEVEL_INFO):
                 states[LEVEL_INFO] = true;
-            case ( LEVEL_WARNING ):
+            case (LEVEL_WARNING):
                 states[LEVEL_WARNING] = true;
-            case ( LEVEL_ERROR ):
+            case (LEVEL_ERROR):
                 states[LEVEL_ERROR] = true;
-            case ( LEVEL_SEVERE ):
+            case (LEVEL_SEVERE):
                 states[LEVEL_SEVERE] = true;
             default:
         }
@@ -105,13 +117,11 @@ public final class MessageLevels
      * @param messageLevel the message leve.
      * @return The label.
      */
-    public static String getLevelLabel( int messageLevel )
-    {
-        if ( messageLevel > -1 && LEVEL_NAMES.size() > messageLevel )
-        {
-            return (String) LEVEL_NAMES.get( messageLevel );
+    public static String getLevelLabel(int messageLevel) {
+        if (messageLevel > -1 && LEVEL_NAMES.size() > messageLevel) {
+            return (String) LEVEL_NAMES.get(messageLevel);
         }
 
-        throw new IllegalArgumentException( "Invalid message level: " + messageLevel );
+        throw new IllegalArgumentException("Invalid message level: " + messageLevel);
     }
 }
diff --git a/src/main/java/org/apache/maven/shared/io/logging/MessageSink.java b/src/main/java/org/apache/maven/shared/io/logging/MessageSink.java
index 3856e21..f8db3d6 100644
--- a/src/main/java/org/apache/maven/shared/io/logging/MessageSink.java
+++ b/src/main/java/org/apache/maven/shared/io/logging/MessageSink.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.logging;
 
 /*
@@ -19,37 +37,34 @@ package org.apache.maven.shared.io.logging;
  * under the License.
  */
 
-
 /**
  * Message Sink interface.
  *
  */
-public interface MessageSink
-{
+public interface MessageSink {
 
     /**
      * @param message The message.
      */
-    void debug( String message );
+    void debug(String message);
 
     /**
      * @param message The message.
      */
-    void info( String message );
+    void info(String message);
 
     /**
      * @param message The message.
      */
-    void warning( String message );
+    void warning(String message);
 
     /**
      * @param message The message.
      */
-    void error( String message );
+    void error(String message);
 
     /**
      * @param message The message.
      */
-    void severe( String message );
-
+    void severe(String message);
 }
diff --git a/src/main/java/org/apache/maven/shared/io/logging/MojoLogSink.java b/src/main/java/org/apache/maven/shared/io/logging/MojoLogSink.java
index f98e818..f98f253 100644
--- a/src/main/java/org/apache/maven/shared/io/logging/MojoLogSink.java
+++ b/src/main/java/org/apache/maven/shared/io/logging/MojoLogSink.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.logging;
 
 /*
@@ -21,53 +39,43 @@ package org.apache.maven.shared.io.logging;
 
 import org.apache.maven.plugin.logging.Log;
 
-
 /**
  * The Mojo Log Sink.
  *
  */
-public class MojoLogSink
-    implements MessageSink
-{
+public class MojoLogSink implements MessageSink {
 
     private final Log logger;
 
     /**
      * @param logger {@link Log}
      */
-    public MojoLogSink( Log logger )
-    {
+    public MojoLogSink(Log logger) {
         this.logger = logger;
     }
 
     /** {@inheritDoc} */
-    public void debug( String message )
-    {
-        logger.debug( message );
+    public void debug(String message) {
+        logger.debug(message);
     }
 
     /** {@inheritDoc} */
-    public void error( String message )
-    {
-        logger.error( message );
+    public void error(String message) {
+        logger.error(message);
     }
 
     /** {@inheritDoc} */
-    public void info( String message )
-    {
-        logger.info( message );
+    public void info(String message) {
+        logger.info(message);
     }
 
     /** {@inheritDoc} */
-    public void severe( String message )
-    {
-        logger.error( message );
+    public void severe(String message) {
+        logger.error(message);
     }
 
     /** {@inheritDoc} */
-    public void warning( String message )
-    {
-        logger.warn( message );
+    public void warning(String message) {
+        logger.warn(message);
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/logging/PlexusLoggerSink.java b/src/main/java/org/apache/maven/shared/io/logging/PlexusLoggerSink.java
index 8091dcc..a070f2e 100644
--- a/src/main/java/org/apache/maven/shared/io/logging/PlexusLoggerSink.java
+++ b/src/main/java/org/apache/maven/shared/io/logging/PlexusLoggerSink.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.logging;
 
 /*
@@ -23,52 +41,43 @@ import org.codehaus.plexus.logging.Logger;
 
 /**
  * The plexus logger sink implementation.
- * 
+ *
  * @deprecated Plexus logging should no longer be used in Maven. Convert to SLF4J.
  */
 @Deprecated
-public class PlexusLoggerSink
-    implements MessageSink
-{
+public class PlexusLoggerSink implements MessageSink {
 
     private final Logger logger;
 
     /**
      * @param logger The logger.
      */
-    public PlexusLoggerSink( Logger logger )
-    {
+    public PlexusLoggerSink(Logger logger) {
         this.logger = logger;
     }
 
     /** {@inheritDoc} */
-    public void debug( String message )
-    {
-        logger.debug( message );
+    public void debug(String message) {
+        logger.debug(message);
     }
 
     /** {@inheritDoc} */
-    public void error( String message )
-    {
-        logger.error( message );
+    public void error(String message) {
+        logger.error(message);
     }
 
     /** {@inheritDoc} */
-    public void info( String message )
-    {
-        logger.info( message );
+    public void info(String message) {
+        logger.info(message);
     }
 
     /** {@inheritDoc} */
-    public void severe( String message )
-    {
-        logger.fatalError( message );
+    public void severe(String message) {
+        logger.fatalError(message);
     }
 
     /** {@inheritDoc} */
-    public void warning( String message )
-    {
-        logger.warn( message );
+    public void warning(String message) {
+        logger.warn(message);
     }
-
 }
diff --git a/src/main/java/org/apache/maven/shared/io/scan/AbstractResourceInclusionScanner.java b/src/main/java/org/apache/maven/shared/io/scan/AbstractResourceInclusionScanner.java
index 2f05f09..34dc413 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/AbstractResourceInclusionScanner.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/AbstractResourceInclusionScanner.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan;
 
 /*
@@ -32,23 +50,19 @@ import org.apache.maven.shared.utils.io.DirectoryScanner;
  * @author jdcasey
  * @version $Id$
  */
-public abstract class AbstractResourceInclusionScanner
-    implements ResourceInclusionScanner
-{
+public abstract class AbstractResourceInclusionScanner implements ResourceInclusionScanner {
     private final List<SourceMapping> sourceMappings = new ArrayList<SourceMapping>();
 
     /** {@inheritDoc} */
-    public final void addSourceMapping( SourceMapping sourceMapping )
-    {
-        sourceMappings.add( sourceMapping );
+    public final void addSourceMapping(SourceMapping sourceMapping) {
+        sourceMappings.add(sourceMapping);
     }
 
     /**
      * @return The source mapping.
      */
-    protected final List<SourceMapping> getSourceMappings()
-    {
-        return Collections.unmodifiableList( sourceMappings );
+    protected final List<SourceMapping> getSourceMappings() {
+        return Collections.unmodifiableList(sourceMappings);
     }
 
     /**
@@ -57,35 +71,28 @@ public abstract class AbstractResourceInclusionScanner
      * @param sourceExcludes source excludes.
      * @return The resulting sources.
      */
-    protected String[] scanForSources( File sourceDir, Set<String> sourceIncludes, Set<String> sourceExcludes )
-    {
+    protected String[] scanForSources(File sourceDir, Set<String> sourceIncludes, Set<String> sourceExcludes) {
         DirectoryScanner ds = new DirectoryScanner();
-        ds.setFollowSymlinks( true );
-        ds.setBasedir( sourceDir );
+        ds.setFollowSymlinks(true);
+        ds.setBasedir(sourceDir);
 
         String[] includes;
-        if ( sourceIncludes.isEmpty() )
-        {
+        if (sourceIncludes.isEmpty()) {
             includes = new String[0];
-        }
-        else
-        {
-            includes = (String[]) sourceIncludes.toArray( new String[sourceIncludes.size()] );
+        } else {
+            includes = (String[]) sourceIncludes.toArray(new String[sourceIncludes.size()]);
         }
 
-        ds.setIncludes( includes );
+        ds.setIncludes(includes);
 
         String[] excludes;
-        if ( sourceExcludes.isEmpty() )
-        {
+        if (sourceExcludes.isEmpty()) {
             excludes = new String[0];
-        }
-        else
-        {
-            excludes = (String[]) sourceExcludes.toArray( new String[sourceExcludes.size()] );
+        } else {
+            excludes = (String[]) sourceExcludes.toArray(new String[sourceExcludes.size()]);
         }
 
-        ds.setExcludes( excludes );
+        ds.setExcludes(excludes);
         ds.addDefaultExcludes();
 
         ds.scan();
diff --git a/src/main/java/org/apache/maven/shared/io/scan/InclusionScanException.java b/src/main/java/org/apache/maven/shared/io/scan/InclusionScanException.java
index 8843427..539f598 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/InclusionScanException.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/InclusionScanException.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan;
 
 /*
@@ -23,23 +41,19 @@ package org.apache.maven.shared.io.scan;
  * @author jdcasey
  * @version $Id$
  */
-public class InclusionScanException
-    extends Exception
-{
+public class InclusionScanException extends Exception {
     /**
      * @param message The message.
      */
-    public InclusionScanException( String message )
-    {
-        super( message );
+    public InclusionScanException(String message) {
+        super(message);
     }
 
     /**
      * @param message The message.
      * @param cause The cause of the error.
      */
-    public InclusionScanException( String message, Throwable cause )
-    {
-        super( message, cause );
+    public InclusionScanException(String message, Throwable cause) {
+        super(message, cause);
     }
 }
diff --git a/src/main/java/org/apache/maven/shared/io/scan/ResourceInclusionScanner.java b/src/main/java/org/apache/maven/shared/io/scan/ResourceInclusionScanner.java
index 5171124..ea5932c 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/ResourceInclusionScanner.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/ResourceInclusionScanner.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan;
 
 /*
@@ -19,21 +37,20 @@ package org.apache.maven.shared.io.scan;
  * under the License.
  */
 
-import org.apache.maven.shared.io.scan.mapping.SourceMapping;
-
 import java.io.File;
 import java.util.Set;
 
+import org.apache.maven.shared.io.scan.mapping.SourceMapping;
+
 /**
  * @author jdcasey
  * @version $Id$
  */
-public interface ResourceInclusionScanner
-{
+public interface ResourceInclusionScanner {
     /**
      * @param sourceMapping {@link SourceMapping}
      */
-    void addSourceMapping( SourceMapping sourceMapping );
+    void addSourceMapping(SourceMapping sourceMapping);
 
     /**
      * @param sourceDir {@link File}
@@ -41,6 +58,5 @@ public interface ResourceInclusionScanner
      * @return The included sources.
      * @throws InclusionScanException in case of an error.
      */
-    Set<File> getIncludedSources( File sourceDir, File targetDir )
-        throws InclusionScanException;
+    Set<File> getIncludedSources(File sourceDir, File targetDir) throws InclusionScanException;
 }
diff --git a/src/main/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScanner.java b/src/main/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScanner.java
index 16dd82d..001b7cc 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScanner.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScanner.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan;
 
 /*
@@ -31,9 +49,7 @@ import org.apache.maven.shared.io.scan.mapping.SourceMapping;
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
  */
-public class SimpleResourceInclusionScanner
-    extends AbstractResourceInclusionScanner
-{
+public class SimpleResourceInclusionScanner extends AbstractResourceInclusionScanner {
     private final Set<String> sourceIncludes;
 
     private final Set<String> sourceExcludes;
@@ -42,30 +58,25 @@ public class SimpleResourceInclusionScanner
      * @param sourceIncludes The source includes.
      * @param sourceExcludes The source excludes.
      */
-    public SimpleResourceInclusionScanner( Set<String> sourceIncludes, Set<String> sourceExcludes )
-    {
+    public SimpleResourceInclusionScanner(Set<String> sourceIncludes, Set<String> sourceExcludes) {
         this.sourceIncludes = sourceIncludes;
 
         this.sourceExcludes = sourceExcludes;
     }
 
     /** {@inheritDoc} */
-    public Set<File> getIncludedSources( File sourceDir, File targetDir )
-        throws InclusionScanException
-    {
+    public Set<File> getIncludedSources(File sourceDir, File targetDir) throws InclusionScanException {
         List<SourceMapping> srcMappings = getSourceMappings();
 
-        if ( srcMappings.isEmpty() )
-        {
+        if (srcMappings.isEmpty()) {
             return Collections.emptySet();
         }
 
         Set<File> matchingSources = new HashSet<>();
-        String[] sourcePaths = scanForSources( sourceDir, sourceIncludes, sourceExcludes );
+        String[] sourcePaths = scanForSources(sourceDir, sourceIncludes, sourceExcludes);
 
-        for ( String sourcePath : sourcePaths )
-        {
-            matchingSources.add( new File( sourceDir, sourcePath ) );
+        for (String sourcePath : sourcePaths) {
+            matchingSources.add(new File(sourceDir, sourcePath));
         }
         return matchingSources;
     }
diff --git a/src/main/java/org/apache/maven/shared/io/scan/StaleResourceScanner.java b/src/main/java/org/apache/maven/shared/io/scan/StaleResourceScanner.java
index 62358be..833e1ef 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/StaleResourceScanner.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/StaleResourceScanner.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan;
 
 /*
@@ -31,9 +49,7 @@ import org.apache.maven.shared.io.scan.mapping.SourceMapping;
  * @author jdcasey
  * @version $Id$
  */
-public class StaleResourceScanner
-    extends AbstractResourceInclusionScanner
-{
+public class StaleResourceScanner extends AbstractResourceInclusionScanner {
     private final long lastUpdatedWithinMsecs;
 
     private final Set<String> sourceIncludes;
@@ -47,17 +63,15 @@ public class StaleResourceScanner
     /**
      * Create instance with defaults.
      */
-    public StaleResourceScanner()
-    {
-        this( 0, Collections.singleton( "**/*" ), Collections.<String>emptySet() );
+    public StaleResourceScanner() {
+        this(0, Collections.singleton("**/*"), Collections.<String>emptySet());
     }
 
     /**
      * @param lastUpdatedWithinMsecs last update within milli seconds.
      */
-    public StaleResourceScanner( long lastUpdatedWithinMsecs )
-    {
-        this( lastUpdatedWithinMsecs, Collections.singleton( "**/*" ), Collections.<String>emptySet() );
+    public StaleResourceScanner(long lastUpdatedWithinMsecs) {
+        this(lastUpdatedWithinMsecs, Collections.singleton("**/*"), Collections.<String>emptySet());
     }
 
     /**
@@ -65,8 +79,7 @@ public class StaleResourceScanner
      * @param sourceIncludes source includes.
      * @param sourceExcludes source excludes.
      */
-    public StaleResourceScanner( long lastUpdatedWithinMsecs, Set<String> sourceIncludes, Set<String> sourceExcludes )
-    {
+    public StaleResourceScanner(long lastUpdatedWithinMsecs, Set<String> sourceIncludes, Set<String> sourceExcludes) {
         this.lastUpdatedWithinMsecs = lastUpdatedWithinMsecs;
 
         this.sourceIncludes = sourceIncludes;
@@ -79,39 +92,33 @@ public class StaleResourceScanner
     // ----------------------------------------------------------------------
 
     /** {@inheritDoc} */
-    public Set<File> getIncludedSources( File sourceDir, File targetDir )
-        throws InclusionScanException
-    {
+    public Set<File> getIncludedSources(File sourceDir, File targetDir) throws InclusionScanException {
         List<SourceMapping> srcMappings = getSourceMappings();
 
-        if ( srcMappings.isEmpty() )
-        {
+        if (srcMappings.isEmpty()) {
             return Collections.<File>emptySet();
         }
 
-        String[] potentialIncludes = scanForSources( sourceDir, sourceIncludes, sourceExcludes );
+        String[] potentialIncludes = scanForSources(sourceDir, sourceIncludes, sourceExcludes);
 
         Set<File> matchingSources = new HashSet<File>();
 
-        for ( int i = 0; i < potentialIncludes.length; i++ )
-        {
+        for (int i = 0; i < potentialIncludes.length; i++) {
             String path = potentialIncludes[i];
 
-            File sourceFile = new File( sourceDir, path );
+            File sourceFile = new File(sourceDir, path);
 
-            staleSourceFileTesting: for ( SourceMapping mapping : srcMappings )
-            {
-                Set<File> targetFiles = mapping.getTargetFiles( targetDir, path );
+            staleSourceFileTesting:
+            for (SourceMapping mapping : srcMappings) {
+                Set<File> targetFiles = mapping.getTargetFiles(targetDir, path);
 
                 // never include files that don't have corresponding target mappings.
                 // the targets don't have to exist on the filesystem, but the
                 // mappers must tell us to look for them.
-                for ( File targetFile : targetFiles )
-                {
-                    if ( !targetFile.exists()
-                        || ( targetFile.lastModified() + lastUpdatedWithinMsecs < sourceFile.lastModified() ) )
-                    {
-                        matchingSources.add( sourceFile );
+                for (File targetFile : targetFiles) {
+                    if (!targetFile.exists()
+                            || (targetFile.lastModified() + lastUpdatedWithinMsecs < sourceFile.lastModified())) {
+                        matchingSources.add(sourceFile);
                         break staleSourceFileTesting;
                     }
                 }
diff --git a/src/main/java/org/apache/maven/shared/io/scan/mapping/SingleTargetMapping.java b/src/main/java/org/apache/maven/shared/io/scan/mapping/SingleTargetMapping.java
index 2d1f337..c880224 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/mapping/SingleTargetMapping.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/mapping/SingleTargetMapping.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan.mapping;
 
 /*
@@ -19,11 +37,11 @@ package org.apache.maven.shared.io.scan.mapping;
  * under the License.
  */
 
-import org.apache.maven.shared.io.scan.InclusionScanException;
-
-import java.util.Set;
-import java.util.Collections;
 import java.io.File;
+import java.util.Collections;
+import java.util.Set;
+
+import org.apache.maven.shared.io.scan.InclusionScanException;
 
 /**
  * Maps a set of input files to a single output file.
@@ -31,9 +49,7 @@ import java.io.File;
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
  */
-public class SingleTargetMapping
-    implements SourceMapping
-{
+public class SingleTargetMapping implements SourceMapping {
     private String sourceSuffix;
 
     private String outputFile;
@@ -42,22 +58,18 @@ public class SingleTargetMapping
      * @param sourceSuffix source suffix.
      * @param outputFile output file.
      */
-    public SingleTargetMapping( String sourceSuffix, String outputFile )
-    {
+    public SingleTargetMapping(String sourceSuffix, String outputFile) {
         this.sourceSuffix = sourceSuffix;
 
         this.outputFile = outputFile;
     }
 
     /** {@inheritDoc} */
-    public Set<File> getTargetFiles( File targetDir, String source )
-        throws InclusionScanException
-    {
-        if ( !source.endsWith( sourceSuffix ) )
-        {
+    public Set<File> getTargetFiles(File targetDir, String source) throws InclusionScanException {
+        if (!source.endsWith(sourceSuffix)) {
             return Collections.<File>emptySet();
         }
 
-        return Collections.singleton( new File( targetDir, outputFile ) );
+        return Collections.singleton(new File(targetDir, outputFile));
     }
 }
diff --git a/src/main/java/org/apache/maven/shared/io/scan/mapping/SourceMapping.java b/src/main/java/org/apache/maven/shared/io/scan/mapping/SourceMapping.java
index 7defc0b..372a184 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/mapping/SourceMapping.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/mapping/SourceMapping.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan.mapping;
 
 /*
@@ -28,14 +46,12 @@ import org.apache.maven.shared.io.scan.InclusionScanException;
  * @author jdcasey
  * @version $Id$
  */
-public interface SourceMapping
-{
+public interface SourceMapping {
     /**
      * @param targetDir target directory.
      * @param source source.
      * @return list of target files.
      * @throws InclusionScanException in case of an error.
      */
-    Set<File> getTargetFiles( File targetDir, String source )
-        throws InclusionScanException;
+    Set<File> getTargetFiles(File targetDir, String source) throws InclusionScanException;
 }
diff --git a/src/main/java/org/apache/maven/shared/io/scan/mapping/SuffixMapping.java b/src/main/java/org/apache/maven/shared/io/scan/mapping/SuffixMapping.java
index 75aa461..5f598f1 100644
--- a/src/main/java/org/apache/maven/shared/io/scan/mapping/SuffixMapping.java
+++ b/src/main/java/org/apache/maven/shared/io/scan/mapping/SuffixMapping.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan.mapping;
 
 /*
@@ -28,9 +46,7 @@ import java.util.Set;
  * @author jdcasey
  * @version $Id$
  */
-public final class SuffixMapping
-    implements SourceMapping
-{
+public final class SuffixMapping implements SourceMapping {
     private final String sourceSuffix;
 
     private final Set<String> targetSuffixes;
@@ -39,36 +55,31 @@ public final class SuffixMapping
      * @param sourceSuffix source suffix.
      * @param targetSuffix target suffix.
      */
-    public SuffixMapping( String sourceSuffix, String targetSuffix )
-    {
+    public SuffixMapping(String sourceSuffix, String targetSuffix) {
         this.sourceSuffix = sourceSuffix;
 
-        this.targetSuffixes = Collections.singleton( targetSuffix );
+        this.targetSuffixes = Collections.singleton(targetSuffix);
     }
 
     /**
      * @param sourceSuffix source suffix.
      * @param targetSuffixes target suffixes.
      */
-    public SuffixMapping( String sourceSuffix, Set<String> targetSuffixes )
-    {
+    public SuffixMapping(String sourceSuffix, Set<String> targetSuffixes) {
         this.sourceSuffix = sourceSuffix;
 
         this.targetSuffixes = targetSuffixes;
     }
 
     /** {@inheritDoc} */
-    public Set<File> getTargetFiles( File targetDir, String source )
-    {
+    public Set<File> getTargetFiles(File targetDir, String source) {
         Set<File> targetFiles = new HashSet<File>();
 
-        if ( source.endsWith( sourceSuffix ) )
-        {
-            String base = source.substring( 0, source.length() - sourceSuffix.length() );
+        if (source.endsWith(sourceSuffix)) {
+            String base = source.substring(0, source.length() - sourceSuffix.length());
 
-            for ( String suffix : targetSuffixes )
-            {
-                targetFiles.add( new File( targetDir, base + suffix ) );
+            for (String suffix : targetSuffixes) {
+                targetFiles.add(new File(targetDir, base + suffix));
             }
         }
 
diff --git a/src/test/java/org/apache/maven/shared/io/download/DefaultDownloadManagerTest.java b/src/test/java/org/apache/maven/shared/io/download/DefaultDownloadManagerTest.java
index 0042056..fc60c7d 100644
--- a/src/test/java/org/apache/maven/shared/io/download/DefaultDownloadManagerTest.java
+++ b/src/test/java/org/apache/maven/shared/io/download/DefaultDownloadManagerTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.download;
 
 /*
@@ -19,14 +37,6 @@ package org.apache.maven.shared.io.download;
  * under the License.
  */
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.anyString;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
@@ -49,512 +59,403 @@ import org.apache.maven.wagon.proxy.ProxyInfo;
 import org.apache.maven.wagon.repository.Repository;
 import org.codehaus.plexus.PlexusTestCase;
 
-public class DefaultDownloadManagerTest
-    extends PlexusTestCase
-{
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.anyString;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+public class DefaultDownloadManagerTest extends PlexusTestCase {
 
     private WagonManager wagonManager;
 
     private Wagon wagon;
 
-    public void setUp()
-        throws Exception
-    {
+    public void setUp() throws Exception {
         super.setUp();
 
-        wagonManager = createMock( WagonManager.class );
-        wagon = createMock( Wagon.class );
+        wagonManager = createMock(WagonManager.class);
+        wagon = createMock(Wagon.class);
     }
 
-    public void testShouldConstructWithNoParamsAndHaveNonNullMessageHolder()
-    {
+    public void testShouldConstructWithNoParamsAndHaveNonNullMessageHolder() {
         new DefaultDownloadManager();
     }
 
-    public void testShouldConstructWithWagonManager()
-    {
-        replay( wagonManager );
+    public void testShouldConstructWithWagonManager() {
+        replay(wagonManager);
 
-        new DefaultDownloadManager( wagonManager );
+        new DefaultDownloadManager(wagonManager);
 
-        verify( wagonManager );
+        verify(wagonManager);
     }
 
-    public void testShouldLookupInstanceDefaultRoleHint()
-        throws Exception
-    {
-        lookup( DownloadManager.ROLE, DefaultDownloadManager.ROLE_HINT );
+    public void testShouldLookupInstanceDefaultRoleHint() throws Exception {
+        lookup(DownloadManager.ROLE, DefaultDownloadManager.ROLE_HINT);
     }
 
-    public void testShouldFailToDownloadMalformedURL()
-    {
-        replay( wagonManager );
+    public void testShouldFailToDownloadMalformedURL() {
+        replay(wagonManager);
 
-        DownloadManager mgr = new DefaultDownloadManager( wagonManager );
+        DownloadManager mgr = new DefaultDownloadManager(wagonManager);
 
-        try
-        {
-            mgr.download( "://nothing.com/index.html", new DefaultMessageHolder() );
+        try {
+            mgr.download("://nothing.com/index.html", new DefaultMessageHolder());
 
-            fail( "Should not download with invalid URL." );
-        }
-        catch ( DownloadFailedException e )
-        {
-            assertTrue( e.getMessage().indexOf( "invalid URL" ) > -1 );
+            fail("Should not download with invalid URL.");
+        } catch (DownloadFailedException e) {
+            assertTrue(e.getMessage().indexOf("invalid URL") > -1);
         }
 
-        verify( wagonManager );
+        verify(wagonManager);
     }
 
-    public void testShouldDownloadFromTempFileWithNoTransferListeners()
-        throws IOException, DownloadFailedException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldDownloadFromTempFileWithNoTransferListeners() throws IOException, DownloadFailedException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
         setupDefaultMockConfiguration();
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    public void testShouldDownloadFromTempFileTwiceAndUseCache()
-        throws IOException, DownloadFailedException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldDownloadFromTempFileTwiceAndUseCache() throws IOException, DownloadFailedException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
         setupDefaultMockConfiguration();
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        File first = downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        File first = downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
         MessageHolder mh = new DefaultMessageHolder();
 
-        File second = downloadManager.download( tempFile.toURI().toASCIIString(), mh );
+        File second = downloadManager.download(tempFile.toURI().toASCIIString(), mh);
 
-        assertSame( first, second );
-        assertEquals( 1, mh.size() );
-        assertTrue( mh.render().indexOf( "Using cached" ) > -1 );
+        assertSame(first, second);
+        assertEquals(1, mh.size());
+        assertTrue(mh.render().indexOf("Using cached") > -1);
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    public void testShouldDownloadFromTempFileWithOneTransferListener()
-        throws IOException, DownloadFailedException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldDownloadFromTempFileWithOneTransferListener() throws IOException, DownloadFailedException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
         setupDefaultMockConfiguration();
 
-        TransferListener transferListener = createMock( TransferListener.class );
+        TransferListener transferListener = createMock(TransferListener.class);
 
-        wagon.addTransferListener( transferListener );
+        wagon.addTransferListener(transferListener);
 
-        wagon.removeTransferListener( transferListener );
+        wagon.removeTransferListener(transferListener);
 
-        replay( wagon, wagonManager, transferListener );
+        replay(wagon, wagonManager, transferListener);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        downloadManager.download( tempFile.toURI().toASCIIString(), Collections.singletonList( transferListener ),
-                                  new DefaultMessageHolder() );
+        downloadManager.download(
+                tempFile.toURI().toASCIIString(),
+                Collections.singletonList(transferListener),
+                new DefaultMessageHolder());
 
-        verify( wagon, wagonManager, transferListener );
+        verify(wagon, wagonManager, transferListener);
     }
 
-    public void testShouldFailToDownloadWhenWagonProtocolNotFound()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldFailToDownloadWhenWagonProtocolNotFound() throws IOException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
-        setupMocksWithWagonManagerGetException( new UnsupportedProtocolException( "not supported" ) );
+        setupMocksWithWagonManagerGetException(new UnsupportedProtocolException("not supported"));
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        try
-        {
-            downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        try {
+            downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
-            fail( "should have failed to retrieve wagon." );
-        }
-        catch ( DownloadFailedException e )
-        {
-            assertTrue( ExceptionUtils.getStackTrace( e ).indexOf( "UnsupportedProtocolException" ) > -1 );
+            fail("should have failed to retrieve wagon.");
+        } catch (DownloadFailedException e) {
+            assertTrue(ExceptionUtils.getStackTrace(e).indexOf("UnsupportedProtocolException") > -1);
         }
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    public void testShouldFailToDownloadWhenWagonConnectThrowsConnectionException()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldFailToDownloadWhenWagonConnectThrowsConnectionException() throws IOException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
-        setupMocksWithWagonConnectionException( new ConnectionException( "connect error" ) );
+        setupMocksWithWagonConnectionException(new ConnectionException("connect error"));
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        try
-        {
-            downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        try {
+            downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
-            fail( "should have failed to connect wagon." );
-        }
-        catch ( DownloadFailedException e )
-        {
-            assertTrue( ExceptionUtils.getStackTrace( e ).indexOf( "ConnectionException" ) > -1 );
+            fail("should have failed to connect wagon.");
+        } catch (DownloadFailedException e) {
+            assertTrue(ExceptionUtils.getStackTrace(e).indexOf("ConnectionException") > -1);
         }
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    public void testShouldFailToDownloadWhenWagonConnectThrowsAuthenticationException()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldFailToDownloadWhenWagonConnectThrowsAuthenticationException() throws IOException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
-        setupMocksWithWagonConnectionException( new AuthenticationException( "bad credentials" ) );
+        setupMocksWithWagonConnectionException(new AuthenticationException("bad credentials"));
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        try
-        {
-            downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        try {
+            downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
-            fail( "should have failed to connect wagon." );
-        }
-        catch ( DownloadFailedException e )
-        {
-            assertTrue( ExceptionUtils.getStackTrace( e ).indexOf( "AuthenticationException" ) > -1 );
+            fail("should have failed to connect wagon.");
+        } catch (DownloadFailedException e) {
+            assertTrue(ExceptionUtils.getStackTrace(e).indexOf("AuthenticationException") > -1);
         }
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    public void testShouldFailToDownloadWhenWagonGetThrowsTransferFailedException()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldFailToDownloadWhenWagonGetThrowsTransferFailedException() throws IOException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
-        setupMocksWithWagonGetException( new TransferFailedException( "bad transfer" ) );
+        setupMocksWithWagonGetException(new TransferFailedException("bad transfer"));
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        try
-        {
-            downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        try {
+            downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
-            fail( "should have failed to get resource." );
-        }
-        catch ( DownloadFailedException e )
-        {
-            assertTrue( ExceptionUtils.getStackTrace( e ).indexOf( "TransferFailedException" ) > -1 );
+            fail("should have failed to get resource.");
+        } catch (DownloadFailedException e) {
+            assertTrue(ExceptionUtils.getStackTrace(e).indexOf("TransferFailedException") > -1);
         }
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    public void testShouldFailToDownloadWhenWagonGetThrowsResourceDoesNotExistException()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldFailToDownloadWhenWagonGetThrowsResourceDoesNotExistException() throws IOException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
-        setupMocksWithWagonGetException( new ResourceDoesNotExistException( "bad resource" ) );
+        setupMocksWithWagonGetException(new ResourceDoesNotExistException("bad resource"));
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        try
-        {
-            downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        try {
+            downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
-            fail( "should have failed to get resource." );
-        }
-        catch ( DownloadFailedException e )
-        {
-            assertTrue( ExceptionUtils.getStackTrace( e ).indexOf( "ResourceDoesNotExistException" ) > -1 );
+            fail("should have failed to get resource.");
+        } catch (DownloadFailedException e) {
+            assertTrue(ExceptionUtils.getStackTrace(e).indexOf("ResourceDoesNotExistException") > -1);
         }
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    public void testShouldFailToDownloadWhenWagonGetThrowsAuthorizationException()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+    public void testShouldFailToDownloadWhenWagonGetThrowsAuthorizationException() throws IOException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
-        setupMocksWithWagonGetException( new AuthorizationException( "bad transfer" ) );
+        setupMocksWithWagonGetException(new AuthorizationException("bad transfer"));
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
-        try
-        {
-            downloadManager.download( tempFile.toURI().toASCIIString(), new DefaultMessageHolder() );
+        try {
+            downloadManager.download(tempFile.toURI().toASCIIString(), new DefaultMessageHolder());
 
-            fail( "should have failed to get resource." );
-        }
-        catch ( DownloadFailedException e )
-        {
-            assertTrue( ExceptionUtils.getStackTrace( e ).indexOf( "AuthorizationException" ) > -1 );
+            fail("should have failed to get resource.");
+        } catch (DownloadFailedException e) {
+            assertTrue(ExceptionUtils.getStackTrace(e).indexOf("AuthorizationException") > -1);
         }
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
     public void testShouldFailToDownloadWhenWagonDisconnectThrowsConnectionException()
-        throws IOException, DownloadFailedException
-    {
-        File tempFile = Files.createTempFile( "download-source", "test" ).toFile();
+            throws IOException, DownloadFailedException {
+        File tempFile = Files.createTempFile("download-source", "test").toFile();
         tempFile.deleteOnExit();
 
-        setupMocksWithWagonDisconnectException( new ConnectionException( "not connected" ) );
+        setupMocksWithWagonDisconnectException(new ConnectionException("not connected"));
 
-        replay( wagon, wagonManager );
+        replay(wagon, wagonManager);
 
-        DownloadManager downloadManager = new DefaultDownloadManager( wagonManager );
+        DownloadManager downloadManager = new DefaultDownloadManager(wagonManager);
 
         MessageHolder mh = new DefaultMessageHolder();
 
-        downloadManager.download( tempFile.toURI().toASCIIString(), mh );
+        downloadManager.download(tempFile.toURI().toASCIIString(), mh);
 
-        assertTrue( mh.render().indexOf( "ConnectionException" ) > -1 );
+        assertTrue(mh.render().indexOf("ConnectionException") > -1);
 
-        verify( wagon, wagonManager );
+        verify(wagon, wagonManager);
     }
 
-    private void setupDefaultMockConfiguration()
-    {
-        try
-        {
-            expect( wagonManager.getWagon( "file" ) ).andReturn( wagon );
-        }
-        catch ( UnsupportedProtocolException e )
-        {
-            fail( "This shouldn't happen!!" );
+    private void setupDefaultMockConfiguration() {
+        try {
+            expect(wagonManager.getWagon("file")).andReturn(wagon);
+        } catch (UnsupportedProtocolException e) {
+            fail("This shouldn't happen!!");
         }
 
-        expect( wagonManager.getAuthenticationInfo( anyString() ) ).andReturn( null );
+        expect(wagonManager.getAuthenticationInfo(anyString())).andReturn(null);
 
-        expect( wagonManager.getProxy( anyString() ) ).andReturn( null );
+        expect(wagonManager.getProxy(anyString())).andReturn(null);
 
-        try
-        {
-            wagon.connect( anyObject( Repository.class ) , anyObject( AuthenticationInfo.class ), anyObject( ProxyInfo.class ) );
-        }
-        catch ( ConnectionException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( AuthenticationException e )
-        {
-            fail( "This shouldn't happen!!" );
+        try {
+            wagon.connect(anyObject(Repository.class), anyObject(AuthenticationInfo.class), anyObject(ProxyInfo.class));
+        } catch (ConnectionException e) {
+            fail("This shouldn't happen!!");
+        } catch (AuthenticationException e) {
+            fail("This shouldn't happen!!");
         }
 
-        try
-        {
-            wagon.get( anyString(), anyObject( File.class ) );
-        }
-        catch ( TransferFailedException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( ResourceDoesNotExistException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( AuthorizationException e )
-        {
-            fail( "This shouldn't happen!!" );
+        try {
+            wagon.get(anyString(), anyObject(File.class));
+        } catch (TransferFailedException e) {
+            fail("This shouldn't happen!!");
+        } catch (ResourceDoesNotExistException e) {
+            fail("This shouldn't happen!!");
+        } catch (AuthorizationException e) {
+            fail("This shouldn't happen!!");
         }
 
-        try
-        {
+        try {
             wagon.disconnect();
-        }
-        catch ( ConnectionException e )
-        {
-            fail( "This shouldn't happen!!" );
+        } catch (ConnectionException e) {
+            fail("This shouldn't happen!!");
         }
     }
 
-    private void setupMocksWithWagonManagerGetException( Throwable error )
-    {
-        try
-        {
-            expect( wagonManager.getWagon( "file" ) ).andThrow( error );
-        }
-        catch ( UnsupportedProtocolException e )
-        {
-            fail( "This shouldn't happen!!" );
+    private void setupMocksWithWagonManagerGetException(Throwable error) {
+        try {
+            expect(wagonManager.getWagon("file")).andThrow(error);
+        } catch (UnsupportedProtocolException e) {
+            fail("This shouldn't happen!!");
         }
     }
 
-    private void setupMocksWithWagonConnectionException( Throwable error )
-    {
-        try
-        {
-            expect( wagonManager.getWagon( "file" ) ).andReturn( wagon );
-        }
-        catch ( UnsupportedProtocolException e )
-        {
-            fail( "This shouldn't happen!!" );
+    private void setupMocksWithWagonConnectionException(Throwable error) {
+        try {
+            expect(wagonManager.getWagon("file")).andReturn(wagon);
+        } catch (UnsupportedProtocolException e) {
+            fail("This shouldn't happen!!");
         }
 
-        expect( wagonManager.getAuthenticationInfo( anyString() ) ).andReturn( null );
+        expect(wagonManager.getAuthenticationInfo(anyString())).andReturn(null);
 
-        expect( wagonManager.getProxy( anyString() ) ).andReturn( null );
+        expect(wagonManager.getProxy(anyString())).andReturn(null);
 
-        try
-        {
-            wagon.connect( anyObject( Repository.class ) , anyObject( AuthenticationInfo.class ), anyObject( ProxyInfo.class ) );
-            expectLastCall().andThrow( error );
-        }
-        catch ( ConnectionException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( AuthenticationException e )
-        {
-            fail( "This shouldn't happen!!" );
+        try {
+            wagon.connect(anyObject(Repository.class), anyObject(AuthenticationInfo.class), anyObject(ProxyInfo.class));
+            expectLastCall().andThrow(error);
+        } catch (ConnectionException e) {
+            fail("This shouldn't happen!!");
+        } catch (AuthenticationException e) {
+            fail("This shouldn't happen!!");
         }
     }
 
-    private void setupMocksWithWagonGetException( Throwable error )
-    {
-        try
-        {
-            expect( wagonManager.getWagon( "file" ) ).andReturn( wagon );
-        }
-        catch ( UnsupportedProtocolException e )
-        {
-            fail( "This shouldn't happen!!" );
+    private void setupMocksWithWagonGetException(Throwable error) {
+        try {
+            expect(wagonManager.getWagon("file")).andReturn(wagon);
+        } catch (UnsupportedProtocolException e) {
+            fail("This shouldn't happen!!");
         }
 
-        expect( wagonManager.getAuthenticationInfo( anyString() ) ).andReturn( null );
+        expect(wagonManager.getAuthenticationInfo(anyString())).andReturn(null);
 
-        expect( wagonManager.getProxy( anyString() ) ).andReturn( null );
+        expect(wagonManager.getProxy(anyString())).andReturn(null);
 
-        try
-        {
-            wagon.connect( anyObject( Repository.class ) , anyObject( AuthenticationInfo.class ), anyObject( ProxyInfo.class ) );
-        }
-        catch ( ConnectionException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( AuthenticationException e )
-        {
-            fail( "This shouldn't happen!!" );
+        try {
+            wagon.connect(anyObject(Repository.class), anyObject(AuthenticationInfo.class), anyObject(ProxyInfo.class));
+        } catch (ConnectionException e) {
+            fail("This shouldn't happen!!");
+        } catch (AuthenticationException e) {
+            fail("This shouldn't happen!!");
         }
 
-        try
-        {
-            wagon.get( anyString(), anyObject( File.class ) );
-            expectLastCall().andThrow( error );
-        }
-        catch ( TransferFailedException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( ResourceDoesNotExistException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( AuthorizationException e )
-        {
-            fail( "This shouldn't happen!!" );
+        try {
+            wagon.get(anyString(), anyObject(File.class));
+            expectLastCall().andThrow(error);
+        } catch (TransferFailedException e) {
+            fail("This shouldn't happen!!");
+        } catch (ResourceDoesNotExistException e) {
+            fail("This shouldn't happen!!");
+        } catch (AuthorizationException e) {
+            fail("This shouldn't happen!!");
         }
 
-        try
-        {
+        try {
             wagon.disconnect();
-        }
-        catch ( ConnectionException e )
-        {
-            fail( "This shouldn't happen!!" );
+        } catch (ConnectionException e) {
+            fail("This shouldn't happen!!");
         }
     }
 
-    private void setupMocksWithWagonDisconnectException( Throwable error )
-    {
-        try
-        {
-            expect( wagonManager.getWagon( "file" ) ).andReturn( wagon );
-        }
-        catch ( UnsupportedProtocolException e )
-        {
-            fail( "This shouldn't happen!!" );
+    private void setupMocksWithWagonDisconnectException(Throwable error) {
+        try {
+            expect(wagonManager.getWagon("file")).andReturn(wagon);
+        } catch (UnsupportedProtocolException e) {
+            fail("This shouldn't happen!!");
         }
 
-        expect( wagonManager.getAuthenticationInfo( anyString() ) ).andReturn( null );
+        expect(wagonManager.getAuthenticationInfo(anyString())).andReturn(null);
 
-        expect( wagonManager.getProxy( anyString() ) ).andReturn( null );
+        expect(wagonManager.getProxy(anyString())).andReturn(null);
 
-        try
-        {
-            wagon.connect( anyObject( Repository.class ) , anyObject( AuthenticationInfo.class ), anyObject( ProxyInfo.class ) );
-        }
-        catch ( ConnectionException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( AuthenticationException e )
-        {
-            fail( "This shouldn't happen!!" );
+        try {
+            wagon.connect(anyObject(Repository.class), anyObject(AuthenticationInfo.class), anyObject(ProxyInfo.class));
+        } catch (ConnectionException e) {
+            fail("This shouldn't happen!!");
+        } catch (AuthenticationException e) {
+            fail("This shouldn't happen!!");
         }
 
-        try
-        {
-            wagon.get( anyString(), anyObject( File.class ) );
-        }
-        catch ( TransferFailedException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( ResourceDoesNotExistException e )
-        {
-            fail( "This shouldn't happen!!" );
-        }
-        catch ( AuthorizationException e )
-        {
-            fail( "This shouldn't happen!!" );
+        try {
+            wagon.get(anyString(), anyObject(File.class));
+        } catch (TransferFailedException e) {
+            fail("This shouldn't happen!!");
+        } catch (ResourceDoesNotExistException e) {
+            fail("This shouldn't happen!!");
+        } catch (AuthorizationException e) {
+            fail("This shouldn't happen!!");
         }
 
-        try
-        {
+        try {
             wagon.disconnect();
-            expectLastCall().andThrow( error );
-        }
-        catch ( ConnectionException e )
-        {
-            fail( "This shouldn't happen!!" );
+            expectLastCall().andThrow(error);
+        } catch (ConnectionException e) {
+            fail("This shouldn't happen!!");
         }
     }
 }
diff --git a/src/test/java/org/apache/maven/shared/io/download/DownloadFailedExceptionTest.java b/src/test/java/org/apache/maven/shared/io/download/DownloadFailedExceptionTest.java
index a6c957c..ee5fdba 100644
--- a/src/test/java/org/apache/maven/shared/io/download/DownloadFailedExceptionTest.java
+++ b/src/test/java/org/apache/maven/shared/io/download/DownloadFailedExceptionTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.download;
 
 /*
@@ -21,24 +39,18 @@ package org.apache.maven.shared.io.download;
 
 import junit.framework.TestCase;
 
-public class DownloadFailedExceptionTest
-    extends TestCase
-{
+public class DownloadFailedExceptionTest extends TestCase {
 
-    public void testShouldConstructWithUrlAndMessage()
-    {
-        new DownloadFailedException( "http://www.google.com", "can't find." );
+    public void testShouldConstructWithUrlAndMessage() {
+        new DownloadFailedException("http://www.google.com", "can't find.");
     }
 
-    public void testShouldConstructWithUrlMessageAndException()
-    {
-        new DownloadFailedException( "http://www.google.com", "can't find.", new NullPointerException() );
+    public void testShouldConstructWithUrlMessageAndException() {
+        new DownloadFailedException("http://www.google.com", "can't find.", new NullPointerException());
     }
 
-    public void testShouldRetrieveUrlFromConstructor()
-    {
+    public void testShouldRetrieveUrlFromConstructor() {
         String url = "http://www.google.com";
-        assertEquals( url, new DownloadFailedException( url, "can't find." ).getUrl() );
+        assertEquals(url, new DownloadFailedException(url, "can't find.").getUrl());
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/ArtifactLocationTest.java b/src/test/java/org/apache/maven/shared/io/location/ArtifactLocationTest.java
index dc5497b..e2d7821 100644
--- a/src/test/java/org/apache/maven/shared/io/location/ArtifactLocationTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/ArtifactLocationTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -24,59 +42,63 @@ import java.io.IOException;
 import java.nio.file.Files;
 
 import junit.framework.TestCase;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.DefaultArtifact;
 import org.apache.maven.artifact.handler.DefaultArtifactHandler;
 import org.apache.maven.artifact.versioning.VersionRange;
 
-public class ArtifactLocationTest
-    extends TestCase
-{
+public class ArtifactLocationTest extends TestCase {
 
-    public void testShouldConstructFromTempFileSpecification()
-        throws IOException
-    {
-        File f = Files.createTempFile( "artifact-location.", ".test" ).toFile();
+    public void testShouldConstructFromTempFileSpecification() throws IOException {
+        File f = Files.createTempFile("artifact-location.", ".test").toFile();
         f.deleteOnExit();
 
-        Artifact a = new DefaultArtifact( "group", "artifact", VersionRange.createFromVersion( "1" ), null, "jar",
-                                          null, new DefaultArtifactHandler() );
+        Artifact a = new DefaultArtifact(
+                "group",
+                "artifact",
+                VersionRange.createFromVersion("1"),
+                null,
+                "jar",
+                null,
+                new DefaultArtifactHandler());
 
-        a.setFile( f );
+        a.setFile(f);
 
-        ArtifactLocation location = new ArtifactLocation( a, f.getAbsolutePath() );
+        ArtifactLocation location = new ArtifactLocation(a, f.getAbsolutePath());
 
-        assertSame( f, location.getFile() );
+        assertSame(f, location.getFile());
     }
 
-    public void testShouldRead()
-        throws IOException
-    {
-        File f = Files.createTempFile( "url-location.", ".test" ).toFile();
+    public void testShouldRead() throws IOException {
+        File f = Files.createTempFile("url-location.", ".test").toFile();
         f.deleteOnExit();
 
         String testStr = "This is a test";
 
-        FileUtils.writeStringToFile( f, testStr, "US-ASCII" );
+        FileUtils.writeStringToFile(f, testStr, "US-ASCII");
 
-        Artifact a = new DefaultArtifact( "group", "artifact", VersionRange.createFromVersion( "1" ), null, "jar",
-                                          null, new DefaultArtifactHandler() );
+        Artifact a = new DefaultArtifact(
+                "group",
+                "artifact",
+                VersionRange.createFromVersion("1"),
+                null,
+                "jar",
+                null,
+                new DefaultArtifactHandler());
 
-        a.setFile( f );
+        a.setFile(f);
 
-        ArtifactLocation location = new ArtifactLocation( a, f.getAbsolutePath() );
+        ArtifactLocation location = new ArtifactLocation(a, f.getAbsolutePath());
 
         location.open();
 
         byte[] buffer = new byte[testStr.length()];
 
-        int read = location.read( buffer );
+        int read = location.read(buffer);
 
-        assertEquals( testStr.length(), read );
+        assertEquals(testStr.length(), read);
 
-        assertEquals( testStr, new String( buffer, "US-ASCII" ) );
+        assertEquals(testStr, new String(buffer, "US-ASCII"));
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategyTest.java b/src/test/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategyTest.java
index 9516080..349587b 100644
--- a/src/test/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategyTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/ArtifactLocatorStrategyTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -25,7 +43,6 @@ import java.nio.file.Files;
 import java.util.Collections;
 
 import junit.framework.TestCase;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -37,9 +54,7 @@ import org.apache.maven.shared.io.logging.MessageHolder;
 
 import static org.easymock.EasyMock.*;
 
-public class ArtifactLocatorStrategyTest
-    extends TestCase
-{
+public class ArtifactLocatorStrategyTest extends TestCase {
 
     private ArtifactFactory factory;
 
@@ -47,462 +62,414 @@ public class ArtifactLocatorStrategyTest
 
     private ArtifactRepository localRepository;
 
-    public void setUp()
-    {
-        factory = createMock( ArtifactFactory.class );
-        resolver = createMock( ArtifactResolver.class );
-        localRepository = createMock( ArtifactRepository.class );
+    public void setUp() {
+        factory = createMock(ArtifactFactory.class);
+        resolver = createMock(ArtifactResolver.class);
+        localRepository = createMock(ArtifactRepository.class);
     }
 
-    public void testShouldConstructWithoutDefaultArtifactType()
-    {
-        replay( factory, resolver, localRepository );
+    public void testShouldConstructWithoutDefaultArtifactType() {
+        replay(factory, resolver, localRepository);
 
-        new ArtifactLocatorStrategy( factory, resolver, localRepository, Collections.EMPTY_LIST );
+        new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
 
-        verify( factory, resolver, localRepository );
+        verify(factory, resolver, localRepository);
     }
 
-    public void testShouldConstructWithDefaultArtifactType()
-    {
-        replay( factory, resolver, localRepository );
+    public void testShouldConstructWithDefaultArtifactType() {
+        replay(factory, resolver, localRepository);
 
-        new ArtifactLocatorStrategy( factory, resolver, localRepository, Collections.EMPTY_LIST, "zip" );
+        new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST, "zip");
 
-        verify( factory, resolver, localRepository );
+        verify(factory, resolver, localRepository);
     }
 
-    public void testShouldFailToResolveSpecWithOneToken()
-    {
-        replay( factory, resolver, localRepository );
+    public void testShouldFailToResolveSpecWithOneToken() {
+        replay(factory, resolver, localRepository);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST, "zip" );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST, "zip");
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "one-token", mh );
+        Location location = strategy.resolve("one-token", mh);
 
-        assertNull( location );
-        assertEquals( 1, mh.size() );
+        assertNull(location);
+        assertEquals(1, mh.size());
 
-        verify( factory, resolver, localRepository );
+        verify(factory, resolver, localRepository);
     }
 
-    public void testShouldFailToResolveSpecWithTwoTokens()
-    {
-        replay( factory, resolver, localRepository );
+    public void testShouldFailToResolveSpecWithTwoTokens() {
+        replay(factory, resolver, localRepository);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST, "zip" );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST, "zip");
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "two:tokens", mh );
+        Location location = strategy.resolve("two:tokens", mh);
 
-        assertNull( location );
-        assertEquals( 1, mh.size() );
+        assertNull(location);
+        assertEquals(1, mh.size());
 
-        verify( factory, resolver, localRepository );
+        verify(factory, resolver, localRepository);
     }
 
-    public void testShouldResolveSpecWithThreeTokensUsingDefaultType()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "artifact-location.", ".temp" ).toFile();
+    public void testShouldResolveSpecWithThreeTokensUsingDefaultType() throws IOException {
+        File tempFile = Files.createTempFile("artifact-location.", ".temp").toFile();
         tempFile.deleteOnExit();
 
-        Artifact artifact = createMock( Artifact.class );
-        
-        expect( artifact.getFile() ).andReturn( tempFile );
-        expect( artifact.getFile() ).andReturn( tempFile );
-        
-        expect( factory.createArtifact( "group", "artifact", "version", null, "jar" ) ).andReturn( artifact );
+        Artifact artifact = createMock(Artifact.class);
 
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+        expect(artifact.getFile()).andReturn(tempFile);
+        expect(artifact.getFile()).andReturn(tempFile);
+
+        expect(factory.createArtifact("group", "artifact", "version", null, "jar"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version", mh );
+        Location location = strategy.resolve("group:artifact:version", mh);
 
-        assertNotNull( location );
-        assertEquals( 0, mh.size() );
+        assertNotNull(location);
+        assertEquals(0, mh.size());
 
-        assertSame( tempFile, location.getFile() );
+        assertSame(tempFile, location.getFile());
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldResolveSpecWithThreeTokensUsingCustomizedDefaultType()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "artifact-location.", ".temp" ).toFile();
+    public void testShouldResolveSpecWithThreeTokensUsingCustomizedDefaultType() throws IOException {
+        File tempFile = Files.createTempFile("artifact-location.", ".temp").toFile();
         tempFile.deleteOnExit();
 
-        Artifact artifact = createMock( Artifact.class );
-        
-        expect( artifact.getFile() ).andReturn( tempFile );
-        expect( artifact.getFile() ).andReturn( tempFile );
-        
-        expect( factory.createArtifact( "group", "artifact", "version", null, "zip" ) ).andReturn( artifact );
+        Artifact artifact = createMock(Artifact.class);
 
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+        expect(artifact.getFile()).andReturn(tempFile);
+        expect(artifact.getFile()).andReturn(tempFile);
+
+        expect(factory.createArtifact("group", "artifact", "version", null, "zip"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST, "zip" );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST, "zip");
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version", mh );
+        Location location = strategy.resolve("group:artifact:version", mh);
 
-        assertNotNull( location );
-        assertEquals( 0, mh.size() );
+        assertNotNull(location);
+        assertEquals(0, mh.size());
 
-        assertSame( tempFile, location.getFile() );
+        assertSame(tempFile, location.getFile());
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldResolveSpecWithFourTokens()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "artifact-location.", ".temp" ).toFile();
+    public void testShouldResolveSpecWithFourTokens() throws IOException {
+        File tempFile = Files.createTempFile("artifact-location.", ".temp").toFile();
         tempFile.deleteOnExit();
 
-        Artifact artifact = createMock( Artifact.class );
-        
-        expect( artifact.getFile() ).andReturn( tempFile );
-        expect( artifact.getFile() ).andReturn( tempFile );
-        
-        expect( factory.createArtifact( "group", "artifact", "version", null, "zip" ) ).andReturn( artifact );
+        Artifact artifact = createMock(Artifact.class);
 
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+        expect(artifact.getFile()).andReturn(tempFile);
+        expect(artifact.getFile()).andReturn(tempFile);
+
+        expect(factory.createArtifact("group", "artifact", "version", null, "zip"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version:zip", mh );
+        Location location = strategy.resolve("group:artifact:version:zip", mh);
 
-        assertNotNull( location );
-        assertEquals( 0, mh.size() );
+        assertNotNull(location);
+        assertEquals(0, mh.size());
 
-        assertSame( tempFile, location.getFile() );
+        assertSame(tempFile, location.getFile());
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldResolveSpecWithFiveTokens()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "artifact-location.", ".temp" ).toFile();
+    public void testShouldResolveSpecWithFiveTokens() throws IOException {
+        File tempFile = Files.createTempFile("artifact-location.", ".temp").toFile();
         tempFile.deleteOnExit();
 
-        Artifact artifact = createMock( Artifact.class );
-        
-        expect( artifact.getFile() ).andReturn( tempFile );
-        expect( artifact.getFile() ).andReturn( tempFile );
-        
-        expect( factory.createArtifactWithClassifier( "group", "artifact", "version", "zip", "classifier" ) )
-                .andReturn( artifact );
-
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+        Artifact artifact = createMock(Artifact.class);
+
+        expect(artifact.getFile()).andReturn(tempFile);
+        expect(artifact.getFile()).andReturn(tempFile);
+
+        expect(factory.createArtifactWithClassifier("group", "artifact", "version", "zip", "classifier"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version:zip:classifier", mh );
+        Location location = strategy.resolve("group:artifact:version:zip:classifier", mh);
 
-        assertNotNull( location );
-        assertEquals( 0, mh.size() );
+        assertNotNull(location);
+        assertEquals(0, mh.size());
 
-        assertSame( tempFile, location.getFile() );
+        assertSame(tempFile, location.getFile());
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldResolveSpecWithFiveTokensAndEmptyTypeToken()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "artifact-location.", ".temp" ).toFile();
+    public void testShouldResolveSpecWithFiveTokensAndEmptyTypeToken() throws IOException {
+        File tempFile = Files.createTempFile("artifact-location.", ".temp").toFile();
         tempFile.deleteOnExit();
 
-        Artifact artifact = createMock( Artifact.class );
-        
-        expect( artifact.getFile() ).andReturn( tempFile );
-        expect( artifact.getFile() ).andReturn( tempFile );
-        
-        expect( factory.createArtifactWithClassifier( "group", "artifact", "version", "jar", "classifier" ) )
-                .andReturn( artifact );
-
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+        Artifact artifact = createMock(Artifact.class);
+
+        expect(artifact.getFile()).andReturn(tempFile);
+        expect(artifact.getFile()).andReturn(tempFile);
+
+        expect(factory.createArtifactWithClassifier("group", "artifact", "version", "jar", "classifier"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version::classifier", mh );
+        Location location = strategy.resolve("group:artifact:version::classifier", mh);
 
-        assertNotNull( location );
-        assertEquals( 0, mh.size() );
+        assertNotNull(location);
+        assertEquals(0, mh.size());
 
-        assertSame( tempFile, location.getFile() );
+        assertSame(tempFile, location.getFile());
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldResolveSpecWithMoreThanFiveTokens()
-        throws IOException
-    {
-        File tempFile = Files.createTempFile( "artifact-location.", ".temp" ).toFile();
+    public void testShouldResolveSpecWithMoreThanFiveTokens() throws IOException {
+        File tempFile = Files.createTempFile("artifact-location.", ".temp").toFile();
         tempFile.deleteOnExit();
 
-        Artifact artifact = createMock( Artifact.class );
-        
-        expect( artifact.getFile() ).andReturn( tempFile );
-        expect( artifact.getFile() ).andReturn( tempFile );
-        
-        expect( factory.createArtifactWithClassifier( "group", "artifact", "version", "zip", "classifier" ) )
-                .andReturn( artifact );
-
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+        Artifact artifact = createMock(Artifact.class);
+
+        expect(artifact.getFile()).andReturn(tempFile);
+        expect(artifact.getFile()).andReturn(tempFile);
+
+        expect(factory.createArtifactWithClassifier("group", "artifact", "version", "zip", "classifier"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version:zip:classifier:six:seven", mh );
+        Location location = strategy.resolve("group:artifact:version:zip:classifier:six:seven", mh);
 
-        assertNotNull( location );
-        assertEquals( 1, mh.size() );
+        assertNotNull(location);
+        assertEquals(1, mh.size());
 
-        assertTrue( mh.render().indexOf( ":six:seven" ) > -1 );
+        assertTrue(mh.render().indexOf(":six:seven") > -1);
 
-        assertSame( tempFile, location.getFile() );
+        assertSame(tempFile, location.getFile());
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldNotResolveSpecToArtifactWithNullFile()
-        throws IOException
-    {
-        Artifact artifact = createMock( Artifact.class );
-        
-        expect( artifact.getFile() ).andReturn( null );
-        expect( artifact.getId() ).andReturn( "<some-artifact-id>" );
-        
-        expect( factory.createArtifact( "group", "artifact", "version", null, "jar" )).andReturn( artifact );
-
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+    public void testShouldNotResolveSpecToArtifactWithNullFile() throws IOException {
+        Artifact artifact = createMock(Artifact.class);
+
+        expect(artifact.getFile()).andReturn(null);
+        expect(artifact.getId()).andReturn("<some-artifact-id>");
+
+        expect(factory.createArtifact("group", "artifact", "version", null, "jar"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version", mh );
+        Location location = strategy.resolve("group:artifact:version", mh);
 
-        assertNull( location );
-        assertEquals( 1, mh.size() );
+        assertNull(location);
+        assertEquals(1, mh.size());
 
-        assertTrue( mh.render().indexOf( "<some-artifact-id>" ) > -1 );
+        assertTrue(mh.render().indexOf("<some-artifact-id>") > -1);
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldNotResolveWhenArtifactNotFoundExceptionThrown()
-        throws IOException
-    {
-        Artifact artifact = createMock( Artifact.class );
-
-        expect( artifact.getId() ).andReturn( "<some-artifact-id>" );
-
-        expect( factory.createArtifact( "group", "artifact", "version", null, "jar" ) ).andReturn( artifact );
-
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-            expectLastCall().andThrow( new ArtifactNotFoundException( "not found", "group", "artifact", "version",
-                                                                               "jar", null, Collections.<ArtifactRepository>emptyList(),
-                                                                               "http://nowhere.com", Collections.<String>emptyList(),
-                                                                                new NullPointerException() ) );
-        }
-        catch ( ArtifactResolutionException e )
-        {
+    public void testShouldNotResolveWhenArtifactNotFoundExceptionThrown() throws IOException {
+        Artifact artifact = createMock(Artifact.class);
+
+        expect(artifact.getId()).andReturn("<some-artifact-id>");
+
+        expect(factory.createArtifact("group", "artifact", "version", null, "jar"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+            expectLastCall()
+                    .andThrow(new ArtifactNotFoundException(
+                            "not found",
+                            "group",
+                            "artifact",
+                            "version",
+                            "jar",
+                            null,
+                            Collections.<ArtifactRepository>emptyList(),
+                            "http://nowhere.com",
+                            Collections.<String>emptyList(),
+                            new NullPointerException()));
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version", mh );
+        Location location = strategy.resolve("group:artifact:version", mh);
 
-        assertNull( location );
-        assertEquals( 1, mh.size() );
+        assertNull(location);
+        assertEquals(1, mh.size());
 
-        assertTrue( mh.render().indexOf( "<some-artifact-id>" ) > -1 );
-        assertTrue( mh.render().indexOf( "not found" ) > -1 );
+        assertTrue(mh.render().indexOf("<some-artifact-id>") > -1);
+        assertTrue(mh.render().indexOf("not found") > -1);
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
 
-    public void testShouldNotResolveWhenArtifactResolutionExceptionThrown()
-        throws IOException
-    {
-        Artifact artifact = createMock( Artifact.class );
-
-        expect( artifact.getId() ).andReturn( "<some-artifact-id>" );
-
-        expect( factory.createArtifact( "group", "artifact", "version", null, "jar" ) ).andReturn( artifact );
-
-        try
-        {
-            resolver.resolve( artifact, Collections.<ArtifactRepository>emptyList(), localRepository );
-            expectLastCall().andThrow( new ArtifactResolutionException( "resolution failed", "group", "artifact",
-                                                                                 "version", "jar", null, Collections.<ArtifactRepository>emptyList(),
-                                                                                 Collections.<String>emptyList(),
-                                                                                 new NullPointerException() ) );
-
-        }
-        catch ( ArtifactResolutionException e )
-        {
+    public void testShouldNotResolveWhenArtifactResolutionExceptionThrown() throws IOException {
+        Artifact artifact = createMock(Artifact.class);
+
+        expect(artifact.getId()).andReturn("<some-artifact-id>");
+
+        expect(factory.createArtifact("group", "artifact", "version", null, "jar"))
+                .andReturn(artifact);
+
+        try {
+            resolver.resolve(artifact, Collections.<ArtifactRepository>emptyList(), localRepository);
+            expectLastCall()
+                    .andThrow(new ArtifactResolutionException(
+                            "resolution failed",
+                            "group",
+                            "artifact",
+                            "version",
+                            "jar",
+                            null,
+                            Collections.<ArtifactRepository>emptyList(),
+                            Collections.<String>emptyList(),
+                            new NullPointerException()));
+
+        } catch (ArtifactResolutionException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
-        }
-        catch ( ArtifactNotFoundException e )
-        {
+            fail("This should NEVER happen. It's a mock!");
+        } catch (ArtifactNotFoundException e) {
             // should never happen
-            fail( "This should NEVER happen. It's a mock!" );
+            fail("This should NEVER happen. It's a mock!");
         }
 
-        replay( factory, resolver, localRepository, artifact );
+        replay(factory, resolver, localRepository, artifact);
 
-        LocatorStrategy strategy = new ArtifactLocatorStrategy( factory, resolver, localRepository,
-                                                                Collections.EMPTY_LIST );
+        LocatorStrategy strategy =
+                new ArtifactLocatorStrategy(factory, resolver, localRepository, Collections.EMPTY_LIST);
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = strategy.resolve( "group:artifact:version", mh );
+        Location location = strategy.resolve("group:artifact:version", mh);
 
-        assertNull( location );
-        assertEquals( 1, mh.size() );
+        assertNull(location);
+        assertEquals(1, mh.size());
 
-        assertTrue( mh.render().indexOf( "<some-artifact-id>" ) > -1 );
-        assertTrue( mh.render().indexOf( "resolution failed" ) > -1 );
+        assertTrue(mh.render().indexOf("<some-artifact-id>") > -1);
+        assertTrue(mh.render().indexOf("resolution failed") > -1);
 
-        verify( factory, resolver, localRepository, artifact );
+        verify(factory, resolver, localRepository, artifact);
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategyTest.java b/src/test/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategyTest.java
index e4cd734..44781ad 100644
--- a/src/test/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategyTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/ClasspathResourceLocatorStrategyTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -19,41 +37,33 @@ package org.apache.maven.shared.io.location;
  * under the License.
  */
 
+import junit.framework.TestCase;
 import org.apache.maven.shared.io.logging.DefaultMessageHolder;
 import org.apache.maven.shared.io.logging.MessageHolder;
 
-import junit.framework.TestCase;
+public class ClasspathResourceLocatorStrategyTest extends TestCase {
 
-public class ClasspathResourceLocatorStrategyTest
-    extends TestCase
-{
-
-    public void testShouldConstructWithNoParams()
-    {
+    public void testShouldConstructWithNoParams() {
         new ClasspathResourceLocatorStrategy();
     }
 
-    public void testShouldConstructWithTempFileOptions()
-    {
-        new ClasspathResourceLocatorStrategy( "prefix.", ".suffix", true );
+    public void testShouldConstructWithTempFileOptions() {
+        new ClasspathResourceLocatorStrategy("prefix.", ".suffix", true);
     }
 
-    public void testShouldFailToResolveMissingClasspathResource()
-    {
+    public void testShouldFailToResolveMissingClasspathResource() {
         MessageHolder mh = new DefaultMessageHolder();
-        Location location = new ClasspathResourceLocatorStrategy().resolve( "/some/missing/path", mh );
+        Location location = new ClasspathResourceLocatorStrategy().resolve("/some/missing/path", mh);
 
-        assertNull( location );
-        assertEquals( 1, mh.size() );
+        assertNull(location);
+        assertEquals(1, mh.size());
     }
 
-    public void testShouldResolveExistingClasspathResourceWithoutPrecedingSlash()
-    {
+    public void testShouldResolveExistingClasspathResourceWithoutPrecedingSlash() {
         MessageHolder mh = new DefaultMessageHolder();
-        Location location = new ClasspathResourceLocatorStrategy().resolve( "META-INF/maven/test.properties", mh );
+        Location location = new ClasspathResourceLocatorStrategy().resolve("META-INF/maven/test.properties", mh);
 
-        assertNotNull( location );
-        assertEquals( 0, mh.size() );
+        assertNotNull(location);
+        assertEquals(0, mh.size());
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/FileLocationTest.java b/src/test/java/org/apache/maven/shared/io/location/FileLocationTest.java
index 351c794..58f7e84 100644
--- a/src/test/java/org/apache/maven/shared/io/location/FileLocationTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/FileLocationTest.java
@@ -1,7 +1,23 @@
+/*
+ * 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.shared.io.location;
 
-import org.apache.commons.io.FileUtils;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -27,154 +43,139 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 import java.nio.file.Files;
+
 import junit.framework.TestCase;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 
-public class FileLocationTest
-    extends TestCase
-{
+public class FileLocationTest extends TestCase {
 
-    public void testShouldConstructWithFileThenRetrieveSameFile() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldConstructWithFileThenRetrieveSameFile() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
-        FileLocation location = new FileLocation( file, file.getAbsolutePath() );
+        FileLocation location = new FileLocation(file, file.getAbsolutePath());
 
-        assertSame( file, location.getFile() );
-        assertEquals( file.getAbsolutePath(), location.getSpecification() );
+        assertSame(file, location.getFile());
+        assertEquals(file.getAbsolutePath(), location.getSpecification());
     }
 
-    public void testShouldReadFileContentsUsingByteBuffer() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldReadFileContentsUsingByteBuffer() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
         String testStr = "This is a test";
 
         FileUtils.writeStringToFile(file, testStr, "US-ASCII");
 
-        FileLocation location = new FileLocation( file, file.getAbsolutePath() );
+        FileLocation location = new FileLocation(file, file.getAbsolutePath());
 
         location.open();
 
-        ByteBuffer buffer = ByteBuffer.allocate( testStr.length() );
-        location.read( buffer );
+        ByteBuffer buffer = ByteBuffer.allocate(testStr.length());
+        location.read(buffer);
 
-        assertEquals( testStr, new String( buffer.array(), "US-ASCII" ) );
+        assertEquals(testStr, new String(buffer.array(), "US-ASCII"));
     }
 
-    public void testShouldReadFileContentsUsingStream() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldReadFileContentsUsingStream() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
         String testStr = "This is a test";
 
         FileUtils.writeStringToFile(file, testStr, "US-ASCII");
 
-        FileLocation location = new FileLocation( file, file.getAbsolutePath() );
+        FileLocation location = new FileLocation(file, file.getAbsolutePath());
 
         location.open();
 
-        try ( InputStream stream = location.getInputStream() ) {
+        try (InputStream stream = location.getInputStream()) {
             ByteArrayOutputStream out = new ByteArrayOutputStream();
-            IOUtils.copy( stream, out );
-    
-            assertEquals( testStr, new String(out.toByteArray(), "US-ASCII" ) );
+            IOUtils.copy(stream, out);
+
+            assertEquals(testStr, new String(out.toByteArray(), "US-ASCII"));
         }
     }
 
-    public void testShouldReadFileContentsUsingByteArray() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldReadFileContentsUsingByteArray() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
         String testStr = "This is a test";
 
         FileUtils.writeStringToFile(file, testStr, "US-ASCII");
 
-        FileLocation location = new FileLocation( file, file.getAbsolutePath() );
+        FileLocation location = new FileLocation(file, file.getAbsolutePath());
 
         location.open();
 
-        byte[] buffer = new byte[ testStr.length() ];
-        location.read( buffer );
+        byte[] buffer = new byte[testStr.length()];
+        location.read(buffer);
 
-        assertEquals( testStr, new String( buffer, "US-ASCII" ) );
+        assertEquals(testStr, new String(buffer, "US-ASCII"));
     }
 
-    public void testShouldReadThenClose() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldReadThenClose() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
         String testStr = "This is a test";
 
         FileUtils.writeStringToFile(file, testStr, "US-ASCII");
 
-        FileLocation location = new FileLocation( file, file.getAbsolutePath() );
+        FileLocation location = new FileLocation(file, file.getAbsolutePath());
 
         location.open();
 
-        byte[] buffer = new byte[ testStr.length() ];
-        location.read( buffer );
+        byte[] buffer = new byte[testStr.length()];
+        location.read(buffer);
 
-        assertEquals( testStr, new String( buffer, "US-ASCII" ) );
+        assertEquals(testStr, new String(buffer, "US-ASCII"));
 
         location.close();
     }
 
-    public void testShouldOpenThenFailToSetFile() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldOpenThenFailToSetFile() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
-        TestFileLocation location = new TestFileLocation( file.getAbsolutePath() );
+        TestFileLocation location = new TestFileLocation(file.getAbsolutePath());
 
         location.open();
 
-        try
-        {
-            location.setFile( file );
+        try {
+            location.setFile(file);
 
-            fail( "should not succeed." );
-        }
-        catch( IllegalStateException e )
-        {
+            fail("should not succeed.");
+        } catch (IllegalStateException e) {
         }
     }
 
-    public void testShouldConstructWithoutFileThenSetFileThenOpen() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldConstructWithoutFileThenSetFileThenOpen() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
-        TestFileLocation location = new TestFileLocation( file.getAbsolutePath() );
+        TestFileLocation location = new TestFileLocation(file.getAbsolutePath());
 
-        location.setFile( file );
+        location.setFile(file);
         location.open();
     }
 
-    public void testShouldConstructWithLocationThenRetrieveEquivalentFile() throws IOException
-    {
-        File file = Files.createTempFile( "test.", ".file-location" ).toFile();
+    public void testShouldConstructWithLocationThenRetrieveEquivalentFile() throws IOException {
+        File file = Files.createTempFile("test.", ".file-location").toFile();
         file.deleteOnExit();
 
-        Location location = new TestFileLocation( file.getAbsolutePath() );
+        Location location = new TestFileLocation(file.getAbsolutePath());
 
-        assertEquals( file, location.getFile() );
-        assertEquals( file.getAbsolutePath(), location.getSpecification() );
+        assertEquals(file, location.getFile());
+        assertEquals(file.getAbsolutePath(), location.getSpecification());
     }
 
-    private static final class TestFileLocation extends FileLocation
-    {
+    private static final class TestFileLocation extends FileLocation {
 
-        TestFileLocation( String specification )
-        {
-            super( specification );
+        TestFileLocation(String specification) {
+            super(specification);
         }
-
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/FileLocatorStrategyTest.java b/src/test/java/org/apache/maven/shared/io/location/FileLocatorStrategyTest.java
index 0a8fc6e..1411439 100644
--- a/src/test/java/org/apache/maven/shared/io/location/FileLocatorStrategyTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/FileLocatorStrategyTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -23,49 +41,43 @@ import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
 
+import junit.framework.TestCase;
 import org.apache.maven.shared.io.logging.DefaultMessageHolder;
 import org.apache.maven.shared.io.logging.MessageHolder;
 
-import junit.framework.TestCase;
+public class FileLocatorStrategyTest extends TestCase {
 
-public class FileLocatorStrategyTest
-    extends TestCase
-{
-
-    public void testShouldResolveExistingTempFileLocation() throws IOException
-    {
-        File f = Files.createTempFile( "file-locator.", ".test" ).toFile();
+    public void testShouldResolveExistingTempFileLocation() throws IOException {
+        File f = Files.createTempFile("file-locator.", ".test").toFile();
         f.deleteOnExit();
 
         FileLocatorStrategy fls = new FileLocatorStrategy();
 
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = fls.resolve( f.getAbsolutePath(), mh );
+        Location location = fls.resolve(f.getAbsolutePath(), mh);
 
-        assertNotNull( location );
+        assertNotNull(location);
 
-        assertTrue( mh.isEmpty() );
+        assertTrue(mh.isEmpty());
 
-        assertEquals( f, location.getFile() );
+        assertEquals(f, location.getFile());
     }
 
-    public void testShouldFailToResolveNonExistentFileLocation() throws IOException
-    {
-        File f = Files.createTempFile( "file-locator.", ".test" ).toFile();
+    public void testShouldFailToResolveNonExistentFileLocation() throws IOException {
+        File f = Files.createTempFile("file-locator.", ".test").toFile();
         f.delete();
 
         FileLocatorStrategy fls = new FileLocatorStrategy();
 
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = fls.resolve( f.getAbsolutePath(), mh );
+        Location location = fls.resolve(f.getAbsolutePath(), mh);
 
-        assertNull( location );
+        assertNull(location);
 
-        System.out.println( mh.render() );
+        System.out.println(mh.render());
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/LocatorTest.java b/src/test/java/org/apache/maven/shared/io/location/LocatorTest.java
index ab976ec..517f488 100644
--- a/src/test/java/org/apache/maven/shared/io/location/LocatorTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/LocatorTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -23,116 +41,102 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import junit.framework.TestCase;
 import org.apache.maven.shared.io.logging.DefaultMessageHolder;
 import org.apache.maven.shared.io.logging.MessageHolder;
 
-import junit.framework.TestCase;
-
 import static org.easymock.EasyMock.*;
 
-public class LocatorTest
-    extends TestCase
-{
+public class LocatorTest extends TestCase {
 
-    public void testShouldConstructWithNoParams()
-    {
+    public void testShouldConstructWithNoParams() {
         new Locator();
     }
 
-    public void testShouldConstructWithStrategyStackAndMessageHolder()
-    {
-        new Locator( Collections.<LocatorStrategy>emptyList(), new DefaultMessageHolder() );
+    public void testShouldConstructWithStrategyStackAndMessageHolder() {
+        new Locator(Collections.<LocatorStrategy>emptyList(), new DefaultMessageHolder());
     }
 
-    public void testShouldAllowModificationOfStrategiesAfterConstructionWithUnmodifiableStack()
-    {
-        Locator locator = new Locator( Collections.unmodifiableList( Collections.<LocatorStrategy>emptyList() ),
-                                       new DefaultMessageHolder() );
+    public void testShouldAllowModificationOfStrategiesAfterConstructionWithUnmodifiableStack() {
+        Locator locator = new Locator(
+                Collections.unmodifiableList(Collections.<LocatorStrategy>emptyList()), new DefaultMessageHolder());
 
-        locator.addStrategy( new FileLocatorStrategy() );
+        locator.addStrategy(new FileLocatorStrategy());
 
-        assertEquals( 1, locator.getStrategies().size() );
+        assertEquals(1, locator.getStrategies().size());
     }
 
-    public void testShouldRetrieveNonNullMessageHolderWhenConstructedWithoutParams()
-    {
-        assertNotNull( new Locator().getMessageHolder() );
+    public void testShouldRetrieveNonNullMessageHolderWhenConstructedWithoutParams() {
+        assertNotNull(new Locator().getMessageHolder());
     }
 
-    public void testSetStrategiesShouldClearAnyPreExistingStrategiesOut()
-    {
-        LocatorStrategy originalStrategy = createMock( LocatorStrategy.class );
-        LocatorStrategy replacementStrategy = createMock( LocatorStrategy.class );
+    public void testSetStrategiesShouldClearAnyPreExistingStrategiesOut() {
+        LocatorStrategy originalStrategy = createMock(LocatorStrategy.class);
+        LocatorStrategy replacementStrategy = createMock(LocatorStrategy.class);
 
-        replay( originalStrategy, replacementStrategy );
+        replay(originalStrategy, replacementStrategy);
 
         Locator locator = new Locator();
-        locator.addStrategy( originalStrategy );
+        locator.addStrategy(originalStrategy);
 
-        locator.setStrategies( Collections.singletonList( replacementStrategy ) );
+        locator.setStrategies(Collections.singletonList(replacementStrategy));
 
         List<LocatorStrategy> strategies = locator.getStrategies();
 
-        assertFalse( strategies.contains( originalStrategy ) );
-        assertTrue( strategies.contains( replacementStrategy ) );
+        assertFalse(strategies.contains(originalStrategy));
+        assertTrue(strategies.contains(replacementStrategy));
 
-        verify( originalStrategy, replacementStrategy );
+        verify(originalStrategy, replacementStrategy);
     }
 
-    public void testShouldRemovePreviouslyAddedStrategy()
-    {
-        LocatorStrategy originalStrategy = createMock( LocatorStrategy.class );
+    public void testShouldRemovePreviouslyAddedStrategy() {
+        LocatorStrategy originalStrategy = createMock(LocatorStrategy.class);
 
-        replay( originalStrategy );
+        replay(originalStrategy);
 
         Locator locator = new Locator();
-        locator.addStrategy( originalStrategy );
+        locator.addStrategy(originalStrategy);
 
         List<LocatorStrategy> strategies = locator.getStrategies();
 
-        assertTrue( strategies.contains( originalStrategy ) );
+        assertTrue(strategies.contains(originalStrategy));
 
-        locator.removeStrategy( originalStrategy );
+        locator.removeStrategy(originalStrategy);
 
         strategies = locator.getStrategies();
 
-        assertFalse( strategies.contains( originalStrategy ) );
+        assertFalse(strategies.contains(originalStrategy));
 
-        verify( originalStrategy );
+        verify(originalStrategy);
     }
 
-    public void testResolutionFallsThroughStrategyStackAndReturnsNullIfNotResolved()
-    {
+    public void testResolutionFallsThroughStrategyStackAndReturnsNullIfNotResolved() {
         List<LocatorStrategy> strategies = new ArrayList<LocatorStrategy>();
 
-        strategies.add( new LoggingLocatorStrategy() );
-        strategies.add( new LoggingLocatorStrategy() );
-        strategies.add( new LoggingLocatorStrategy() );
+        strategies.add(new LoggingLocatorStrategy());
+        strategies.add(new LoggingLocatorStrategy());
+        strategies.add(new LoggingLocatorStrategy());
 
         MessageHolder mh = new DefaultMessageHolder();
 
-        Locator locator = new Locator( strategies, mh );
+        Locator locator = new Locator(strategies, mh);
 
-        Location location = locator.resolve( "some-specification" );
+        Location location = locator.resolve("some-specification");
 
-        assertNull( location );
+        assertNull(location);
 
-        assertEquals( 3, mh.size() );
+        assertEquals(3, mh.size());
     }
 
-    public static final class LoggingLocatorStrategy implements LocatorStrategy
-    {
+    public static final class LoggingLocatorStrategy implements LocatorStrategy {
 
         static int instanceCounter = 0;
 
         int counter = instanceCounter++;
 
-        public Location resolve( String locationSpecification, MessageHolder messageHolder )
-        {
-            messageHolder.addMessage( "resolve hit on strategy-" + (counter) );
+        public Location resolve(String locationSpecification, MessageHolder messageHolder) {
+            messageHolder.addMessage("resolve hit on strategy-" + (counter));
             return null;
         }
-
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/URLLocationTest.java b/src/test/java/org/apache/maven/shared/io/location/URLLocationTest.java
index dc8bf87..1b0b36b 100644
--- a/src/test/java/org/apache/maven/shared/io/location/URLLocationTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/URLLocationTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -24,40 +42,34 @@ import java.io.IOException;
 import java.net.URL;
 import java.nio.file.Files;
 
-import org.apache.commons.io.FileUtils;
-
 import junit.framework.TestCase;
+import org.apache.commons.io.FileUtils;
 
-public class URLLocationTest
-    extends TestCase
-{
+public class URLLocationTest extends TestCase {
 
-    public void testShouldConstructFromUrlAndTempFileSpecifications() throws IOException
-    {
-        File f = Files.createTempFile( "url-location.", ".test" ).toFile();
+    public void testShouldConstructFromUrlAndTempFileSpecifications() throws IOException {
+        File f = Files.createTempFile("url-location.", ".test").toFile();
         f.deleteOnExit();
 
         URL url = f.toURL();
 
-        new URLLocation( url, f.getAbsolutePath(), "prefix.", ".suffix", true );
+        new URLLocation(url, f.getAbsolutePath(), "prefix.", ".suffix", true);
     }
 
-    public void testShouldTransferFromTempFile() throws IOException
-    {
-        File f = Files.createTempFile( "url-location.", ".test" ).toFile();
+    public void testShouldTransferFromTempFile() throws IOException {
+        File f = Files.createTempFile("url-location.", ".test").toFile();
         f.deleteOnExit();
 
         URL url = f.toURL();
 
-        URLLocation location = new URLLocation( url, f.getAbsolutePath(), "prefix.", ".suffix", true );
+        URLLocation location = new URLLocation(url, f.getAbsolutePath(), "prefix.", ".suffix", true);
 
-        assertNotNull( location.getFile() );
-        assertFalse( f.equals( location.getFile() ) );
+        assertNotNull(location.getFile());
+        assertFalse(f.equals(location.getFile()));
     }
 
-    public void testShouldTransferFromTempFileThenRead() throws IOException
-    {
-        File f = Files.createTempFile( "url-location.", ".test" ).toFile();
+    public void testShouldTransferFromTempFileThenRead() throws IOException {
+        File f = Files.createTempFile("url-location.", ".test").toFile();
         f.deleteOnExit();
 
         String testStr = "This is a test";
@@ -66,17 +78,16 @@ public class URLLocationTest
 
         URL url = f.toURL();
 
-        URLLocation location = new URLLocation( url, f.getAbsolutePath(), "prefix.", ".suffix", true );
+        URLLocation location = new URLLocation(url, f.getAbsolutePath(), "prefix.", ".suffix", true);
 
         location.open();
 
-        byte[] buffer = new byte[ testStr.length() ];
+        byte[] buffer = new byte[testStr.length()];
 
-        int read = location.read( buffer );
+        int read = location.read(buffer);
 
-        assertEquals( testStr.length(), read );
+        assertEquals(testStr.length(), read);
 
-        assertEquals( testStr, new String( buffer, "US-ASCII" ) );
+        assertEquals(testStr, new String(buffer, "US-ASCII"));
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/location/URLLocatorStrategyTest.java b/src/test/java/org/apache/maven/shared/io/location/URLLocatorStrategyTest.java
index 1567a93..e44cc7a 100644
--- a/src/test/java/org/apache/maven/shared/io/location/URLLocatorStrategyTest.java
+++ b/src/test/java/org/apache/maven/shared/io/location/URLLocatorStrategyTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.location;
 
 /*
@@ -24,38 +42,31 @@ import java.io.IOException;
 import java.nio.file.Files;
 
 import junit.framework.TestCase;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.maven.shared.io.logging.DefaultMessageHolder;
 import org.apache.maven.shared.io.logging.MessageHolder;
 
-public class URLLocatorStrategyTest
-    extends TestCase
-{
+public class URLLocatorStrategyTest extends TestCase {
 
-    public void testShouldConstructWithNoParams()
-    {
+    public void testShouldConstructWithNoParams() {
         new URLLocatorStrategy();
     }
 
-    public void testShouldConstructWithTempFileOptions()
-    {
-        new URLLocatorStrategy( "prefix.", ".suffix", true );
+    public void testShouldConstructWithTempFileOptions() {
+        new URLLocatorStrategy("prefix.", ".suffix", true);
     }
 
-    public void testShouldFailToResolveWithMalformedUrl()
-    {
+    public void testShouldFailToResolveWithMalformedUrl() {
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = new URLLocatorStrategy().resolve( "://www.google.com", mh );
+        Location location = new URLLocatorStrategy().resolve("://www.google.com", mh);
 
-        assertNull( location );
-        assertEquals( 1, mh.size() );
+        assertNull(location);
+        assertEquals(1, mh.size());
     }
 
-    public void testShouldResolveUrlForTempFile() throws IOException
-    {
-        File tempFile = Files.createTempFile( "prefix.", ".suffix" ).toFile();
+    public void testShouldResolveUrlForTempFile() throws IOException {
+        File tempFile = Files.createTempFile("prefix.", ".suffix").toFile();
         tempFile.deleteOnExit();
 
         String testStr = "This is a test.";
@@ -64,17 +75,16 @@ public class URLLocatorStrategyTest
 
         MessageHolder mh = new DefaultMessageHolder();
 
-        Location location = new URLLocatorStrategy().resolve( tempFile.toURL().toExternalForm(), mh );
+        Location location = new URLLocatorStrategy().resolve(tempFile.toURL().toExternalForm(), mh);
 
-        assertNotNull( location );
-        assertEquals( 0, mh.size() );
+        assertNotNull(location);
+        assertEquals(0, mh.size());
 
         location.open();
 
         byte[] buffer = new byte[testStr.length()];
-        location.read( buffer );
+        location.read(buffer);
 
-        assertEquals( testStr, new String( buffer, "US-ASCII" ) );
+        assertEquals(testStr, new String(buffer, "US-ASCII"));
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/logging/DefaultMessageHolderTest.java b/src/test/java/org/apache/maven/shared/io/logging/DefaultMessageHolderTest.java
index ea3b805..363457e 100644
--- a/src/test/java/org/apache/maven/shared/io/logging/DefaultMessageHolderTest.java
+++ b/src/test/java/org/apache/maven/shared/io/logging/DefaultMessageHolderTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.logging;
 
 /*
@@ -24,92 +42,86 @@ import java.io.StringWriter;
 
 import junit.framework.TestCase;
 
-public class DefaultMessageHolderTest
-    extends TestCase
-{
+public class DefaultMessageHolderTest extends TestCase {
 
     // MessageHolder newMessage();
     // int size();
     // String render();
-    public void testNewMessageIncrementsSizeWhenEmpty()
-    {
+    public void testNewMessageIncrementsSizeWhenEmpty() {
         MessageHolder mh = new DefaultMessageHolder();
 
-        assertEquals( 0, mh.size() );
+        assertEquals(0, mh.size());
 
         MessageHolder test = mh.newMessage();
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
-        assertEquals( "", mh.render() );
+        assertEquals("", mh.render());
     }
 
     // MessageHolder append( CharSequence messagePart );
     // int size();
     // String render();
-    public void testAppendCreatesNewMessageIfNoneCurrent()
-    {
+    public void testAppendCreatesNewMessageIfNoneCurrent() {
         MessageHolder mh = new DefaultMessageHolder();
 
-        assertEquals( 0, mh.size() );
+        assertEquals(0, mh.size());
 
-        MessageHolder test = mh.append( "test" );
+        MessageHolder test = mh.append("test");
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
-        assertEquals( "[1] [INFO] test", mh.render() );
+        assertEquals("[1] [INFO] test", mh.render());
     }
 
     // MessageHolder append( Throwable error );
     // int size();
     // String render();
-    public void testAppendErrorCreatesNewMessageIfNoneCurrent()
-    {
+    public void testAppendErrorCreatesNewMessageIfNoneCurrent() {
         MessageHolder mh = new DefaultMessageHolder();
 
-        assertEquals( 0, mh.size() );
+        assertEquals(0, mh.size());
 
         NullPointerException npe = new NullPointerException();
 
-        MessageHolder test = mh.append( npe );
+        MessageHolder test = mh.append(npe);
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
         StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter( sw );
+        PrintWriter pw = new PrintWriter(sw);
 
-        npe.printStackTrace( pw );
+        npe.printStackTrace(pw);
 
-        assertEquals( "[1] [INFO] Error:\n" + sw.toString(), mh.render() );
+        assertEquals("[1] [INFO] Error:\n" + sw.toString(), mh.render());
     }
 
     // MessageHolder newMessage();
     // MessageHolder append( CharSequence messagePart );
     // int size();
     // String render();
-    public void testNewMessageThenAppendOnlyIncrementsSizeByOne()
-    {
+    public void testNewMessageThenAppendOnlyIncrementsSizeByOne() {
         MessageHolder mh = new DefaultMessageHolder();
 
-        assertEquals( 0, mh.size() );
+        assertEquals(0, mh.size());
 
         MessageHolder test = mh.newMessage();
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        test = mh.append( "test" );
+        test = mh.append("test");
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
-        assertEquals( "[1] [INFO] test", mh.render() );
+        assertEquals("[1] [INFO] test", mh.render());
     }
 
     // MessageHolder newMessage();
@@ -117,27 +129,26 @@ public class DefaultMessageHolderTest
     // MessageHolder append( CharSequence messagePart );
     // int size();
     // String render();
-    public void testNewMessageThenAppendTwiceOnlyIncrementsSizeByOne()
-    {
+    public void testNewMessageThenAppendTwiceOnlyIncrementsSizeByOne() {
         MessageHolder mh = new DefaultMessageHolder();
 
-        assertEquals( 0, mh.size() );
+        assertEquals(0, mh.size());
 
         MessageHolder test = mh.newMessage();
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        test = mh.append( "test" );
+        test = mh.append("test");
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        test = mh.append( " again" );
+        test = mh.append(" again");
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
-        assertEquals( "[1] [INFO] test again", mh.render() );
+        assertEquals("[1] [INFO] test again", mh.render());
     }
 
     // MessageHolder newMessage();
@@ -145,160 +156,150 @@ public class DefaultMessageHolderTest
     // MessageHolder append( Throwable error );
     // int size();
     // String render();
-    public void testNewMessageThenAppendBothMessageAndErrorOnlyIncrementsSizeByOne()
-    {
+    public void testNewMessageThenAppendBothMessageAndErrorOnlyIncrementsSizeByOne() {
         MessageHolder mh = new DefaultMessageHolder();
 
-        assertEquals( 0, mh.size() );
+        assertEquals(0, mh.size());
 
         MessageHolder test = mh.newMessage();
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        test = mh.append( "test" );
+        test = mh.append("test");
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
         NullPointerException npe = new NullPointerException();
 
-        test = mh.append( npe );
+        test = mh.append(npe);
 
-        assertSame( mh, test );
+        assertSame(mh, test);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
         StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter( sw );
+        PrintWriter pw = new PrintWriter(sw);
 
-        npe.printStackTrace( pw );
+        npe.printStackTrace(pw);
 
-        assertEquals( "[1] [INFO] test\nError:\n" + sw.toString(), mh.render() );
+        assertEquals("[1] [INFO] test\nError:\n" + sw.toString(), mh.render());
     }
 
     // MessageHolder addMessage( CharSequence messagePart );
     // int size();
     // String render();
-    public void testAddMessageIncrementsSizeByOne()
-    {
+    public void testAddMessageIncrementsSizeByOne() {
         MessageHolder mh = new DefaultMessageHolder();
-        MessageHolder check = mh.addMessage( "test" );
+        MessageHolder check = mh.addMessage("test");
 
-        assertSame( mh, check );
+        assertSame(mh, check);
 
-        assertEquals( 1, mh.size() );
-        assertEquals( "[1] [INFO] test", mh.render() );
+        assertEquals(1, mh.size());
+        assertEquals("[1] [INFO] test", mh.render());
     }
 
     // MessageHolder addMessage( CharSequence messagePart );
     // int size();
     // String render();
-    public void testAddMessageTwiceIncrementsSizeByTwo()
-    {
+    public void testAddMessageTwiceIncrementsSizeByTwo() {
         MessageHolder mh = new DefaultMessageHolder();
-        MessageHolder check = mh.addMessage( "test" );
+        MessageHolder check = mh.addMessage("test");
 
-        assertSame( mh, check );
+        assertSame(mh, check);
 
-        check = mh.addMessage( "test2" );
+        check = mh.addMessage("test2");
 
-        assertSame( mh, check );
+        assertSame(mh, check);
 
-        assertEquals( 2, mh.size() );
-        assertEquals( "[1] [INFO] test\n\n[2] [INFO] test2", mh.render() );
+        assertEquals(2, mh.size());
+        assertEquals("[1] [INFO] test\n\n[2] [INFO] test2", mh.render());
     }
 
     // MessageHolder addMessage( CharSequence messagePart, Throwable error );
     // int size();
     // String render();
-    public void testAddMessageWithErrorIncrementsSizeByOne()
-    {
+    public void testAddMessageWithErrorIncrementsSizeByOne() {
         MessageHolder mh = new DefaultMessageHolder();
 
         NullPointerException npe = new NullPointerException();
 
-        MessageHolder check = mh.addMessage( "test", npe );
+        MessageHolder check = mh.addMessage("test", npe);
 
-        assertSame( mh, check );
+        assertSame(mh, check);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
         StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter( sw );
+        PrintWriter pw = new PrintWriter(sw);
 
-        npe.printStackTrace( pw );
+        npe.printStackTrace(pw);
 
-        assertEquals( "[1] [INFO] test\nError:\n" + sw.toString(), mh.render() );
+        assertEquals("[1] [INFO] test\nError:\n" + sw.toString(), mh.render());
     }
 
     // MessageHolder addMessage( CharSequence messagePart, Throwable error );
     // MessageHolder addMessage( CharSequence messagePart );
     // int size();
     // String render();
-    public void testAddMessageWithErrorThenWithJustMessageIncrementsSizeByTwo()
-    {
+    public void testAddMessageWithErrorThenWithJustMessageIncrementsSizeByTwo() {
         MessageHolder mh = new DefaultMessageHolder();
 
         NullPointerException npe = new NullPointerException();
 
-        MessageHolder check = mh.addMessage( "test", npe );
+        MessageHolder check = mh.addMessage("test", npe);
 
-        assertSame( mh, check );
+        assertSame(mh, check);
 
-        check = mh.addMessage( "test2" );
+        check = mh.addMessage("test2");
 
-        assertSame( mh, check );
+        assertSame(mh, check);
 
-        assertEquals( 2, mh.size() );
+        assertEquals(2, mh.size());
 
         StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter( sw );
+        PrintWriter pw = new PrintWriter(sw);
 
-        npe.printStackTrace( pw );
+        npe.printStackTrace(pw);
 
-        assertEquals( "[1] [INFO] test\nError:\n" + sw.toString() + "\n\n[2] [INFO] test2", mh.render() );
+        assertEquals("[1] [INFO] test\nError:\n" + sw.toString() + "\n\n[2] [INFO] test2", mh.render());
     }
 
     // MessageHolder addMessage( Throwable error );
     // int size();
     // String render();
-    public void testAddMessageWithJustErrorIncrementsSizeByOne()
-    {
+    public void testAddMessageWithJustErrorIncrementsSizeByOne() {
         MessageHolder mh = new DefaultMessageHolder();
 
         NullPointerException npe = new NullPointerException();
 
-        MessageHolder check = mh.addMessage( npe );
+        MessageHolder check = mh.addMessage(npe);
 
-        assertSame( mh, check );
+        assertSame(mh, check);
 
-        assertEquals( 1, mh.size() );
+        assertEquals(1, mh.size());
 
         StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter( sw );
+        PrintWriter pw = new PrintWriter(sw);
 
-        npe.printStackTrace( pw );
+        npe.printStackTrace(pw);
 
-        assertEquals( "[1] [INFO] Error:\n" + sw.toString(), mh.render() );
+        assertEquals("[1] [INFO] Error:\n" + sw.toString(), mh.render());
     }
 
     // boolean isEmpty();
-    public void testIsEmptyAfterConstruction()
-    {
-        assertTrue( new DefaultMessageHolder().isEmpty() );
+    public void testIsEmptyAfterConstruction() {
+        assertTrue(new DefaultMessageHolder().isEmpty());
     }
 
     // boolean isEmpty();
-    public void testIsNotEmptyAfterConstructionAndNewMessageCall()
-    {
-        assertFalse( new DefaultMessageHolder().newMessage().isEmpty() );
+    public void testIsNotEmptyAfterConstructionAndNewMessageCall() {
+        assertFalse(new DefaultMessageHolder().newMessage().isEmpty());
     }
 
-    public void testAppendCharSequence()
-    {
+    public void testAppendCharSequence() {
         MessageHolder mh = new DefaultMessageHolder();
-        mh.newMessage().append( new StringBuffer( "This is a test" ) );
+        mh.newMessage().append(new StringBuffer("This is a test"));
 
-        assertTrue( mh.render().indexOf( "This is a test" ) > -1 );
+        assertTrue(mh.render().indexOf("This is a test") > -1);
     }
-
 }
diff --git a/src/test/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScannerTest.java b/src/test/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScannerTest.java
index e7b27d2..096abdc 100644
--- a/src/test/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScannerTest.java
+++ b/src/test/java/org/apache/maven/shared/io/scan/SimpleResourceInclusionScannerTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan;
 
 /*
@@ -19,15 +37,15 @@ package org.apache.maven.shared.io.scan;
  * under the License.
  */
 
-import org.apache.maven.shared.io.scan.mapping.SuffixMapping;
-import org.junit.Test;
-
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.maven.shared.io.scan.mapping.SuffixMapping;
+import org.junit.Test;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -37,24 +55,24 @@ import static org.junit.Assert.assertTrue;
 public class SimpleResourceInclusionScannerTest {
 
     @Test
-    public void testGetIncludedSources() throws IOException, InclusionScanException
-    {
-        File baseDir = new File("target" );
+    public void testGetIncludedSources() throws IOException, InclusionScanException {
+        File baseDir = new File("target");
         baseDir.deleteOnExit();
         baseDir.mkdirs();
-        File f = Files.createTempFile( baseDir.toPath(), "source1.", ".test" ).toFile();
+        File f = Files.createTempFile(baseDir.toPath(), "source1.", ".test").toFile();
 
         Set<String> sourceIncludes = new HashSet<>();
-        sourceIncludes.add( "**/*" + f.getName() );
+        sourceIncludes.add("**/*" + f.getName());
         Set<String> sourceExcludes = new HashSet<>();
-        SimpleResourceInclusionScanner simpleResourceInclusionScanner = new SimpleResourceInclusionScanner( sourceIncludes, sourceExcludes );
+        SimpleResourceInclusionScanner simpleResourceInclusionScanner =
+                new SimpleResourceInclusionScanner(sourceIncludes, sourceExcludes);
         Set<String> targets = new HashSet<>();
-        targets.add( ".class" );
-        simpleResourceInclusionScanner.addSourceMapping(new SuffixMapping( ".java", targets ));
-        Set results = simpleResourceInclusionScanner.getIncludedSources( baseDir, baseDir );
-        assertTrue( results.size() > 0 );
+        targets.add(".class");
+        simpleResourceInclusionScanner.addSourceMapping(new SuffixMapping(".java", targets));
+        Set results = simpleResourceInclusionScanner.getIncludedSources(baseDir, baseDir);
+        assertTrue(results.size() > 0);
         Object file = results.iterator().next();
-        assertTrue( file instanceof File );
-        assertEquals( f.getName(), ( (File) file ).getName() );
+        assertTrue(file instanceof File);
+        assertEquals(f.getName(), ((File) file).getName());
     }
 }
diff --git a/src/test/java/org/apache/maven/shared/io/scan/mapping/SuffixMappingTest.java b/src/test/java/org/apache/maven/shared/io/scan/mapping/SuffixMappingTest.java
index 8eb2315..7a77ae9 100644
--- a/src/test/java/org/apache/maven/shared/io/scan/mapping/SuffixMappingTest.java
+++ b/src/test/java/org/apache/maven/shared/io/scan/mapping/SuffixMappingTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.shared.io.scan.mapping;
 
 /*
@@ -19,9 +37,6 @@ package org.apache.maven.shared.io.scan.mapping;
  * under the License.
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 import java.io.File;
 import java.util.HashSet;
 import java.util.Set;
@@ -29,101 +44,96 @@ import java.util.Set;
 import org.apache.maven.shared.io.scan.InclusionScanException;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 /**
  * @author jdcasey
  */
-public class SuffixMappingTest
-{
+public class SuffixMappingTest {
     @Test
-    public void testShouldReturnSingleClassFileForSingleJavaFile()
-        throws InclusionScanException
-    {
+    public void testShouldReturnSingleClassFileForSingleJavaFile() throws InclusionScanException {
         String base = "path/to/file";
 
-        File basedir = new File( "." );
+        File basedir = new File(".");
 
-        SuffixMapping mapping = new SuffixMapping( ".java", ".class" );
+        SuffixMapping mapping = new SuffixMapping(".java", ".class");
 
-        Set<File> results = mapping.getTargetFiles( basedir, base + ".java" );
+        Set<File> results = mapping.getTargetFiles(basedir, base + ".java");
 
-        assertEquals( "Returned wrong number of target files.", 1, results.size() );
+        assertEquals("Returned wrong number of target files.", 1, results.size());
 
-        assertEquals( "Target file is wrong.", new File( basedir, base + ".class" ), results.iterator().next() );
+        assertEquals(
+                "Target file is wrong.",
+                new File(basedir, base + ".class"),
+                results.iterator().next());
     }
 
     @Test
-    public void testShouldNotReturnClassFileWhenSourceFileHasWrongSuffix()
-        throws InclusionScanException
-    {
+    public void testShouldNotReturnClassFileWhenSourceFileHasWrongSuffix() throws InclusionScanException {
         String base = "path/to/file";
 
-        File basedir = new File( "." );
+        File basedir = new File(".");
 
-        SuffixMapping mapping = new SuffixMapping( ".java", ".class" );
+        SuffixMapping mapping = new SuffixMapping(".java", ".class");
 
-        Set<File> results = mapping.getTargetFiles( basedir, base + ".xml" );
+        Set<File> results = mapping.getTargetFiles(basedir, base + ".xml");
 
-        assertTrue( "Returned wrong number of target files.", results.isEmpty() );
+        assertTrue("Returned wrong number of target files.", results.isEmpty());
     }
 
     @Test
-    public void testShouldReturnOneClassFileAndOneXmlFileForSingleJavaFile()
-        throws InclusionScanException
-    {
+    public void testShouldReturnOneClassFileAndOneXmlFileForSingleJavaFile() throws InclusionScanException {
         String base = "path/to/file";
 
-        File basedir = new File( "." );
+        File basedir = new File(".");
 
         Set<String> targets = new HashSet<String>();
-        targets.add( ".class" );
-        targets.add( ".xml" );
+        targets.add(".class");
+        targets.add(".xml");
 
-        SuffixMapping mapping = new SuffixMapping( ".java", targets );
+        SuffixMapping mapping = new SuffixMapping(".java", targets);
 
-        Set<File> results = mapping.getTargetFiles( basedir, base + ".java" );
+        Set<File> results = mapping.getTargetFiles(basedir, base + ".java");
 
-        assertEquals( "Returned wrong number of target files.", 2, results.size() );
+        assertEquals("Returned wrong number of target files.", 2, results.size());
 
-        assertTrue( "Targets do not contain class target.", results.contains( new File( basedir, base + ".class" ) ) );
+        assertTrue("Targets do not contain class target.", results.contains(new File(basedir, base + ".class")));
 
-        assertTrue( "Targets do not contain class target.", results.contains( new File( basedir, base + ".xml" ) ) );
+        assertTrue("Targets do not contain class target.", results.contains(new File(basedir, base + ".xml")));
     }
 
     @Test
-    public void testShouldReturnNoTargetFilesWhenSourceFileHasWrongSuffix()
-        throws InclusionScanException
-    {
+    public void testShouldReturnNoTargetFilesWhenSourceFileHasWrongSuffix() throws InclusionScanException {
         String base = "path/to/file";
 
-        File basedir = new File( "." );
+        File basedir = new File(".");
 
         Set<String> targets = new HashSet<String>();
-        targets.add( ".class" );
-        targets.add( ".xml" );
+        targets.add(".class");
+        targets.add(".xml");
 
-        SuffixMapping mapping = new SuffixMapping( ".java", targets );
+        SuffixMapping mapping = new SuffixMapping(".java", targets);
 
-        Set<File> results = mapping.getTargetFiles( basedir, base + ".apt" );
+        Set<File> results = mapping.getTargetFiles(basedir, base + ".apt");
 
-        assertTrue( "Returned wrong number of target files.", results.isEmpty() );
+        assertTrue("Returned wrong number of target files.", results.isEmpty());
     }
 
     @Test
-    public void testSingleTargetMapper()
-        throws InclusionScanException
-    {
+    public void testSingleTargetMapper() throws InclusionScanException {
         String base = "path/to/file";
 
-        File basedir = new File( "target/" );
+        File basedir = new File("target/");
 
-        SingleTargetMapping mapping = new SingleTargetMapping( ".cs", "/foo" );
+        SingleTargetMapping mapping = new SingleTargetMapping(".cs", "/foo");
 
-        Set<File> results = mapping.getTargetFiles( basedir, base + ".apt" );
+        Set<File> results = mapping.getTargetFiles(basedir, base + ".apt");
 
-        assertTrue( results.isEmpty() );
+        assertTrue(results.isEmpty());
 
-        results = mapping.getTargetFiles( basedir, base + ".cs" );
+        results = mapping.getTargetFiles(basedir, base + ".cs");
 
-        assertEquals( 1, results.size() );
+        assertEquals(1, results.size());
     }
 }