o Fixed bootstrap to work with Ant 1.8.x

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-2/branches/maven-2.2.x@1001487 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/apache-maven/README.txt b/apache-maven/README.txt
index 349b6a8..a4c432c 100644
--- a/apache-maven/README.txt
+++ b/apache-maven/README.txt
@@ -11,8 +11,6 @@
   Documentation
   -------------
 
-  The documentation available as of the date of this release is included in
-  HTML format in the docs/ directory.
   The most up-to-date documentation can be found at http://maven.apache.org/.
 
   Release Notes
@@ -24,7 +22,7 @@
   -------------------
 
   JDK:
-    1.4 or above (this is to execute Maven - it still allows you to build against 1.3
+    1.5 or above (this is to execute Maven - it still allows you to build against 1.3
     and prior JDK's).
   Memory:
     No minimum requirement.
@@ -42,18 +40,18 @@
   1) Unpack the archive where you would like to store the binaries, eg:
 
     Unix-based Operating Systems (Linux, Solaris and Mac OS X)
-      tar zxvf apache-maven-2.1.x.tar.gz
+      tar zxvf apache-maven-2.2.x.tar.gz
     Windows 2000/XP
-      unzip apache-maven-2.1.x.zip
+      unzip apache-maven-2.2.x.zip
 
-  2) A directory called "apache-maven-2.1.x" will be created.
+  2) A directory called "apache-maven-2.2.x" will be created.
 
   3) Add the bin directory to your PATH, eg:
 
     Unix-based Operating Systems (Linux, Solaris and Mac OS X)
-      export PATH=/usr/local/apache-maven-2.1.x/bin:$PATH
+      export PATH=/usr/local/apache-maven-2.2.x/bin:$PATH
     Windows 2000/XP
-      set PATH="c:\program files\apache-maven-2.1.x\bin";%PATH%
+      set PATH="c:\program files\apache-maven-2.2.x\bin";%PATH%
 
   4) Make sure JAVA_HOME is set to the location of your JDK
 
@@ -70,7 +68,7 @@
   ----------
 
   Home Page:          http://maven.apache.org/
-  Downloads:          http://maven.apache.org/downloads.html
+  Downloads:          http://maven.apache.org/download.html
   Mailing Lists:      http://maven.apache.org/mail-lists.html
   Source Code:        http://svn.apache.org/repos/asf/maven/
   Issue Tracking:     http://jira.codehaus.org/browse/MNG
diff --git a/apache-maven/src/bin/mvnDebug.bat b/apache-maven/src/bin/mvnDebug.bat
index 4c12fd4..8b91c85 100644
--- a/apache-maven/src/bin/mvnDebug.bat
+++ b/apache-maven/src/bin/mvnDebug.bat
@@ -37,7 +37,6 @@
 @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'

 @if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

 

-set MAVEN_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

 @echo Preparing to Execute Maven in Debug Mode

 

 @REM set %HOME% to equivalent of $HOME

@@ -52,6 +51,8 @@
 if "%OS%"=="Windows_NT" @setlocal

 if "%OS%"=="WINNT" @setlocal

 

+set MAVEN_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

+

 @REM ==== START VALIDATION ====

 if not "%JAVA_HOME%" == "" goto OkJHome

 

diff --git a/build.xml b/build.xml
index 53d2ea3..e115316 100644
--- a/build.xml
+++ b/build.xml
@@ -36,8 +36,8 @@
 <project default="all" basedir="." xmlns:artifact="urn:maven-artifact-ant">
 
   <target name="initTaskDefs" unless="taskdefs.inited">
-    <xmlproperty file="pom.xml" prefix="pom.xml" />
-    <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.0.8.jar"/>
+    <xmlproperty file="pom.xml" prefix="xmlPom" />
+    <path id="maven-ant-tasks.classpath" path="maven-ant-tasks-2.1.1.jar"/>
     <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath"/>
     <property name="taskdefs.inited" value="true"/>
   </target>
@@ -67,8 +67,8 @@
 
   <target name="read-poms" depends="initTaskDefs,initLocalRepo" unless="pom.version">
     <copy file="pom.xml" tofile="dependencies.xml"/>
-    <replace file="${basedir}/dependencies.xml" token="&lt;!--start--&gt;" value="&lt;!--"/>
-    <replace file="${basedir}/dependencies.xml" token="&lt;!--end--&gt;" value="--&gt;"/>
+    <replace file="${basedir}/dependencies.xml" token="&lt;!--bootstrap-start-comment--&gt;" value="&lt;!--"/>
+    <replace file="${basedir}/dependencies.xml" token="&lt;!--bootstrap-end-comment--&gt;" value="--&gt;"/>
     <artifact:pom file="${basedir}/dependencies.xml" id="pom">
       <localRepository path="${maven.repo.local}"/>
     </artifact:pom>
@@ -80,15 +80,20 @@
   </target>
 
   <target name="init" depends="isMavenHomeSet,initLocalRepo">
-    <xmlproperty prefix="pom" file="pom.xml"/>
     <basename file="${maven.home}" property="maven.home.basename"/>
     <dirname file="${maven.home}" property="maven.home.dirname"/>
-    <!-- Initialize properties -->
-    <property name="maven.home.basename.expected" value="apache-maven-${pom.project.version}"/>
+    <property name="maven.home.basename.expected" value="apache-maven-${xmlPom.project.version}"/>
     <property name="maven.assembly" location="apache-maven/target/${maven.home.basename.expected}-bin.zip"/>
     <property name="surefire.useFile" value="true"/>
     <echo>maven.home = ${maven.home}</echo>
     <echo>maven.assembly = ${maven.assembly}</echo>
+    <fail message="Expected M2_HOME to end in ${maven.home.basename.expected} but was ${maven.home}">
+      <condition>
+        <not>
+          <equals arg1="${maven.home.basename}" arg2="${maven.home.basename.expected}" />
+        </not>
+      </condition>
+    </fail>
   </target>
 
   <target name="clean-bootstrap" description="cleans up generated bootstrap classes">
@@ -96,15 +101,14 @@
   </target>
 
   <target name="pull" depends="init, read-poms" unless="skip.pull">
-    <property name="verbose" value="false"/>
     <!-- Pull the dependencies that Maven needs to build -->
-    <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset" verbose="${verbose}" useScope="compile">
+    <artifact:dependencies pathId="pom.pathid" filesetId="pom.fileset" useScope="compile">
        <localRepository path="${maven.repo.local}"/>
        <pom refid="pom"/>
     </artifact:dependencies>
 
     <!-- Pull the dependencies for Modello -->
-    <artifact:dependencies pathId="modello.pathid" filesetId="modello.fileset" verbose="${verbose}">
+    <artifact:dependencies pathId="modello.pathid" filesetId="modello.fileset">
        <localRepository path="${maven.repo.local}"/>
        <dependency groupId="org.codehaus.modello" artifactId="modello-maven-plugin" version="1.0"/>
        <dependency groupId="org.codehaus.modello" artifactId="modello-core" version="1.0"/>
@@ -166,14 +170,14 @@
     </path>
 
     <mkdir dir="bootstrap/target/classes"/>
-    <javac destdir="bootstrap/target/classes" encoding="UTF-8" source="1.5" target="1.5" debug="true">
+    <javac destdir="bootstrap/target/classes" encoding="UTF-8" source="1.5" target="1.5" debug="true" includeAntRuntime="false">
       <src refid="sources"/>
       <classpath refid="pom.pathid"/>
     </javac>
 
     <!-- DGF generating a fake pom.properties so Maven thinks it has a version number -->
     <mkdir dir="bootstrap/target/classes/META-INF/maven/org.apache.maven/maven-core"/>
-    <echo message="version=${pom.project.version}"
+    <echo message="version=${xmlPom.project.version}"
           file="bootstrap/target/classes/META-INF/maven/org.apache.maven/maven-core/pom.properties"/>
 
     <path id="maven.classpath">
@@ -238,6 +242,7 @@
         <os family="windows"/>
       </not>
     </condition>
+    <property name="maven.opts.its" value="-Xmx128m -XX:MaxPermSize=128m"/>
   </target>
 
   <target name="its-win32" if="its.win32">
@@ -265,6 +270,7 @@
     <echo>Running integration tests</echo>
     <exec failonerror="true" dir="${java.io.tmpdir}/${itPom.artifactId}-${itPom.version}" executable="cmd">
       <env key="M2_HOME" value="${maven.home}"/>
+      <env key="MAVEN_OPTS" value="${maven.opts.its}"/>
       <arg value="/c"/>
       <arg value="${maven.home}\bin\mvn.bat"/>
       <arg value="-Prun-its"/>
@@ -297,6 +303,7 @@
     <echo>Running integration tests</echo>
     <exec failonerror="true" dir="${java.io.tmpdir}/${itPom.artifactId}-${itPom.version}" executable="${maven.home}/bin/mvn">
       <env key="M2_HOME" value="${maven.home}"/>
+      <env key="MAVEN_OPTS" value="${maven.opts.its}"/>
       <arg value="-Prun-its"/>
       <arg value="-e"/>
       <arg value="-B"/>
@@ -314,8 +321,8 @@
 
   <target name="with-its" depends="all,run-its"/>
 
-  <target name="set-temp-maven-home" depends="read-poms">
-    <property name="maven.home" location="${java.io.tmpdir}/apache-maven-${pom.version}"/>
+  <target name="set-temp-maven-home" depends="initTaskDefs">
+    <property name="maven.home" location="${java.io.tmpdir}/apache-maven-${xmlPom.project.version}"/>
     <echo>Using temporary maven install directory: ${maven.home}</echo>
   </target>
 
diff --git a/maven-ant-tasks-2.0.8.jar b/maven-ant-tasks-2.0.8.jar
deleted file mode 100644
index 8d0abaa..0000000
--- a/maven-ant-tasks-2.0.8.jar
+++ /dev/null
Binary files differ
diff --git a/maven-ant-tasks-2.1.1.jar b/maven-ant-tasks-2.1.1.jar
new file mode 100644
index 0000000..7810a54
--- /dev/null
+++ b/maven-ant-tasks-2.1.1.jar
Binary files differ
diff --git a/maven-artifact-manager/pom.xml b/maven-artifact-manager/pom.xml
index 50f7d6d..57780c0 100644
--- a/maven-artifact-manager/pom.xml
+++ b/maven-artifact-manager/pom.xml
@@ -61,10 +61,6 @@
       <artifactId>wagon-provider-api</artifactId>
     </dependency>
     <dependency>
-      <groupId>backport-util-concurrent</groupId>
-      <artifactId>backport-util-concurrent</artifactId>
-    </dependency>
-    <dependency>
       <groupId>easymock</groupId>
       <artifactId>easymock</artifactId>
       <version>1.2_Java1.3</version>
@@ -72,7 +68,7 @@
     </dependency>
     <dependency>
       <groupId>edu.umd.cs.mtc</groupId>
-      <artifactId>multithreadedtc-jdk14</artifactId>
+      <artifactId>multithreadedtc</artifactId>
       <version>1.01</version>
       <scope>test</scope>
     </dependency>
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
index 73eebd2..742dbec 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
@@ -93,10 +93,22 @@
                 destination.getParentFile().mkdirs();
             }
 
-            getLogger().info( "Installing " + source.getPath() + " to " + destination );
+            boolean copy =
+                !destination.exists() || "pom".equals( artifact.getType() )
+                    || source.lastModified() != destination.lastModified() || source.length() != destination.length();
 
-            FileUtils.copyFileIfModified( source, destination );
-            
+            if ( copy )
+            {
+                getLogger().info( "Installing " + source + " to " + destination );
+
+                FileUtils.copyFile( source, destination );
+                destination.setLastModified( source.lastModified() );
+            }
+            else
+            {
+                getLogger().info( "Skipped re-installing " + source + " to " + destination + ", seems unchanged" );
+            }
+
             // Now, we'll set the artifact's file to the one installed in the local repository,
             // to help avoid duplicate copy operations in the deployment step.
             if ( useArtifactFile )
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
index 6318435..f112bab 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
@@ -46,7 +46,6 @@
 import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.configuration.PlexusConfigurationException;
 import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.context.ContextException;
@@ -86,7 +85,7 @@
     private static final String WAGON_PROVIDER_CONFIGURATION = "wagonProvider";
 
     private static int anonymousMirrorIdSeed = 0;
-    
+
     private PlexusContainer container;
 
     // TODO: proxies, authentication and mirrors are via settings, and should come in via an alternate method - perhaps
@@ -118,7 +117,7 @@
     private RepositoryPermissions defaultRepositoryPermissions;
 
     private String httpUserAgent;
-    
+
     private WagonProviderMapping providerMapping = new DefaultWagonProviderMapping();
 
     // TODO: this leaks the component in the public api - it is never released back to the container
@@ -138,13 +137,13 @@
 
         return wagon;
     }
-    
+
     public Wagon getWagon( String protocol )
         throws UnsupportedProtocolException
     {
         return getWagon( protocol, null );
     }
-    
+
     private Wagon getWagon( String protocol, String repositoryId )
         throws UnsupportedProtocolException
     {
@@ -166,12 +165,12 @@
 
         return wagon;
     }
-    
+
     private String getWagonHint( String protocol, String repositoryId )
     {
         // TODO: Implement a better way to get the hint, via settings.xml or something.
         String impl = null;
-        
+
         if ( repositoryId != null && serverWagonProviderMap.containsKey( repositoryId ) )
         {
             impl = serverWagonProviderMap.get( repositoryId );
@@ -185,7 +184,7 @@
                 getLogger().debug( "Using Wagon implementation " + impl + " from default mapping for protocol " + protocol );
             }
         }
-        
+
         String hint;
         if ( impl != null )
         {
@@ -204,7 +203,7 @@
         {
             hint = protocol;
         }
-        
+
         return hint;
     }
 
@@ -215,7 +214,7 @@
         {
             container = availableWagons.get( hint );
         }
-        
+
         return container;
     }
 
@@ -312,7 +311,7 @@
                 {
                     return getProxy( protocol );
                 }
-            });
+            } );
 
             wagon.put( source, remotePath );
 
@@ -388,13 +387,13 @@
                 // This one we will eat when looking through remote repositories
                 // because we want to cycle through them all before squawking.
 
-                getLogger().info( "Unable to find resource '" + artifact.getId() + "' in repository " +
-                    repository.getId() + " (" + repository.getUrl() + ")" );
+                getLogger().info( "Unable to find resource '" + artifact.getId() + "' in repository "
+                    + repository.getId() + " (" + repository.getUrl() + ")" );
             }
             catch ( TransferFailedException e )
             {
-                getLogger().warn( "Unable to get resource '" + artifact.getId() + "' from repository " +
-                    repository.getId() + " (" + repository.getUrl() + "): " + e.getMessage() );
+                getLogger().warn( "Unable to get resource '" + artifact.getId() + "' from repository "
+                    + repository.getId() + " (" + repository.getUrl() + "): " + e.getMessage() );
             }
         }
 
@@ -490,7 +489,7 @@
         try
         {
             getLogger().debug( "Connecting to repository: \'" + repository.getId() + "\' with url: \'" + repository.getUrl() + "\'." );
-            
+
             wagon.connect( new Repository( repository.getId(), repository.getUrl() ),
                            getAuthenticationInfo( repository.getId() ), new ProxyInfoProvider()
             {
@@ -498,7 +497,7 @@
                 {
                     return getProxy( protocol );
                 }
-            });
+            } );
 
             boolean firstRun = true;
             boolean retry = true;
@@ -694,7 +693,7 @@
                 // TODO: this should be illegal in settings.xml
                 id = repository.getId();
             }
-            
+
             getLogger().debug( "Using mirror: " + mirror.getUrl() + " (id: " + id + ")" );
 
             repository = repositoryFactory.createArtifactRepository( id, mirror.getUrl(),
@@ -780,8 +779,8 @@
             }
             else
             {
-                throw new ChecksumFailedException( "Checksum failed on download: local = '" + actualChecksum +
-                    "'; remote = '" + expectedChecksum + "'" );
+                throw new ChecksumFailedException( "Checksum failed on download: local = '" + actualChecksum
+                    + "'; remote = '" + expectedChecksum + "'" );
             }
         }
         catch ( IOException e )
@@ -807,7 +806,7 @@
                                Wagon wagon, String repositoryId )
     {
         String hint = getWagonHint( protocol, repositoryId );
-        
+
         PlexusContainer container = getWagonContainer( hint );
         try
         {
@@ -822,12 +821,12 @@
     public ProxyInfo getProxy( String protocol )
     {
         ProxyInfo info = (ProxyInfo) proxies.get( protocol );
-        
+
         if ( info != null )
         {
             getLogger().debug( "Using Proxy: " + info.getHost() );
         }
-        
+
         return info;
     }
 
@@ -1047,11 +1046,11 @@
             id = "mirror-" + anonymousMirrorIdSeed++;
             getLogger().warn( "You are using a mirror that doesn't declare an <id/> element. Using \'" + id + "\' instead:\nId: " + id + "\nmirrorOf: " + mirrorOf + "\nurl: " + url + "\n" );
         }
-        
+
         ArtifactRepository mirror = new DefaultArtifactRepository( id, url, null );
 
         //to preserve first wins, don't add repeated mirrors.
-        if (!mirrors.containsKey( mirrorOf ))
+        if ( !mirrors.containsKey( mirrorOf ) )
         {
             mirrors.put( mirrorOf, mirror );
         }
@@ -1099,12 +1098,12 @@
     private void configureWagon( Wagon wagon, String repositoryId, String protocol )
         throws WagonConfigurationException
     {
-        PlexusConfiguration config = (PlexusConfiguration) serverConfigurationMap.get( repositoryId ); 
+        PlexusConfiguration config = (PlexusConfiguration) serverConfigurationMap.get( repositoryId );
         if ( protocol.startsWith( "http" ) || protocol.startsWith( "dav" ) )
         {
             config = updateUserAgentForHttp( wagon, config );
         }
-        
+
         if ( config != null )
         {
             ComponentConfigurator componentConfigurator = null;
@@ -1148,17 +1147,17 @@
         {
             config = new XmlPlexusConfiguration( "configuration" );
         }
-        
+
         if ( httpUserAgent != null )
         {
             try
             {
                 wagon.getClass().getMethod( "setHttpHeaders", new Class[]{ Properties.class } );
-                
+
                 PlexusConfiguration headerConfig = config.getChild( "httpHeaders", true );
                 PlexusConfiguration[] children = headerConfig.getChildren( "property" );
                 boolean found = false;
-                
+
                 getLogger().debug( "Checking for pre-existing User-Agent configuration." );
                 for ( int i = 0; i < children.length; i++ )
                 {
@@ -1169,17 +1168,17 @@
                         break;
                     }
                 }
-                
+
                 if ( !found )
                 {
                     getLogger().debug( "Adding User-Agent configuration." );
                     XmlPlexusConfiguration propertyConfig = new XmlPlexusConfiguration( "property" );
                     headerConfig.addChild( propertyConfig );
-                    
+
                     XmlPlexusConfiguration nameConfig = new XmlPlexusConfiguration( "name" );
                     nameConfig.setValue( "User-Agent" );
                     propertyConfig.addChild( nameConfig );
-                    
+
                     XmlPlexusConfiguration versionConfig = new XmlPlexusConfiguration( "value" );
                     versionConfig.setValue( httpUserAgent );
                     propertyConfig.addChild( versionConfig );
@@ -1200,7 +1199,7 @@
                 // forget it.
             }
         }
-        
+
         return config;
     }
 
@@ -1223,13 +1222,13 @@
                 configuration.removeChild( i );
                 break;
             }
-            
+
             i++;
         }
 
         serverConfigurationMap.put( repositoryId, xmlConf );
     }
-    
+
     public void setDefaultRepositoryPermissions( RepositoryPermissions defaultRepositoryPermissions )
     {
         this.defaultRepositoryPermissions = defaultRepositoryPermissions;
@@ -1272,7 +1271,7 @@
             }
         }
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1280,7 +1279,7 @@
     {
         this.httpUserAgent = userAgent;
     }
-    
+
     /**
      * {@inheritDoc}
      */
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/WagonProviderMapping.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/WagonProviderMapping.java
index 6641e3c..1834bfc 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/WagonProviderMapping.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/WagonProviderMapping.java
@@ -23,9 +23,9 @@
 {
 
     String ROLE = WagonProviderMapping.class.getName();
-    
-    public void setWagonProvider( String protocol, String provider );
-    
-    public String getWagonProvider( String protocol );
+
+    void setWagonProvider( String protocol, String provider );
+
+    String getWagonProvider( String protocol );
 
 }
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
index 22cb0ec..0abe65a 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/DefaultRepositoryMetadataManager.java
@@ -112,8 +112,8 @@
                             }
                             catch ( TransferFailedException e )
                             {
-                                getLogger().warn( metadata + " could not be retrieved from repository: " +
-                                    repository.getId() + " due to an error: " + e.getMessage() );
+                                getLogger().warn( metadata + " could not be retrieved from repository: "
+                                    + repository.getId() + " due to an error: " + e.getMessage() );
                                 getLogger().debug( "Exception", e );
 
                                 getLogger().info( "Repository '" + repository.getId() + "' will be blacklisted" );
@@ -149,8 +149,8 @@
                         }
                         else
                         {
-                            getLogger().debug( "System is offline. Cannot resolve metadata:\n" +
-                                metadata.extendedToString() + "\n\n" );
+                            getLogger().debug( "System is offline. Cannot resolve metadata:\n"
+                                + metadata.extendedToString() + "\n\n" );
                         }
                     }
                 }
@@ -247,8 +247,8 @@
                 }
                 else
                 {
-                    if ( ( m.getVersioning() != null ) && ( m.getVersioning().getSnapshot() != null ) &&
-                        m.getVersioning().getSnapshot().isLocalCopy() )
+                    if ( ( m.getVersioning() != null ) && ( m.getVersioning().getSnapshot() != null )
+                        && m.getVersioning().getSnapshot().isLocalCopy() )
                     {
                         m.getVersioning().getSnapshot().setLocalCopy( false );
                         metadata.setMetadata( m );
@@ -348,8 +348,8 @@
         }
         catch ( TransferFailedException e )
         {
-            throw new RepositoryMetadataResolutionException( metadata + " could not be retrieved from repository: " +
-                remoteRepository.getId() + " due to an error: " + e.getMessage(), e );
+            throw new RepositoryMetadataResolutionException( metadata + " could not be retrieved from repository: "
+                + remoteRepository.getId() + " due to an error: " + e.getMessage(), e );
         }
 
         try
@@ -419,9 +419,9 @@
             }
             catch ( TransferFailedException e )
             {
-                throw new RepositoryMetadataDeploymentException( metadata +
-                    " could not be retrieved from repository: " + deploymentRepository.getId() + " due to an error: " +
-                    e.getMessage(), e );
+                throw new RepositoryMetadataDeploymentException( metadata
+                    + " could not be retrieved from repository: " + deploymentRepository.getId() + " due to an error: "
+                    + e.getMessage(), e );
             }
         }
         else
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
index eaddbf3..5af0e53 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
@@ -40,7 +40,7 @@
     private String indent = "";
 
     private static Set ignoredArtifacts = new HashSet();
-    
+
     public DebugResolutionListener( Logger logger )
     {
         this.logger = logger;
@@ -83,15 +83,15 @@
 
     public void updateScopeCurrentPom( Artifact artifact, String ignoredScope )
     {
-        logger.debug( indent + artifact + " (not setting scope to: " + ignoredScope + "; local scope " + artifact.getScope() +
-            " wins)" );
+        logger.debug( indent + artifact + " (not setting scope to: " + ignoredScope + "; local scope "
+                      + artifact.getScope() + " wins)" );
 
         // TODO: better way than static? this might hide messages in a reactor
         if ( !ignoredArtifacts.contains( artifact ) )
         {
-            logger.warn( "\n\tArtifact " + artifact + " retains local scope '" + artifact.getScope() +
-                "' overriding broader scope '" + ignoredScope + "'\n" +
-                "\tgiven by a dependency. If this is not intended, modify or remove the local scope.\n" );
+            logger.warn( "\n\tArtifact " + artifact + " retains local scope '" + artifact.getScope()
+                + "' overriding broader scope '" + ignoredScope + "'\n"
+                + "\tgiven by a dependency. If this is not intended, modify or remove the local scope.\n" );
             ignoredArtifacts.add( artifact );
         }
     }
@@ -103,14 +103,14 @@
 
     public void selectVersionFromRange( Artifact artifact )
     {
-        logger.debug( indent + artifact + " (setting version to: " + artifact.getVersion() + " from range: " +
-            artifact.getVersionRange() + ")" );
+        logger.debug( indent + artifact + " (setting version to: " + artifact.getVersion() + " from range: "
+            + artifact.getVersionRange() + ")" );
     }
 
     public void restrictRange( Artifact artifact, Artifact replacement, VersionRange newRange )
     {
-        logger.debug( indent + artifact + " (range restricted from: " + artifact.getVersionRange() + " and: " +
-            replacement.getVersionRange() + " to: " + newRange + " )" );
+        logger.debug( indent + artifact + " (range restricted from: " + artifact.getVersionRange() + " and: "
+            + replacement.getVersionRange() + " to: " + newRange + " )" );
     }
 
     /**
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index d8c3629..e582842 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -29,6 +29,10 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -48,11 +52,6 @@
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.FileUtils;
 
-import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
-import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
-import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
-import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
-
 public class DefaultArtifactResolver
     extends AbstractLogEnabled
     implements ArtifactResolver
@@ -75,28 +74,28 @@
     public DefaultArtifactResolver()
     {
         super();
-        resolveArtifactPool = 
+        resolveArtifactPool =
             new ThreadPoolExecutor( DEFAULT_POOL_SIZE, DEFAULT_POOL_SIZE, 3, TimeUnit.SECONDS,
-                                    new LinkedBlockingQueue() );
+                                    new LinkedBlockingQueue<Runnable>() );
     }
 
     // ----------------------------------------------------------------------
     // Implementation
     // ----------------------------------------------------------------------
 
-    public void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
+    public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         resolve( artifact, remoteRepositories, localRepository, false );
     }
 
-    public void resolveAlways( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
+    public void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         resolve( artifact, remoteRepositories, localRepository, true );
     }
 
-    private void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository,
+    private void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository,
                           boolean force )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
@@ -172,13 +171,13 @@
             List repositories = remoteRepositories;
 
             // TODO: would prefer the snapshot transformation took care of this. Maybe we need a "shouldresolve" flag.
-            if ( artifact.isSnapshot() && artifact.getBaseVersion().equals( artifact.getVersion() ) &&
-                destination.exists() && !localCopy && wagonManager.isOnline() )
+            if ( artifact.isSnapshot() && artifact.getBaseVersion().equals( artifact.getVersion() )
+                && destination.exists() && !localCopy && wagonManager.isOnline() )
             {
                 Date comparisonDate = new Date( destination.lastModified() );
 
                 // cull to list of repositories that would like an update
-                repositories = new ArrayList( remoteRepositories );
+                repositories = new ArrayList<ArtifactRepository>( remoteRepositories );
                 for ( Iterator i = repositories.iterator(); i.hasNext(); )
                 {
                     ArtifactRepository repository = (ArtifactRepository) i.next();
@@ -354,7 +353,7 @@
         {
             throw (ArtifactResolutionException) resolutionExceptions.get( 0 );
         }
-        
+
         if ( missingArtifacts.size() > 0 )
         {
             throw new MultipleArtifactsNotFoundException( originatingArtifact, resolvedArtifacts, missingArtifacts,
@@ -436,7 +435,7 @@
             {
                 resolutionExceptions.add( e );
             }
-            finally 
+            finally
             {
                 latch.countDown();
 
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/WarningResolutionListener.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/WarningResolutionListener.java
index 916a456..73ad551 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/WarningResolutionListener.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/resolver/WarningResolutionListener.java
@@ -23,9 +23,6 @@
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.codehaus.plexus.logging.Logger;
 
-import java.util.HashSet;
-import java.util.Set;
-
 /**
  * Send resolution warning events to the warning log.
  *
diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/DefaultArtifactTransformationManager.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/DefaultArtifactTransformationManager.java
index ccd5e48..8ae40cf 100644
--- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/DefaultArtifactTransformationManager.java
+++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/transform/DefaultArtifactTransformationManager.java
@@ -34,19 +34,22 @@
     implements ArtifactTransformationManager, Initializable
 {
     private List<ArtifactTransformation> artifactTransformations;
-    
-	public void initialize() throws InitializationException {
-		// TODO this is a hack until plexus can fix the ordering of the arrays
-		ArtifactTransformation transforms[] = artifactTransformations.toArray( new ArtifactTransformation[]{} );
-		for (int x = 0; x < transforms.length; x++)
-		{
-			if (transforms[x].getClass().getName().indexOf("Snapshot") != -1) {
-				artifactTransformations.remove(transforms[x]);
-				artifactTransformations.add(transforms[x]);
-			}
-		}
-	}
-    
+
+    public void initialize()
+        throws InitializationException
+    {
+        // TODO this is a hack until plexus can fix the ordering of the arrays
+        ArtifactTransformation transforms[] = artifactTransformations.toArray( new ArtifactTransformation[] {} );
+        for ( int x = 0; x < transforms.length; x++ )
+        {
+            if ( transforms[x].getClass().getName().indexOf( "Snapshot" ) != -1 )
+            {
+                artifactTransformations.remove( transforms[x] );
+                artifactTransformations.add( transforms[x] );
+            }
+        }
+    }
+
     public void transformForResolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
diff --git a/maven-artifact-manager/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java b/maven-artifact-manager/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
index 1571c36..9e738d9 100644
--- a/maven-artifact-manager/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
+++ b/maven-artifact-manager/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
@@ -228,7 +228,7 @@
 
         Writer writer = new FileWriter( artifactFile );
 
-        if( content == null )
+        if ( content == null )
         {
             writer.write( artifact.getId() );
         }
@@ -238,9 +238,9 @@
         }
 
         writer.close();
-        
+
         artifactFile = new File( repository.getBasedir(), path );
-        
+
         artifact.setFile( artifactFile );
     }
 
diff --git a/maven-artifact-manager/src/test/java/org/apache/maven/artifact/manager/StringWagon.java b/maven-artifact-manager/src/test/java/org/apache/maven/artifact/manager/StringWagon.java
index 316b922..1556c0c 100644
--- a/maven-artifact-manager/src/test/java/org/apache/maven/artifact/manager/StringWagon.java
+++ b/maven-artifact-manager/src/test/java/org/apache/maven/artifact/manager/StringWagon.java
@@ -19,8 +19,6 @@
  * under the License.
  */
 
-import java.io.File;
-import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -33,7 +31,6 @@
 import org.apache.maven.wagon.authentication.AuthenticationException;
 import org.apache.maven.wagon.authorization.AuthorizationException;
 import org.apache.maven.wagon.resource.Resource;
-import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringInputStream;
 import org.codehaus.plexus.util.StringOutputStream;
 
@@ -41,7 +38,7 @@
     extends StreamWagon
 {
     private Map expectedContent = new HashMap();
-    
+
     public void addExpectedContent( String resourceName, String expectedContent )
     {
         this.expectedContent.put( resourceName, expectedContent );
@@ -63,7 +60,7 @@
         Resource resource = inputData.getResource();
 
         String content = (String) expectedContent.get( resource.getName() );
-        
+
         if ( content != null )
         {
             resource.setContentLength( content.length() );
@@ -90,6 +87,6 @@
 
     public void clearExpectedContent()
     {
-        expectedContent.clear();        
+        expectedContent.clear();
     }
 }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java b/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java
index bb60ca1..e0c7a3e 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java
@@ -38,9 +38,9 @@
 
     public static boolean isSnapshot( String version )
     {
-        return version != null &&
-            ( version.toUpperCase().endsWith( Artifact.SNAPSHOT_VERSION ) || Artifact.VERSION_FILE_PATTERN.matcher( version )
-                .matches() );
+        return version != null
+            && ( version.toUpperCase().endsWith( Artifact.SNAPSHOT_VERSION )
+                            || Artifact.VERSION_FILE_PATTERN.matcher( version ).matches() );
     }
 
     public static String toSnapshotVersion( String version )
@@ -82,8 +82,8 @@
     public static String artifactId( String groupId, String artifactId, String type, String classifier,
                                      String baseVersion )
     {
-        return groupId + ":" + artifactId + ":" + type + ( classifier != null ? ":" + classifier : "" ) + ":" +
-            baseVersion;
+        return groupId + ":" + artifactId + ":" + type + ( classifier != null ? ":" + classifier : "" ) + ":"
+            + baseVersion;
     }
 
     public static Map artifactMapByVersionlessId( Collection artifacts )
@@ -140,21 +140,21 @@
 
         return clone;
     }
-    
+
     private static List copyList( List original )
     {
         List copy = null;
-        
+
         if ( original != null )
         {
             copy = new ArrayList();
-            
+
             if ( !original.isEmpty() )
             {
                 copy.addAll( original );
             }
         }
-        
+
         return copy;
     }
 
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
index 3a8df0e..28c14fa 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
@@ -561,7 +561,7 @@
     {
         if ( getBaseVersion() != null )
         {
-            return getBaseVersion().endsWith( SNAPSHOT_VERSION ) || getBaseVersion().equals( LATEST_VERSION );
+            return ArtifactUtils.isSnapshot( getBaseVersion() );
         }
         else
         {
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java b/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java
index 558296c..bfc0827 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/AbstractArtifactMetadata.java
@@ -51,16 +51,16 @@
     {
         return artifact.getArtifactId();
     }
-    
+
     public String extendedToString()
     {
         StringBuffer buffer = new StringBuffer();
-        
+
         buffer.append( "\nArtifact Metadata\n--------------------------" );
         buffer.append( "\nGroupId: " ).append( getGroupId() );
         buffer.append( "\nArtifactId: " ).append( getArtifactId() );
-        buffer.append( "\nMetadata Type: " ).append(getClass().getName() );
-        
+        buffer.append( "\nMetadata Type: " ).append( getClass().getName() );
+
         return buffer.toString();
     }
 }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java b/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
index 3d8dd3d..2482308 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/metadata/ArtifactMetadataSource.java
@@ -21,7 +21,6 @@
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.versioning.ArtifactVersion;
 
 import java.util.List;
 
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataReadException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataReadException.java
index 41b3044..1e5379c 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataReadException.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/RepositoryMetadataReadException.java
@@ -1,4 +1,6 @@
-package org.apache.maven.artifact.repository.metadata;/*
+package org.apache.maven.artifact.repository.metadata;
+
+/*
  * 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
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
index abf1c48..49ca901 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
@@ -90,7 +90,7 @@
                                                    Throwable t )
     {
         this( message, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(),
-              artifact.getClassifier(),remoteRepositories, artifact.getDependencyTrail(), t );
+              artifact.getClassifier(), remoteRepositories, artifact.getDependencyTrail(), t );
         this.artifact = artifact;
     }
 
@@ -246,7 +246,7 @@
             sb.append( version );
 
             //insert classifier only if it was used in the artifact
-            if (classifier !=null && !classifier.equals( "" ))
+            if ( classifier != null && !classifier.equals( "" ) )
             {
                 sb.append( " -Dclassifier=" );
                 sb.append( classifier );
@@ -271,7 +271,7 @@
             sb.append( version );
 
             //insert classifier only if it was used in the artifact
-            if (classifier !=null && !classifier.equals( "" ))
+            if ( classifier != null && !classifier.equals( "" ) )
             {
                 sb.append( " -Dclassifier=" );
                 sb.append( classifier );
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java
index 180d374..0b1ef9b 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactCollector.java
@@ -37,13 +37,15 @@
  */
 public interface ArtifactCollector
 {
-    ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, ArtifactRepository localRepository,
-                                      List remoteRepositories, ArtifactMetadataSource source, ArtifactFilter filter,
-                                      List listeners )
+    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                      ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
+                                      ArtifactMetadataSource source, ArtifactFilter filter,
+                                      List<ResolutionListener> listeners )
         throws ArtifactResolutionException;
 
-    ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, Map managedVersions,
-                                      ArtifactRepository localRepository, List remoteRepositories,
-                                      ArtifactMetadataSource source, ArtifactFilter filter, List listeners )
+    ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact, Map managedVersions,
+                                      ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
+                                      ArtifactMetadataSource source, ArtifactFilter filter,
+                                      List<ResolutionListener> listeners )
         throws ArtifactResolutionException;
 }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java
index 0d521c2..c92c36f 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactNotFoundException.java
@@ -31,12 +31,12 @@
     extends AbstractArtifactResolutionException
 {
     private String downloadUrl;
-    
+
     protected ArtifactNotFoundException( String message, Artifact artifact, List remoteRepositories )
     {
         super( message, artifact, remoteRepositories );
     }
-    
+
     public ArtifactNotFoundException( String message, Artifact artifact )
     {
         this( message, artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType(),
@@ -52,7 +52,7 @@
     public ArtifactNotFoundException( String message, String groupId, String artifactId, String version, String type, String classifier,
                                       List remoteRepositories, String downloadUrl, List path, Throwable t )
     {
-        super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier,downloadUrl, path ), groupId, artifactId,
+        super( constructMissingArtifactMessage( message, "", groupId, artifactId, version, type, classifier, downloadUrl, path ), groupId, artifactId,
                version, type, classifier, remoteRepositories, null, t );
 
         this.downloadUrl = downloadUrl;
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java
index 7bc298d..93af9d2 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionException.java
@@ -39,7 +39,7 @@
     public ArtifactResolutionException( String message, String groupId, String artifactId, String version, String type,
                                         String classifier, Throwable t )
     {
-        super( message, groupId, artifactId, version, type, classifier,null, null, t );
+        super( message, groupId, artifactId, version, type, classifier, null, null, t );
     }
 
     public ArtifactResolutionException( String message, Artifact artifact )
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
index b82f0ee..e1025f3 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
@@ -19,56 +19,56 @@
  * under the License.
  */
 
-import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.apache.maven.artifact.Artifact;
+
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
  */
 public class ArtifactResolutionResult
 {
-    private Set resolutionNodes;
+    private Set<ResolutionNode> resolutionNodes;
 
     // calculated.
-    private Set artifacts;
-    
+    private Set<Artifact> artifacts;
+
     public ArtifactResolutionResult()
     {
     }
 
-    public Set getArtifacts()
+    public Set<Artifact> getArtifacts()
     {
         if ( artifacts == null )
         {
-            artifacts = new LinkedHashSet();
-            
-            for ( Iterator it = resolutionNodes.iterator(); it.hasNext(); )
+            artifacts = new LinkedHashSet<Artifact>();
+
+            for ( ResolutionNode node : resolutionNodes )
             {
-                ResolutionNode node = (ResolutionNode) it.next();
                 artifacts.add( node.getArtifact() );
             }
         }
-        
+
         return artifacts;
     }
-    
-    public Set getArtifactResolutionNodes()
+
+    public Set<ResolutionNode> getArtifactResolutionNodes()
     {
         return resolutionNodes;
     }
 
-    public void setArtifactResolutionNodes( Set resolutionNodes )
+    public void setArtifactResolutionNodes( Set<ResolutionNode> resolutionNodes )
     {
         this.resolutionNodes = resolutionNodes;
-        
+
         // clear the cache
         this.artifacts = null;
     }
-    
+
     public String toString()
     {
-        return "Artifacts: "+this.artifacts+" Nodes: "+ this.resolutionNodes;
+        return "Artifacts: " + this.artifacts + " Nodes: " + this.resolutionNodes;
     }
 }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
index 1d9978b..cdf73ad 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolver.java
@@ -29,9 +29,9 @@
 import java.util.Set;
 
 /**
- * I want to use it for hidding the fact that sometime artifact must be
+ * I want to use it for hiding the fact that sometime artifact must be
  * downloaded. I am just asking LocalRepository for given artifact and I don't
- * care if it is alredy there or how it will get there.
+ * care if it is already there or how it will get there.
  *
  * @author <a href="michal.maczka@dimatics.com">Michal Maczka </a>
  * @version $Id$
@@ -41,58 +41,58 @@
 {
     String ROLE = ArtifactResolver.class.getName();
 
-    void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
+    void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    ArtifactResolutionResult resolveTransitively( Set artifacts,
+    ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
-                                                  List remoteRepositories,
+                                                  List<ArtifactRepository> remoteRepositories,
                                                   ArtifactRepository localRepository,
                                                   ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    ArtifactResolutionResult resolveTransitively( Set artifacts,
+    ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
-                                                  List remoteRepositories,
+                                                  List<ArtifactRepository> remoteRepositories,
                                                   ArtifactRepository localRepository,
                                                   ArtifactMetadataSource source,
                                                   List listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    ArtifactResolutionResult resolveTransitively( Set artifacts,
+    ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   ArtifactRepository localRepository,
-                                                  List remoteRepositories,
+                                                  List<ArtifactRepository> remoteRepositories,
                                                   ArtifactMetadataSource source,
                                                   ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    ArtifactResolutionResult resolveTransitively( Set artifacts,
+    ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   Map managedVersions,
                                                   ArtifactRepository localRepository,
-                                                  List remoteRepositories,
+                                                  List<ArtifactRepository> remoteRepositories,
                                                   ArtifactMetadataSource source )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    ArtifactResolutionResult resolveTransitively( Set artifacts,
+    ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   Map managedVersions,
                                                   ArtifactRepository localRepository,
-                                                  List remoteRepositories,
+                                                  List<ArtifactRepository> remoteRepositories,
                                                   ArtifactMetadataSource source, ArtifactFilter filter )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    ArtifactResolutionResult resolveTransitively( Set artifacts,
+    ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts,
                                                   Artifact originatingArtifact,
                                                   Map managedVersions,
                                                   ArtifactRepository localRepository,
-                                                  List remoteRepositories,
+                                                  List<ArtifactRepository> remoteRepositories,
                                                   ArtifactMetadataSource source,
                                                   ArtifactFilter filter,
                                                   List listeners )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
-    void resolveAlways( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
+    void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 }
\ No newline at end of file
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java
index 24f42e5..d66c177 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java
@@ -49,21 +49,25 @@
 public class DefaultArtifactCollector
     implements ArtifactCollector
 {
-    public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact,
-                                             ArtifactRepository localRepository, List remoteRepositories,
-                                             ArtifactMetadataSource source, ArtifactFilter filter, List listeners )
+    public ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                             ArtifactRepository localRepository,
+                                             List<ArtifactRepository> remoteRepositories,
+                                             ArtifactMetadataSource source, ArtifactFilter filter,
+                                             List<ResolutionListener> listeners )
         throws ArtifactResolutionException
     {
         return collect( artifacts, originatingArtifact, Collections.EMPTY_MAP, localRepository, remoteRepositories,
                         source, filter, listeners );
     }
 
-    public ArtifactResolutionResult collect( Set artifacts, Artifact originatingArtifact, Map managedVersions,
-                                             ArtifactRepository localRepository, List remoteRepositories,
-                                             ArtifactMetadataSource source, ArtifactFilter filter, List listeners )
+    public ArtifactResolutionResult collect( Set<Artifact> artifacts, Artifact originatingArtifact,
+                                             Map managedVersions, ArtifactRepository localRepository,
+                                             List<ArtifactRepository> remoteRepositories,
+                                             ArtifactMetadataSource source, ArtifactFilter filter,
+                                             List<ResolutionListener> listeners )
         throws ArtifactResolutionException
     {
-        Map resolvedArtifacts = new LinkedHashMap();
+        Map<Object, List<ResolutionNode>> resolvedArtifacts = new LinkedHashMap<Object, List<ResolutionNode>>();
 
         ResolutionNode root = new ResolutionNode( originatingArtifact, remoteRepositories );
 
@@ -71,17 +75,15 @@
 
         ManagedVersionMap versionMap = getManagedVersionsMap( originatingArtifact, managedVersions );
 
-        recurse( originatingArtifact, root, resolvedArtifacts, versionMap, localRepository, remoteRepositories, source, filter,
-                 listeners );
+        recurse( originatingArtifact, root, resolvedArtifacts, versionMap, localRepository, remoteRepositories, source,
+                 filter, listeners );
 
-        Set set = new LinkedHashSet();
+        Set<ResolutionNode> set = new LinkedHashSet<ResolutionNode>();
 
-        for ( Iterator i = resolvedArtifacts.values().iterator(); i.hasNext(); )
+        for ( List<ResolutionNode> nodes : resolvedArtifacts.values() )
         {
-            List nodes = (List) i.next();
-            for ( Iterator j = nodes.iterator(); j.hasNext(); )
+            for ( ResolutionNode node : nodes )
             {
-                ResolutionNode node = (ResolutionNode) j.next();
                 if ( !node.equals( root ) && node.isActive() )
                 {
                     Artifact artifact = node.getArtifact();
@@ -140,9 +142,10 @@
         return versionMap;
     }
 
-    private void recurse( Artifact originatingArtifact, ResolutionNode node, Map resolvedArtifacts, ManagedVersionMap managedVersions,
-                          ArtifactRepository localRepository, List remoteRepositories, ArtifactMetadataSource source,
-                          ArtifactFilter filter, List listeners )
+    private void recurse( Artifact originatingArtifact, ResolutionNode node,
+                          Map<Object, List<ResolutionNode>> resolvedArtifacts, ManagedVersionMap managedVersions,
+                          ArtifactRepository localRepository, List<ArtifactRepository> remoteRepositories,
+                          ArtifactMetadataSource source, ArtifactFilter filter, List<ResolutionListener> listeners )
         throws CyclicDependencyException, ArtifactResolutionException, OverConstrainedVersionException
     {
         fireEvent( ResolutionListener.TEST_ARTIFACT, listeners, node );
@@ -151,18 +154,16 @@
 
         // TODO: Does this check need to happen here?  Had to add the same call
         // below when we iterate on child nodes -- will that suffice?
-        if ( managedVersions.containsKey( key ))
+        if ( managedVersions.containsKey( key ) )
         {
             manageArtifact( node, managedVersions, listeners );
         }
 
-        List previousNodes = (List) resolvedArtifacts.get( key );
+        List<ResolutionNode> previousNodes = resolvedArtifacts.get( key );
         if ( previousNodes != null )
         {
-            for ( Iterator i = previousNodes.iterator(); i.hasNext(); )
+            for ( ResolutionNode previous : previousNodes )
             {
-                ResolutionNode previous = (ResolutionNode) i.next();
-
                 if ( previous.isActive() )
                 {
                     // Version mediation
@@ -198,7 +199,7 @@
                             {
 
                                 // go find the version. This is a total hack. See previous comment.
-                                List versions = resetArtifact.getAvailableVersions();
+                                List<ArtifactVersion> versions = resetArtifact.getAvailableVersions();
                                 if ( versions == null )
                                 {
                                     try
@@ -211,23 +212,24 @@
                                     catch ( ArtifactMetadataRetrievalException e )
                                     {
                                         resetArtifact.setDependencyTrail( node.getDependencyTrail() );
-                                        throw new ArtifactResolutionException(
-                                                                               "Unable to get dependency information: " +
-                                                                                   e.getMessage(), resetArtifact,
-                                                                               remoteRepositories, e );
+                                        throw new ArtifactResolutionException( "Unable to get dependency information: "
+                                            + e.getMessage(), resetArtifact, remoteRepositories, e );
                                     }
                                 }
                                 //end hack
 
                                 //MNG-2861: match version can return null
-                                ArtifactVersion selectedVersion = resetArtifact.getVersionRange().matchVersion( resetArtifact.getAvailableVersions() );
-                                if (selectedVersion != null)
+                                ArtifactVersion selectedVersion =
+                                    resetArtifact.getVersionRange().matchVersion( resetArtifact.getAvailableVersions() );
+                                if ( selectedVersion != null )
                                 {
-                                  resetArtifact.selectVersion( selectedVersion.toString() );
+                                    resetArtifact.selectVersion( selectedVersion.toString() );
                                 }
                                 else
                                 {
-                                  throw new OverConstrainedVersionException(" Unable to find a version in "+ resetArtifact.getAvailableVersions()+" to match the range "+ resetArtifact.getVersionRange(), resetArtifact);
+                                    throw new OverConstrainedVersionException( " Unable to find a version in "
+                                        + resetArtifact.getAvailableVersions() + " to match the range "
+                                        + resetArtifact.getVersionRange(), resetArtifact );
                                 }
 
                                 fireEvent( ResolutionListener.SELECT_VERSION_FROM_RANGE, listeners, resetNodes[j] );
@@ -270,7 +272,7 @@
         }
         else
         {
-            previousNodes = new ArrayList();
+            previousNodes = new ArrayList<ResolutionNode>();
             resolvedArtifacts.put( key, previousNodes );
         }
         previousNodes.add( node );
@@ -286,18 +288,18 @@
             fireEvent( ResolutionListener.PROCESS_CHILDREN, listeners, node );
 
             Artifact parentArtifact = node.getArtifact();
-            
-            for ( Iterator i = node.getChildrenIterator(); i.hasNext(); )
+
+            for ( Iterator<ResolutionNode> i = node.getChildrenIterator(); i.hasNext(); )
             {
-                ResolutionNode child = (ResolutionNode) i.next();
+                ResolutionNode child = i.next();
 
                 // We leave in optional ones, but don't pick up its dependencies
                 if ( !child.isResolved() && ( !child.getArtifact().isOptional() || child.isChildOfRootNode() ) )
                 {
                     Artifact artifact = child.getArtifact();
                     artifact.setDependencyTrail( node.getDependencyTrail() );
-                    
-                    List childRemoteRepositories = child.getRemoteRepositories();
+
+                    List<ArtifactRepository> childRemoteRepositories = child.getRemoteRepositories();
                     try
                     {
                         Object childKey;
@@ -348,7 +350,7 @@
                                 else
                                 {
                                     //go find the version
-                                    List versions = artifact.getAvailableVersions();
+                                    List<ArtifactVersion> versions = artifact.getAvailableVersions();
                                     if ( versions == null )
                                     {
                                         versions = source.retrieveAvailableVersions( artifact, localRepository,
@@ -367,12 +369,12 @@
                                         if ( versions.isEmpty() )
                                         {
                                             throw new OverConstrainedVersionException(
-                                                "No versions are present in the repository for the artifact with a range " +
-                                                    versionRange, artifact, childRemoteRepositories );
+                                                "No versions are present in the repository for the artifact with a range "
+                                                    + versionRange, artifact, childRemoteRepositories );
                                         }
 
-                                        throw new OverConstrainedVersionException( "Couldn't find a version in " +
-                                            versions + " to match range " + versionRange, artifact,
+                                        throw new OverConstrainedVersionException( "Couldn't find a version in "
+                                            + versions + " to match range " + versionRange, artifact,
                                             childRemoteRepositories );
                                     }
                                 }
@@ -392,11 +394,12 @@
                                 child.setArtifact( artifact );
                             }
                         }
-                        while( !childKey.equals( child.getKey() ) );
-                        
-                        if ( parentArtifact != null && parentArtifact.getDependencyFilter() != null && !parentArtifact.getDependencyFilter().include( artifact ) )
+                        while ( !childKey.equals( child.getKey() ) );
+
+                        if ( parentArtifact != null && parentArtifact.getDependencyFilter() != null
+                            && !parentArtifact.getDependencyFilter().include( artifact ) )
                         {
-                            // MNG-3769: the [probably relocated] artifact is excluded. 
+                            // MNG-3769: the [probably relocated] artifact is excluded.
                             // We could process exclusions on relocated artifact details in the
                             // MavenMetadataSource.createArtifacts(..) step, BUT that would
                             // require resolving the POM from the repository very early on in
@@ -441,7 +444,8 @@
         }
     }
 
-    private void manageArtifact( ResolutionNode node, ManagedVersionMap managedVersions, List listeners )
+    private void manageArtifact( ResolutionNode node, ManagedVersionMap managedVersions,
+                                 List<ResolutionListener> listeners )
     {
         Artifact artifact = (Artifact) managedVersions.get( node.getKey() );
 
@@ -475,23 +479,22 @@
      * @param nearest   nearest resolution node
      * @param listeners
      */
-    boolean checkScopeUpdate( ResolutionNode farthest, ResolutionNode nearest, List listeners )
+    boolean checkScopeUpdate( ResolutionNode farthest, ResolutionNode nearest, List<ResolutionListener> listeners )
     {
         boolean updateScope = false;
         Artifact farthestArtifact = farthest.getArtifact();
         Artifact nearestArtifact = nearest.getArtifact();
 
         /* farthest is runtime and nearest has lower priority, change to runtime */
-        if ( Artifact.SCOPE_RUNTIME.equals( farthestArtifact.getScope() ) && (
-            Artifact.SCOPE_TEST.equals( nearestArtifact.getScope() ) ||
-                Artifact.SCOPE_PROVIDED.equals( nearestArtifact.getScope() ) ) )
+        if ( Artifact.SCOPE_RUNTIME.equals( farthestArtifact.getScope() )
+            && ( Artifact.SCOPE_TEST.equals( nearestArtifact.getScope() ) || Artifact.SCOPE_PROVIDED.equals( nearestArtifact.getScope() ) ) )
         {
             updateScope = true;
         }
 
         /* farthest is compile and nearest is not (has lower priority), change to compile */
-        if ( Artifact.SCOPE_COMPILE.equals( farthestArtifact.getScope() ) &&
-            !Artifact.SCOPE_COMPILE.equals( nearestArtifact.getScope() ) )
+        if ( Artifact.SCOPE_COMPILE.equals( farthestArtifact.getScope() )
+            && !Artifact.SCOPE_COMPILE.equals( nearestArtifact.getScope() ) )
         {
             updateScope = true;
         }
@@ -517,23 +520,21 @@
         return updateScope;
     }
 
-    private void fireEvent( int event, List listeners, ResolutionNode node )
+    private void fireEvent( int event, List<ResolutionListener> listeners, ResolutionNode node )
     {
         fireEvent( event, listeners, node, null );
     }
 
-    private void fireEvent( int event, List listeners, ResolutionNode node, Artifact replacement )
+    private void fireEvent( int event, List<ResolutionListener> listeners, ResolutionNode node, Artifact replacement )
     {
         fireEvent( event, listeners, node, replacement, null );
     }
 
-    private void fireEvent( int event, List listeners, ResolutionNode node, Artifact replacement,
+    private void fireEvent( int event, List<ResolutionListener> listeners, ResolutionNode node, Artifact replacement,
                             VersionRange newRange )
     {
-        for ( Iterator i = listeners.iterator(); i.hasNext(); )
+        for ( ResolutionListener listener : listeners )
         {
-            ResolutionListener listener = (ResolutionListener) i.next();
-
             switch ( event )
             {
                 case ResolutionListener.TEST_ARTIFACT:
@@ -561,18 +562,24 @@
                     listener.updateScopeCurrentPom( node.getArtifact(), replacement.getScope() );
                     break;
                 case ResolutionListener.MANAGE_ARTIFACT_VERSION:
-                    if (listener instanceof ResolutionListenerForDepMgmt) {
+                    if ( listener instanceof ResolutionListenerForDepMgmt )
+                    {
                         ResolutionListenerForDepMgmt asImpl = (ResolutionListenerForDepMgmt) listener;
                         asImpl.manageArtifactVersion( node.getArtifact(), replacement );
-                    } else {
+                    }
+                    else
+                    {
                         listener.manageArtifact( node.getArtifact(), replacement );
                     }
                     break;
                 case ResolutionListener.MANAGE_ARTIFACT_SCOPE:
-                    if (listener instanceof ResolutionListenerForDepMgmt) {
+                    if ( listener instanceof ResolutionListenerForDepMgmt )
+                    {
                         ResolutionListenerForDepMgmt asImpl = (ResolutionListenerForDepMgmt) listener;
                         asImpl.manageArtifactScope( node.getArtifact(), replacement );
-                    } else {
+                    }
+                    else
+                    {
                         listener.manageArtifact( node.getArtifact(), replacement );
                     }
                     break;
@@ -580,8 +587,8 @@
                     listener.selectVersionFromRange( node.getArtifact() );
                     break;
                 case ResolutionListener.RESTRICT_RANGE:
-                    if ( node.getArtifact().getVersionRange().hasRestrictions() ||
-                        replacement.getVersionRange().hasRestrictions() )
+                    if ( node.getArtifact().getVersionRange().hasRestrictions()
+                        || replacement.getVersionRange().hasRestrictions() )
                     {
                         listener.restrictRange( node.getArtifact(), replacement, newRange );
                     }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
index 701990d..f75ae5d 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/ResolutionNode.java
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
@@ -35,35 +36,35 @@
 {
     private Artifact artifact;
 
-    private List children;
+    private List<ResolutionNode> children;
 
-    private final List parents;
+    private final List<Object> parents;
 
     private final int depth;
 
     private final ResolutionNode parent;
 
-    private final List remoteRepositories;
+    private final List<ArtifactRepository> remoteRepositories;
 
     private boolean active = true;
 
-    private List trail;
+    private List<Artifact> trail;
 
-    public ResolutionNode( Artifact artifact, List remoteRepositories )
+    public ResolutionNode( Artifact artifact, List<ArtifactRepository> remoteRepositories )
     {
         this.artifact = artifact;
         this.remoteRepositories = remoteRepositories;
         depth = 0;
-        parents = Collections.EMPTY_LIST;
+        parents = Collections.emptyList();
         parent = null;
     }
 
-    public ResolutionNode( Artifact artifact, List remoteRepositories, ResolutionNode parent )
+    public ResolutionNode( Artifact artifact, List<ArtifactRepository> remoteRepositories, ResolutionNode parent )
     {
         this.artifact = artifact;
         this.remoteRepositories = remoteRepositories;
         depth = parent.depth + 1;
-        parents = new ArrayList();
+        parents = new ArrayList<Object>();
         parents.addAll( parent.parents );
         parents.add( parent.getKey() );
         this.parent = parent;
@@ -84,17 +85,16 @@
         return artifact.getDependencyConflictId();
     }
 
-    public void addDependencies( Set artifacts, List remoteRepositories, ArtifactFilter filter )
+    public void addDependencies( Set<Artifact> artifacts, List<ArtifactRepository> remoteRepositories,
+                                 ArtifactFilter filter )
         throws CyclicDependencyException, OverConstrainedVersionException
     {
         if ( !artifacts.isEmpty() )
         {
-            children = new ArrayList( artifacts.size() );
+            children = new ArrayList<ResolutionNode>( artifacts.size() );
 
-            for ( Iterator i = artifacts.iterator(); i.hasNext(); )
+            for ( Artifact a : artifacts )
             {
-                Artifact a = (Artifact) i.next();
-
                 if ( parents.contains( a.getDependencyConflictId() ) )
                 {
                     a.setDependencyTrail( getDependencyTrail() );
@@ -107,7 +107,7 @@
         }
         else
         {
-            children = Collections.EMPTY_LIST;
+            children = Collections.emptyList();
         }
         trail = null;
     }
@@ -116,26 +116,25 @@
      * @return {@link List} &lt; {@link String} > with artifact ids
      * @throws OverConstrainedVersionException
      */
-    public List getDependencyTrail()
+    public List<String> getDependencyTrail()
         throws OverConstrainedVersionException
     {
-        List trial = getTrail();
+        List<Artifact> trial = getTrail();
 
-        List ret = new ArrayList( trial.size() );
-        for ( Iterator i = trial.iterator(); i.hasNext(); )
+        List<String> ret = new ArrayList<String>( trial.size() );
+        for ( Artifact artifact : trial )
         {
-            Artifact artifact = (Artifact) i.next();
             ret.add( artifact.getId() );
         }
         return ret;
     }
 
-    private List getTrail()
+    private List<Artifact> getTrail()
         throws OverConstrainedVersionException
     {
         if ( trail == null )
         {
-            List ids = new LinkedList();
+            List<Artifact> ids = new LinkedList<Artifact>();
             ResolutionNode node = this;
             while ( node != null )
             {
@@ -146,13 +145,14 @@
                     ArtifactVersion selected = artifact.getSelectedVersion();
                     //MNG-2123: null is a valid response to getSelectedVersion, don't
                     //assume it won't ever be.
-                    if (selected != null)
+                    if ( selected != null )
                     {
                         artifact.selectVersion( selected.toString() );
                     }
                     else
                     {
-                        throw new OverConstrainedVersionException("Unable to get a selected Version for "+ artifact.getArtifactId(),artifact);
+                        throw new OverConstrainedVersionException( "Unable to get a selected Version for "
+                            + artifact.getArtifactId(), artifact );
                     }
                 }
 
@@ -174,7 +174,7 @@
         return parent != null && parent.parent == null;
     }
 
-    public Iterator getChildrenIterator()
+    public Iterator<ResolutionNode> getChildrenIterator()
     {
         return children.iterator();
     }
@@ -184,7 +184,7 @@
         return depth;
     }
 
-    public List getRemoteRepositories()
+    public List<ArtifactRepository> getRemoteRepositories()
     {
         return remoteRepositories;
     }
@@ -200,9 +200,8 @@
         // TODO: if it was null, we really need to go find them now... or is this taken care of by the ordering?
         if ( children != null )
         {
-            for ( Iterator i = children.iterator(); i.hasNext(); )
+            for ( ResolutionNode node : children )
             {
-                ResolutionNode node = (ResolutionNode) i.next();
                 node.enable();
             }
         }
@@ -213,9 +212,8 @@
         active = false;
         if ( children != null )
         {
-            for ( Iterator i = children.iterator(); i.hasNext(); )
+            for ( ResolutionNode node : children )
             {
-                ResolutionNode node = (ResolutionNode) i.next();
                 node.disable();
             }
         }
@@ -224,19 +222,17 @@
     public boolean filterTrail( ArtifactFilter filter )
         throws OverConstrainedVersionException
     {
-        boolean success = true;
         if ( filter != null )
         {
-            for ( Iterator i = getTrail().iterator(); i.hasNext() && success; )
+            for ( Artifact artifact : getTrail() )
             {
-                Artifact artifact = (Artifact) i.next();
                 if ( !filter.include( artifact ) )
                 {
-                    success = false;
+                    return false;
                 }
             }
         }
-        return success;
+        return true;
     }
 
     public String toString()
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/conflict/ConflictResolver.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/conflict/ConflictResolver.java
index 18a0029..824bb81 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/conflict/ConflictResolver.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/conflict/ConflictResolver.java
@@ -25,5 +25,5 @@
  */
 public interface ConflictResolver
 {
-    static String ROLE = ConflictResolver.class.getName();
+    String ROLE = ConflictResolver.class.getName();
 }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
index 53ac988..8445ca2 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
@@ -246,7 +246,7 @@
             return true;
         }
 
-        if ( false == ( other instanceof ArtifactVersion ) )
+        if ( !( other instanceof ArtifactVersion ) )
         {
             return false;
         }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java
index eb782e7..abba1d9 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java
@@ -25,26 +25,26 @@
 
 public class ManagedVersionMap extends HashMap
 {
-    public ManagedVersionMap(Map map)
+    public ManagedVersionMap( Map map )
     {
         super();
-        if (map != null)
+        if ( map != null )
         {
-            putAll(map);
+            putAll( map );
         }
     }
 
     public String toString()
     {
-        StringBuffer buffer = new StringBuffer("ManagedVersionMap\n");
+        StringBuffer buffer = new StringBuffer( "ManagedVersionMap\n" );
         Iterator iter = this.keySet().iterator();
-        while (iter.hasNext())
+        while ( iter.hasNext() )
         {
-            String key = (String)iter.next();
-            buffer.append(key).append("=").append(get(key));
-            if (iter.hasNext())
+            String key = (String) iter.next();
+            buffer.append( key ).append( "=" ).append( get( key ) );
+            if ( iter.hasNext() )
             {
-                buffer.append("\n");
+                buffer.append( "\n" );
             }
         }
         return buffer.toString();
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
index 157503f..e3cafd6 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
@@ -1,6 +1,5 @@
 package org.apache.maven.artifact.versioning;
 
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -133,7 +132,7 @@
             return true;
         }
 
-        if ( !(other instanceof Restriction ) )
+        if ( !( other instanceof Restriction ) )
         {
             return false;
         }
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
index a29bdaf..0803667 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
@@ -53,27 +53,27 @@
     {
         return restrictions;
     }
-    
+
     public VersionRange cloneOf()
     {
         List copiedRestrictions = null;
-        
+
         if ( restrictions != null )
         {
             copiedRestrictions = new ArrayList();
-            
+
             if ( !restrictions.isEmpty() )
             {
                 copiedRestrictions.addAll( restrictions );
             }
         }
-        
+
         return new VersionRange( recommendedVersion, copiedRestrictions );
     }
 
     /**
      * Create a version range from a string representation
-     * 
+     *
      * Some spec examples are
      * <ul>
      *   <li><code>1.0</code> Version 1.0</li>
@@ -82,7 +82,7 @@
      *   <li><code>[1.5,)</code> Versions 1.5 and higher</li>
      *   <li><code>(,1.0],[1.2,)</code> Versions up to 1.0 (included) and 1.2 or higher</li>
      * </ul>
-     * 
+     *
      * @param spec string representation of a version or version range
      * @return a new {@link VersionRange} object that represents the spec
      * @throws InvalidVersionSpecificationException
@@ -220,30 +220,30 @@
     }
 
     /**
-     * Creates and returns a new <code>VersionRange</code> that is a restriction of this 
+     * Creates and returns a new <code>VersionRange</code> that is a restriction of this
      * version range and the specified version range.
      * <p>
-     * Note: Precedence is given to the recommended version from this version range over the 
+     * Note: Precedence is given to the recommended version from this version range over the
      * recommended version from the specified version range.
      * </p>
      * @param restriction the <code>VersionRange</code> that will be used to restrict this version
      * range.
-     * @return the <code>VersionRange</code> that is a restriction of this version range and the 
+     * @return the <code>VersionRange</code> that is a restriction of this version range and the
      * specified version range.
      * <p>
      * The restrictions of the returned version range will be an intersection of the restrictions
-     * of this version range and the specified version range if both version ranges have 
+     * of this version range and the specified version range if both version ranges have
      * restrictions. Otherwise, the restrictions on the returned range will be empty.
      * </p>
      * <p>
      * The recommended version of the returned version range will be the recommended version of
-     * this version range, provided that ranges falls within the intersected restrictions. If 
+     * this version range, provided that ranges falls within the intersected restrictions. If
      * the restrictions are empty, this version range's recommended version is used if it is not
      * <code>null</code>. If it is <code>null</code>, the specified version range's recommended
-     * version is used (provided it is non-<code>null</code>). If no recommended version can be 
+     * version is used (provided it is non-<code>null</code>). If no recommended version can be
      * obtained, the returned version range's recommended version is set to <code>null</code>.
      * </p>
-     * @throws NullPointerException if the specified <code>VersionRange</code> is 
+     * @throws NullPointerException if the specified <code>VersionRange</code> is
      * <code>null</code>.
      */
     public VersionRange restrict( VersionRange restriction )
@@ -274,8 +274,8 @@
                     version = recommendedVersion;
                     found = true;
                 }
-                else if ( version == null && restriction.getRecommendedVersion() != null &&
-                    r.containsVersion( restriction.getRecommendedVersion() ) )
+                else if ( version == null && restriction.getRecommendedVersion() != null
+                    && r.containsVersion( restriction.getRecommendedVersion() ) )
                 {
                     // use this if we can, but prefer the original if possible
                     version = restriction.getRecommendedVersion();
@@ -288,7 +288,7 @@
             // Use the original recommended version since it exists
             version = recommendedVersion;
         }
-        else if (restriction.recommendedVersion != null)
+        else if ( restriction.recommendedVersion != null )
         {
             // Use the recommended version from the specified VersionRange since there is no
             // original recommended version
@@ -315,11 +315,11 @@
         boolean done = false;
         while ( !done )
         {
-            if ( res1.getLowerBound() == null || res2.getUpperBound() == null ||
-                res1.getLowerBound().compareTo( res2.getUpperBound() ) <= 0 )
+            if ( res1.getLowerBound() == null || res2.getUpperBound() == null
+                || res1.getLowerBound().compareTo( res2.getUpperBound() ) <= 0 )
             {
-                if ( res1.getUpperBound() == null || res2.getLowerBound() == null ||
-                    res1.getUpperBound().compareTo( res2.getLowerBound() ) >= 0 )
+                if ( res1.getUpperBound() == null || res2.getLowerBound() == null
+                    || res1.getUpperBound().compareTo( res2.getLowerBound() ) >= 0 )
                 {
                     ArtifactVersion lower;
                     ArtifactVersion upper;
@@ -555,21 +555,22 @@
 
     public boolean equals( Object obj )
     {
-        if (this == obj){
+        if ( this == obj )
+        {
             return true;
         }
-        if (!(obj instanceof VersionRange ))
+        if ( !( obj instanceof VersionRange ) )
         {
             return false;
         }
         VersionRange other = (VersionRange) obj;
-        
+
         boolean equals =
-            recommendedVersion == other.recommendedVersion ||
-                ( ( recommendedVersion != null ) && recommendedVersion.equals( other.recommendedVersion ) );
+            recommendedVersion == other.recommendedVersion
+                || ( ( recommendedVersion != null ) && recommendedVersion.equals( other.recommendedVersion ) );
         equals &=
-            restrictions == other.restrictions ||
-                ( ( restrictions != null ) && restrictions.equals( other.restrictions ) );
+            restrictions == other.restrictions
+                || ( ( restrictions != null ) && restrictions.equals( other.restrictions ) );
         return equals;
     }
 
diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java
index 5eefaa9..41757f2 100644
--- a/maven-artifact/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java
+++ b/maven-artifact/src/test/java/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java
@@ -26,19 +26,19 @@
 public class DefaultArtifactFactoryTest
     extends PlexusTestCase
 {
-    
+
     public void testPropagationOfSystemScopeRegardlessOfInheritedScope() throws Exception
     {
         ArtifactFactory factory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
-        
-        Artifact artifact = factory.createDependencyArtifact( "test-grp", "test-artifact", VersionRange.createFromVersion("1.0"), "type", null, "system", "provided" );
-        Artifact artifact2 = factory.createDependencyArtifact( "test-grp", "test-artifact-2", VersionRange.createFromVersion("1.0"), "type", null, "system", "test" );
-        Artifact artifact3 = factory.createDependencyArtifact( "test-grp", "test-artifact-3", VersionRange.createFromVersion("1.0"), "type", null, "system", "runtime" );
-        Artifact artifact4 = factory.createDependencyArtifact( "test-grp", "test-artifact-4", VersionRange.createFromVersion("1.0"), "type", null, "system", "compile" );
-        
+
+        Artifact artifact = factory.createDependencyArtifact( "test-grp", "test-artifact", VersionRange.createFromVersion( "1.0" ), "type", null, "system", "provided" );
+        Artifact artifact2 = factory.createDependencyArtifact( "test-grp", "test-artifact-2", VersionRange.createFromVersion( "1.0" ), "type", null, "system", "test" );
+        Artifact artifact3 = factory.createDependencyArtifact( "test-grp", "test-artifact-3", VersionRange.createFromVersion( "1.0" ), "type", null, "system", "runtime" );
+        Artifact artifact4 = factory.createDependencyArtifact( "test-grp", "test-artifact-4", VersionRange.createFromVersion( "1.0" ), "type", null, "system", "compile" );
+
         // this one should never happen in practice...
-        Artifact artifact5 = factory.createDependencyArtifact( "test-grp", "test-artifact-5", VersionRange.createFromVersion("1.0"), "type", null, "system", "system" );
-        
+        Artifact artifact5 = factory.createDependencyArtifact( "test-grp", "test-artifact-5", VersionRange.createFromVersion( "1.0" ), "type", null, "system", "system" );
+
         assertEquals( "system", artifact.getScope() );
         assertEquals( "system", artifact2.getScope() );
         assertEquals( "system", artifact3.getScope() );
diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java
index 454928c..43a90f6 100644
--- a/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java
+++ b/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolutionExceptionTest.java
@@ -44,26 +44,29 @@
         String type = "jar";
         String classifier = "aClassifier";
         String downloadUrl = "http://somewhere.com/download";
-        List path = Arrays.asList(new String[]{"dependency1", "dependency2"});
-        String expected = "Missing artifact" + LS +
-        		LS +
-        		"  Try downloading the file manually from: " + LS +
-        		"      http://somewhere.com/download" + LS +
-        		LS +
-        		"  Then, install it using the command: " + LS +
-        		"      mvn install:install-file -DgroupId=aGroupId -DartifactId=anArtifactId -Dversion=aVersion "+
-        		"-Dclassifier=aClassifier -Dpackaging=jar -Dfile=/path/to/file" + LS +
-        		LS +
-        		"  Alternatively, if you host your own repository you can deploy the file there: " + LS +
-        		"      mvn deploy:deploy-file -DgroupId=aGroupId -DartifactId=anArtifactId"+
-        		" -Dversion=aVersion -Dclassifier=aClassifier -Dpackaging=jar -Dfile=/path/to/file"+
-        		" -Durl=[url] -DrepositoryId=[id]" + LS +
-        		LS +
-        		"  Path to dependency: " + LS +
-        		"  \t1) dependency1" + LS +
-        		"  \t2) dependency2" + LS + 
-        		LS;
-        String actual = AbstractArtifactResolutionException.constructMissingArtifactMessage(message, indentation, groupId, artifactId, version, type, classifier, downloadUrl, path);
-        assertEquals(expected, actual);
+        List path = Arrays.asList( new String[] { "dependency1", "dependency2" } );
+        String expected = "Missing artifact" + LS
+                + LS
+                + "  Try downloading the file manually from: " + LS
+                + "      http://somewhere.com/download" + LS
+                + LS
+                + "  Then, install it using the command: " + LS
+                + "      mvn install:install-file -DgroupId=aGroupId -DartifactId=anArtifactId -Dversion=aVersion "
+                + "-Dclassifier=aClassifier -Dpackaging=jar -Dfile=/path/to/file" + LS
+                + LS
+                + "  Alternatively, if you host your own repository you can deploy the file there: " + LS
+                + "      mvn deploy:deploy-file -DgroupId=aGroupId -DartifactId=anArtifactId"
+                + " -Dversion=aVersion -Dclassifier=aClassifier -Dpackaging=jar -Dfile=/path/to/file"
+                + " -Durl=[url] -DrepositoryId=[id]" + LS
+                + LS
+                + "  Path to dependency: " + LS
+                + "  \t1) dependency1" + LS
+                + "  \t2) dependency2" + LS
+                + LS;
+        String actual =
+            AbstractArtifactResolutionException.constructMissingArtifactMessage( message, indentation, groupId,
+                                                                                 artifactId, version, type, classifier,
+                                                                                 downloadUrl, path );
+        assertEquals( expected, actual );
     }
 }
diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java b/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
index d329804..cdb1ff2 100644
--- a/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
+++ b/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
@@ -330,11 +330,11 @@
 
         //put it in the repo
         ArtifactSpec c = createArtifactSpec( "c", "2.5" );
-        source.addArtifact( createArtifactSpec( "c", "2.5" ));
+        source.addArtifact( createArtifactSpec( "c", "2.5" ) );
 
         ArtifactResolutionResult res = collect( a );
 
-        assertEquals( "Check artifact list", createSet( new Object[] { a.artifact, b.artifact,b1.artifact,c.artifact } ),
+        assertEquals( "Check artifact list", createSet( new Object[] { a.artifact, b.artifact, b1.artifact, c.artifact } ),
                       res.getArtifacts() );
         assertEquals( "Check version", "2.5", getArtifact( "c", res.getArtifacts() ).getVersion() );
     }
@@ -349,12 +349,12 @@
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         ArtifactSpec e = a.addDependency( "e", "1.0" );
         ArtifactSpec c1 = b.addDependency( "c", "3.2" );
-        ArtifactSpec d1 = c1.addDependency( "d","1.1" );
+        ArtifactSpec d1 = c1.addDependency( "d", "1.1" );
         e.addDependency( "c", "[1.0,3.0]" );
 
         // put it in the repo
         ArtifactSpec c = createArtifactSpec( "c", "2.5" );
-        ArtifactSpec d = c.addDependency( "d","1.0" );
+        ArtifactSpec d = c.addDependency( "d", "1.0" );
 
         source.addArtifact( c );
         source.addArtifact( d );
@@ -364,7 +364,7 @@
         ArtifactResolutionResult res = collect( a );
 
         assertEquals( "Check artifact list",
-                      createSet( new Object[] { a.artifact, b.artifact, e.artifact, c.artifact,d.artifact } ), res.getArtifacts() );
+                      createSet( new Object[] { a.artifact, b.artifact, e.artifact, c.artifact, d.artifact } ), res.getArtifacts() );
         assertEquals( "Check version", "2.5", getArtifact( "c", res.getArtifacts() ).getVersion() );
     }
 
@@ -821,8 +821,8 @@
         }
         catch ( OverConstrainedVersionException e )
         {
-            assertTrue( "Versions unordered", e.getMessage().indexOf( "[3.2.1-v3235e, 3.3.0-v3346]" ) != -1);
-            assertTrue( "DependencyTrail not resolved", e.getMessage().indexOf( "Path to dependency:" ) != -1);
+            assertTrue( "Versions unordered", e.getMessage().indexOf( "[3.2.1-v3235e, 3.3.0-v3346]" ) != -1 );
+            assertTrue( "DependencyTrail not resolved", e.getMessage().indexOf( "Path to dependency:" ) != -1 );
         }
     }
 
diff --git a/maven-compat/src/main/java/org/apache/maven/cli/compat/CompatibleMain.java b/maven-compat/src/main/java/org/apache/maven/cli/compat/CompatibleMain.java
index 68817aa..23046c0 100644
--- a/maven-compat/src/main/java/org/apache/maven/cli/compat/CompatibleMain.java
+++ b/maven-compat/src/main/java/org/apache/maven/cli/compat/CompatibleMain.java
@@ -24,7 +24,7 @@
 
 /**
  * Main class used to shield the user from the rest of Maven in the event the user is using JDK < 1.5.
- * 
+ *
  * @since 2.2.0
  */
 public class CompatibleMain
@@ -47,16 +47,16 @@
         // ----------------------------------------------------------------------
         // Setup the command line parser
         // ----------------------------------------------------------------------
-        
+
         String javaVersion = System.getProperty( "java.specification.version", "1.5" );
-        if ( "1.4".equals( javaVersion ) || "1.3".equals( javaVersion ) 
+        if ( "1.4".equals( javaVersion ) || "1.3".equals( javaVersion )
              || "1.2".equals( javaVersion )  || "1.1".equals( javaVersion ) )
         {
-	        System.out.println( "Java specification version: " + javaVersion );
+            System.out.println( "Java specification version: " + javaVersion );
             System.err.println( "This release of Maven requires Java version 1.5 or greater." );
             return 1;
         }
-        
+
         return MavenCli.main( args, classWorld );
     }
 }
diff --git a/maven-core-it-runner/pom.xml b/maven-core-it-runner/pom.xml
index d8f78fa..70494dc 100644
--- a/maven-core-it-runner/pom.xml
+++ b/maven-core-it-runner/pom.xml
@@ -19,9 +19,11 @@
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven</groupId>
-  <version>2.2.1-RC2-SNAPSHOT</version>
+  <parent>
+    <artifactId>maven</artifactId>
+    <groupId>org.apache.maven</groupId>
+    <version>2.2.2-RC1-SNAPSHOT</version>
+  </parent>
   <artifactId>maven-core-it-runner</artifactId>
 
   <name>Integration Test Executor</name>
diff --git a/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolationException.java b/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolationException.java
index 8e3d903..9cd66ed 100644
--- a/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolationException.java
+++ b/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolationException.java
@@ -1,5 +1,24 @@
 package org.apache.maven;
 
+/*
+ * 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.
+ */
+
 public class ConfigurationInterpolationException
     extends Exception
 {
diff --git a/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolator.java b/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolator.java
index b41f04c..d68f4d4 100644
--- a/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolator.java
+++ b/maven-core/src/main/java/org/apache/maven/ConfigurationInterpolator.java
@@ -1,13 +1,32 @@
 package org.apache.maven;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilderConfiguration;
 
 public interface ConfigurationInterpolator
 {
-    
+
     String ROLE = ConfigurationInterpolator.class.getName();
-    
+
     Object interpolate( Object configObject, MavenProject project, ProjectBuilderConfiguration config )
         throws ConfigurationInterpolationException;
 
diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
index 9cc9960..f937e12 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
@@ -286,15 +286,15 @@
         try
         {
             String resumeFrom = request.getResumeFrom();
-            
+
             List projectList = request.getSelectedProjects();
-            
+
             String makeBehavior = request.getMakeBehavior();
-            
+
             rm = new ReactorManager( projects, projectList, resumeFrom, makeBehavior );
 
             rm.setFailureBehavior( request.getFailureBehavior() );
-            
+
         }
         catch ( CycleDetectedException e )
         {
@@ -502,8 +502,8 @@
                 DefaultArtifactVersion version = new DefaultArtifactVersion( project.getPrerequisites().getMaven() );
                 if ( runtimeInformation.getApplicationVersion().compareTo( version ) < 0 )
                 {
-                    throw new BuildFailureException( "Unable to build project '" + project.getFile() +
-                        "; it requires Maven version " + version.toString() );
+                    throw new BuildFailureException( "Unable to build project '" + project.getFile()
+                        + "; it requires Maven version " + version.toString() );
                 }
             }
 
@@ -602,8 +602,8 @@
         {
             if ( pom.length() == 0 )
             {
-                throw new ProjectBuildingException( "unknown", "The file " + pom.getAbsolutePath() +
-                    " you specified has zero length." );
+                throw new ProjectBuildingException( "unknown", "The file " + pom.getAbsolutePath()
+                    + " you specified has zero length." );
             }
         }
 
@@ -641,21 +641,21 @@
             if ( settings.isOffline() )
             {
                 getLogger().info( SystemWarnings.getOfflineWarning() );
-    
+
                 wagonManager.setOnline( false );
             }
 
             try
             {
                 DefaultWagonManager wm = (DefaultWagonManager) wagonManager;
-            
+
                 String oldUserAgent = wm.getHttpUserAgent();
                 int firstSpace = oldUserAgent == null ? -1 : oldUserAgent.indexOf( " " );
-            
+
                 StringBuffer buffer = new StringBuffer();
-            
+
                 buffer.append( "Apache-Maven/" );
-            
+
                 ArtifactVersion version = runtimeInformation.getApplicationVersion();
                 if ( version != null )
                 {
@@ -667,7 +667,7 @@
                 {
                     buffer.append( "unknown" );
                 }
-                
+
                 buffer.append( ' ' );
                 if ( firstSpace > -1 )
                 {
@@ -679,7 +679,7 @@
                 {
                     buffer.append( oldUserAgent );
                 }
-                
+
                 wm.setHttpUserAgent( buffer.toString() );
             }
             catch ( ClassCastException e )
@@ -688,31 +688,31 @@
             }
 
             SecDispatcher sd = null;
-        
+
             try
             {
                 Proxy proxy = settings.getActiveProxy();
-            
+
                 try
                 {
                     sd = (SecDispatcher) container.lookup( SecDispatcher.ROLE, "maven" );
                 }
-                catch (Exception e)
+                catch ( Exception e )
                 {
-                    getLogger().warn( "Security features are disabled. Cannot find plexus component "+SecDispatcher.ROLE + ":maven" );
-                    
+                    getLogger().warn( "Security features are disabled. Cannot find plexus component " + SecDispatcher.ROLE + ":maven" );
+
                     line();
                 }
-    
+
                 if ( proxy != null )
                 {
                     if ( proxy.getHost() == null )
                     {
                         throw new SettingsConfigurationException( "Proxy in settings.xml has no host" );
                     }
-                    
+
                     String pass = proxy.getPassword();
-                    
+
                     if ( sd != null )
                     {
                         try
@@ -724,17 +724,17 @@
                             reportSecurityConfigurationError( "password for proxy '" + proxy.getId() + "'", e );
                         }
                     }
-    
+
                     wagonManager.addProxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), proxy.getUsername(),
                                            pass, proxy.getNonProxyHosts() );
                 }
-                
+
                 for ( Iterator i = settings.getServers().iterator(); i.hasNext(); )
                 {
                     Server server = (Server) i.next();
-                    
+
                     String passWord = server.getPassword();
-    
+
                     if ( sd != null )
                     {
                         try
@@ -746,9 +746,9 @@
                             reportSecurityConfigurationError( "password for server '" + server.getId() + "'", e );
                         }
                     }
-                    
+
                     String passPhrase = server.getPassphrase();
-    
+
                     if ( sd != null )
                     {
                         try
@@ -760,23 +760,23 @@
                             reportSecurityConfigurationError( "passphrase for server '" + server.getId() + "'", e );
                         }
                     }
-    
+
                     wagonManager.addAuthenticationInfo( server.getId(), server.getUsername(), passWord,
                                                         server.getPrivateKey(), passPhrase );
-    
+
                     wagonManager.addPermissionInfo( server.getId(), server.getFilePermissions(),
                                                     server.getDirectoryPermissions() );
-    
+
                     if ( server.getConfiguration() != null )
                     {
                         wagonManager.addConfiguration( server.getId(), (Xpp3Dom) server.getConfiguration() );
                     }
                 }
-    
+
                 for ( Iterator i = settings.getMirrors().iterator(); i.hasNext(); )
                 {
                     Mirror mirror = (Mirror) i.next();
-    
+
                     wagonManager.addMirror( mirror.getId(), mirror.getMirrorOf(), mirror.getUrl() );
                 }
             }
@@ -792,7 +792,7 @@
         {
             container.release( wagonManager );
         }
-        
+
         WagonProviderMapping mapping = (WagonProviderMapping) container.lookup( WagonProviderMapping.ROLE );
         try
         {
@@ -807,7 +807,7 @@
                 {
                     String provider = executionProperties.getProperty( key );
                     key = key.substring( "maven.wagon.provider.".length() );
-                    
+
                     mapping.setWagonProvider( key, provider );
                 }
             }
@@ -835,7 +835,7 @@
             {
                 getLogger().warn( "Invalid number of threads '" + numThreads + "' will be ignored: " + e.getMessage() );
             }
-            
+
             if ( threads > 0 )
             {
                 DefaultArtifactResolver artifactResolver = (DefaultArtifactResolver) container.lookup( ArtifactResolver.ROLE );
diff --git a/maven-core/src/main/java/org/apache/maven/SettingsConfigurationException.java b/maven-core/src/main/java/org/apache/maven/SettingsConfigurationException.java
index 82af5a4..106e8dc 100644
--- a/maven-core/src/main/java/org/apache/maven/SettingsConfigurationException.java
+++ b/maven-core/src/main/java/org/apache/maven/SettingsConfigurationException.java
@@ -44,8 +44,8 @@
 
     public SettingsConfigurationException( String message, Throwable cause, int lineNumber, int columnNumber )
     {
-        super( message + ( lineNumber > 0 ? "\n  Line:   " + lineNumber : "" ) +
-            ( columnNumber > 0 ? "\n  Column: " + columnNumber : "" ), cause );
+        super( message + ( lineNumber > 0 ? "\n  Line:   " + lineNumber : "" )
+            + ( columnNumber > 0 ? "\n  Column: " + columnNumber : "" ), cause );
         this.lineNumber = lineNumber;
         this.columnNumber = columnNumber;
     }
@@ -59,6 +59,6 @@
     {
         return lineNumber;
     }
-    
+
 
 }
diff --git a/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
index 9e491c5..c1198bd 100644
--- a/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -110,7 +110,7 @@
         // ----------------------------------------------------------------------
         // Setup the command line parser
         // ----------------------------------------------------------------------
-        
+
         CLIManager cliManager = new CLIManager();
 
         CommandLine commandLine;
@@ -143,7 +143,7 @@
             cliManager.displayHelp();
             return 0;
         }
-        
+
         if ( commandLine.hasOption( CLIManager.VERSION ) )
         {
             showVersion();
@@ -225,13 +225,13 @@
 
                     System.out.println( cipher.encryptAndDecorate( passwd,
                                                                    DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ) );
-                    
+
                     return 0;
                 }
                 else if ( commandLine.hasOption( CLIManager.ENCRYPT_PASSWORD ) )
                 {
                     String passwd = commandLine.getOptionValue( CLIManager.ENCRYPT_PASSWORD );
-                    
+
                     dispatcher = (DefaultSecDispatcher) embedder.lookup( SecDispatcher.ROLE );
                     String configurationFile = dispatcher.getConfigurationFile();
                     if ( configurationFile.startsWith( "~" ) )
@@ -240,9 +240,9 @@
                     }
                     String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile );
                     embedder.release( dispatcher );
-                    
+
                     String master = null;
-                    
+
                     SettingsSecurity sec = SecUtil.read( file, true );
                     if ( sec != null )
                     {
@@ -252,25 +252,25 @@
                     if ( master == null )
                     {
                         System.err.println( "Master password is not set in the setting security file" );
-                        
+
                         return 1;
                     }
-                    
+
                     DefaultPlexusCipher cipher = new DefaultPlexusCipher();
                     String masterPasswd =
                         cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION );
                     System.out.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
-                    
+
                     return 0;
                 }
             }
             catch ( Exception e )
             {
                 showFatalError( "Error encrypting password: " + e.getMessage(), e, showErrors );
-                
+
                 return 1;
             }
-                
+
             Maven maven = null;
 
             MavenExecutionRequest request = null;
@@ -302,7 +302,7 @@
 
                     if ( profileOptionValues != null )
                     {
-                        for ( int i=0; i < profileOptionValues.length; ++i )
+                        for ( int i = 0; i < profileOptionValues.length; ++i )
                         {
                             StringTokenizer profileTokens = new StringTokenizer( profileOptionValues[i], "," );
 
@@ -413,8 +413,8 @@
                 }
                 else
                 {
-                    System.out.println( "WARNING: Alternate user settings file: " + userSettingsPath +
-                        " is invalid. Using default path." );
+                    System.out.println( "WARNING: Alternate user settings file: " + userSettingsPath
+                        + " is invalid. Using default path." );
                 }
             }
 
@@ -456,8 +456,8 @@
     {
         RuntimeInfo runtimeInfo = new RuntimeInfo( settings );
 
-        if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES ) ||
-            commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES2 ) )
+        if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES )
+            || commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES2 ) )
         {
             runtimeInfo.setPluginUpdateOverride( Boolean.TRUE );
         }
@@ -551,19 +551,19 @@
         {
             request.setPomFile( commandLine.getOptionValue( CLIManager.ALTERNATE_POM_FILE ) );
         }
-        
+
         if ( commandLine.hasOption( CLIManager.RESUME_FROM ) )
         {
             request.setResumeFrom( commandLine.getOptionValue( CLIManager.RESUME_FROM ) );
         }
-        
+
         if ( commandLine.hasOption( CLIManager.PROJECT_LIST ) )
         {
             String projectList = commandLine.getOptionValue( CLIManager.PROJECT_LIST );
             String[] projects = StringUtils.split( projectList, "," );
             request.setSelectedProjects( Arrays.asList( projects ) );
         }
-        
+
         if ( commandLine.hasOption( CLIManager.ALSO_MAKE ) && !commandLine.hasOption( CLIManager.ALSO_MAKE_DEPENDENTS ) )
         {
             request.setMakeBehavior( ReactorManager.MAKE_MODE );
@@ -706,8 +706,8 @@
         System.out.println( "Default locale: " + Locale.getDefault() + ", platform encoding: "
                             + System.getProperty( "file.encoding", "<unknown encoding>" ) );
 
-        System.out.println( "OS name: \"" + Os.OS_NAME + "\" version: \"" + Os.OS_VERSION +
-                            "\" arch: \"" + Os.OS_ARCH + "\" Family: \"" + Os.OS_FAMILY + "\"" );
+        System.out.println( "OS name: \"" + Os.OS_NAME + "\" version: \"" + Os.OS_VERSION
+                            + "\" arch: \"" + Os.OS_ARCH + "\" Family: \"" + Os.OS_FAMILY + "\"" );
     }
 
     private static String reduce( String s )
diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
index f573240..67db347 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
@@ -77,6 +77,9 @@
     
     private List selectedProjects;
 
+    // lazily initialized.
+    private ProjectBuilderConfiguration projectBuilderConfig;
+
     public DefaultMavenExecutionRequest( ArtifactRepository localRepository, Settings settings,
                                          EventDispatcher eventDispatcher, List goals, String baseDirectory,
                                          ProfileManager globalProfileManager, Properties executionProperties,
@@ -215,14 +218,19 @@
 
     public ProjectBuilderConfiguration getProjectBuilderConfiguration()
     {
-        ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
-        config.setLocalRepository( getLocalRepository() )
-              .setGlobalProfileManager( getGlobalProfileManager() )
-              .setExecutionProperties( getExecutionProperties() )
-              .setUserProperties( getUserProperties() )
-              .setBuildStartTime( startTime );
+        if ( projectBuilderConfig == null )
+        {
+            ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration();
+            config.setLocalRepository( getLocalRepository() )
+                  .setGlobalProfileManager( getGlobalProfileManager() )
+                  .setExecutionProperties( getExecutionProperties() )
+                  .setUserProperties( getUserProperties() )
+                  .setBuildStartTime( startTime );
+            
+            projectBuilderConfig = config;
+        }
 
-        return config;
+        return projectBuilderConfig;
     }
     
     public String getMakeBehavior()
diff --git a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java
index b9a1d51..88c4c19 100644
--- a/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java
+++ b/maven-core/src/main/java/org/apache/maven/execution/ReactorManager.java
@@ -48,7 +48,7 @@
 
     // make projects that depend on me, and projects that I depend on
     public static final String MAKE_BOTH_MODE = "make-both";
-    
+
     private List blackList = new ArrayList();
 
     private Map buildFailuresByProject = new HashMap();
@@ -66,7 +66,7 @@
     {
         this.sorter = new ProjectSorter( projects );
     }
-    
+
     public ReactorManager( List projects, List selectedProjects, String resumeFrom, String makeBehavior )
         throws CycleDetectedException, DuplicateProjectException, MissingProjectException
     {
@@ -127,15 +127,15 @@
             this.failureBehavior = FAIL_FAST; // default
             return;
         }
-        if ( FAIL_FAST.equals( failureBehavior ) || FAIL_AT_END.equals( failureBehavior ) ||
-            FAIL_NEVER.equals( failureBehavior ) )
+        if ( FAIL_FAST.equals( failureBehavior ) || FAIL_AT_END.equals( failureBehavior )
+            || FAIL_NEVER.equals( failureBehavior ) )
         {
             this.failureBehavior = failureBehavior;
         }
         else
         {
-            throw new IllegalArgumentException( "Invalid failure behavior (must be one of: \'" + FAIL_FAST + "\', \'" +
-                FAIL_AT_END + "\', \'" + FAIL_NEVER + "\')." );
+            throw new IllegalArgumentException( "Invalid failure behavior (must be one of: \'" + FAIL_FAST + "\', \'"
+                + FAIL_AT_END + "\', \'" + FAIL_NEVER + "\')." );
         }
     }
 
@@ -163,8 +163,8 @@
                 {
                     String dependentId = (String) it.next();
 
-                    if ( !buildSuccessesByProject.containsKey( dependentId ) &&
-                        !buildFailuresByProject.containsKey( dependentId ) )
+                    if ( !buildSuccessesByProject.containsKey( dependentId )
+                        && !buildFailuresByProject.containsKey( dependentId ) )
                     {
                         blackList( dependentId );
                     }
diff --git a/maven-core/src/main/java/org/apache/maven/extension/DefaultExtensionManager.java b/maven-core/src/main/java/org/apache/maven/extension/DefaultExtensionManager.java
index b0bd04c..53897ab 100644
--- a/maven-core/src/main/java/org/apache/maven/extension/DefaultExtensionManager.java
+++ b/maven-core/src/main/java/org/apache/maven/extension/DefaultExtensionManager.java
@@ -132,8 +132,8 @@
             }
             catch ( ArtifactMetadataRetrievalException e )
             {
-                throw new ArtifactResolutionException( "Unable to download metadata from repository for plugin '" +
-                    artifact.getId() + "': " + e.getMessage(), artifact, e );
+                throw new ArtifactResolutionException( "Unable to download metadata from repository for plugin '"
+                    + artifact.getId() + "': " + e.getMessage(), artifact, e );
             }
 
             // We use the same hack here to make sure that plexus 1.1 is available for extensions that do
@@ -290,12 +290,12 @@
             getLogger().debug( "Wagons could not be registered as the extension container was never created" );
         }
     }
-    
+
     @SuppressWarnings( "unchecked" )
     public Map<String, ArtifactHandler> getArtifactTypeHandlers()
     {
         Map<String, ArtifactHandler> result = new HashMap<String, ArtifactHandler>();
-        
+
         if ( extensionContainer != null )
         {
             try
@@ -318,7 +318,7 @@
                 getLogger().debug( "ArtifactHandler extensions could not be loaded: " + e.getMessage(), e );
             }
         }
-        
+
         return result;
     }
 
@@ -377,7 +377,7 @@
                 }
             }
         }
-        catch( Exception e )
+        catch ( Exception e )
         {
             // do nothing
         }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
index d9b13eb..d53877d 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
@@ -113,7 +113,7 @@
     private MavenProjectBuilder mavenProjectBuilder;
 
     private ModelInterpolator modelInterpolator;
-    
+
     private ConfigurationInterpolator configInterpolator;
 
     // ----------------------------------------------------------------------
@@ -210,9 +210,9 @@
             }
 
         }
-        
+
         extensionManager.registerWagons();
-        
+
         handlers.putAll( extensionManager.getArtifactTypeHandlers() );
 
         for ( MavenProject project : session.getSortedProjects() )
@@ -227,7 +227,7 @@
                     if ( project.getPackaging().equals( handler.getPackaging() ) )
                     {
                         project.getArtifact().setArtifactHandler( handler );
-                        
+
                         // NOTE: Adding this (maven 2.2.1) to short-circuit things. This means first match is used, NOT LAST.
                         break;
                     }
@@ -238,7 +238,7 @@
                 throw new LifecycleExecutionException( e.getMessage(), e );
             }
         }
-        
+
         artifactHandlerManager.addHandlers( handlers );
     }
 
@@ -578,10 +578,10 @@
             MojoExecution mojoExecution = (MojoExecution) i.next();
 
             MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
-            
+
             PlexusConfiguration configuration = mojoDescriptor.getMojoConfiguration();
             boolean usesReactorProjects = mojoDescriptor.isAggregator() || usesSessionOrReactorProjects( configuration );
-            
+
             if ( usesReactorProjects )
             {
                 calculateAllConcreteStates( session );
@@ -590,15 +590,15 @@
             {
                 calculateConcreteState( project, session, true );
             }
-            
+
             calculateConcreteConfiguration( mojoExecution, project, session );
-            
+
             List reportExecutions = null;
             if ( mojoDescriptor.isRequiresReports() )
             {
                 reportExecutions = getReportExecutions( project, forkEntryPoints, mojoExecution, session );
             }
-            
+
             boolean hasFork = false;
             if ( mojoDescriptor.getExecutePhase() != null || mojoDescriptor.getExecuteGoal() != null )
             {
@@ -616,7 +616,7 @@
                     }
                 }
             }
-            
+
             if ( hasFork )
             {
                 // NOTE: This must always happen, regardless of treatment of reactorProjects below, because
@@ -624,7 +624,7 @@
                 // something in the reactorProjects list, and won't have a next-stage executionProject created
                 // for it otherwise, which leaves the project == null for the upcoming forked execution.
                 createExecutionProject( project, session, true );
-                
+
                 if ( usesReactorProjects )
                 {
                     List reactorProjects = session.getSortedProjects();
@@ -644,7 +644,7 @@
 
                 forkEntryPoints.pop();
             }
-            
+
             if ( mojoDescriptor.isRequiresReports() )
             {
                 List reports = getReports( reportExecutions, project, mojoExecution, session );
@@ -666,15 +666,15 @@
                     }
                 }
             }
-            
+
             if ( hasFork )
             {
                 // NOTE: This must always happen, regardless of treatment of reactorProjects below, because
                 // if we're in a forked execution right now, the current project will itself be an execution project of
-                // something in the reactorProjects list, and may not have had its own executionProject instance reset to 
+                // something in the reactorProjects list, and may not have had its own executionProject instance reset to
                 // a concrete state again after the previous forked executions.
                 calculateConcreteState( project.getExecutionProject(), session, true );
-                
+
                 // FIXME: Would be nice to find a way to cause the execution project to stay in a concrete state...
                 // TODO: Test this! It should be fixed, but I don't want to destabilize until I have the issue I'm working on fixed.
                 if ( usesReactorProjects )
@@ -695,8 +695,8 @@
             }
             catch ( PluginManagerException e )
             {
-                throw new LifecycleExecutionException( "Internal error in the plugin manager executing goal '" +
-                    mojoDescriptor.getId() + "': " + e.getMessage(), e );
+                throw new LifecycleExecutionException( "Internal error in the plugin manager executing goal '"
+                    + mojoDescriptor.getId() + "': " + e.getMessage(), e );
             }
             catch ( ArtifactNotFoundException e )
             {
@@ -724,21 +724,21 @@
             }
         }
     }
-    
+
     private void createExecutionProject( final MavenProject project, final MavenSession session, final boolean processProjectReferences )
         throws LifecycleExecutionException
     {
         MavenProject executionProject = new MavenProject( project );
-        
+
         calculateConcreteState( executionProject, session, processProjectReferences );
-        
+
         project.setExecutionProject( executionProject );
     }
 
     private boolean usesSessionOrReactorProjects( final PlexusConfiguration configuration )
     {
         String value = configuration != null ? String.valueOf( configuration ) : null;
-        
+
         if ( value != null )
         {
             if ( value.indexOf( "${session" ) > -1 || value.indexOf( "${reactorProjects}" ) > -1 )
@@ -746,7 +746,7 @@
                 return true;
             }
         }
-        
+
         return false;
     }
 
@@ -757,7 +757,7 @@
         {
             return;
         }
-        
+
         try
         {
             mojoExecution.setConfiguration( (Xpp3Dom) configInterpolator.interpolate(
@@ -767,11 +767,11 @@
         }
         catch ( ConfigurationInterpolationException e )
         {
-            throw new LifecycleExecutionException( "Error interpolating configuration for: '" + mojoExecution.getMojoDescriptor().getRoleHint() +
-                                                   "' (execution: '" + mojoExecution.getExecutionId() + "')", e );
+            throw new LifecycleExecutionException( "Error interpolating configuration for: '" + mojoExecution.getMojoDescriptor().getRoleHint()
+                                                   + "' (execution: '" + mojoExecution.getExecutionId() + "')", e );
         }
     }
-    
+
     private void calculateAllConcreteStates( final MavenSession session )
         throws LifecycleExecutionException
     {
@@ -801,7 +801,7 @@
             }
         }
     }
-    
+
 //    private void restoreAllDynamicStates( MavenSession session )
 //        throws LifecycleExecutionException
 //    {
@@ -871,8 +871,8 @@
                     for ( Iterator j = reportPlugins.iterator(); j.hasNext() && !found; )
                     {
                         ReportPlugin reportPlugin = (ReportPlugin) j.next();
-                        if ( reportPlugin.getGroupId().equals( groupId ) &&
-                            reportPlugin.getArtifactId().equals( artifactId ) )
+                        if ( reportPlugin.getGroupId().equals( groupId )
+                            && reportPlugin.getArtifactId().equals( artifactId ) )
                         {
                             found = true;
                         }
@@ -916,7 +916,7 @@
         }
         return reports;
     }
-    
+
     private List getReportExecutions( final ReportPlugin reportPlugin,
                              final Stack forkEntryPoints,
                              final ReportSet reportSet,
@@ -950,7 +950,7 @@
                 {
                     id = mojoExecution.getExecutionId();
                 }
-                
+
                 MojoExecution reportExecution;
                 if ( id.startsWith( MojoExecution.DEFAULT_EXEC_ID_PREFIX ) )
                 {
@@ -971,12 +971,12 @@
         throws LifecycleExecutionException
     {
         List reports = new ArrayList();
-        
+
         for ( Iterator it = reportExecutions.iterator(); it.hasNext(); )
         {
             MojoExecution reportExecution = (MojoExecution) it.next();
             PluginDescriptor pluginDescriptor = reportExecution.getMojoDescriptor().getPluginDescriptor();
-            
+
             try
             {
                 MavenReport reportMojo = pluginManager.getReport( project, reportExecution, session );
@@ -1007,7 +1007,7 @@
                 throw new LifecycleExecutionException( e.getMessage(), e );
             }
         }
-        
+
         return reports;
     }
 
@@ -1023,7 +1023,7 @@
             for ( Iterator i = session.getSortedProjects().iterator(); i.hasNext(); )
             {
                 MavenProject reactorProject = (MavenProject) i.next();
-                
+
                 line();
 
                 getLogger().info( "Building " + reactorProject.getName() );
@@ -1044,7 +1044,7 @@
         throws LifecycleExecutionException, BuildFailureException, PluginNotFoundException
     {
         project = project.getExecutionProject();
-        
+
         forkEntryPoints.push( mojoDescriptor );
 
         PluginDescriptor pluginDescriptor = mojoDescriptor.getPluginDescriptor();
@@ -1165,7 +1165,7 @@
                             {
                                 mojoExecution = new MojoExecution( desc, configuration, executionId );
                             }
-                            
+
                             addToLifecycleMappings( lifecycleMappings, phase.getId(), mojoExecution,
                                                     session.getSettings() );
                         }
@@ -1318,9 +1318,9 @@
 
                     if ( mojoDescriptor.isDirectInvocationOnly() )
                     {
-                        throw new LifecycleExecutionException( "Mojo: \'" + goal +
-                            "\' requires direct invocation. It cannot be used as part of lifecycle: \'" +
-                            project.getPackaging() + "\'." );
+                        throw new LifecycleExecutionException( "Mojo: \'" + goal
+                            + "\' requires direct invocation. It cannot be used as part of lifecycle: \'"
+                            + project.getPackaging() + "\'." );
                     }
 
                     addToLifecycleMappings( lifecycleMappings, phase, new MojoExecution( mojoDescriptor ),
@@ -1406,8 +1406,8 @@
             }
             catch ( ComponentLookupException e )
             {
-                getLogger().debug( "Error looking up lifecycle mapping to retrieve optional mojos. Lifecycle ID: " +
-                    lifecycle.getId() + ". Error: " + e.getMessage(), e );
+                getLogger().debug( "Error looking up lifecycle mapping to retrieve optional mojos. Lifecycle ID: "
+                    + lifecycle.getId() + ". Error: " + e.getMessage(), e );
             }
         }
 
@@ -1479,8 +1479,8 @@
                 }
                 catch ( PluginManagerException e )
                 {
-                    throw new LifecycleExecutionException( "Error looking up available components from plugin '" +
-                        plugin.getKey() + "': " + e.getMessage(), e );
+                    throw new LifecycleExecutionException( "Error looking up available components from plugin '"
+                        + plugin.getKey() + "': " + e.getMessage(), e );
                 }
             }
         }
@@ -1685,8 +1685,8 @@
                 {
                     if ( mojoDescriptor.isDirectInvocationOnly() )
                     {
-                        throw new LifecycleExecutionException( "Mojo: \'" + goal +
-                            "\' requires direct invocation. It cannot be used as part of the lifecycle (it was included via the POM)." );
+                        throw new LifecycleExecutionException( "Mojo: \'" + goal
+                            + "\' requires direct invocation. It cannot be used as part of the lifecycle (it was included via the POM)." );
                     }
 
                     addToLifecycleMappings( phaseMap, phase, mojoExecution, settings );
@@ -1757,9 +1757,9 @@
             {
                 if ( !canUsePrefix )
                 {
-                    String msg = "Mapped-prefix lookup of mojos are only supported from direct invocation. " +
-                        "Please use specification of the form groupId:artifactId[:version]:goal instead. " +
-                        "(Offending mojo: \'" + task + "\', invoked via: \'" + invokedVia + "\')";
+                    String msg = "Mapped-prefix lookup of mojos are only supported from direct invocation. "
+                        + "Please use specification of the form groupId:artifactId[:version]:goal instead. "
+                        + "(Offending mojo: \'" + task + "\', invoked via: \'" + invokedVia + "\')";
                     throw new LifecycleExecutionException( msg );
                 }
 
@@ -1825,8 +1825,8 @@
             }
             else
             {
-                String message = "Invalid task '" + task + "': you must specify a valid lifecycle phase, or" +
-                    " a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal";
+                String message = "Invalid task '" + task + "': you must specify a valid lifecycle phase, or"
+                    + " a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal";
                 throw new BuildFailureException( message );
             }
 
@@ -1910,9 +1910,9 @@
                     if ( phaseToLifecycleMap.containsKey( phase ) )
                     {
                         Lifecycle prevLifecycle = (Lifecycle) phaseToLifecycleMap.get( phase );
-                        throw new LifecycleExecutionException( "Phase '" + phase +
-                            "' is defined in more than one lifecycle: '" + lifecycle.getId() + "' and '" +
-                            prevLifecycle.getId() + "'" );
+                        throw new LifecycleExecutionException( "Phase '" + phase
+                            + "' is defined in more than one lifecycle: '" + lifecycle.getId() + "' and '"
+                            + prevLifecycle.getId() + "'" );
                     }
                     else
                     {
@@ -1983,7 +1983,7 @@
             return tasks;
         }
     }
-    
+
     public List getLifecycles()
     {
         return lifecycles;
@@ -2009,7 +2009,7 @@
                 throw new InitializationException( "Failed to lookup project builder after it was NOT injected via component requirement." );
             }
         }
-        
+
         if ( modelInterpolator == null )
         {
             warnOfIncompleteComponentConfiguration( ModelInterpolator.ROLE );
@@ -2022,7 +2022,7 @@
                 throw new InitializationException( "Failed to lookup model interpolator after it was NOT injected via component requirement." );
             }
         }
-        
+
         if ( configInterpolator == null )
         {
             warnOfIncompleteComponentConfiguration( ConfigurationInterpolator.ROLE );
@@ -2036,7 +2036,7 @@
             }
         }
     }
-    
+
     private void warnOfIncompleteComponentConfiguration( final String role )
     {
         StringBuffer buffer = new StringBuffer();
@@ -2049,7 +2049,7 @@
         buffer.append( "\nnotify the developers for this derivative project of the problem. The Apache Maven team is not" );
         buffer.append( "\nresponsible for maintaining the integrity of third-party component overrides." );
         buffer.append( "\n\n" );
-        
+
         getLogger().warn( buffer.toString() );
     }
 
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
index a11e02a..6a33fcc 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
@@ -41,6 +41,7 @@
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.execution.RuntimeInformation;
 import org.apache.maven.model.Plugin;
+import org.apache.maven.model.Dependency;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.monitor.event.EventDispatcher;
 import org.apache.maven.monitor.event.MavenEvents;
@@ -131,7 +132,7 @@
     protected RuntimeInformation runtimeInformation;
 
     protected MavenProjectBuilder mavenProjectBuilder;
-    
+
     protected PluginMappingManager pluginMappingManager;
 
     // END component requirements
@@ -247,8 +248,8 @@
             {
                 throw new PluginNotFoundException( e );
             }
-            else if ( groupId.equals( e.getGroupId() ) && artifactId.equals( e.getArtifactId() ) &&
-                version.equals( e.getVersion() ) && "maven-plugin".equals( e.getType() ) )
+            else if ( groupId.equals( e.getGroupId() ) && artifactId.equals( e.getArtifactId() )
+                && version.equals( e.getVersion() ) && "maven-plugin".equals( e.getType() ) )
             {
                 throw new PluginNotFoundException( e );
             }
@@ -381,6 +382,14 @@
                 projectPlugin = plugin;
             }
 
+						for( Dependency dependency: projectPlugin.getDependencies() )
+						{
+			          if ( !Artifact.SCOPE_SYSTEM.equals( dependency.getScope() ) )
+			          {
+			              dependency.setScope( Artifact.SCOPE_RUNTIME );
+			          }
+						}
+
             Set artifacts = MavenMetadataSource.createArtifacts( artifactFactory, projectPlugin.getDependencies(), null,
                                                                  null, project );
 
@@ -411,15 +420,15 @@
         // anything that wants to execute a mojo.
         if ( mojoDescriptor.isProjectRequired() && !session.isUsingPOMsFromFilesystem() )
         {
-            throw new MojoExecutionException( "Cannot execute mojo: " + mojoDescriptor.getGoal() +
-                ". It requires a project with an existing pom.xml, but the build is not using one." );
+            throw new MojoExecutionException( "Cannot execute mojo: " + mojoDescriptor.getGoal()
+                + ". It requires a project with an existing pom.xml, but the build is not using one." );
         }
 
         if ( mojoDescriptor.isOnlineRequired() && session.getSettings().isOffline() )
         {
             // TODO: Should we error out, or simply warn and skip??
-            throw new MojoExecutionException( "Mojo: " + mojoDescriptor.getGoal() +
-                " requires online mode for execution. Maven is currently offline." );
+            throw new MojoExecutionException( "Mojo: " + mojoDescriptor.getGoal()
+                + " requires online mode for execution. Maven is currently offline." );
         }
 
         if ( mojoDescriptor.isDependencyResolutionRequired() != null )
@@ -581,7 +590,7 @@
         }
 
         MavenReport report = (MavenReport) getConfiguredMojo( session, dom, project, true, mojoExecution );
-        
+
         return report;
     }
 
@@ -659,20 +668,20 @@
         catch ( ComponentLookupException e )
         {
             Throwable cause = e.getCause();
-            while( cause != null && !(cause instanceof NoClassDefFoundError ) )
+            while ( cause != null && !( cause instanceof NoClassDefFoundError ) )
             {
                 cause = cause.getCause();
             }
-            
+
             if ( cause != null && ( cause instanceof NoClassDefFoundError ) )
             {
                 throw new PluginManagerException( "Unable to load the mojo '" + mojoDescriptor.getRoleHint()
                                                   + "' in the plugin '" + pluginDescriptor.getPluginLookupKey() + "'. A required class is missing: "
                                                   + cause.getMessage(), e );
             }
-            
-            throw new PluginManagerException( "Unable to find the mojo '" + mojoDescriptor.getGoal() +
-                "' (or one of its required components) in the plugin '" + pluginDescriptor.getPluginLookupKey() + "'", e );
+
+            throw new PluginManagerException( "Unable to find the mojo '" + mojoDescriptor.getGoal()
+                + "' (or one of its required components) in the plugin '" + pluginDescriptor.getPluginLookupKey() + "'", e );
         }
         catch ( NoClassDefFoundError e )
         {
@@ -754,8 +763,8 @@
             }
             catch ( ArtifactMetadataRetrievalException e )
             {
-                throw new ArtifactResolutionException( "Unable to download metadata from repository for plugin '" +
-                    pluginArtifact.getId() + "': " + e.getMessage(), pluginArtifact, e );
+                throw new ArtifactResolutionException( "Unable to download metadata from repository for plugin '"
+                    + pluginArtifact.getId() + "': " + e.getMessage(), pluginArtifact, e );
             }
 
             Set rgArtifacts = resolutionGroup.getArtifacts();
@@ -860,8 +869,8 @@
                     }
                     catch ( PlexusContainerException e )
                     {
-                        throw new PluginManagerException( "Error adding plugin dependency '" +
-                            artifact.getDependencyConflictId() + "' into plugin manager: " + e.getMessage(), e );
+                        throw new PluginManagerException( "Error adding plugin dependency '"
+                            + artifact.getDependencyConflictId() + "' into plugin manager: " + e.getMessage(), e );
                     }
                 }
             }
@@ -931,8 +940,8 @@
         {
             Artifact a = (Artifact) i.next();
 
-            if ( a.getArtifactId().equals( "plexus-utils" ) &&
-                vr.containsVersion( new DefaultArtifactVersion( a.getVersion() ) ) )
+            if ( a.getArtifactId().equals( "plexus-utils" )
+                && vr.containsVersion( new DefaultArtifactVersion( a.getVersion() ) ) )
             {
                 plexusUtilsPresent = true;
 
@@ -1040,8 +1049,8 @@
                 // ideally, this would be elevated above the true debug output, but below the default INFO level...
                 // [BP] (2004-07-18): need to understand the context more but would prefer this could be either WARN or
                 // removed - shouldn't need DEBUG to diagnose a problem most of the time.
-                getLogger().debug( "*** WARNING: Configuration \'" + child.getName() + "\' is not used in goal \'" +
-                    mojoDescriptor.getFullGoalName() + "; this may indicate a typo... ***" );
+                getLogger().debug( "*** WARNING: Configuration \'" + child.getName() + "\' is not used in goal \'"
+                    + mojoDescriptor.getFullGoalName() + "; this may indicate a typo... ***" );
             }
         }
 
@@ -1498,6 +1507,12 @@
         {
             project.resolveActiveArtifacts();
         }
+        
+        ArtifactMetadataSource metadataSource = context.getProjectBuilderConfiguration().getMetadataSource();
+        if ( metadataSource == null )
+        {
+            metadataSource = artifactMetadataSource;
+        }
 
         Set resolvedArtifacts;
         try
@@ -1507,17 +1522,17 @@
                                                                                 project.getManagedVersionMap(),
                                                                                 context.getLocalRepository(),
                                                                                 project.getRemoteArtifactRepositories(),
-                                                                                artifactMetadataSource, filter );
+                                                                                metadataSource, filter );
             resolvedArtifacts = result.getArtifacts();
         }
-        catch (MultipleArtifactsNotFoundException me)
+        catch ( MultipleArtifactsNotFoundException me )
         {
             /*only do this if we are an aggregating plugin: MNG-2277
             if the dependency doesn't yet exist but is in the reactor, then
             all we can do is warn and skip it. A better fix can be inserted into 2.1*/
-            if (isAggregator && checkMissingArtifactsInReactor( context.getSortedProjects(), me.getMissingArtifacts() ))
+            if ( isAggregator && checkMissingArtifactsInReactor( context.getSortedProjects(), me.getMissingArtifacts() ) )
             {
-                resolvedArtifacts = new HashSet(me.getResolvedArtifacts());
+                resolvedArtifacts = new HashSet( me.getResolvedArtifacts() );
             }
             else
             {
@@ -1537,25 +1552,25 @@
      * @param missing the artifacts that can't be found
      * @return true if ALL missing artifacts are found in the reactor.
      */
-    private boolean checkMissingArtifactsInReactor(Collection projects, Collection missing)
+    private boolean checkMissingArtifactsInReactor( Collection projects, Collection missing )
     {
         Collection foundInReactor = new HashSet();
         Iterator iter = missing.iterator();
-        while (iter.hasNext())
+        while ( iter.hasNext() )
         {
             Artifact mArtifact = (Artifact) iter.next();
             Iterator pIter = projects.iterator();
-            while (pIter.hasNext())
+            while ( pIter.hasNext() )
             {
                 MavenProject p = (MavenProject) pIter.next();
-                if (p.getArtifactId().equals( mArtifact.getArtifactId()) &&
-                    p.getGroupId().equals( mArtifact.getGroupId()) &&
-                    p.getVersion().equals( mArtifact.getVersion()))
+                if ( p.getArtifactId().equals( mArtifact.getArtifactId() )
+                    && p.getGroupId().equals( mArtifact.getGroupId() )
+                    && p.getVersion().equals( mArtifact.getVersion() ) )
                 {
                     //TODO: the packaging could be different, but the exception doesn't contain that info
                     //most likely it would be produced by the project we just found in the reactor since all
                     //the other info matches. Assume it's ok.
-                    getLogger().warn( "The dependency: "+ p.getId()+" can't be resolved but has been found in the reactor.\nThis dependency has been excluded from the plugin execution. You should rerun this mojo after executing mvn install.\n" );
+                    getLogger().warn( "The dependency: " + p.getId() + " can't be resolved but has been found in the reactor.\nThis dependency has been excluded from the plugin execution. You should rerun this mojo after executing mvn install.\n" );
 
                     //found it, move on.
                     foundInReactor.add( p );
@@ -1597,7 +1612,7 @@
         PluginDescriptor pluginDescriptor = pluginCollector.getPluginDescriptor( plugin );
 
         PlexusContainer pluginContainer = getPluginContainer( pluginDescriptor );
-        
+
         return pluginContainer.lookup( role, roleHint );
     }
 
@@ -1609,7 +1624,7 @@
         PluginDescriptor pluginDescriptor = pluginCollector.getPluginDescriptor( plugin );
 
         PlexusContainer pluginContainer = getPluginContainer( pluginDescriptor );
-        
+
         Set<String> pluginHints = findChildComponentHints( role, container, pluginContainer );
         Map<String, Object> components = new HashMap<String, Object>( pluginHints.size() );
         for ( String hint : pluginHints )
@@ -1620,7 +1635,7 @@
 
         return components;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1630,10 +1645,10 @@
         PluginVersionNotFoundException
     {
         PluginDescriptor pd = verifyPlugin( plugin, project, session.getSettings(), session.getLocalRepository() );
-        
+
         PlexusContainer pluginContainer = getPluginContainer( pd );
         ensurePluginContainerIsComplete( pd, pluginContainer, project, session );
-        
+
         return pd;
     }
 
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginConfigurationException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginConfigurationException.java
index 54ab1ea..4422a0d 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginConfigurationException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginConfigurationException.java
@@ -167,9 +167,9 @@
             }
 
             messageBuffer
-                .append( "NOTE: One or more purely derived expression elements were detected in \'" + expression +
-                    "\'.\n    If you continue to get this error after any other expression elements are specified correctly," +
-                    "\n    please report this issue to the Maven development team.\n" );
+                .append( "NOTE: One or more purely derived expression elements were detected in \'" + expression
+                    + "\'.\n    If you continue to get this error after any other expression elements are specified correctly,"
+                    + "\n    please report this issue to the Maven development team.\n" );
         }
     }
 
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java
index 803dbd5..a53927b 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginNotFoundException.java
@@ -34,6 +34,6 @@
     public PluginNotFoundException( ArtifactNotFoundException e )
     {
         super( "Plugin could not be found - check that the goal name is correct: " + e.getMessage(), e.getGroupId(),
-               e.getArtifactId(), e.getVersion(), "maven-plugin",null, e.getRemoteRepositories(), null, e.getCause() );
+               e.getArtifactId(), e.getVersion(), "maven-plugin", null, e.getRemoteRepositories(), null, e.getCause() );
     }
 }
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
index 09864ee..f324e81 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
@@ -71,9 +71,9 @@
 
         if ( param.isEditable() )
         {
-            messageBuffer.append( "Inside the definition for plugin \'" + mojo.getPluginDescriptor().getArtifactId() +
-                "\' specify the following:\n\n<configuration>\n  ...\n  <" + param.getName() + ">VALUE</" +
-                param.getName() + ">\n</configuration>" );
+            messageBuffer.append( "Inside the definition for plugin \'" + mojo.getPluginDescriptor().getArtifactId()
+                + "\' specify the following:\n\n<configuration>\n  ...\n  <" + param.getName() + ">VALUE</"
+                + param.getName() + ">\n</configuration>" );
 
             String alias = param.getAlias();
             if ( StringUtils.isNotEmpty( alias ) && !alias.equals( param.getName() ) )
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
index 3c28d02..17b9edd 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
@@ -118,7 +118,7 @@
         {
             return null;
         }
-        
+
         String expression = stripTokens( expr );
         if ( expression.equals( expr ) )
         {
@@ -129,7 +129,7 @@
                 if ( lastIndex >= 0 )
                 {
                     String retVal = expr.substring( 0, index );
-                    
+
                     if ( index > 0 && expr.charAt( index - 1 ) == '$' )
                     {
                         retVal += expr.substring( index + 1, lastIndex + 1 );
@@ -138,7 +138,7 @@
                     {
                         retVal += evaluate( expr.substring( index, lastIndex + 1 ) );
                     }
-                    
+
                     retVal += evaluate( expr.substring( lastIndex + 1 ) );
                     return retVal;
                 }
@@ -158,15 +158,15 @@
         MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
         if ( BANNED_EXPRESSIONS.containsKey( expression ) )
         {
-            throw new ExpressionEvaluationException( "The parameter expression: \'" + expression +
-                "\' used in mojo: \'" + mojoDescriptor.getGoal() + "\' is banned. Use \'" +
-                BANNED_EXPRESSIONS.get( expression ) + "\' instead." );
+            throw new ExpressionEvaluationException( "The parameter expression: \'" + expression
+                + "\' used in mojo: \'" + mojoDescriptor.getGoal() + "\' is banned. Use \'"
+                + BANNED_EXPRESSIONS.get( expression ) + "\' instead." );
         }
         else if ( DEPRECATED_EXPRESSIONS.containsKey( expression ) )
         {
-            logger.warn( "The parameter expression: \'" + expression + "\' used in mojo: \'" +
-                mojoDescriptor.getGoal() + "\' has been deprecated. Use \'" + DEPRECATED_EXPRESSIONS.get( expression ) +
-                "\' instead." );
+            logger.warn( "The parameter expression: \'" + expression + "\' used in mojo: \'"
+                + mojoDescriptor.getGoal() + "\' has been deprecated. Use \'" + DEPRECATED_EXPRESSIONS.get( expression )
+                + "\' instead." );
         }
 
         if ( "localRepository".equals( expression ) )
@@ -185,7 +185,7 @@
         {
             value = mojoExecution.getReports();
         }
-        else if ("mojoExecution".equals(expression)) 
+        else if ( "mojoExecution".equals( expression ) )
         {
         	value = mojoExecution;
         }
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionManager.java b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionManager.java
index 5a484bc..7fd00fd 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionManager.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionManager.java
@@ -148,8 +148,8 @@
                 //  a. the CLI switch to force plugin updates is set, OR BOTH OF THE FOLLOWING:
                 //  b. the CLI switch to suppress plugin updates is NOT set, AND
                 //  c. the update interval for the plugin has triggered an update check.
-                if ( Boolean.TRUE.equals( pluginUpdateOverride ) ||
-                    ( !Boolean.FALSE.equals( pluginUpdateOverride ) && shouldCheckForUpdates( groupId, artifactId ) ) )
+                if ( Boolean.TRUE.equals( pluginUpdateOverride )
+                    || ( !Boolean.FALSE.equals( pluginUpdateOverride ) && shouldCheckForUpdates( groupId, artifactId ) ) )
                 {
                     updatedVersion =
                         resolveMetaVersion( groupId, artifactId, project, localRepository, Artifact.LATEST_VERSION );
@@ -217,8 +217,8 @@
 
         // if we're still empty here, and the current project matches the plugin in question, use the current project's
         // version, I guess...
-        if ( StringUtils.isEmpty( version ) && project.getGroupId().equals( groupId ) &&
-            project.getArtifactId().equals( artifactId ) )
+        if ( StringUtils.isEmpty( version ) && project.getGroupId().equals( groupId )
+            && project.getArtifactId().equals( artifactId ) )
         {
             version = project.getVersion();
         }
@@ -260,8 +260,8 @@
             //      a. the registry is declared to be in autoUpdate mode
             //
             // NOTE: This is only the default value; it may be changed as the result of prompting the user.
-            boolean persistUpdate = forcePersist || ( promptToPersist &&
-                !Boolean.FALSE.equals( pluginUpdateOverride ) && ( inInteractiveMode || autoUpdate ) );
+            boolean persistUpdate = forcePersist || ( promptToPersist
+                && !Boolean.FALSE.equals( pluginUpdateOverride ) && ( inInteractiveMode || autoUpdate ) );
 
             // retrieve the apply-to-all flag, if it's been set previously.
             Boolean applyToAll = settings.getRuntimeInfo().getApplyToAllPluginUpdates();
@@ -273,7 +273,7 @@
             // don't prompt if the CLI pluginUpdateOverride is set (either suppression or force mode will stop prompting)
             // don't prompt if the user has selected ALL/NONE previously in this session
             //
-            // NOTE: We're incorporating here, to make the usages of this check more consistent and 
+            // NOTE: We're incorporating here, to make the usages of this check more consistent and
             // resistant to change.
             promptToPersist =
                 promptToPersist && pluginUpdateOverride == null && applyToAll == null && inInteractiveMode;
@@ -338,8 +338,8 @@
                 }
                 catch ( ParseException e )
                 {
-                    getLogger().warn( "Last-checked date for plugin {" + constructPluginKey( groupId, artifactId ) +
-                        "} is invalid. Checking for updates." );
+                    getLogger().warn( "Last-checked date for plugin {" + constructPluginKey( groupId, artifactId )
+                        + "} is invalid. Checking for updates." );
 
                     return true;
                 }
@@ -614,8 +614,8 @@
             catch ( IOException e )
             {
                 getLogger().warn(
-                    "Cannot rewrite user-level plugin-registry.xml with new plugin version of plugin: \'" + groupId +
-                        ":" + artifactId + "\'.", e );
+                    "Cannot rewrite user-level plugin-registry.xml with new plugin version of plugin: \'" + groupId
+                        + ":" + artifactId + "\'.", e );
             }
             finally
             {
@@ -702,8 +702,8 @@
                 }
                 catch ( ProjectBuildingException e )
                 {
-                    throw new InvalidPluginException( "Unable to build project information for plugin '" +
-                        ArtifactUtils.versionlessKey( groupId, artifactId ) + "': " + e.getMessage(), e );
+                    throw new InvalidPluginException( "Unable to build project information for plugin '"
+                        + ArtifactUtils.versionlessKey( groupId, artifactId ) + "': " + e.getMessage(), e );
                 }
 
                 // if we don't have the required Maven version, then ignore an update
@@ -714,8 +714,8 @@
 
                     if ( runtimeInformation.getApplicationVersion().compareTo( requiredVersion ) < 0 )
                     {
-                        getLogger().info( "Ignoring available plugin update: " + artifactVersion +
-                            " as it requires Maven version " + requiredVersion );
+                        getLogger().info( "Ignoring available plugin update: " + artifactVersion
+                            + " as it requires Maven version " + requiredVersion );
 
                         VersionRange vr;
                         try
@@ -725,8 +725,8 @@
                         catch ( InvalidVersionSpecificationException e )
                         {
                             throw new PluginVersionResolutionException( groupId, artifactId,
-                                                                        "Error getting available plugin versions: " +
-                                                                            e.getMessage(), e );
+                                                                        "Error getting available plugin versions: "
+                                                                            + e.getMessage(), e );
                         }
 
                         getLogger().debug( "Trying " + vr );
@@ -740,8 +740,8 @@
                         catch ( ArtifactMetadataRetrievalException e )
                         {
                             throw new PluginVersionResolutionException( groupId, artifactId,
-                                                                        "Error getting available plugin versions: " +
-                                                                            e.getMessage(), e );
+                                                                        "Error getting available plugin versions: "
+                                                                            + e.getMessage(), e );
                         }
 
                         if ( artifactVersion != null )
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/version/IntervalUtils.java b/maven-core/src/main/java/org/apache/maven/plugin/version/IntervalUtils.java
index e50dccb..b8e52ea 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/version/IntervalUtils.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/version/IntervalUtils.java
@@ -28,51 +28,52 @@
 
 public final class IntervalUtils
 {
-    
+
     private static final String PERIOD_PART_PATTERN = "[0-9]+[WwDdHhMm]?";
-    
+
     private static final Map PART_TYPE_CONTRIBUTIONS;
-    
+
     static
     {
         Map contributions = new HashMap();
-        
+
         contributions.put( "w", new Long( 7 * 24 * 60 * 60 * 1000 ) );
         contributions.put( "d", new Long( 24 * 60 * 60 * 1000 ) );
         contributions.put( "h", new Long( 60 * 60 * 1000 ) );
         contributions.put( "m", new Long( 60 * 1000 ) );
-        
+
         PART_TYPE_CONTRIBUTIONS = contributions;
     }
-    
+
     private IntervalUtils()
     {
         // don't allow construction
     }
-    
+
     public static boolean isExpired( String intervalSpec, Date lastChecked )
     {
-        if( "never".equalsIgnoreCase( intervalSpec ) )
+        if ( "never".equalsIgnoreCase( intervalSpec ) )
         {
             return false;
         }
-        else if( "always".equalsIgnoreCase( intervalSpec ) )
+        else if ( "always".equalsIgnoreCase( intervalSpec ) )
         {
             return true;
         }
-        else if( intervalSpec != null && intervalSpec.toLowerCase().startsWith("interval:") && intervalSpec.length() > "interval:".length())
+        else if ( intervalSpec != null && intervalSpec.toLowerCase().startsWith( "interval:" )
+            && intervalSpec.length() > "interval:".length() )
         {
             String intervalPart = intervalSpec.substring( "interval:".length() );
-            
+
             // subtract the specified period from now() and see if it's still after the lastChecked date.
-            long period = IntervalUtils.parseInterval(intervalPart);
-            
+            long period = IntervalUtils.parseInterval( intervalPart );
+
             Calendar cal = Calendar.getInstance();
-            
+
             cal.setTimeInMillis( System.currentTimeMillis() - period );
-            
+
             Date test = cal.getTime();
-            
+
             return lastChecked == null || test.after( lastChecked );
         }
         else
@@ -80,52 +81,52 @@
             throw new IllegalArgumentException( "Invalid interval specification: \'" + intervalSpec + "\'" );
         }
     }
-    
+
     public static long parseInterval( String interval )
     {
-        Matcher partMatcher = Pattern.compile(PERIOD_PART_PATTERN).matcher(interval);
-        
+        Matcher partMatcher = Pattern.compile( PERIOD_PART_PATTERN ).matcher( interval );
+
         long period = 0;
-        
-        while( partMatcher.find() )
+
+        while ( partMatcher.find() )
         {
             String part = partMatcher.group();
-            
+
             period += getPartPeriod( part );
         }
-        
+
         return period;
     }
 
     private static long getPartPeriod( String part )
     {
         char type = part.charAt( part.length() - 1 );
-        
+
         String coefficientPart;
-        
-        if( Character.isLetter(type))
+
+        if ( Character.isLetter( type ) )
         {
-            coefficientPart = part.substring( 0, part.length() - 1);
+            coefficientPart = part.substring( 0, part.length() - 1 );
         }
         else
         {
             // if the interval doesn't specify a resolution, assume minutes.
             coefficientPart = part;
-            
+
             type = 'm';
         }
-        
+
         int coefficient = Integer.parseInt( coefficientPart );
-        
+
         Long period = (Long) PART_TYPE_CONTRIBUTIONS.get( "" + Character.toLowerCase( type ) );
-        
+
         long result = 0;
-        
-        if( period != null )
+
+        if ( period != null )
         {
             result = coefficient * period.longValue();
         }
-        
+
         return result;
     }
 
diff --git a/maven-core/src/main/java/org/apache/maven/usability/SystemWarnings.java b/maven-core/src/main/java/org/apache/maven/usability/SystemWarnings.java
index dbc930e..07dc06b 100644
--- a/maven-core/src/main/java/org/apache/maven/usability/SystemWarnings.java
+++ b/maven-core/src/main/java/org/apache/maven/usability/SystemWarnings.java
@@ -24,8 +24,8 @@
 
     public static String getOfflineWarning()
     {
-        return "\nNOTE: Maven is executing in offline mode. Any artifacts not already in your local\n" +
-            "repository will be inaccessible.\n";
+        return "\nNOTE: Maven is executing in offline mode. Any artifacts not already in your local\n"
+            + "repository will be inaccessible.\n";
     }
 
 }
diff --git a/maven-core/src/test/java/org/apache/maven/cli/ConsoleDownloadMonitorTest.java b/maven-core/src/test/java/org/apache/maven/cli/ConsoleDownloadMonitorTest.java
index 1380c7f..18c0819 100644
--- a/maven-core/src/test/java/org/apache/maven/cli/ConsoleDownloadMonitorTest.java
+++ b/maven-core/src/test/java/org/apache/maven/cli/ConsoleDownloadMonitorTest.java
@@ -1,12 +1,5 @@
 package org.apache.maven.cli;
 
-import org.apache.maven.wagon.resource.Resource;
-import org.apache.maven.wagon.WagonConstants;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-import java.io.PrintStream;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -26,9 +19,15 @@
  * under the License.
  */
 
+import org.apache.maven.wagon.resource.Resource;
+import org.apache.maven.wagon.WagonConstants;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
 /**
  * Test for {@link ConsoleDownloadMonitor}
- * 
+ *
  * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
  * @version $Id$
  */
@@ -42,41 +41,41 @@
         super.setMonitor( new ConsoleDownloadMonitor() );
         super.setUp();
         bout = new ByteArrayOutputStream();
-        monitor.out = new PrintStream(bout);
+        monitor.out = new PrintStream( bout );
     }
 
     public void testTransferProgress()
         throws Exception
     {
         byte[] buffer = new byte[1024];
-        monitor.transferProgress( new TransferEventMock(new Resource(), 10000), buffer, 1024 );
-        assertEquals("1/9K\r", new String(bout.toByteArray()));
+        monitor.transferProgress( new TransferEventMock( new Resource(), 10000 ), buffer, 1024 );
+        assertEquals( "1/9K\r", new String( bout.toByteArray() ) );
     }
 
     public void testTransferProgressTwoFiles()
         throws Exception
     {
         byte[] buffer = new byte[2048];
-        monitor.transferProgress( new TransferEventMock(new Resource("foo"), 10000), buffer, 1024 );
-        assertEquals("1/9K\r", new String(bout.toByteArray()));
+        monitor.transferProgress( new TransferEventMock( new Resource( "foo" ), 10000 ), buffer, 1024 );
+        assertEquals( "1/9K\r", new String( bout.toByteArray() ) );
         bout.reset();
-        monitor.transferProgress( new TransferEventMock(new Resource("bar"), 10000), buffer, 2048 );
-        assertEquals("1/9K 2/9K\r", new String(bout.toByteArray()));
+        monitor.transferProgress( new TransferEventMock( new Resource( "bar" ), 10000 ), buffer, 2048 );
+        assertEquals( "1/9K 2/9K\r", new String( bout.toByteArray() ) );
         bout.reset();
-        monitor.transferProgress( new TransferEventMock(new Resource("bar"), 10000), buffer, 2048 );
-        assertEquals("1/9K 4/9K\r", new String(bout.toByteArray()));
+        monitor.transferProgress( new TransferEventMock( new Resource( "bar" ), 10000 ), buffer, 2048 );
+        assertEquals( "1/9K 4/9K\r", new String( bout.toByteArray() ) );
         bout.reset();
-        monitor.transferProgress( new TransferEventMock(new Resource("foo"), 10000), buffer, 2048 );
-        assertEquals("3/9K 4/9K\r", new String(bout.toByteArray()));
+        monitor.transferProgress( new TransferEventMock( new Resource( "foo" ), 10000 ), buffer, 2048 );
+        assertEquals( "3/9K 4/9K\r", new String( bout.toByteArray() ) );
     }
 
-    public void testGetDownloadStatusForResource() 
+    public void testGetDownloadStatusForResource()
     {
-        ConsoleDownloadMonitor cm = (ConsoleDownloadMonitor)monitor;
-        assertEquals("200/400b", cm.getDownloadStatusForResource(200, 400));
-        assertEquals("1/2K", cm.getDownloadStatusForResource(1024, 2048));
-        assertEquals("0/2K", cm.getDownloadStatusForResource(10, 2048));
-        assertEquals("10/?", cm.getDownloadStatusForResource(10, WagonConstants.UNKNOWN_LENGTH));
-        assertEquals("1024/?", cm.getDownloadStatusForResource(1024, WagonConstants.UNKNOWN_LENGTH));
+        ConsoleDownloadMonitor cm = (ConsoleDownloadMonitor) monitor;
+        assertEquals( "200/400b", cm.getDownloadStatusForResource( 200, 400 ) );
+        assertEquals( "1/2K", cm.getDownloadStatusForResource( 1024, 2048 ) );
+        assertEquals( "0/2K", cm.getDownloadStatusForResource( 10, 2048 ) );
+        assertEquals( "10/?", cm.getDownloadStatusForResource( 10, WagonConstants.UNKNOWN_LENGTH ) );
+        assertEquals( "1024/?", cm.getDownloadStatusForResource( 1024, WagonConstants.UNKNOWN_LENGTH ) );
     }
 }
diff --git a/maven-core/src/test/java/org/apache/maven/usability/MojoExecutionExceptionDiagnoserTest.java b/maven-core/src/test/java/org/apache/maven/usability/MojoExecutionExceptionDiagnoserTest.java
index 22cdcf0..d071f0a 100644
--- a/maven-core/src/test/java/org/apache/maven/usability/MojoExecutionExceptionDiagnoserTest.java
+++ b/maven-core/src/test/java/org/apache/maven/usability/MojoExecutionExceptionDiagnoserTest.java
@@ -1,5 +1,25 @@
 package org.apache.maven.usability;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
 import org.apache.maven.plugin.MojoExecutionException;
 
 import junit.framework.TestCase;
@@ -15,16 +35,16 @@
     public void testDiag()
     {
         MojoExecutionExceptionDiagnoser diag = new MojoExecutionExceptionDiagnoser();
-        
-        Exception e = new NullPointerException("Test");
-        
+
+        Exception e = new NullPointerException( "Test" );
+
         assertFalse( diag.canDiagnose( e ) );
-        
-        MojoExecutionException me = new MojoExecutionException(null);
-        
+
+        MojoExecutionException me = new MojoExecutionException( null );
+
         assertTrue( diag.canDiagnose( me ) );
-        
-        diag.diagnose( me );   
-        
+
+        diag.diagnose( me );
+
     }
 }
diff --git a/maven-core/src/test/java/org/apache/maven/usability/MojoFailureExceptionDiagnoserTest.java b/maven-core/src/test/java/org/apache/maven/usability/MojoFailureExceptionDiagnoserTest.java
index d954615..b54030b 100644
--- a/maven-core/src/test/java/org/apache/maven/usability/MojoFailureExceptionDiagnoserTest.java
+++ b/maven-core/src/test/java/org/apache/maven/usability/MojoFailureExceptionDiagnoserTest.java
@@ -1,5 +1,24 @@
 package org.apache.maven.usability;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import junit.framework.TestCase;
 
 import org.apache.maven.plugin.MojoFailureException;
@@ -15,16 +34,16 @@
     public void testDiag()
     {
         MojoFailureExceptionDiagnoser diag = new MojoFailureExceptionDiagnoser();
-        
-        Exception e = new NullPointerException("Test");
-        
+
+        Exception e = new NullPointerException( "Test" );
+
         assertFalse( diag.canDiagnose( e ) );
-        
-        MojoFailureException me = new MojoFailureException(null);
-        
+
+        MojoFailureException me = new MojoFailureException( null );
+
         assertTrue( diag.canDiagnose( me ) );
-        
-        diag.diagnose( me );   
-        
+
+        diag.diagnose( me );
+
     }
 }
diff --git a/maven-core/src/test/java/org/apache/maven/usability/PluginErrorDiagnoserTest.java b/maven-core/src/test/java/org/apache/maven/usability/PluginErrorDiagnoserTest.java
index 9d3ad3a..e6b3026 100644
--- a/maven-core/src/test/java/org/apache/maven/usability/PluginErrorDiagnoserTest.java
+++ b/maven-core/src/test/java/org/apache/maven/usability/PluginErrorDiagnoserTest.java
@@ -64,11 +64,11 @@
 
         ComponentConfigurationException cce = new ComponentConfigurationException(
                                                                                    "Class \'org.apache.maven.plugin.jar.JarMojo\' does not contain a field named \'addClasspath\'" );
-        
+
         PluginDescriptor pd = new PluginDescriptor();
-        pd.setGroupId("testGroup");
-        pd.setArtifactId("testArtifact");
-        
+        pd.setGroupId( "testGroup" );
+        pd.setArtifactId( "testArtifact" );
+
         PluginConfigurationException pce = new PluginConfigurationException( pd, "test", cce );
 
         assertTrue( diagnoser.canDiagnose( pce ) );
diff --git a/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/ErrorDiagnoser.java b/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/ErrorDiagnoser.java
index de6796f..bf46000 100644
--- a/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/ErrorDiagnoser.java
+++ b/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/ErrorDiagnoser.java
@@ -21,10 +21,10 @@
 
 public interface ErrorDiagnoser
 {
-    public static final String ROLE = ErrorDiagnoser.class.getName();
+    String ROLE = ErrorDiagnoser.class.getName();
 
-    public boolean canDiagnose( Throwable error );
+    boolean canDiagnose( Throwable error );
 
-    public String diagnose( Throwable error );
+    String diagnose( Throwable error );
 
 }
diff --git a/maven-model/src/main/mdo/maven.mdo b/maven-model/src/main/mdo/maven.mdo
index 57d86c4..a343869 100644
--- a/maven-model/src/main/mdo/maven.mdo
+++ b/maven-model/src/main/mdo/maven.mdo
@@ -2283,6 +2283,7 @@
           <name>id</name>
           <version>4.0.0</version>
           <required>true</required>
+          <identifier>true</identifier>
           <description>
             <![CDATA[
             A unique identifier for a repository. This is used to match the repository
@@ -2322,33 +2323,6 @@
           <defaultValue>default</defaultValue>
         </field>
       </fields>
-      <codeSegments>
-        <codeSegment>
-          <version>4.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object obj )
-    {
-        if ( obj instanceof RepositoryBase ) {
-
-            final RepositoryBase other =  (RepositoryBase) obj;
-
-            if ( id != null )
-            {
-                return id.equals( other.id );
-            }
-            return super.equals(obj);
-        }
-
-        return false;
-    }
-            ]]>
-          </code>
-        </codeSegment>
-      </codeSegments>
     </class>
 
     <class>
@@ -2375,23 +2349,6 @@
           </association>
         </field>
       </fields>
-      <!-- TODO:prevent modello generation of an incorrect equals method. Could be avoided by using <identity/> tags to mark ID as the only identity field -->
-      <codeSegments>
-        <codeSegment>
-          <version>4.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object obj )
-    {
-        return super.equals( obj );
-    }
-            ]]>
-          </code>
-        </codeSegment>
-      </codeSegments>
     </class>
 
     <class>
@@ -2410,23 +2367,6 @@
           <version>4.0.0</version>
         </field>
       </fields>
-      <!-- TODO:prevent modello generation of an incorrect equals method. Could be avoided by using <identity/> tags to mark ID as the only identity field -->
-      <codeSegments>
-        <codeSegment>
-          <version>4.0.0</version>
-          <code>
-            <![CDATA[
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals( Object obj )
-    {
-        return super.equals( obj );
-    }
-            ]]>
-          </code>
-        </codeSegment>
-      </codeSegments>
     </class>
 
     <class>
diff --git a/maven-model/src/site/apt/index.apt b/maven-model/src/site/apt/index.apt
index 6c2fa3f..29c84a5 100644
--- a/maven-model/src/site/apt/index.apt
+++ b/maven-model/src/site/apt/index.apt
@@ -4,7 +4,7 @@
  Jason van Zyl
  Vincent Siveton
  -----
- 04 November 2006
+ 2006-11-04
  -----
 
 Maven Model
@@ -13,8 +13,8 @@
 
  The following are generated from this model:
 
-   * {{{apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser
+   * {{{./apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser
 
-   * A {{{maven.html}Descriptor Reference}}
+   * A {{{./maven.html}Descriptor Reference}}
 
    * An XSD {{{http://maven.apache.org/xsd/maven-v3_0_0.xsd}for Maven 1.1}} and {{{http://maven.apache.org/xsd/maven-4.0.0.xsd}for Maven 2.0}}.
diff --git a/maven-monitor/src/main/java/org/apache/maven/monitor/event/AbstractSelectiveEventMonitor.java b/maven-monitor/src/main/java/org/apache/maven/monitor/event/AbstractSelectiveEventMonitor.java
index dd5a29b..4b714bb 100644
--- a/maven-monitor/src/main/java/org/apache/maven/monitor/event/AbstractSelectiveEventMonitor.java
+++ b/maven-monitor/src/main/java/org/apache/maven/monitor/event/AbstractSelectiveEventMonitor.java
@@ -28,35 +28,35 @@
 public abstract class AbstractSelectiveEventMonitor
     implements EventMonitor
 {
-    
+
     private List boundStartEvents;
     private List boundErrorEvents;
     private List boundEndEvents;
 
-    protected AbstractSelectiveEventMonitor(String[] startEvents, String[] endEvents, String[] errorEvents)
+    protected AbstractSelectiveEventMonitor( String[] startEvents, String[] endEvents, String[] errorEvents )
     {
         this.boundStartEvents = Arrays.asList( startEvents );
-        
+
         this.boundEndEvents = Arrays.asList( endEvents );
-        
+
         this.boundErrorEvents = Arrays.asList( errorEvents );
     }
 
     public final void startEvent( String eventName, String target, long timestamp )
     {
-        if( boundStartEvents.contains( eventName ) )
+        if ( boundStartEvents.contains( eventName ) )
         {
             doStartEvent( eventName, target, timestamp );
         }
     }
-    
+
     protected void doStartEvent( String eventName, String target, long timestamp )
     {
     }
 
     public final void endEvent( String eventName, String target, long timestamp )
     {
-        if( boundEndEvents.contains( eventName ) )
+        if ( boundEndEvents.contains( eventName ) )
         {
             doEndEvent( eventName, target, timestamp );
         }
@@ -68,7 +68,7 @@
 
     public final void errorEvent( String eventName, String target, long timestamp, Throwable cause )
     {
-        if( boundErrorEvents.contains( eventName ) )
+        if ( boundErrorEvents.contains( eventName ) )
         {
             doErrorEvent( eventName, target, timestamp, cause );
         }
diff --git a/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java b/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
index 15f9a2e..dc93db2 100644
--- a/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
+++ b/maven-plugin-descriptor/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java
@@ -45,7 +45,7 @@
     implements Cloneable
 {
     /** The Plexus component type */
-    public static String MAVEN_PLUGIN = "maven-plugin";
+    public static final String MAVEN_PLUGIN = "maven-plugin";
 
     /** "once-per-session" execution strategy */
     public static final String SINGLE_PASS_EXEC_STRATEGY = "once-per-session";
@@ -192,9 +192,9 @@
     {
         if ( parameters != null && parameters.contains( parameter ) )
         {
-            throw new DuplicateParameterException( parameter.getName() +
-                " has been declared multiple times in mojo with goal: " + getGoal() + " (implementation: " +
-                getImplementation() + ")" );
+            throw new DuplicateParameterException( parameter.getName()
+                + " has been declared multiple times in mojo with goal: " + getGoal() + " (implementation: "
+                + getImplementation() + ")" );
         }
 
         if ( parameters == null )
@@ -203,7 +203,7 @@
         }
 
         parameters.add( parameter );
-        
+
         parameterMap = null;
     }
 
diff --git a/maven-plugin-descriptor/src/test/java/org/apache/maven/plugin/lifecycle/LifecycleXpp3ReaderTest.java b/maven-plugin-descriptor/src/test/java/org/apache/maven/plugin/lifecycle/LifecycleXpp3ReaderTest.java
index ad5b67d..5b314be 100644
--- a/maven-plugin-descriptor/src/test/java/org/apache/maven/plugin/lifecycle/LifecycleXpp3ReaderTest.java
+++ b/maven-plugin-descriptor/src/test/java/org/apache/maven/plugin/lifecycle/LifecycleXpp3ReaderTest.java
@@ -50,7 +50,7 @@
         assertEquals( "check id", "generate-sources", p.getId() );
         assertEquals( "check number of executions", 1, p.getExecutions().size() );
         Execution e = (Execution) p.getExecutions().iterator().next();
-        assertEquals( "check configuration", "true", ((Xpp3Dom) e.getConfiguration()).getChild( "debug" ).getValue() );
+        assertEquals( "check configuration", "true", ( (Xpp3Dom) e.getConfiguration() ).getChild( "debug" ).getValue() );
         assertEquals( "check number of goals", 1, e.getGoals().size() );
         String g = (String) e.getGoals().iterator().next();
         assertEquals( "check goal", "clover:compiler", g );
diff --git a/maven-plugin-parameter-documenter/src/test/java/org/apache/maven/usability/plugin/Xpp3ParseTest.java b/maven-plugin-parameter-documenter/src/test/java/org/apache/maven/usability/plugin/Xpp3ParseTest.java
index c65e073..f4b9ad0 100644
--- a/maven-plugin-parameter-documenter/src/test/java/org/apache/maven/usability/plugin/Xpp3ParseTest.java
+++ b/maven-plugin-parameter-documenter/src/test/java/org/apache/maven/usability/plugin/Xpp3ParseTest.java
@@ -33,28 +33,28 @@
 public class Xpp3ParseTest
     extends TestCase
 {
-    
+
     public void testParse() throws IOException, XmlPullParserException
     {
         InputStream testDocStream = getClass().getClassLoader().getResourceAsStream( "test.paramdoc.xml" );
         ParamdocXpp3Reader reader = new ParamdocXpp3Reader();
-        
-        ExpressionDocumentation documentation = reader.read(new InputStreamReader( testDocStream ) );
-        
+
+        ExpressionDocumentation documentation = reader.read( new InputStreamReader( testDocStream ) );
+
         Map exprs = documentation.getExpressionsBySyntax();
-        
+
         Expression expr = (Expression) exprs.get( "localRepository" );
-        
+
         assertNotNull( expr );
-        
+
         Properties p = expr.getCliOptions();
-        
+
         assertNotNull( p );
-        
+
         assertEquals( 1, p.size() );
-        
+
         assertEquals( "Override the local repository location on a per-build basis.", p.getProperty( "-Dmaven.repo.local=/path/to/local/repo" ) );
-        
+
     }
 
 }
diff --git a/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java b/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java
index f946ca7..9db0928 100644
--- a/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java
+++ b/maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/DefaultPluginRegistryBuilder.java
@@ -62,8 +62,8 @@
 
         getLogger().debug( "Building Maven user-level plugin registry from: '" + userRegistryFile.getAbsolutePath() + "'" );
 
-        if ( System.getProperty( "maven.home" ) != null ||
-             System.getProperty( MavenPluginRegistryBuilder.ALT_GLOBAL_PLUGIN_REG_LOCATION ) != null )
+        if ( System.getProperty( "maven.home" ) != null
+             || System.getProperty( MavenPluginRegistryBuilder.ALT_GLOBAL_PLUGIN_REG_LOCATION ) != null )
         {
             globalRegistryFile = getFile( globalRegistryPath, "maven.home", MavenPluginRegistryBuilder.ALT_GLOBAL_PLUGIN_REG_LOCATION );
 
@@ -130,13 +130,13 @@
         // -------------------------------------------------------------------------------------
         // Alright, here's the justification for all the regexp wizardry below...
         //
-        // Continuum and other server-like apps may need to locate the user-level and 
+        // Continuum and other server-like apps may need to locate the user-level and
         // global-level settings somewhere other than ${user.home} and ${maven.home},
         // respectively. Using a simple replacement of these patterns will allow them
         // to specify the absolute path to these files in a customized components.xml
         // file. Ideally, we'd do full pattern-evaluation against the sysprops, but this
         // is a first step. There are several replacements below, in order to normalize
-        // the path character before we operate on the string as a regex input, and 
+        // the path character before we operate on the string as a regex input, and
         // in order to avoid surprises with the File construction...
         // -------------------------------------------------------------------------------------
 
@@ -149,7 +149,7 @@
             String basedir = System.getProperty( basedirSysProp );
 
             basedir = basedir.replaceAll( "\\\\", "/" );
-            basedir = basedir.replaceAll("\\$", "\\\\\\$");
+            basedir = basedir.replaceAll( "\\$", "\\\\\\$" );
 
             path = pathPattern.replaceAll( "\\$\\{" + basedirSysProp + "\\}", basedir );
             path = path.replaceAll( "\\\\", "/" );
diff --git a/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java b/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
index e62d5ed..1291119 100644
--- a/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
+++ b/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
@@ -58,7 +58,7 @@
      */
     public DefaultProfileManager( PlexusContainer container )
     {
-        this( container, (Settings)null);
+        this( container, (Settings) null );
     }
 
     /**
@@ -68,7 +68,7 @@
      */
     public DefaultProfileManager( PlexusContainer container, Properties props )
     {
-        this( container, (Settings)null, props );
+        this( container, (Settings) null, props );
 
     }
 
@@ -100,7 +100,8 @@
         }
     }
 
-    public Properties getRequestProperties() {
+    public Properties getRequestProperties()
+    {
         return requestProperties;
     }
 
@@ -119,8 +120,8 @@
         Profile existing = (Profile) profilesById.get( profileId );
         if ( existing != null )
         {
-            container.getLogger().warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource() +
-                ") with new instance from source: " + profile.getSource() );
+            container.getLogger().warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource()
+                + ") with new instance from source: " + profile.getSource() );
         }
 
         profilesById.put( profile.getId(), profile );
@@ -234,7 +235,7 @@
                 {
                     continue;
                 }
-                
+
                 Profile profile = (Profile) profilesById.get( profileId );
 
                 activeFromPom.add( profile );
@@ -259,7 +260,7 @@
             systemProperties.putAll( requestProperties );
         }
 
-        container.addContextValue("SystemProperties", systemProperties);
+        container.addContextValue( "SystemProperties", systemProperties );
         try
         {
             activators = container.lookupList( ProfileActivator.ROLE );
@@ -285,7 +286,7 @@
         }
         finally
         {
-            container.getContext().put("SystemProperties", null);
+            container.getContext().put( "SystemProperties", null );
             if ( activators != null )
             {
                 try
diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
index c8f24e3..da89003 100644
--- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
+++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
@@ -171,7 +171,7 @@
     private ModelDefaultsInjector modelDefaultsInjector;
 
     private ModelInterpolator modelInterpolator;
-    
+
     private ArtifactRepositoryFactory artifactRepositoryFactory;
 
     // ----------------------------------------------------------------------
@@ -240,7 +240,7 @@
         throws ProjectBuildingException
     {
         ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setLocalRepository( localRepository );
-        
+
         return buildFromRepository( artifact, remoteArtifactRepositories, config, allowStubModel );
     }
 
@@ -394,8 +394,8 @@
         catch ( InvalidDependencyVersionException e )
         {
             throw new ProjectBuildingException( projectId,
-                                                "Unable to build project due to an invalid dependency version: " +
-                                                    e.getMessage(), e );
+                                                "Unable to build project due to an invalid dependency version: "
+                                                    + e.getMessage(), e );
         }
 
         if ( transferListener != null )
@@ -442,8 +442,8 @@
     {
         Map map = null;
         List deps;
-        if ( ( dependencyManagement != null ) && ( ( deps = dependencyManagement.getDependencies() ) != null ) &&
-            ( deps.size() > 0 ) )
+        if ( ( dependencyManagement != null ) && ( ( deps = dependencyManagement.getDependencies() ) != null )
+            && ( deps.size() > 0 ) )
         {
             map = new ManagedVersionMap( map );
 
@@ -494,8 +494,8 @@
                 }
                 catch ( InvalidVersionSpecificationException e )
                 {
-                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + d.getVersion() +
-                        "' for dependency '" + d.getManagementKey() + "': " + e.getMessage(), e );
+                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + d.getVersion()
+                        + "' for dependency '" + d.getManagementKey() + "': " + e.getMessage(), e );
                 }
             }
         }
@@ -520,8 +520,8 @@
 
         if ( checkDistributionManagementStatus )
         {
-            if ( ( project.getDistributionManagement() != null ) &&
-                ( project.getDistributionManagement().getStatus() != null ) )
+            if ( ( project.getDistributionManagement() != null )
+                && ( project.getDistributionManagement().getStatus() != null ) )
             {
                 String projectId = safeVersionlessKey( project.getGroupId(), project.getArtifactId() );
 
@@ -598,8 +598,8 @@
         }
         catch ( ArtifactResolutionException e )
         {
-            throw new ProjectBuildingException( projectId, "Error getting POM for '" + projectId +
-                "' from the repository: " + e.getMessage(), e );
+            throw new ProjectBuildingException( projectId, "Error getting POM for '" + projectId
+                + "' from the repository: " + e.getMessage(), e );
         }
         catch ( ArtifactNotFoundException e )
         {
@@ -611,8 +611,8 @@
             }
             else
             {
-                throw new ProjectBuildingException( projectId, "POM '" + projectId + "' not found in repository: " +
-                    e.getMessage(), e );
+                throw new ProjectBuildingException( projectId, "POM '" + projectId + "' not found in repository: "
+                    + e.getMessage(), e );
             }
         }
 
@@ -856,8 +856,8 @@
             }
             catch ( IOException e )
             {
-                getLogger().debug( "Cannot determine whether " + currentProject.getId() + " is a module of " +
-                    previousProject.getId() + ". Reason: " + e.getMessage(), e );
+                getLogger().debug( "Cannot determine whether " + currentProject.getId() + " is a module of "
+                    + previousProject.getId() + ". Reason: " + e.getMessage(), e );
             }
 
             modelInheritanceAssembler.assembleModelInheritance( current, previous, pathAdjustment );
@@ -916,7 +916,7 @@
             // Only track the file of a POM in the source tree
             project.setFile( projectDescriptor );
         }
-        
+
         project.setManagedVersionMap( createManagedVersionMap( projectId,
                                                                project.getDependencyManagement(),
                                                                project.getParent() ) );
@@ -990,9 +990,9 @@
         List injectedProfiles = injectActiveProfiles( profileMgr, model );
 
         activeProfiles.addAll( injectedProfiles );
-        
+
         // --------------------------------------------------------------------------------
-        
+
         Build dynamicBuild = model.getBuild();
 
         model.setBuild( ModelUtils.cloneBuild( dynamicBuild ) );
@@ -1002,7 +1002,7 @@
         mergeDeterministicBuildElements( model.getBuild(), dynamicBuild );
 
         model.setBuild( dynamicBuild );
-        
+
         // MNG-3482: Make sure depMgmt is interpolated before merging.
         if ( !isSuperPom )
         {
@@ -1020,12 +1020,12 @@
         project = new MavenProject( model, getLogger() );
 
         project.setOriginalModel( originalModel );
-        
+
         project.setActiveProfiles( activeProfiles );
 
         // TODO: maybe not strictly correct, while we should enfore that packaging has a type handler of the same id, we don't
         Artifact projectArtifact = artifactFactory.create( project );
-        
+
         project.setArtifact( projectArtifact );
         project.setProjectBuilderConfiguration( config );
 
@@ -1097,7 +1097,7 @@
         project.setReportArtifacts( createReportArtifacts( projectId, project.getReportPlugins() ) );
 
         project.setExtensionArtifacts( createExtensionArtifacts( projectId, project.getBuildExtensions() ) );
-        
+
         return project;
     }
 
@@ -1132,20 +1132,22 @@
                 dPlugin.setGroupId( iPlugin.getGroupId() );
                 dPlugin.setArtifactId( iPlugin.getArtifactId() );
                 dPlugin.setVersion( iPlugin.getVersion() );
-                
+
                 dPlugin.setDependencies( iPlugin.getDependencies() );
-                
+
                 List dExecutions = dPlugin.getExecutions();
                 if ( dExecutions != null )
                 {
                     List iExecutions = iPlugin.getExecutions();
-                    
+
                     for ( int j = 0; j < dExecutions.size(); j++ )
                     {
                         PluginExecution dExec = (PluginExecution) dExecutions.get( j );
                         PluginExecution iExec = (PluginExecution) iExecutions.get( j );
-                        
+
                         dExec.setId( iExec.getId() );
+                        dExec.setPhase( iExec.getPhase() );
+                        dExec.setGoals( iExec.getGoals() );
                     }
                 }
             }
@@ -1207,8 +1209,8 @@
         {
             String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
 
-            throw new ProjectBuildingException( projectId, "Failed to activate local (project-level) build profiles: " +
-                e.getMessage(), e );
+            throw new ProjectBuildingException( projectId, "Failed to activate local (project-level) build profiles: "
+                + e.getMessage(), e );
         }
 
         if ( !model.getRepositories().isEmpty() )
@@ -1248,8 +1250,8 @@
             {
                 throw new ProjectBuildingException( projectId, "Missing artifactId element from parent element" );
             }
-            else if ( parentModel.getGroupId().equals( model.getGroupId() ) &&
-                parentModel.getArtifactId().equals( model.getArtifactId() ) )
+            else if ( parentModel.getGroupId().equals( model.getGroupId() )
+                && parentModel.getArtifactId().equals( model.getArtifactId() ) )
             {
                 throw new ProjectBuildingException( projectId,
                                                     "Parent element is a duplicate of " + "the current project " );
@@ -1285,16 +1287,16 @@
 
                 if ( getLogger().isDebugEnabled() )
                 {
-                    getLogger().debug( "Searching for parent-POM: " + parentModel.getId() + " of project: " +
-                        project.getId() + " in relative path: " + parentRelativePath );
+                    getLogger().debug( "Searching for parent-POM: " + parentModel.getId() + " of project: "
+                        + project.getId() + " in relative path: " + parentRelativePath );
                 }
 
                 if ( parentDescriptor.isDirectory() )
                 {
                     if ( getLogger().isDebugEnabled() )
                     {
-                        getLogger().debug( "Path specified in <relativePath/> (" + parentRelativePath +
-                            ") is a directory. Searching for 'pom.xml' within this directory." );
+                        getLogger().debug( "Path specified in <relativePath/> (" + parentRelativePath
+                            + ") is a directory. Searching for 'pom.xml' within this directory." );
                     }
 
                     parentDescriptor = new File( parentDescriptor, "pom.xml" );
@@ -1303,9 +1305,9 @@
                     {
                         if ( getLogger().isDebugEnabled() )
                         {
-                            getLogger().debug( "Parent-POM: " + parentModel.getId() + " for project: " +
-                                project.getId() + " cannot be loaded from relative path: " + parentDescriptor +
-                                "; path does not exist." );
+                            getLogger().debug( "Parent-POM: " + parentModel.getId() + " for project: "
+                                + project.getId() + " cannot be loaded from relative path: " + parentDescriptor
+                                + "; path does not exist." );
                         }
                     }
                 }
@@ -1341,20 +1343,20 @@
                         candidateParentVersion = candidateParent.getParent().getVersion();
                     }
 
-                    if ( parentModel.getGroupId().equals( candidateParentGroupId ) &&
-                        parentModel.getArtifactId().equals( candidateParent.getArtifactId() ) &&
-                        parentModel.getVersion().equals( candidateParentVersion ) )
+                    if ( parentModel.getGroupId().equals( candidateParentGroupId )
+                        && parentModel.getArtifactId().equals( candidateParent.getArtifactId() )
+                        && parentModel.getVersion().equals( candidateParentVersion ) )
                     {
                         model = candidateParent;
 
-                        getLogger().debug( "Using parent-POM from the project hierarchy at: \'" +
-                            parentModel.getRelativePath() + "\' for project: " + project.getId() );
+                        getLogger().debug( "Using parent-POM from the project hierarchy at: \'"
+                            + parentModel.getRelativePath() + "\' for project: " + project.getId() );
                     }
                     else
                     {
-                        getLogger().debug( "Invalid parent-POM referenced by relative path '" +
-                            parentModel.getRelativePath() + "' in parent specification in " + project.getId() + ":" +
-                            "\n  Specified: " + parentModel.getId() + "\n  Found:     " + candidateParent.getId() );
+                        getLogger().debug( "Invalid parent-POM referenced by relative path '"
+                            + parentModel.getRelativePath() + "' in parent specification in " + project.getId() + ":"
+                            + "\n  Specified: " + parentModel.getId() + "\n  Found:     " + candidateParent.getId() );
                     }
                 }
                 else if ( getLogger().isDebugEnabled() )
@@ -1389,8 +1391,8 @@
 
                 if ( getLogger().isDebugEnabled() )
                 {
-                    getLogger().debug( "Retrieving parent-POM: " + parentModel.getId() + " for project: " +
-                        project.getId() + " from the repository." );
+                    getLogger().debug( "Retrieving parent-POM: " + parentModel.getId() + " for project: "
+                        + project.getId() + " from the repository." );
                 }
 
                 parentArtifact = artifactFactory.createParentArtifact( parentModel.getGroupId(),
@@ -1403,15 +1405,15 @@
                 }
                 catch ( ProjectBuildingException e )
                 {
-                    throw new ProjectBuildingException( project.getId(), "Cannot find parent: " + e.getProjectId() +
-                        " for project: " + project.getId(), e );
+                    throw new ProjectBuildingException( project.getId(), "Cannot find parent: " + e.getProjectId()
+                        + " for project: " + project.getId(), e );
                 }
             }
 
             if ( ( model != null ) && !"pom".equals( model.getPackaging() ) )
             {
-                throw new ProjectBuildingException( projectId, "Parent: " + model.getId() + " of project: " +
-                    projectId + " has wrong packaging: " + model.getPackaging() + ". Must be 'pom'." );
+                throw new ProjectBuildingException( projectId, "Parent: " + model.getId() + " of project: "
+                    + projectId + " has wrong packaging: " + model.getPackaging() + ". Must be 'pom'." );
             }
 
             MavenProject parent = assembleLineage( model,
@@ -1432,17 +1434,17 @@
         return project;
     }
 
-    private void mergeManagedDependencies(Model model, ProjectBuilderConfiguration config, List parentSearchRepositories)
+    private void mergeManagedDependencies( Model model, ProjectBuilderConfiguration config, List parentSearchRepositories )
         throws ProjectBuildingException
     {
         DependencyManagement modelDepMgmt = model.getDependencyManagement();
 
-        if (modelDepMgmt != null)
+        if ( modelDepMgmt != null )
         {
             Map depsMap = new TreeMap();
             Iterator iter = modelDepMgmt.getDependencies().iterator();
             boolean doInclude = false;
-            while (iter.hasNext())
+            while ( iter.hasNext() )
             {
                 Dependency dep = (Dependency) iter.next();
                 depsMap.put( dep.getManagementKey(), dep );
@@ -1451,23 +1453,23 @@
                     doInclude = true;
                 }
             }
-            Map newDeps = new TreeMap(depsMap);
+            Map newDeps = new TreeMap( depsMap );
             iter = modelDepMgmt.getDependencies().iterator();
-            if (doInclude)
+            if ( doInclude )
             {
-                while (iter.hasNext())
+                while ( iter.hasNext() )
                 {
-                    Dependency dep = (Dependency)iter.next();
+                    Dependency dep = (Dependency) iter.next();
                     if ( dep.getType().equals( "pom" )
                          && Artifact.SCOPE_IMPORT.equals( dep.getScope() ) )
                     {
                         Artifact artifact = artifactFactory.createProjectArtifact( dep.getGroupId(), dep.getArtifactId(),
                                                                                   dep.getVersion(), dep.getScope() );
-                        MavenProject project = buildFromRepository(artifact, parentSearchRepositories, config, false);
+                        MavenProject project = buildFromRepository( artifact, parentSearchRepositories, config, false );
 
                         DependencyManagement depMgmt = project.getDependencyManagement();
 
-                        if (depMgmt != null)
+                        if ( depMgmt != null )
                         {
                             if ( getLogger().isDebugEnabled() )
                             {
@@ -1478,17 +1480,17 @@
                             {
                                 Dependency includedDep = (Dependency) it.next();
                                 String key = includedDep.getManagementKey();
-                                if (!newDeps.containsKey(key))
+                                if ( !newDeps.containsKey( key ) )
                                 {
                                     newDeps.put( includedDep.getManagementKey(), includedDep );
                                 }
                             }
-                            newDeps.remove(dep.getManagementKey());
+                            newDeps.remove( dep.getManagementKey() );
                         }
                     }
                 }
-                List deps = new ArrayList(newDeps.values());
-                modelDepMgmt.setDependencies(deps);
+                List deps = new ArrayList( newDeps.values() );
+                modelDepMgmt.setDependencies( deps );
             }
         }
     }
@@ -1587,8 +1589,8 @@
         }
         catch ( IOException e )
         {
-            throw new ProjectBuildingException( projectId, "Failed to build model from file '" +
-                file.getAbsolutePath() + "'.\nError: \'" + e.getLocalizedMessage() + "\'", e );
+            throw new ProjectBuildingException( projectId, "Failed to build model from file '"
+                + file.getAbsolutePath() + "'.\nError: \'" + e.getLocalizedMessage() + "\'", e );
         }
         finally
         {
@@ -1635,8 +1637,8 @@
         }
         catch ( IOException e )
         {
-            throw new ProjectBuildingException( projectId, "Failed build model from URL \'" + url.toExternalForm() +
-                "\'\nError: \'" + e.getLocalizedMessage() + "\'", e );
+            throw new ProjectBuildingException( projectId, "Failed build model from URL \'" + url.toExternalForm()
+                + "\'\nError: \'" + e.getLocalizedMessage() + "\'", e );
         }
         finally
         {
@@ -1679,9 +1681,9 @@
             }
             catch ( InvalidVersionSpecificationException e )
             {
-                throw new ProjectBuildingException( projectId, "Unable to parse version '" + version +
-                    "' for plugin '" + ArtifactUtils.versionlessKey( p.getGroupId(), p.getArtifactId() ) + "': " +
-                    e.getMessage(), e );
+                throw new ProjectBuildingException( projectId, "Unable to parse version '" + version
+                    + "' for plugin '" + ArtifactUtils.versionlessKey( p.getGroupId(), p.getArtifactId() ) + "': "
+                    + e.getMessage(), e );
             }
 
             if ( artifact != null )
@@ -1724,9 +1726,9 @@
                 }
                 catch ( InvalidVersionSpecificationException e )
                 {
-                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + version +
-                        "' for report '" + ArtifactUtils.versionlessKey( p.getGroupId(), p.getArtifactId() ) + "': " +
-                        e.getMessage(), e );
+                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + version
+                        + "' for report '" + ArtifactUtils.versionlessKey( p.getGroupId(), p.getArtifactId() ) + "': "
+                        + e.getMessage(), e );
                 }
 
                 if ( artifact != null )
@@ -1771,9 +1773,9 @@
                 }
                 catch ( InvalidVersionSpecificationException e )
                 {
-                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + version +
-                        "' for extension '" + ArtifactUtils.versionlessKey( ext.getGroupId(), ext.getArtifactId() ) +
-                        "': " + e.getMessage(), e );
+                    throw new ProjectBuildingException( projectId, "Unable to parse version '" + version
+                        + "' for extension '" + ArtifactUtils.versionlessKey( ext.getGroupId(), ext.getArtifactId() )
+                        + "': " + e.getMessage(), e );
                 }
 
                 if ( artifact != null )
@@ -1814,7 +1816,7 @@
     {
         calculateConcreteStateInternal( project, config, true, new HashSet() );
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1823,11 +1825,11 @@
     {
         calculateConcreteStateInternal( project, config, processProjectReferences, ( processProjectReferences ? new HashSet() : null ) );
     }
-    
+
     /*
      * NOTE: This is a code hotspot, PLEASE be careful about the performance of logic inside or
-     * called from this method. 
-     * 
+     * called from this method.
+     *
      * NOTE: If processProjectReferences == false, processedProjects MUST NOT BE USED. It will be null.
      */
     private void calculateConcreteStateInternal( MavenProject project, ProjectBuilderConfiguration config, boolean processProjectReferences, Set processedProjects )
@@ -1837,16 +1839,16 @@
         {
             processedProjects.add( project.getId() );
         }
-        
+
         restoreDynamicStateInternal( project, config, processProjectReferences, processProjectReferences ? new HashSet( processedProjects ) : null );
-        
+
         if ( !project.isConcrete() )
         {
             if ( project.getParent() != null )
             {
                 calculateConcreteStateInternal( project.getParent(), config, processProjectReferences, processedProjects );
             }
-            
+
             Build build = project.getBuild();
             if ( build != null )
             {
@@ -1893,7 +1895,7 @@
                                                                               getLogger().isDebugEnabled() );
 
             project.preserveScriptSourceRoots( originalInterpolatedScriptSourceRoots );
-            
+
             // TODO: MNG-3731
             project.setScriptSourceRoots( originalInterpolatedScriptSourceRoots );
 //            project.setScriptSourceRoots( originalInterpolatedScriptSourceRoots == null ? null
@@ -1908,12 +1910,12 @@
             project.preserveProperties();
             project.preserveBasedir();
             project.setBuild( model.getBuild() );
-            
+
             if ( project.getExecutionProject() != null )
             {
                 calculateConcreteStateInternal( project.getExecutionProject(), config, processProjectReferences, processedProjects );
             }
-            
+
             project.setConcrete( true );
         }
 
@@ -1988,7 +1990,7 @@
     {
         restoreDynamicStateInternal( project, config, true, new HashSet() );
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1997,11 +1999,11 @@
     {
         restoreDynamicStateInternal( project, config, processProjectReferences, ( processProjectReferences ? new HashSet() : null ) );
     }
-    
+
     /*
      * NOTE: This is a code hotspot, PLEASE be careful about the performance of logic inside or
-     * called from this method. 
-     * 
+     * called from this method.
+     *
      * NOTE: If processProjectReferences == false, processedProjects MUST NOT BE USED. It will be null.
      */
     private void restoreDynamicStateInternal( MavenProject project, ProjectBuilderConfiguration config, boolean processProjectReferences, Set processedProjects )
@@ -2011,22 +2013,22 @@
         {
             processedProjects.add( project.getId() );
         }
-        
+
         if ( project.isConcrete() && projectWasChanged( project ) )
         {
             if ( project.getParent() != null )
             {
                 restoreDynamicStateInternal( project.getParent(), config, processProjectReferences, processedProjects );
             }
-            
+
             restoreBuildRoots( project, config, getLogger().isDebugEnabled() );
             restoreModelBuildSection( project, config, getLogger().isDebugEnabled() );
-            
+
             if ( project.getExecutionProject() != null )
             {
                 restoreDynamicStateInternal( project.getExecutionProject(), config, processProjectReferences, processedProjects );
             }
-            
+
             project.setConcrete( false );
         }
 
@@ -2042,40 +2044,40 @@
         {
             return true;
         }
-        
+
         if ( !objectEquals( project.getProperties(), project.getPreservedProperties() ) )
         {
             return true;
         }
-        
+
         Build oBuild = project.getOriginalInterpolatedBuild();
         Build build = project.getBuild();
-        
+
         if ( !objectEquals( oBuild.getDirectory(), build.getDirectory() ) )
         {
             return true;
         }
-        
+
         if ( !objectEquals( oBuild.getOutputDirectory(), build.getOutputDirectory() ) )
         {
             return true;
         }
-        
+
         if ( !objectEquals( oBuild.getSourceDirectory(), build.getSourceDirectory() ) )
         {
             return true;
         }
-        
+
         if ( !objectEquals( oBuild.getTestSourceDirectory(), build.getTestSourceDirectory() ) )
         {
             return true;
         }
-        
+
         if ( !objectEquals( oBuild.getScriptSourceDirectory(), build.getScriptSourceDirectory() ) )
         {
             return true;
         }
-        
+
         return false;
     }
 
@@ -2088,15 +2090,15 @@
     {
         Build changedBuild = project.getBuild();
         Build dynamicBuild = project.getDynamicBuild();
-        
+
         if ( changedBuild == null || dynamicBuild == null )
         {
             return;
         }
-        
+
         List changedPlugins = changedBuild.getPlugins();
         List dynamicPlugins = dynamicBuild.getPlugins();
-        
+
         if ( changedPlugins != null && dynamicPlugins != null && changedPlugins.size() != dynamicPlugins.size() )
         {
             changedPlugins.removeAll( dynamicPlugins );
@@ -2105,12 +2107,12 @@
                 for ( Iterator it = changedPlugins.iterator(); it.hasNext(); )
                 {
                     Plugin plugin = (Plugin) it.next();
-                    
+
                     dynamicBuild.addPlugin( plugin );
                 }
             }
         }
-        
+
         dynamicBuild.flushPluginMap();
     }
 
@@ -2249,7 +2251,7 @@
                                                       debugMessages ) );
 
         propagateNewPlugins( project );
-        
+
         project.setBuild( dynamicBuild );
 
         project.clearRestorableBuild();
@@ -2314,7 +2316,7 @@
                                                                      project.getBasedir(),
                                                                      config,
                                                                      debugMessages );
-        
+
         interpolatedOriginal = pathTranslator.unalignFromBaseDirectory( interpolatedOriginal, project.getBasedir() );
 
         String interpolatedOriginal2 = modelInterpolator.interpolate( originalInterpolatedString,
@@ -2322,7 +2324,7 @@
                                                                       project.getBasedir(),
                                                                       config,
                                                                       debugMessages );
-        
+
         interpolatedOriginal2 = pathTranslator.alignToBaseDirectory( interpolatedOriginal2, project.getBasedir() );
 
         String interpolatedChanged = modelInterpolator.interpolate( changedString,
@@ -2330,7 +2332,7 @@
                                                                     project.getBasedir(),
                                                                     config,
                                                                     debugMessages );
-        
+
         interpolatedChanged = pathTranslator.alignToBaseDirectory( interpolatedChanged, project.getBasedir() );
 
         String relativeInterpolatedChanged = modelInterpolator.interpolate( relativeChangedString,
@@ -2400,7 +2402,7 @@
                                                                  project.getBasedir(),
                                                                  config,
                                                                  debugMessages );
-            
+
             interpolated = pathTranslator.alignToBaseDirectory( interpolated, project.getBasedir() );
 
             String relativeInterpolated = modelInterpolator.interpolate( relativeChangedString,
@@ -2408,7 +2410,7 @@
                                                                          project.getBasedir(),
                                                                          config,
                                                                          debugMessages );
-            
+
             String[] original = (String[]) orig.get( interpolated );
             if ( original == null )
             {
diff --git a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
index 46bff14..d08d0a4 100644
--- a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
@@ -85,11 +85,11 @@
     implements Cloneable
 {
     public static final String EMPTY_PROJECT_GROUP_ID = "unknown";
-    
+
     public static final String EMPTY_PROJECT_ARTIFACT_ID = "empty-project";
-    
+
     public static final String EMPTY_PROJECT_VERSION = "0";
-    
+
     private Model model;
 
     private MavenProject parent;
@@ -148,23 +148,23 @@
     private Map projectReferences = new HashMap();
 
     private boolean executionRoot;
-    
+
     private Map moduleAdjustments;
 
     private File basedir;
-    
+
     private Logger logger;
-    
+
     private ProjectBuilderConfiguration projectBuilderConfiguration;
-    
+
     public MavenProject()
     {
         Model model = new Model();
-        
+
         model.setGroupId( EMPTY_PROJECT_GROUP_ID );
         model.setArtifactId( EMPTY_PROJECT_ARTIFACT_ID );
         model.setVersion( EMPTY_PROJECT_VERSION );
-        
+
         this.setModel( model );
     }
 
@@ -187,7 +187,8 @@
         deepCopy( project );
     }
 
-    private final void deepCopy(MavenProject project){
+    private void deepCopy( MavenProject project )
+    {
         // disown the parent
 
         // copy fields
@@ -282,12 +283,12 @@
         {
             setManagedVersionMap( new ManagedVersionMap( project.getManagedVersionMap() ) );
         }
-        
+
         if ( project.getReleaseArtifactRepository() != null )
         {
             setReleaseArtifactRepository( project.getReleaseArtifactRepository() );
         }
-        
+
         if ( project.getSnapshotArtifactRepository() != null )
         {
             setSnapshotArtifactRepository( project.getSnapshotArtifactRepository() );
@@ -324,31 +325,31 @@
         preservedBasedir = project.preservedBasedir;
         setConcrete( project.isConcrete() );
     }
-    
+
     public String getModulePathAdjustment( MavenProject moduleProject ) throws IOException
     {
         // FIXME: This is hacky. What if module directory doesn't match artifactid, and parent
         // is coming from the repository??
-        
-        // FIXME: If there is a hierarchy of three projects, with the url specified at the top, 
+
+        // FIXME: If there is a hierarchy of three projects, with the url specified at the top,
         // and the top two projects are referenced from copies that are in the repository, the
         // middle-level POM doesn't have a File associated with it (or the file's directory is
         // of an unexpected name), and module path adjustments fail.
         String module = moduleProject.getArtifactId();
-        
+
         File moduleFile = moduleProject.getFile();
-        
+
         if ( moduleFile != null )
         {
             File moduleDir = moduleFile.getCanonicalFile().getParentFile();
-            
+
             module = moduleDir.getName();
         }
-        
+
         if ( moduleAdjustments == null )
         {
             moduleAdjustments = new HashMap();
-            
+
             List modules = getModules();
             if ( modules != null )
             {
@@ -356,21 +357,21 @@
                 {
                     String modulePath = (String) it.next();
                     String moduleName = modulePath;
-                    
+
                     if ( moduleName.endsWith( "/" ) || moduleName.endsWith( "\\" ) )
                     {
                         moduleName = moduleName.substring( 0, moduleName.length() - 1 );
                     }
-                    
+
                     int lastSlash = moduleName.lastIndexOf( '/' );
-                    
+
                     if ( lastSlash < 0 )
                     {
                         lastSlash = moduleName.lastIndexOf( '\\' );
                     }
-                    
+
                     String adjustment = null;
-                    
+
                     if ( lastSlash > -1 )
                     {
                         moduleName = moduleName.substring( lastSlash + 1 );
@@ -381,7 +382,7 @@
                 }
             }
         }
-        
+
         return (String) moduleAdjustments.get( module );
     }
 
@@ -441,15 +442,15 @@
         {
             return;
         }
-        
+
         if ( basedir == null )
         {
             basedir = file.getParentFile();
         }
-        
+
         this.file = file;
     }
-    
+
     public void setBasedir( File basedir )
     {
         this.basedir = basedir;
@@ -553,8 +554,8 @@
             if ( a.getArtifactHandler().isAddedToClasspath() )
             {
                 // TODO: let the scope handler deal with this
-                if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() ) ||
-                    Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
+                if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() )
+                    || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
                 {
                     addArtifactPath( a, list );
                 }
@@ -575,8 +576,8 @@
             if ( a.getArtifactHandler().isAddedToClasspath() )
             {
                 // TODO: let the scope handler deal with this
-                if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() ) ||
-                    Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
+                if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() )
+                    || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
                 {
                     list.add( a );
                 }
@@ -601,8 +602,8 @@
             Artifact a = (Artifact) i.next();
 
             // TODO: let the scope handler deal with this
-            if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() ) ||
-                Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
+            if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() )
+                || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) )
             {
                 Dependency dependency = new Dependency();
 
@@ -627,7 +628,7 @@
         list.add( getBuild().getTestOutputDirectory() );
 
         list.add( getBuild().getOutputDirectory() );
-        
+
         for ( Iterator i = getArtifacts().iterator(); i.hasNext(); )
         {
             Artifact a = (Artifact) i.next();
@@ -906,7 +907,7 @@
         {
             groupId = getModel().getParent().getGroupId();
         }
-        
+
         return groupId;
     }
 
@@ -951,7 +952,7 @@
         {
             version = getModel().getParent().getVersion();
         }
-        
+
         return version;
     }
 
@@ -1161,7 +1162,7 @@
     /**
      * All dependencies that this project has, including transitive ones.
      * Contents are lazily populated, so depending on what phases have run dependencies in some scopes won't be included.
-     * eg. if only compile phase has run, dependencies with scope test won't be included. 
+     * eg. if only compile phase has run, dependencies with scope test won't be included.
      * @return {@link Set} &lt; {@link Artifact} >
      * @see #getDependencyArtifacts() to get only direct dependencies
      */
@@ -1301,7 +1302,7 @@
 
         return pluginMgmt;
     }
-    
+
     private Build getModelBuild()
     {
         Build build = getModel().getBuild();
@@ -1312,7 +1313,7 @@
 
             getModel().setBuild( build );
         }
-        
+
         return build;
     }
 
@@ -1328,7 +1329,7 @@
             build.flushPluginMap();
         }
     }
-    
+
     public void injectPluginManagementInfo( Plugin plugin )
     {
         PluginManagement pm = getModelBuild().getPluginManagement();
@@ -1445,7 +1446,7 @@
                 }
             }
         }
-        
+
 //        PluginManagement pluginManagement = getBuild().getPluginManagement();
 //        if ( pluginManagement != null && pluginManagement.getPlugins() != null )
 //        {
@@ -1470,7 +1471,7 @@
 //                            }
 //                        }
 //                    }
-//                    
+//
 //                    dom = Xpp3Dom.mergeXpp3Dom( dom, managedDom );
 //                    break;
 //                }
@@ -1734,7 +1735,7 @@
     {
         return snapshotArtifactRepository;
     }
-    
+
     public void resolveActiveArtifacts()
     {
         Set depArtifacts = getDependencyArtifacts();
@@ -1742,23 +1743,23 @@
         {
             return;
         }
-        
+
         Set updated = new LinkedHashSet( depArtifacts.size() );
         int updatedCount = 0;
-        
+
         for ( Iterator it = depArtifacts.iterator(); it.hasNext(); )
         {
             Artifact depArtifact = (Artifact) it.next();
             Artifact replaced = replaceWithActiveArtifact( depArtifact );
-            
+
             if ( depArtifact != replaced )
             {
                 updatedCount++;
             }
-            
+
             updated.add( replaced );
         }
-        
+
         if ( updatedCount > 0 )
         {
             setDependencyArtifacts( updated );
@@ -1810,7 +1811,7 @@
 
     /**
      * Tries to resolve the specified artifact from the given collection of attached project artifacts.
-     * 
+     *
      * @param artifacts The attached artifacts, may be <code>null</code>.
      * @param requestedArtifact The artifact to resolve, must not be <code>null</code>.
      * @return The matching artifact or <code>null</code> if not found.
@@ -1849,7 +1850,7 @@
      * Gets the repository conflict id of the specified artifact. Unlike the dependency conflict id, the repository
      * conflict id uses the artifact file extension instead of the artifact type. Hence, the repository conflict id more
      * closely reflects the identity of artifacts as perceived by a repository.
-     * 
+     *
      * @param artifact The artifact, must not be <code>null</code>.
      * @return The repository conflict id, never <code>null</code>.
      */
@@ -1879,7 +1880,7 @@
         {
             return;
         }
-        
+
         if ( logger.isDebugEnabled() )
         {
             StringBuffer message = new StringBuffer();
@@ -1889,7 +1890,7 @@
             message.append( "\nRequested Dependency: " ).append( artifact.getId() );
             message.append( "\n\nNOTE: You may need to run this build to the 'compile' lifecycle phase, or farther, in order to build the dependency artifact." );
             message.append( "\n" );
-            
+
             logger.debug( message.toString() );
         }
         else
@@ -1898,7 +1899,8 @@
         }
     }
 
-    private void addArtifactPath(Artifact a, List list) throws DependencyResolutionRequiredException
+    private void addArtifactPath( Artifact a, List list )
+        throws DependencyResolutionRequiredException
     {
         File file = a.getFile();
         if ( file == null )
@@ -1907,13 +1909,13 @@
         }
         list.add( file.getPath() );
     }
-    
+
     /**
      * Default toString
      */
     public String toString()
     {
-        StringBuffer sb = new StringBuffer(30);
+        StringBuffer sb = new StringBuffer( 30 );
         sb.append( "MavenProject: " );
         sb.append( this.getGroupId() );
         sb.append( ":" );
@@ -1921,19 +1923,19 @@
         sb.append( ":" );
         sb.append( this.getVersion() );
         sb.append( " @ " );
-        
-        try 
+
+        try
         {
             sb.append( this.getFile().getPath() );
         }
-        catch (NullPointerException e)
+        catch ( NullPointerException e )
         {
             //don't log it.
         }
-        
-        return sb.toString();        
+
+        return sb.toString();
     }
-    
+
     /**
      * @throws CloneNotSupportedException
      * @since 2.0.9
@@ -1949,7 +1951,7 @@
 // ----------------------------------------------------------------------------
 // CODE BELOW IS USED TO PRESERVE DYNAMISM IN THE BUILD SECTION OF THE POM.
 // ----------------------------------------------------------------------------
-    
+
     private Build dynamicBuild;
 
     private Build originalInterpolatedBuild;
@@ -2100,9 +2102,9 @@
     {
         this.originalInterpolatedScriptSourceRoots = originalInterpolatedScriptSourceRoots;
     }
-    
+
     private Properties preservedProperties;
-    
+
     public Properties getPreservedProperties()
     {
         return preservedProperties;
@@ -2114,16 +2116,16 @@
         if ( p != null )
         {
             preservedProperties = new Properties();
-            for( Enumeration e = p.propertyNames(); e.hasMoreElements(); )
+            for ( Enumeration e = p.propertyNames(); e.hasMoreElements(); )
             {
                 String key = (String) e.nextElement();
                 preservedProperties.setProperty( key, p.getProperty( key ) );
             }
         }
     }
-    
+
     private File preservedBasedir;
-    
+
     public File getPreservedBasedir()
     {
         return preservedBasedir;
diff --git a/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java b/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
index c84b77b..4d290f2 100644
--- a/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
+++ b/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
@@ -232,7 +232,7 @@
                 // MNG-3719: merge currentPlugin with firstPlugin as parent,
                 // then use updated currentPlugin as new parent
                 mergePluginDefinitions( currentPlugin, firstPlugin, false );
-                normalized.set(idx, currentPlugin);
+                normalized.set( idx, currentPlugin );
             }
             else
             {
@@ -249,14 +249,14 @@
         {
             return null;
         }
-        
+
         ReportSet result = new ReportSet();
-        
+
         result.setConfiguration( cloneConfiguration( src.getConfiguration() ) );
         result.setId( src.getId() );
         result.setInherited( src.getInherited() );
         result.setReports( cloneListOfStrings( src.getReports() ) );
-        
+
         return result;
     }
 
@@ -266,16 +266,16 @@
         {
             return null;
         }
-        
+
         ReportPlugin result = new ReportPlugin();
-        
+
         result.setArtifactId( src.getArtifactId() );
         result.setConfiguration( cloneConfiguration( src.getConfiguration() ) );
         result.setGroupId( src.getGroupId() );
         result.setInherited( src.getInherited() );
         result.setReportSets( cloneList( src.getReportSets(), REPORT_SET_CLONER ) );
         result.setVersion( src.getVersion() );
-        
+
         return result;
     }
 
@@ -285,13 +285,13 @@
         {
             return null;
         }
-        
+
         Profile result = new Profile();
-        
+
         cloneModelBaseFields( src, result );
-        
+
         result.setActivation( cloneActivation( src.getActivation() ) );
-        
+
         BuildBase resultBuild = null;
         if ( src.getBuild() != null )
         {
@@ -299,10 +299,10 @@
             cloneBuildBaseFields( src.getBuild(), resultBuild );
         }
         result.setBuild( resultBuild );
-        
+
         result.setId( src.getId() );
         result.setSource( src.getSource() );
-        
+
         return result;
     }
 
@@ -311,7 +311,7 @@
         result.setDependencies( cloneList( src.getDependencies(), DEPENDENCY_CLONER ) );
         result.setDependencyManagement( cloneDependencyManagement( src.getDependencyManagement() ) );
         result.setDistributionManagement( cloneDistributionManagement( src.getDistributionManagement() ) );
-        
+
         result.setModules( cloneListOfStrings( src.getModules() ) );
 
         result.setPluginRepositories( cloneList( src.getPluginRepositories(), REPOSITORY_CLONER ) );
@@ -326,13 +326,13 @@
         {
             return null;
         }
-        
+
         Reporting result = new Reporting();
-        
+
         result.setExcludeDefaults( src.isExcludeDefaults() );
         result.setOutputDirectory( src.getOutputDirectory() );
         result.setPlugins( cloneList( src.getPlugins(), REPORT_PLUGIN_CLONER ) );
-        
+
         return result;
     }
 
@@ -342,14 +342,14 @@
         {
             return null;
         }
-        
+
         Activation result = new Activation();
         result.setActiveByDefault( src.isActiveByDefault() );
         result.setFile( cloneActivationFile( src.getFile() ) );
         result.setJdk( src.getJdk() );
         result.setOs( cloneActivationOs( src.getOs() ) );
         result.setProperty( cloneActivationProperty( src.getProperty() ) );
-        
+
         return result;
     }
 
@@ -359,12 +359,12 @@
         {
             return null;
         }
-        
+
         ActivationProperty result = new ActivationProperty();
-        
+
         result.setName( src.getName() );
         result.setValue( src.getValue() );
-        
+
         return result;
     }
 
@@ -374,14 +374,14 @@
         {
             return null;
         }
-        
+
         ActivationOS result = new ActivationOS();
-        
+
         result.setArch( src.getArch() );
         result.setFamily( src.getFamily() );
         result.setName( src.getName() );
         result.setVersion( src.getVersion() );
-        
+
         return result;
     }
 
@@ -391,9 +391,9 @@
         {
             return null;
         }
-        
+
         ActivationFile result = new ActivationFile();
-        
+
         result.setExists( src.getExists() );
         result.setMissing( src.getMissing() );
 
@@ -406,14 +406,14 @@
         {
             return null;
         }
-        
+
         Repository result = new Repository();
-        
+
         result.setReleases( cloneRepositoryPolicy( src.getReleases() ) );
         result.setSnapshots( cloneRepositoryPolicy( src.getSnapshots() ) );
-        
+
         cloneRepositoryBaseFields( src, result );
-        
+
         return result;
     }
 
@@ -423,13 +423,13 @@
         {
             return null;
         }
-        
+
         RepositoryPolicy result = new RepositoryPolicy();
-        
+
         result.setChecksumPolicy( src.getChecksumPolicy() );
         result.setEnabled( src.isEnabled() );
         result.setUpdatePolicy( src.getUpdatePolicy() );
-        
+
         return result;
     }
 
@@ -439,16 +439,16 @@
         {
             return null;
         }
-        
+
         MailingList result = new MailingList();
-        
+
         result.setArchive( src.getArchive() );
         result.setName( src.getName() );
         result.setOtherArchives( src.getOtherArchives() );
         result.setPost( src.getPost() );
         result.setSubscribe( src.getSubscribe() );
         result.setUnsubscribe( src.getUnsubscribe() );
-        
+
         return result;
     }
 
@@ -511,8 +511,8 @@
                 // 1. we're not processing the plugins in an inheritance-based merge
                 // 2. the parent's <inherited/> flag is not set
                 // 3. the parent's <inherited/> flag is set to true
-                if ( !handleAsInheritance || ( parentInherited == null ) ||
-                    Boolean.valueOf( parentInherited ).booleanValue() )
+                if ( !handleAsInheritance || ( parentInherited == null )
+                    || Boolean.valueOf( parentInherited ).booleanValue() )
                 {
                     Plugin childPlugin = (Plugin) childPlugins.get( parentPlugin.getKey() );
 
@@ -608,7 +608,7 @@
     /**
      * Merge the list of reporting plugins from parent pom and child pom
      * TODO it's pretty much a copy of {@link #mergePluginLists(PluginContainer, PluginContainer, boolean)}
-     * 
+     *
      * @param child
      * @param parent
      * @param handleAsInheritance
@@ -659,8 +659,8 @@
                 // 1. we're not processing the plugins in an inheritance-based merge
                 // 2. the parent's <inherited/> flag is not set
                 // 3. the parent's <inherited/> flag is set to true
-                if ( !handleAsInheritance || ( parentInherited == null ) ||
-                    Boolean.valueOf( parentInherited ).booleanValue() )
+                if ( !handleAsInheritance || ( parentInherited == null )
+                    || Boolean.valueOf( parentInherited ).booleanValue() )
                 {
                     ReportPlugin childPlugin = (ReportPlugin) childPlugins.get( parentPlugin.getKey() );
 
@@ -763,21 +763,21 @@
                     }
 
                     assembledExecutions.put( assembled.getId(), assembled );
-                    mergedExecutions.add(assembled);
+                    mergedExecutions.add( assembled );
                 }
             }
 
             for ( Iterator it = child.getExecutions().iterator(); it.hasNext(); )
             {
-                PluginExecution childExecution = (PluginExecution)it.next();
+                PluginExecution childExecution = (PluginExecution) it.next();
 
                 if ( !assembledExecutions.containsKey( childExecution.getId() ) )
                 {
-                    mergedExecutions.add(childExecution);
+                    mergedExecutions.add( childExecution );
                 }
             }
 
-            child.setExecutions(mergedExecutions);
+            child.setExecutions( mergedExecutions );
 
             child.flushExecutionMap();
         }
@@ -802,7 +802,7 @@
 
         boolean parentIsInherited = ( parentInherited == null ) || Boolean.valueOf( parentInherited ).booleanValue();
 
-        // merge configuration just like with build plugins	
+        // merge configuration just like with build plugins
         if ( parentIsInherited )
         {
             Xpp3Dom childConfiguration = (Xpp3Dom) child.getConfiguration();
@@ -947,35 +947,35 @@
         {
             return null;
         }
-        
+
         Model result = new Model();
-        
+
         cloneModelBaseFields( src, result );
 
         result.setArtifactId( src.getArtifactId() );
         result.setBuild( cloneBuild( src.getBuild() ) );
         result.setCiManagement( cloneCiManagement( src.getCiManagement() ) );
-        
+
         result.setContributors( cloneList( src.getContributors(), CONTRIBUTOR_CLONER ) );
-        
+
         result.setDescription( src.getDescription() );
         result.setDevelopers( cloneList( src.getDevelopers(), DEVELOPER_CLONER ) );
-        
+
         result.setGroupId( src.getGroupId() );
         result.setInceptionYear( src.getInceptionYear() );
         result.setIssueManagement( cloneIssueManagement( src.getIssueManagement() ) );
         result.setLicenses( cloneList( src.getLicenses(), LICENSE_CLONER ) );
-        
+
         result.setMailingLists( cloneList( src.getMailingLists(), MAILING_LIST_CLONER ) );
         result.setModelVersion( src.getModelVersion() );
         result.setName( src.getName() );
         result.setOrganization( cloneOrganization( src.getOrganization() ) );
         result.setPackaging( src.getPackaging() );
         result.setParent( cloneParent( src.getParent() ) );
-        
+
         result.setPrerequisites( clonePrerequisites( src.getPrerequisites() ) );
         result.setProfiles( cloneList( src.getProfiles(), PROFILE_CLONER ) );
-        
+
         result.setScm( cloneScm( src.getScm() ) );
         result.setUrl( src.getUrl() );
         result.setVersion( src.getVersion() );
@@ -989,14 +989,14 @@
         {
             return null;
         }
-        
+
         Scm result = new Scm();
-        
+
         result.setConnection( src.getConnection() );
         result.setDeveloperConnection( src.getDeveloperConnection() );
         result.setTag( src.getTag() );
         result.setUrl( src.getUrl() );
-        
+
         return result;
     }
 
@@ -1006,9 +1006,9 @@
         {
             return null;
         }
-        
+
         Prerequisites result = new Prerequisites();
-        
+
         result.setMaven( src.getMaven() );
 
         return result;
@@ -1020,12 +1020,12 @@
         {
             return null;
         }
-        
+
         Organization result = new Organization();
-        
+
         result.setName( src.getName() );
         result.setUrl( src.getUrl() );
-        
+
         return result;
     }
 
@@ -1035,14 +1035,14 @@
         {
             return null;
         }
-        
+
         License result = new License();
-        
+
         result.setComments( src.getComments() );
         result.setDistribution( src.getDistribution() );
         result.setName( src.getName() );
         result.setUrl( src.getUrl() );
-        
+
         return result;
     }
 
@@ -1052,12 +1052,12 @@
         {
             return null;
         }
-        
+
         IssueManagement result = new IssueManagement();
-        
+
         result.setSystem( src.getSystem() );
         result.setUrl( src.getUrl() );
-        
+
         return result;
     }
 
@@ -1067,16 +1067,16 @@
         {
             return null;
         }
-        
+
         DistributionManagement result = new DistributionManagement();
-        
+
         result.setDownloadUrl( src.getDownloadUrl() );
         result.setRelocation( cloneRelocation( src.getRelocation() ) );
         result.setRepository( cloneDeploymentRepository( src.getRepository() ) );
         result.setSite( cloneSite( src.getSite() ) );
         result.setSnapshotRepository( cloneDeploymentRepository( src.getSnapshotRepository() ) );
         result.setStatus( src.getStatus() );
-        
+
         return result;
     }
 
@@ -1086,13 +1086,13 @@
         {
             return null;
         }
-        
+
         Site result = new Site();
-        
+
         result.setId( src.getId() );
         result.setName( src.getName() );
         result.setUrl( src.getUrl() );
-        
+
         return result;
     }
 
@@ -1102,13 +1102,13 @@
         {
             return null;
         }
-        
+
         DeploymentRepository result = new DeploymentRepository();
-        
+
         result.setUniqueVersion( src.isUniqueVersion() );
-        
+
         cloneRepositoryBaseFields( src, result );
-        
+
         return result;
     }
 
@@ -1126,14 +1126,14 @@
         {
             return null;
         }
-        
+
         Relocation result = new Relocation();
-        
+
         result.setArtifactId( src.getArtifactId() );
         result.setGroupId( src.getGroupId() );
         result.setMessage( src.getMessage() );
         result.setVersion( src.getVersion() );
-        
+
         return result;
     }
 
@@ -1143,10 +1143,10 @@
         {
             return null;
         }
-        
+
         DependencyManagement result = new DependencyManagement();
         result.setDependencies( cloneList( src.getDependencies(), DEPENDENCY_CLONER ) );
-        
+
         return result;
     }
 
@@ -1161,7 +1161,7 @@
                 result.add( cloner.cloneModelPart( (Object) it.next() ) );
             }
         }
-        
+
         return result;
     }
 
@@ -1171,29 +1171,29 @@
         {
             return null;
         }
-        
+
         Contributor result = new Contributor();
         cloneContributorFields( src, result );
-        
+
         return result;
     }
-    
+
     public static Developer cloneDeveloper( Developer src )
     {
         if ( src == null )
         {
             return null;
         }
-        
+
         Developer result = new Developer();
-        
+
         result.setId( src.getId() );
-        
+
         cloneContributorFields( src, result );
-        
+
         return result;
     }
-    
+
     private static void cloneContributorFields( Contributor src, Contributor result )
     {
         result.setEmail( src.getEmail() );
@@ -1212,9 +1212,9 @@
         {
             return null;
         }
-        
+
         CiManagement result = new CiManagement();
-        
+
         List notifiers = null;
         if ( src.getNotifiers() != null )
         {
@@ -1225,10 +1225,10 @@
             }
         }
         result.setNotifiers( cloneList( src.getNotifiers(), NOTIFIER_CLONER ) );
-        
+
         result.setSystem( src.getSystem() );
         result.setUrl( src.getUrl() );
-        
+
         return result;
     }
 
@@ -1238,7 +1238,7 @@
         {
             return null;
         }
-        
+
         Notifier result = new Notifier();
         result.setAddress( src.getAddress() );
         result.setConfiguration( cloneProperties( src.getConfiguration() ) );
@@ -1246,7 +1246,7 @@
         result.setSendOnFailure( result.isSendOnFailure() );
         result.setSendOnSuccess( result.isSendOnSuccess() );
         result.setSendOnWarning( result.isSendOnWarning() );
-        
+
         return result;
     }
 
@@ -1256,14 +1256,14 @@
         {
             return null;
         }
-        
+
         Properties result = new Properties();
-        for( Enumeration e = src.propertyNames(); e.hasMoreElements(); )
+        for ( Enumeration e = src.propertyNames(); e.hasMoreElements(); )
         {
             String key = (String) e.nextElement();
             result.setProperty( key, src.getProperty( key ) );
         }
-        
+
         return result;
     }
 
@@ -1275,17 +1275,17 @@
         }
 
         Build result = new Build();
-        
+
         cloneBuildBaseFields( src, result );
-        
+
         result.setExtensions( cloneList( src.getExtensions(), EXTENSION_CLONER ) );
         result.setOutputDirectory( src.getOutputDirectory() );
-        
+
         result.setScriptSourceDirectory( src.getScriptSourceDirectory() );
         result.setSourceDirectory( src.getSourceDirectory() );
         result.setTestOutputDirectory( src.getTestOutputDirectory() );
         result.setTestSourceDirectory( src.getTestSourceDirectory() );
-        
+
         return result;
     }
 
@@ -1293,15 +1293,15 @@
     {
         result.setDefaultGoal( src.getDefaultGoal() );
         result.setDirectory( src.getDirectory() );
-        
+
         result.setFilters( cloneListOfStrings( src.getFilters() ) );
         result.setFinalName( src.getFinalName() );
-        
+
         result.setPluginManagement( clonePluginManagement( src.getPluginManagement() ) );
         result.setPlugins( cloneList( src.getPlugins(), PLUGIN_CLONER ) );
- 
+
         result.setResources( cloneList( src.getResources(), RESOURCE_CLONER ) );
-        
+
         result.setTestResources( cloneList( src.getTestResources(), RESOURCE_CLONER ) );
     }
 
@@ -1313,7 +1313,7 @@
             pMgmt = new PluginManagement();
             pMgmt.setPlugins( cloneList( src.getPlugins(), PLUGIN_CLONER ) );
         }
-        
+
         return pMgmt;
     }
 
@@ -1323,7 +1323,7 @@
         if ( src != null )
         {
             result = new Resource();
-            
+
             result.setDirectory( src.getDirectory() );
             result.setExcludes( cloneListOfStrings( src.getExcludes() ) );
             result.setFiltering( src.isFiltering() );
@@ -1331,7 +1331,7 @@
             result.setMergeId( src.getMergeId() );
             result.setTargetPath( src.getTargetPath() );
         }
-        
+
         return result;
     }
 
@@ -1342,36 +1342,36 @@
         {
             result = new Plugin();
             result.setArtifactId( src.getArtifactId() );
-            
+
             result.setConfiguration( cloneConfiguration( src.getConfiguration() ) );
-            
+
             result.setDependencies( cloneList( src.getDependencies(), DEPENDENCY_CLONER ) );
             result.setExecutions( cloneList( src.getExecutions(), PLUGIN_EXECUTION_CLONER ) );
-            
+
             result.setExtensions( src.isExtensions() );
             result.setGroupId( src.getGroupId() );
             result.setInherited( src.getInherited() );
             result.setVersion( src.getVersion() );
         }
-        
+
         return result;
     }
 
     public static PluginExecution clonePluginExecution( PluginExecution src )
     {
         PluginExecution result = null;
-        
+
         if ( src != null )
         {
             result = new PluginExecution();
-            
+
             result.setId( src.getId() );
             result.setGoals( cloneListOfStrings( src.getGoals() ) );
             result.setConfiguration( cloneConfiguration( src.getConfiguration() ) );
             result.setInherited( src.getInherited() );
             result.setPhase( src.getPhase() );
         }
-        
+
         return result;
     }
 
@@ -1382,7 +1382,7 @@
         {
             return null;
         }
-        
+
         return new Xpp3Dom( (Xpp3Dom) configuration );
     }
 
@@ -1392,7 +1392,7 @@
         if ( src != null )
         {
             result = new Dependency();
-            
+
             result.setArtifactId( src.getArtifactId() );
             result.setClassifier( src.getClassifier() );
             result.setExclusions( cloneList( src.getExclusions(), DEPENDENCY_EXCLUSION_CLONER ) );
@@ -1403,7 +1403,7 @@
             result.setType( src.getType() );
             result.setVersion( src.getVersion() );
         }
-        
+
         return result;
     }
 
@@ -1416,7 +1416,7 @@
             result.setArtifactId( src.getArtifactId() );
             result.setGroupId( src.getGroupId() );
         }
-        
+
         return result;
     }
 
@@ -1432,7 +1432,7 @@
                 result.add( item );
             }
         }
-        
+
         return result;
     }
 
@@ -1442,7 +1442,7 @@
         rExt.setArtifactId( src.getArtifactId() );
         rExt.setGroupId( src.getGroupId() );
         rExt.setVersion( src.getVersion() );
-        
+
         return rExt;
     }
 
@@ -1452,12 +1452,12 @@
         {
             return null;
         }
-        
+
         Exclusion result = new Exclusion();
 
         result.setArtifactId( src.getArtifactId() );
         result.setGroupId( src.getGroupId() );
-        
+
         return result;
     }
 
@@ -1473,7 +1473,7 @@
         result.setGroupId( src.getGroupId() );
         result.setRelativePath( src.getRelativePath() );
         result.setVersion( src.getVersion() );
-        
+
         return result;
     }
 
@@ -1584,11 +1584,11 @@
 
         return new ArrayList( depsMap.values() );
     }
-    
+
     public static interface ModelPartCloner
     {
         Object cloneModelPart( Object src );
     }
-    
+
 
 }
diff --git a/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java b/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java
index 1f1c1a4..86860c0 100644
--- a/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java
+++ b/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java
@@ -49,7 +49,7 @@
 public class ProjectSorter
 {
     private final DAG dag;
-    
+
     private final Map projectMap;
 
     private final List<MavenProject> sortedProjects;
@@ -67,14 +67,14 @@
      * <li>do a topo sort on the graph that remains.</li>
      * </ul>
      * @throws DuplicateProjectException if any projects are duplicated by id
-     * @throws MissingProjectException 
+     * @throws MissingProjectException
      */
     public ProjectSorter( List projects )
         throws CycleDetectedException, DuplicateProjectException, MissingProjectException
     {
         this( projects, null, null, false, false );
     }
-    
+
     public ProjectSorter( List projects, List selectedProjectNames, String resumeFrom, boolean make, boolean makeDependents )
         throws CycleDetectedException, DuplicateProjectException, MissingProjectException
     {
@@ -146,7 +146,8 @@
                         addEdgeWithParentCheck( projectMap, pluginId, project, id );
                     }
 
-                    if ( !pluginId.equals( id ) ) {
+                    if ( !pluginId.equals( id ) )
+                    {
                         for ( Iterator k = plugin.getDependencies().iterator(); k.hasNext(); )
                         {
                           Dependency dependency = (Dependency) k.next();
@@ -169,12 +170,12 @@
                                   project.addProjectReference( (MavenProject) projectMap.get( dependencyId ) );
 
                                   addEdgeWithParentCheck( projectMap, dependencyId, project, id );
-                                  
+
                                   // TODO: Shouldn't we add an edge between the plugin and its dependency?
-                                  // Note that doing this may result in cycles...run 
-                                  // ProjectSorterTest.testPluginDependenciesInfluenceSorting_DeclarationInParent() 
+                                  // Note that doing this may result in cycles...run
+                                  // ProjectSorterTest.testPluginDependenciesInfluenceSorting_DeclarationInParent()
                                   // for more information, if you change this:
-                                  
+
                                   // dag.addEdge( pluginId, dependencyId );
                               }
                           }
@@ -216,7 +217,7 @@
 
             sortedProjects.add( projectMap.get( id ) );
         }
-        
+
         // TODO: !![jc; 28-jul-2005] check this; if we're using '-r' and there are aggregator tasks, this will result in weirdness.
         for ( Iterator i = sortedProjects.iterator(); i.hasNext() && topLevelProject == null; )
         {
@@ -226,19 +227,22 @@
                 topLevelProject = project;
             }
         }
-        
+
         sortedProjects = applyMakeFilter( sortedProjects, dag, projectMap, topLevelProject, selectedProjectNames, make, makeDependents );
-        
+
         resumeFrom( resumeFrom, sortedProjects, projectMap, topLevelProject );
 
         this.sortedProjects = Collections.unmodifiableList( sortedProjects );
     }
 
-    // make selected projects and possibly projects they depend on, or projects that depend on them 
+    // make selected projects and possibly projects they depend on, or projects that depend on them
     private static List applyMakeFilter( List sortedProjects, DAG dag, Map projectMap, MavenProject topLevelProject, List selectedProjectNames, boolean make, boolean makeDependents ) throws MissingProjectException
     {
-        if ( selectedProjectNames == null ) return sortedProjects;
-        
+        if ( selectedProjectNames == null )
+        {
+            return sortedProjects;
+        }
+
         MavenProject[] selectedProjects = new MavenProject[selectedProjectNames.size()];
         for ( int i = 0; i < selectedProjects.length; i++ )
         {
@@ -269,15 +273,22 @@
         }
         return sortedProjects;
     }
-    
+
     private static void resumeFrom( String resumeFrom, List sortedProjects, Map projectMap, MavenProject topLevelProject ) throws MissingProjectException
     {
-        if ( resumeFrom == null ) return;
+        if ( resumeFrom == null )
+        {
+            return;
+        }
+
         MavenProject resumeFromProject = findProject( resumeFrom, projectMap, topLevelProject );
         for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
         {
             MavenProject project = (MavenProject) i.next();
-            if ( resumeFromProject.equals( project ) ) break;
+            if ( resumeFromProject.equals( project ) )
+            {
+                break;
+            }
             i.remove();
         }
         if ( sortedProjects.isEmpty() )
@@ -285,40 +296,54 @@
             throw new MissingProjectException( "Couldn't resume, project was not scheduled to run: " + resumeFrom );
         }
     }
-    
+
     private static MavenProject findProject( String projectName, Map projectMap, MavenProject topLevelProject ) throws MissingProjectException
     {
         MavenProject project = (MavenProject) projectMap.get( projectName );
-        if ( project != null ) return project;
+        if ( project != null )
+        {
+            return project;
+        }
         // in that case, it must be a file path
         File baseDir;
-        if ( topLevelProject == null ) {
+        if ( topLevelProject == null )
+        {
             baseDir = new File( System.getProperty( "user.dir" ) );
-        } else {
+        }
+        else
+        {
             baseDir = topLevelProject.getBasedir();
             // or should this be .getFile().getParentFile() ?
         }
-        
+
         File projectDir = new File( baseDir, projectName );
-        if ( !projectDir.exists() ) {
+        if ( !projectDir.exists() )
+        {
             throw new MissingProjectException( "Couldn't find specified project dir: " + projectDir.getAbsolutePath() );
         }
-        if ( !projectDir.isDirectory() ) {
+        if ( !projectDir.isDirectory() )
+        {
             throw new MissingProjectException( "Couldn't find specified project dir (not a directory): " + projectDir.getAbsolutePath() );
         }
-        
+
         for ( Iterator i = projectMap.values().iterator(); i.hasNext(); )
         {
             project = (MavenProject) i.next();
-            if ( projectDir.equals( project.getFile().getParentFile() ) ) return project;
+            if ( projectDir.equals( project.getFile().getParentFile() ) )
+            {
+                return project;
+            }
         }
-        
+
         throw new MissingProjectException( "Couldn't find specified project in module list: " + projectDir.getAbsolutePath() );
     }
-    
+
     private static void gatherDescendents ( Vertex v, Map projectMap, Set out, Set visited )
     {
-        if ( visited.contains( v ) ) return;
+        if ( visited.contains( v ) )
+        {
+            return;
+        }
         visited.add( v );
         out.add( projectMap.get( v.getLabel() ) );
         for ( Iterator i = v.getChildren().iterator(); i.hasNext(); )
@@ -327,10 +352,13 @@
             gatherDescendents( child, projectMap, out, visited );
         }
     }
-    
+
     private static void gatherAncestors ( Vertex v, Map projectMap, Set out, Set visited )
     {
-        if ( visited.contains( v ) ) return;
+        if ( visited.contains( v ) )
+        {
+            return;
+        }
         visited.add( v );
         out.add( projectMap.get( v.getLabel() ) );
         for ( Iterator i = v.getParents().iterator(); i.hasNext(); )
@@ -339,12 +367,12 @@
             gatherAncestors( parent, projectMap, out, visited );
         }
     }
-    
+
     private void addEdgeWithParentCheck( Map projectMap, String projectRefId, MavenProject project, String id )
         throws CycleDetectedException
     {
         MavenProject extProject = (MavenProject) projectMap.get( projectRefId );
-        
+
         if ( extProject == null )
         {
             return;
@@ -383,12 +411,12 @@
     {
         return dag.getParentLabels( id );
     }
-    
+
     public DAG getDAG()
     {
         return dag;
     }
-    
+
     public Map getProjectMap()
     {
         return projectMap;
diff --git a/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java b/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java
index 03a80cb..2db3589 100644
--- a/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java
+++ b/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java
@@ -154,8 +154,8 @@
         }
         catch ( ComponentLookupException e )
         {
-            throw new InvalidRepositoryException( "Cannot find layout implementation corresponding to: \'" + layout +
-                "\' for remote repository with id: \'" + mavenRepo.getId() + "\'.", e );
+            throw new InvalidRepositoryException( "Cannot find layout implementation corresponding to: \'" + layout
+                + "\' for remote repository with id: \'" + mavenRepo.getId() + "\'.", e );
         }
         return repositoryLayout;
     }
diff --git a/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java b/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
index 4ab0f07..26ec543 100644
--- a/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
+++ b/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
@@ -78,7 +78,7 @@
 
     // lazily instantiated and cached.
     private MavenProject superProject;
-    
+
     // cache
     private final Set<String> warnedPoms;
     
@@ -100,6 +100,7 @@
         
         projectBuilderConfig = configuration;
         projectBuilderConfig.setMetadataSource( this );
+        enableLogging( mms.getLogger() );
     }
     
     /**
@@ -114,20 +115,20 @@
         }
 
         ProjectRelocation rel = retrieveRelocatedProject( artifact, localRepository, remoteRepositories );
-        
+
         if ( rel == null )
         {
             return artifact;
         }
-        
+
         MavenProject project = rel.project;
         if ( project == null || getRelocationKey( artifact ).equals( getRelocationKey( project.getArtifact() ) ) )
         {
             return artifact;
         }
 
-        
-        // NOTE: Using artifact information here, since some POMs are deployed 
+
+        // NOTE: Using artifact information here, since some POMs are deployed
         // to central with one version in the filename, but another in the <version> string!
         // Case in point: org.apache.ws.commons:XmlSchema:1.1:pom.
         //
@@ -194,7 +195,7 @@
                 catch ( InvalidProjectModelException e )
                 {
                     String id = pomArtifact.getId();
-                    
+
                     if ( !warnedPoms.contains( id ) )
                     {
                         warnedPoms.add( pomArtifact.getId() );
@@ -225,8 +226,8 @@
                 }
                 catch ( ProjectBuildingException e )
                 {
-                    throw new ArtifactMetadataRetrievalException( "Unable to read the metadata file for artifact '" +
-                        artifact.getDependencyConflictId() + "': " + e.getMessage(), e, artifact );
+                    throw new ArtifactMetadataRetrievalException( "Unable to read the metadata file for artifact '"
+                        + artifact.getDependencyConflictId() + "': " + e.getMessage(), e, artifact );
                 }
 
                 if ( project != null )
@@ -261,8 +262,8 @@
                             project.setVersion( relocation.getVersion() );
                         }
 
-                        if ( artifact.getDependencyFilter() != null &&
-                            !artifact.getDependencyFilter().include( artifact ) )
+                        if ( artifact.getDependencyFilter() != null
+                            && !artifact.getDependencyFilter().include( artifact ) )
                         {
                             return null;
                         }
@@ -277,8 +278,8 @@
 
                         }
 
-                        String message = "\n  This artifact has been relocated to " + artifact.getGroupId() + ":" +
-                            artifact.getArtifactId() + ":" + artifact.getVersion() + ".\n";
+                        String message = "\n  This artifact has been relocated to " + artifact.getGroupId() + ":"
+                            + artifact.getArtifactId() + ":" + artifact.getVersion() + ".\n";
 
                         if ( relocation.getMessage() != null )
                         {
@@ -287,13 +288,13 @@
 
                         if ( artifact.getDependencyTrail() != null && artifact.getDependencyTrail().size() == 1 )
                         {
-                            getLogger().warn( "While downloading " + pomArtifact.getGroupId() + ":" +
-                                pomArtifact.getArtifactId() + ":" + pomArtifact.getVersion() + message + "\n" );
+                            getLogger().warn( "While downloading " + pomArtifact.getGroupId() + ":"
+                                + pomArtifact.getArtifactId() + ":" + pomArtifact.getVersion() + message + "\n" );
                         }
                         else
                         {
-                            getLogger().debug( "While downloading " + pomArtifact.getGroupId() + ":" +
-                                pomArtifact.getArtifactId() + ":" + pomArtifact.getVersion() + message + "\n" );
+                            getLogger().debug( "While downloading " + pomArtifact.getGroupId() + ":"
+                                + pomArtifact.getArtifactId() + ":" + pomArtifact.getVersion() + message + "\n" );
                         }
                     }
                     else
@@ -312,7 +313,7 @@
         ProjectRelocation rel = new ProjectRelocation();
         rel.project = project;
         rel.pomArtifact = pomArtifact;
-        
+
         return rel;
     }
 
@@ -325,12 +326,12 @@
         throws ArtifactMetadataRetrievalException
     {
         ProjectRelocation rel = retrieveRelocatedProject( artifact, localRepository, remoteRepositories );
-        
+
         if ( rel == null )
         {
             return null;
         }
-        
+
         MavenProject project = rel.project;
         Artifact pomArtifact = rel.pomArtifact;
 
@@ -364,8 +365,8 @@
                 }
                 catch ( InvalidDependencyVersionException e )
                 {
-                    throw new ArtifactMetadataRetrievalException( "Error in metadata for artifact '" +
-                        artifact.getDependencyConflictId() + "': " + e.getMessage(), e );
+                    throw new ArtifactMetadataRetrievalException( "Error in metadata for artifact '"
+                        + artifact.getDependencyConflictId() + "': " + e.getMessage(), e );
                 }
             }
 
@@ -467,8 +468,8 @@
             }
             catch ( InvalidVersionSpecificationException e )
             {
-                throw new InvalidDependencyVersionException( "Unable to parse version '" + d.getVersion() +
-                    "' for dependency '" + d.getManagementKey() + "': " + e.getMessage(), e );
+                throw new InvalidDependencyVersionException( "Unable to parse version '" + d.getVersion()
+                    + "' for dependency '" + d.getManagementKey() + "': " + e.getMessage(), e );
             }
             Artifact artifact = artifactFactory.createDependencyArtifact( d.getGroupId(), d.getArtifactId(),
                                                                           versionRange, d.getType(), d.getClassifier(),
@@ -481,10 +482,10 @@
 
             ArtifactFilter artifactFilter = dependencyFilter;
 
-            // MNG-3769: It would be nice to be able to process relocations here, 
+            // MNG-3769: It would be nice to be able to process relocations here,
             // so we could have this filtering step apply to post-relocated dependencies.
             // HOWEVER, this would require a much more invasive POM resolution process
-            // in order to look for relocations, which would make the early steps in 
+            // in order to look for relocations, which would make the early steps in
             // a Maven build way too heavy.
             if ( artifact != null && ( artifactFilter == null || artifactFilter.include( artifact ) ) )
             {
@@ -559,11 +560,11 @@
 
         return versions;
     }
-    
+
     private static final class ProjectRelocation
     {
         private MavenProject project;
         private Artifact pomArtifact;
     }
-    
+
 }
diff --git a/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java b/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
index 9266807..8b01477 100644
--- a/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
+++ b/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
@@ -32,7 +32,6 @@
 import org.apache.maven.project.ModelUtils;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -372,8 +371,8 @@
                     appendPath( parentScm.getConnection(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
             }
 
-            if ( StringUtils.isEmpty( childScm.getDeveloperConnection() ) &&
-                !StringUtils.isEmpty( parentScm.getDeveloperConnection() ) )
+            if ( StringUtils.isEmpty( childScm.getDeveloperConnection() )
+                && !StringUtils.isEmpty( parentScm.getDeveloperConnection() ) )
             {
                 childScm
                     .setDeveloperConnection( appendPath( parentScm.getDeveloperConnection(), child.getArtifactId(),
diff --git a/maven-project/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java b/maven-project/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
index a26d170..5091b8d 100644
--- a/maven-project/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
+++ b/maven-project/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
@@ -59,18 +59,18 @@
         validateId( "artifactId", result, model.getArtifactId() );
 
         validateStringNotEmpty( "packaging", result, model.getPackaging() );
-        
+
         if ( !model.getModules().isEmpty() && !"pom".equals( model.getPackaging() ) )
         {
-            result.addMessage( "Packaging '" + model.getPackaging() + "' is invalid. Aggregator projects " +
-                    "require 'pom' as packaging." );
+            result.addMessage( "Packaging '" + model.getPackaging() + "' is invalid. Aggregator projects "
+                    + "require 'pom' as packaging." );
         }
-        
+
         Parent parent = model.getParent();
         if ( parent != null )
         {
-            if ( parent.getGroupId().equals( model.getGroupId() ) && 
-                    parent.getArtifactId().equals( model.getArtifactId() ) )
+            if ( parent.getGroupId().equals( model.getGroupId() )
+                && parent.getArtifactId().equals( model.getArtifactId() ) )
             {
                 result.addMessage( "The parent element cannot have the same ID as the project." );
             }
@@ -93,7 +93,7 @@
             if ( Artifact.SCOPE_SYSTEM.equals( d.getScope() ) )
             {
                 String systemPath = d.getSystemPath();
-                
+
                 if ( StringUtils.isEmpty( systemPath ) )
                 {
                     result.addMessage( "For dependency " + d + ": system-scoped dependency must specify systemPath." );
@@ -102,8 +102,8 @@
                 {
                     if ( ! new File( systemPath ).isAbsolute() )
                     {
-                        result.addMessage( "For dependency " + d + ": system-scoped dependency must " +
-                                "specify an absolute path systemPath." );
+                        result.addMessage( "For dependency " + d + ": system-scoped dependency must "
+                                + "specify an absolute path systemPath." );
                     }
                 }
             }
@@ -130,7 +130,7 @@
                 if ( Artifact.SCOPE_SYSTEM.equals( d.getScope() ) )
                 {
                     String systemPath = d.getSystemPath();
-                    
+
                     if ( StringUtils.isEmpty( systemPath ) )
                     {
                         result.addMessage( "For managed dependency " + d + ": system-scoped dependency must specify systemPath." );
@@ -139,8 +139,8 @@
                     {
                         if ( ! new File( systemPath ).isAbsolute() )
                         {
-                            result.addMessage( "For managed dependency " + d + ": system-scoped dependency must " +
-                                    "specify an absolute path systemPath." );
+                            result.addMessage( "For managed dependency " + d + ": system-scoped dependency must "
+                                    + "specify an absolute path systemPath." );
                         }
                     }
                 }
diff --git a/maven-project/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java b/maven-project/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
index 294d1db..15f7eba 100644
--- a/maven-project/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
+++ b/maven-project/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
@@ -30,7 +30,7 @@
 /**
  * Verifies the version of a dependency listed in a parent's
  * dependencyManagement section is chosen over another version of the same
- * dependency, listed transitively.	
+ * dependency, listed transitively.
  *
  * @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
  * @version $Id$
@@ -67,16 +67,18 @@
 
         assertEquals( pom0Basedir, project1.getParent().getBasedir() );
         Set set = project1.getArtifacts();
-        assertNotNull("No artifacts", set);
-        assertTrue("No Artifacts", set.size() > 0);
-        assertTrue("Set size should be 3, is " + set.size(), set.size() == 3);
-        
+        assertNotNull( "No artifacts", set );
+        assertTrue( "No Artifacts", set.size() > 0 );
+        assertTrue( "Set size should be 3, is " + set.size(), set.size() == 3 );
+
         Iterator iter = set.iterator();
-        while (iter.hasNext()) {
-            Artifact artifact = (Artifact)iter.next();
-            System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() +
-              " Optional=" + (artifact.isOptional() ? "true" : "false"));
-            assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
+        while ( iter.hasNext() )
+        {
+            Artifact artifact = (Artifact) iter.next();
+            System.out.println( "Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion()
+                + " Optional=" + ( artifact.isOptional() ? "true" : "false" ) );
+            assertTrue( "Incorrect version for " + artifact.getDependencyConflictId(),
+                        artifact.getVersion().equals( "1.0" ) );
         }
 
     }
diff --git a/maven-project/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java b/maven-project/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java
index a0adb48..9b2d2a5 100644
--- a/maven-project/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java
+++ b/maven-project/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java
@@ -63,16 +63,17 @@
 
         assertEquals( pom0Basedir, project1.getParent().getBasedir() );
         Set set = project1.getArtifacts();
-        assertNotNull("No artifacts", set);
-        assertTrue("No Artifacts", set.size() > 0);
+        assertNotNull( "No artifacts", set );
+        assertTrue( "No Artifacts", set.size() > 0 );
         Iterator iter = set.iterator();
 
-        while (iter.hasNext())
+        while ( iter.hasNext() )
         {
-            Artifact artifact = (Artifact)iter.next();
-            System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " +
-                    artifact.getVersion() + " Scope: " + artifact.getScope());
-            assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
+            Artifact artifact = (Artifact) iter.next();
+            System.out.println( "Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion()
+                + " Scope: " + artifact.getScope() );
+            assertTrue( "Incorrect version for " + artifact.getDependencyConflictId(),
+                        artifact.getVersion().equals( "1.0" ) );
         }
 
     }
diff --git a/maven-project/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java b/maven-project/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java
index 1474430..6f97868 100644
--- a/maven-project/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java
+++ b/maven-project/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java
@@ -62,19 +62,20 @@
         MavenProject project1 = getProjectWithDependencies( pom1 );
 
         assertEquals( pom0Basedir, project1.getParent().getBasedir() );
-        System.out.println("Project " + project1.getId() + " " + project1);
+        System.out.println( "Project " + project1.getId() + " " + project1 );
         Set set = project1.getArtifacts();
-        assertNotNull("No artifacts", set);
-        assertTrue("No Artifacts", set.size() > 0);
+        assertNotNull( "No artifacts", set );
+        assertTrue( "No Artifacts", set.size() > 0 );
         Iterator iter = set.iterator();
-        assertTrue("Set size should be 4, is " + set.size(), set.size() == 4);
+        assertTrue( "Set size should be 4, is " + set.size(), set.size() == 4 );
 
-        while (iter.hasNext())
+        while ( iter.hasNext() )
         {
-            Artifact artifact = (Artifact)iter.next();
-            System.out.println("Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion() +
-              " Optional=" + (artifact.isOptional() ? "true" : "false"));
-            assertTrue("Incorrect version for " + artifact.getDependencyConflictId(), artifact.getVersion().equals("1.0"));
+            Artifact artifact = (Artifact) iter.next();
+            System.out.println( "Artifact: " + artifact.getDependencyConflictId() + " " + artifact.getVersion()
+                + " Optional=" + ( artifact.isOptional() ? "true" : "false" ) );
+            assertTrue( "Incorrect version for " + artifact.getDependencyConflictId(),
+                        artifact.getVersion().equals( "1.0" ) );
         }
 
     }
diff --git a/maven-reporting/maven-reporting-api/src/site/apt/index.apt b/maven-reporting/maven-reporting-api/src/site/apt/index.apt
new file mode 100644
index 0000000..e942ae8
--- /dev/null
+++ b/maven-reporting/maven-reporting-api/src/site/apt/index.apt
@@ -0,0 +1,15 @@
+ -----
+ Maven Reporting API
+ -----
+ Hervé Boutemy
+ -----
+ 2010-05-08
+ -----
+
+Maven Reporting API
+
+  API to manage report generation.
+
+  <<<maven-reporting-api>>> is included in Maven 2.x core distribution, but
+  {{{http://maven.apache.org/shared/maven-reporting-api/}moved to
+  shared components}} to achieve report decoupling from Maven 3 core.
diff --git a/maven-repository-metadata/src/main/mdo/metadata.mdo b/maven-repository-metadata/src/main/mdo/metadata.mdo
index 13c7563..21c7998 100644
--- a/maven-repository-metadata/src/main/mdo/metadata.mdo
+++ b/maven-repository-metadata/src/main/mdo/metadata.mdo
@@ -79,18 +79,16 @@
     {
         boolean changed = false;
 
-        for ( java.util.Iterator i = sourceMetadata.getPlugins().iterator(); i.hasNext(); )
+        for ( Plugin plugin : sourceMetadata.getPlugins() )
         {
-            Plugin plugin = (Plugin) i.next();
             boolean found = false;
 
-            for ( java.util.Iterator it = getPlugins().iterator(); it.hasNext() && !found; )
+            for ( Plugin preExisting : getPlugins() )
             {
-                Plugin preExisting = (Plugin) it.next();
-
                 if ( preExisting.getPrefix().equals( plugin.getPrefix() ) )
                 {
                     found = true;
+                    break;
                 }
             }
 
@@ -121,9 +119,8 @@
                 changed = true;
             }
 
-            for ( java.util.Iterator i = versioning.getVersions().iterator(); i.hasNext(); )
+            for ( String version : versioning.getVersions() )
             {
-                String version = (String) i.next();
                 if ( !v.getVersions().contains( version ) )
                 {
                     changed = true;
diff --git a/maven-repository-metadata/src/site/apt/index.apt b/maven-repository-metadata/src/site/apt/index.apt
index fdc0792..e622ebd 100644
--- a/maven-repository-metadata/src/site/apt/index.apt
+++ b/maven-repository-metadata/src/site/apt/index.apt
@@ -1,7 +1,7 @@
  -----
  Maven Repository Metadata Model
  -----
- Hervé Boutemy
+ Hervé Boutemy
  -----
  2009-04-26
  -----
@@ -12,6 +12,6 @@
 
  The following are generated from this model:
 
-   * {{{apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser, to read and write <<<maven-metadata(-*).xml>>> files
+   * {{{./apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser, to read and write <<<maven-metadata(-*).xml>>> files
 
-   * A {{{repository-metadata.html}Descriptor Reference}}
+   * A {{{./repository-metadata.html}Descriptor Reference}}
diff --git a/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java b/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
index 9ea1034..f10643d 100644
--- a/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
+++ b/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
@@ -34,7 +34,6 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.io.StringWriter;
-import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -187,11 +186,10 @@
 
     private void activateDefaultProfiles( Settings settings )
     {
-        List activeProfiles = settings.getActiveProfiles();
+        List<String> activeProfiles = settings.getActiveProfiles();
 
-        for ( Iterator profiles = settings.getProfiles().iterator(); profiles.hasNext(); )
+        for ( Profile profile : settings.getProfiles() )
         {
-            Profile profile = (Profile) profiles.next();
             if ( profile.getActivation() != null && profile.getActivation().isActiveByDefault()
                 && !activeProfiles.contains( profile.getId() ) )
             {
@@ -241,13 +239,13 @@
         // -------------------------------------------------------------------------------------
         // Alright, here's the justification for all the regexp wizardry below...
         //
-        // Continuum and other server-like apps may need to locate the user-level and 
+        // Continuum and other server-like apps may need to locate the user-level and
         // global-level settings somewhere other than ${user.home} and ${maven.home},
         // respectively. Using a simple replacement of these patterns will allow them
         // to specify the absolute path to these files in a customized components.xml
         // file. Ideally, we'd do full pattern-evaluation against the sysprops, but this
         // is a first step. There are several replacements below, in order to normalize
-        // the path character before we operate on the string as a regex input, and 
+        // the path character before we operate on the string as a regex input, and
         // in order to avoid surprises with the File construction...
         // -------------------------------------------------------------------------------------
 
@@ -270,7 +268,7 @@
             path = path.replaceAll( "\\\\", "/" );
             // ---------------------------------------------------------------------------------
             // I'm not sure if this last regexp was really intended to disallow the usage of
-            // network paths as user.home directory. Unfortunately it did. I removed it and 
+            // network paths as user.home directory. Unfortunately it did. I removed it and
             // have not detected any problems yet.
             // ---------------------------------------------------------------------------------
             // path = path.replaceAll( "//", "/" );
diff --git a/maven-settings/src/main/java/org/apache/maven/settings/RuntimeInfo.java b/maven-settings/src/main/java/org/apache/maven/settings/RuntimeInfo.java
index 9b57b41..c623a0f 100644
--- a/maven-settings/src/main/java/org/apache/maven/settings/RuntimeInfo.java
+++ b/maven-settings/src/main/java/org/apache/maven/settings/RuntimeInfo.java
@@ -43,11 +43,11 @@
     // using Boolean for 3VL (null for not-set, otherwise override with value)
 //    private Boolean checkLatest;
 
-    private Map activeProfileToSourceLevel = new HashMap();
+    private Map<String, String> activeProfileToSourceLevel = new HashMap<String, String>();
 
     private String localRepositorySourceLevel = TrackableBase.USER_LEVEL;
 
-    private Map pluginGroupIdSourceLevels = new HashMap();
+    private Map<String, String> pluginGroupIdSourceLevels = new HashMap<String, String>();
 
     private final Settings settings;
 
diff --git a/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java b/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java
index 6a6e8b8..315721a 100644
--- a/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java
+++ b/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java
@@ -24,7 +24,6 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -55,21 +54,19 @@
 
         recessive.setSourceLevel( recessiveSourceLevel );
 
-        List dominantActiveProfiles = dominant.getActiveProfiles();
-        List recessiveActiveProfiles = recessive.getActiveProfiles();
+        List<String> dominantActiveProfiles = dominant.getActiveProfiles();
+        List<String> recessiveActiveProfiles = recessive.getActiveProfiles();
 
         if ( recessiveActiveProfiles != null )
         {
             if ( dominantActiveProfiles == null )
             {
-                dominantActiveProfiles = new ArrayList();
+                dominantActiveProfiles = new ArrayList<String>();
                 dominant.setActiveProfiles( dominantActiveProfiles );
             }
 
-            for ( Iterator it = recessiveActiveProfiles.iterator(); it.hasNext(); )
+            for ( String profileId : recessiveActiveProfiles )
             {
-                String profileId = (String) it.next();
-
                 if ( !dominantActiveProfiles.contains( profileId ) )
                 {
                     dominantActiveProfiles.add( profileId );
@@ -79,21 +76,19 @@
             }
         }
 
-        List dominantPluginGroupIds = dominant.getPluginGroups();
-        List recessivePluginGroupIds = recessive.getPluginGroups();
+        List<String> dominantPluginGroupIds = dominant.getPluginGroups();
+        List<String> recessivePluginGroupIds = recessive.getPluginGroups();
 
         if ( recessivePluginGroupIds != null )
         {
             if ( dominantPluginGroupIds == null )
             {
-                dominantPluginGroupIds = new ArrayList();
+                dominantPluginGroupIds = new ArrayList<String>();
                 dominant.setPluginGroups( dominantPluginGroupIds );
             }
 
-            for ( Iterator it = recessivePluginGroupIds.iterator(); it.hasNext(); )
+            for ( String pluginGroupId : recessivePluginGroupIds )
             {
-                String pluginGroupId = (String) it.next();
-
                 if ( !dominantPluginGroupIds.contains( pluginGroupId ) )
                 {
                     dominantPluginGroupIds.add( pluginGroupId );
@@ -121,14 +116,13 @@
      * @param recessive
      * @param recessiveSourceLevel
      */
-    private static void shallowMergeById( List dominant, List recessive, String recessiveSourceLevel )
+    private static <T extends IdentifiableBase> void shallowMergeById( List<T> dominant, List<T> recessive,
+                                                                       String recessiveSourceLevel )
     {
-        Map dominantById = mapById( dominant );
+        Map<String, T> dominantById = mapById( dominant );
 
-        for ( Iterator it = recessive.iterator(); it.hasNext(); )
+        for ( T identifiable : recessive )
         {
-            IdentifiableBase identifiable = (IdentifiableBase) it.next();
-
             if ( !dominantById.containsKey( identifiable.getId() ) )
             {
                 identifiable.setSourceLevel( recessiveSourceLevel );
@@ -142,14 +136,12 @@
      * @param identifiables
      * @return a map
      */
-    private static Map mapById( List identifiables )
+    private static <T extends IdentifiableBase> Map<String, T> mapById( List<T> identifiables )
     {
-        Map byId = new HashMap();
+        Map<String, T> byId = new HashMap<String, T>();
 
-        for ( Iterator it = identifiables.iterator(); it.hasNext(); )
+        for ( T identifiable : identifiables )
         {
-            IdentifiableBase identifiable = (IdentifiableBase) it.next();
-
             byId.put( identifiable.getId(), identifiable );
         }
 
@@ -221,21 +213,21 @@
 
         profile.setProperties( settingsProfile.getProperties() );
 
-        List repos = settingsProfile.getRepositories();
+        List<Repository> repos = settingsProfile.getRepositories();
         if ( repos != null )
         {
-            for ( Iterator it = repos.iterator(); it.hasNext(); )
+            for ( Repository repo : repos )
             {
-                profile.addRepository( convertFromSettingsRepository( (Repository) it.next() ) );
+                profile.addRepository( convertFromSettingsRepository( repo ) );
             }
         }
 
-        List pluginRepos = settingsProfile.getPluginRepositories();
+        List<Repository> pluginRepos = settingsProfile.getPluginRepositories();
         if ( pluginRepos != null )
         {
-            for ( Iterator it = pluginRepos.iterator(); it.hasNext(); )
+            for ( Repository pluginRepo : pluginRepos )
             {
-                profile.addPluginRepository( convertFromSettingsRepository( (Repository) it.next() ) );
+                profile.addPluginRepository( convertFromSettingsRepository( pluginRepo ) );
             }
         }
 
diff --git a/maven-settings/src/site/apt/index.apt b/maven-settings/src/site/apt/index.apt
index 7bcf149..29d9d75 100644
--- a/maven-settings/src/site/apt/index.apt
+++ b/maven-settings/src/site/apt/index.apt
@@ -3,17 +3,17 @@
  -----
  Vincent Siveton
  -----
- 04 November 2006
+ 2006-11-04
  -----
 
 Maven Settings Model
- 
+
  This is strictly the model for Maven settings.
 
  The following are generated from this model:
 
-   * {{{apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser
+   * {{{./apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser
 
-   * A {{{settings.html}Descriptor Reference}}
+   * A {{{./settings.html}Descriptor Reference}}
 
    * An {{{ http://maven.apache.org/xsd/settings-1.0.0.xsd}XSD}}
diff --git a/maven-settings/src/test/java/org/apache/maven/settings/SettingsTest.java b/maven-settings/src/test/java/org/apache/maven/settings/SettingsTest.java
index 6d52d06..91e3808 100644
--- a/maven-settings/src/test/java/org/apache/maven/settings/SettingsTest.java
+++ b/maven-settings/src/test/java/org/apache/maven/settings/SettingsTest.java
@@ -1,33 +1,59 @@
 package org.apache.maven.settings;
 
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import java.io.File;
 
 import junit.framework.TestCase;
 
-public class SettingsTest extends TestCase {
+public class SettingsTest
+    extends TestCase
+{
 
-	private Settings settingsNoProxies;
-	private Settings settingsOneInactiveProxy;
-	private Settings settingsOneActiveProxy;
+    private Settings settingsNoProxies;
+    private Settings settingsOneInactiveProxy;
+    private Settings settingsOneActiveProxy;
 
-	
-	protected void setUp() throws Exception {
-		
-		super.setUp();
 
-		// Read different settings files for proxy testing.
-		DefaultMavenSettingsBuilder settingsBuilder = new DefaultMavenSettingsBuilder();
-		settingsNoProxies = settingsBuilder.buildSettings(new File("src/test/resources/org/apache/maven/settings/settings-no-proxies.xml"), false);
-		settingsOneInactiveProxy = settingsBuilder.buildSettings(new File("src/test/resources/org/apache/maven/settings/settings-one-inactive-proxy.xml"), false);
-		settingsOneActiveProxy = settingsBuilder.buildSettings(new File("src/test/resources/org/apache/maven/settings/settings-one-active-proxy.xml"), false);
-		
-	}
-	
-	
-	public void testProxySettings() {
-		
-		assertNull(settingsNoProxies.getActiveProxy());
-		assertNull(settingsOneInactiveProxy.getActiveProxy());
-		assertNotNull(settingsOneActiveProxy.getActiveProxy());
-	}
+    protected void setUp()
+        throws Exception
+    {
+
+        super.setUp();
+
+        // Read different settings files for proxy testing.
+        DefaultMavenSettingsBuilder settingsBuilder = new DefaultMavenSettingsBuilder();
+        File dir = new File( "src/test/resources/org/apache/maven/settings" );
+        settingsNoProxies = settingsBuilder.buildSettings( new File( dir, "settings-no-proxies.xml" ), false );
+        settingsOneInactiveProxy =
+            settingsBuilder.buildSettings( new File( dir, "settings-one-inactive-proxy.xml" ), false );
+        settingsOneActiveProxy =
+            settingsBuilder.buildSettings( new File( dir, "settings-one-active-proxy.xml" ), false );
+
+    }
+
+
+    public void testProxySettings()
+    {
+        assertNull( settingsNoProxies.getActiveProxy() );
+        assertNull( settingsOneInactiveProxy.getActiveProxy() );
+        assertNotNull( settingsOneActiveProxy.getActiveProxy() );
+    }
 }
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java
index efdde5a..a28548d 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchain.java
@@ -35,18 +35,18 @@
 
     private String type;
 
-    private Map provides = new HashMap /*<String,RequirementMatcher>*/ (  );
+    private Map<String, RequirementMatcher> provides = new HashMap<String, RequirementMatcher>();
 
     public static final String KEY_TYPE = "type"; //NOI18N
-    
+
     private ToolchainModel model;
-    
+
     private Logger logger;
 
-    protected DefaultToolchain( ToolchainModel model, Logger logger ) 
+    protected DefaultToolchain( ToolchainModel model, Logger logger )
     {
         this.model = model;
-        
+
         this.logger = logger;
     }
 
@@ -56,13 +56,12 @@
         this.type = type;
     }
 
-    public final String getType( )
+    public final String getType()
     {
         return type != null ? type : model.getType();
     }
 
-    
-    public final ToolchainModel getModel( ) 
+    public final ToolchainModel getModel()
     {
         return model;
     }
@@ -74,14 +73,15 @@
     }
 
 
-    public boolean matchesRequirements(Map requirements) {
+    public boolean matchesRequirements(Map requirements)
+    {
         Iterator it = requirements.keySet().iterator();
         while ( it.hasNext() )
         {
             String key = (String) it.next();
-            
-            RequirementMatcher matcher = (RequirementMatcher) provides.get(key);
-            
+
+            RequirementMatcher matcher = provides.get( key );
+
             if ( matcher == null )
             {
                 getLog().debug( "Toolchain "  + this + " is missing required property: "  + key );
@@ -95,8 +95,9 @@
         }
         return true;
     }
-    
-    protected Logger getLog() {
+
+    protected Logger getLog()
+    {
         return logger;
     }
 }
\ No newline at end of file
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java
index 9d7706a..72faba7 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/DefaultToolchainManager.java
@@ -67,7 +67,7 @@
     public void contextualize( Context context )
         throws ContextException
     {
-        container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
+        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
     }
 
     public ToolchainPrivate[] getToolchainsForType( String type )
@@ -94,7 +94,7 @@
                         }
                         else
                         {
-                            getLogger().error("Missing toolchain factory for type:" + toolchainModel.getType() + ". Possibly caused by misconfigured project.");
+                            getLogger().error( "Missing toolchain factory for type:" + toolchainModel.getType() + ". Possibly caused by misconfigured project." );
                         }
                     }
                 }
@@ -110,11 +110,11 @@
                 }
             }
             ToolchainPrivate[] tc = new ToolchainPrivate[ toRet.size() ];
-            return (ToolchainPrivate[]) toRet.toArray(tc);
+            return (ToolchainPrivate[]) toRet.toArray( tc );
         }
         catch ( ComponentLookupException ex )
         {
-            getLogger().fatalError("Error in component lookup", ex);
+            getLogger().fatalError( "Error in component lookup", ex );
         }
         return new ToolchainPrivate[0];
     }
@@ -122,78 +122,80 @@
     public Toolchain getToolchainFromBuildContext( String type,
                                                    MavenSession session )
     {
-        Map context = retrieveContext(session);
-        if ( "javac".equals( type )) 
+        Map context = retrieveContext( session );
+        if ( "javac".equals( type ) )
         {
             //HACK to make compiler plugin happy
             type = "jdk";
         }
         Object obj = context.get( getStorageKey( type ) );
-        ToolchainModel model = (ToolchainModel)obj;
-        
-        if ( model != null ) 
+        ToolchainModel model = (ToolchainModel) obj;
+
+        if ( model != null )
         {
             try
             {
-                ToolchainFactory fact = (ToolchainFactory) container.lookup(ToolchainFactory.ROLE, type);
+                ToolchainFactory fact = (ToolchainFactory) container.lookup( ToolchainFactory.ROLE, type );
                 return fact.createToolchain( model );
             }
             catch ( ComponentLookupException ex )
             {
-                getLogger().fatalError("Error in component lookup", ex);
+                getLogger().fatalError( "Error in component lookup", ex );
             }
             catch ( MisconfiguredToolchainException ex )
             {
-                getLogger().error("Misconfigured toolchain.", ex);
+                getLogger().error( "Misconfigured toolchain.", ex );
             }
         }
         return null;
     }
 
-    private MavenProject getCurrentProject(MavenSession session) {
-        //use reflection since MavenSession.getCurrentProject() is not part of 2.0.8
-        try 
+    private MavenProject getCurrentProject( MavenSession session )
+    {
+        // use reflection since MavenSession.getCurrentProject() is not part of 2.0.8
+        try
         {
-            Method meth = session.getClass().getMethod("getCurrentProject", new Class[0]);
-            return (MavenProject) meth.invoke(session, null);
-        } catch (Exception ex) 
+            Method meth = session.getClass().getMethod( "getCurrentProject", new Class[0] );
+            return (MavenProject) meth.invoke( session, null );
+        }
+        catch ( Exception ex )
         {
-            //just ignore, we're running in pre- 2.0.9
+            // just ignore, we're running in pre- 2.0.9
         }
         return null;
     }
-    
-    private Map retrieveContext( MavenSession session ) 
+
+    private Map retrieveContext( MavenSession session )
     {
-        if (session == null) 
+        if ( session == null )
         {
             return new HashMap();
         }
         PluginDescriptor desc = new PluginDescriptor();
         desc.setGroupId( PluginDescriptor.getDefaultPluginGroupId() );
-        desc.setArtifactId( PluginDescriptor.getDefaultPluginArtifactId ("toolchains") );
-        MavenProject current = getCurrentProject(session);
-        if ( current != null ) 
+        desc.setArtifactId( PluginDescriptor.getDefaultPluginArtifactId( "toolchains" ) );
+        MavenProject current = getCurrentProject( session );
+        if ( current != null )
         {
             return session.getPluginContext( desc, current );
-            
+
         }
         return new HashMap();
     }
-    
+
 
     public void storeToolchainToBuildContext( ToolchainPrivate toolchain,
                                               MavenSession session )
     {
-        Map context = retrieveContext( session );
+        Map<String, Object> context = retrieveContext( session );
         context.put( getStorageKey( toolchain.getType() ), toolchain.getModel () );
     }
-    
+
     public static final String getStorageKey( String type )
     {
         return "toolchain-" + type; //NOI18N
     }
-    
+
 
     private PersistedToolchains readToolchainSettings( )
         throws MisconfiguredToolchainException
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/RequirementMatcherFactory.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/RequirementMatcherFactory.java
index 0b517da..15219c9 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/RequirementMatcherFactory.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/RequirementMatcherFactory.java
@@ -29,8 +29,7 @@
  */
 public final class RequirementMatcherFactory
 {
-
-    private RequirementMatcherFactory( )
+    private RequirementMatcherFactory()
     {
     }
 
@@ -69,21 +68,24 @@
 
         private VersionMatcher( String version )
         {
-            this.version = new DefaultArtifactVersion(version);
+            this.version = new DefaultArtifactVersion( version );
         }
 
         public boolean matches( String requirement )
         {
-            try 
+            try
             {
-                VersionRange range = VersionRange.createFromVersionSpec(requirement);
-                if (range.hasRestrictions()) {
-                    return range.containsVersion(version);
-                } else {
-                    return range.getRecommendedVersion().compareTo(version) == 0;
+                VersionRange range = VersionRange.createFromVersionSpec( requirement );
+                if ( range.hasRestrictions() )
+                {
+                    return range.containsVersion( version );
                 }
-            } 
-            catch (InvalidVersionSpecificationException ex) 
+                else
+                {
+                    return range.getRecommendedVersion().compareTo( version ) == 0;
+                }
+            }
+            catch ( InvalidVersionSpecificationException ex )
             {
                 //TODO error reporting
                 ex.printStackTrace();
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/Toolchain.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/Toolchain.java
index d8550a9..6a194d9 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/Toolchain.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/Toolchain.java
@@ -27,7 +27,7 @@
 public interface Toolchain
 {
 
-    String getType( );
+    String getType();
 
     /**
      * Gets the platform tool executable.
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainFactory.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainFactory.java
index db3e04b..e4536c0 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainFactory.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainFactory.java
@@ -41,5 +41,5 @@
      * if not applicable.
      * TODO keep around??
      **/
-    ToolchainPrivate createDefaultToolchain( );
+    ToolchainPrivate createDefaultToolchain();
 }
\ No newline at end of file
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java
index 97bab97..0b490d7 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/ToolchainPrivate.java
@@ -36,8 +36,8 @@
      * @param requirements Map<String, String> key value pair
      * @return
      */
-    boolean matchesRequirements( Map requirements);
-    
-    ToolchainModel getModel( );
-    
+    boolean matchesRequirements( Map requirements );
+
+    ToolchainModel getModel();
+
 }
\ No newline at end of file
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolChain.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolChain.java
index 604f7d0..de5992d 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolChain.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolChain.java
@@ -43,7 +43,7 @@
         super( model, "jdk", logger );
     }
 
-    public String getJavaHome( )
+    public String getJavaHome()
     {
         return javaHome;
     }
@@ -53,18 +53,17 @@
         this.javaHome = javaHome;
     }
 
-    public String toString( )
+    public String toString()
     {
-        return "JDK[" + getJavaHome(  ) + "]";
+        return "JDK[" + getJavaHome() + "]";
     }
 
     public String findTool( String toolName )
     {
-        File toRet = findTool( toolName,
-            new File( FileUtils.normalize( getJavaHome(  ) ) ) );
+        File toRet = findTool( toolName, new File( FileUtils.normalize( getJavaHome() ) ) );
         if ( toRet != null )
         {
-            return toRet.getAbsolutePath(  );
+            return toRet.getAbsolutePath();
         }
         return null;
     }
@@ -73,15 +72,14 @@
     private static File findTool( String toolName, File installFolder )
     {
         File bin = new File( installFolder, "bin" ); //NOI18N
-        if ( bin.exists(  ) )
+        if ( bin.exists() )
         {
-            File tool = new File( bin,
-                toolName + (Os.isFamily( "windows" ) ? ".exe" : "") ); //NOI18N
-            if ( tool.exists(  ) )
+            File tool = new File( bin, toolName + ( Os.isFamily( "windows" ) ? ".exe" : "" ) ); // NOI18N
+            if ( tool.exists() )
             {
                 return tool;
             }
         }
         return null;
-    }
+   }
 }
\ No newline at end of file
diff --git a/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java b/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java
index 1a5439b..10a1fa6 100644
--- a/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java
+++ b/maven-toolchain/src/main/java/org/apache/maven/toolchain/java/DefaultJavaToolchainFactory.java
@@ -40,22 +40,24 @@
 
     private Logger logger;
 
-    public DefaultJavaToolchainFactory( )
+    public DefaultJavaToolchainFactory()
     {
     }
-    
+
     public ToolchainPrivate createToolchain( ToolchainModel model )
         throws MisconfiguredToolchainException
     {
-        if (model == null) {
+        if ( model == null )
+        {
             return null;
         }
-        DefaultJavaToolChain jtc = new DefaultJavaToolChain( model , logger);
+        DefaultJavaToolChain jtc = new DefaultJavaToolChain( model, logger );
         Xpp3Dom dom = (Xpp3Dom) model.getConfiguration();
         Xpp3Dom javahome = dom.getChild( DefaultJavaToolChain.KEY_JAVAHOME );
         if ( javahome == null )
         {
-            throw new MisconfiguredToolchainException( "Java toolchain without the " + DefaultJavaToolChain.KEY_JAVAHOME + " configuration element." );
+            throw new MisconfiguredToolchainException( "Java toolchain without the "
+                + DefaultJavaToolChain.KEY_JAVAHOME + " configuration element." );
         }
         File normal = new File( FileUtils.normalize( javahome.getValue() ) );
         if ( normal.exists() )
@@ -64,7 +66,8 @@
         }
         else
         {
-            throw new MisconfiguredToolchainException( "Non-existing JDK home configuration at " + normal.getAbsolutePath(  ) );
+            throw new MisconfiguredToolchainException( "Non-existing JDK home configuration at "
+                + normal.getAbsolutePath() );
         }
 
         //now populate the provides section.
@@ -96,10 +99,10 @@
     public ToolchainPrivate createDefaultToolchain()
     {
         //not sure it's necessary to provide a default toolchain here.
-        //only version can be eventually supplied, and 
+        //only version can be eventually supplied, and
         return null;
     }
-    
+
     protected Logger getLogger()
     {
         return logger;
@@ -109,5 +112,4 @@
     {
         this.logger = logger;
     }
-    
 }
\ No newline at end of file
diff --git a/maven-toolchain/src/site/apt/index.apt b/maven-toolchain/src/site/apt/index.apt
index c4b4cc1..bff5f9b 100644
--- a/maven-toolchain/src/site/apt/index.apt
+++ b/maven-toolchain/src/site/apt/index.apt
@@ -1,7 +1,7 @@
  -----
  Maven Toolchains
  -----
- Hervé Boutemy
+ Hervé Boutemy
  -----
  2009-04-26
  -----
@@ -12,6 +12,6 @@
 
  The following are generated from this model:
 
-   * {{{apidocs/index.html}Java sources}} with Reader for the Xpp3 XML parser, to read <<<toolchains.xml>>> file
+   * {{{./apidocs/index.html}Java sources}} with Reader for the Xpp3 XML parser, to read <<<toolchains.xml>>> file
 
-   * A {{{toolchains.html}Descriptor Reference}}
+   * A {{{./toolchains.html}Descriptor Reference}}
diff --git a/maven-toolchain/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java b/maven-toolchain/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java
index fe5c411..7f1fcfd 100644
--- a/maven-toolchain/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java
+++ b/maven-toolchain/src/test/java/org/apache/maven/toolchain/RequirementMatcherFactoryTest.java
@@ -1,3 +1,5 @@
+package org.apache.maven.toolchain;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,45 +19,48 @@
  * under the License.
  */
 
-package org.apache.maven.toolchain;
-
 import junit.framework.TestCase;
 
 /**
  *
  * @author mkleint
  */
-public class RequirementMatcherFactoryTest extends TestCase {
-    
-    public RequirementMatcherFactoryTest(String testName) {
-        super(testName);
+public class RequirementMatcherFactoryTest
+    extends TestCase
+{
+
+    public RequirementMatcherFactoryTest( String testName )
+    {
+        super( testName );
     }
 
     /**
      * Test of createExactMatcher method, of class RequirementMatcherFactory.
      */
-    public void testCreateExactMatcher() {
+    public void testCreateExactMatcher()
+    {
         RequirementMatcher matcher;
-        matcher = RequirementMatcherFactory.createExactMatcher("foo");
-        assertFalse(matcher.matches("bar"));
-        assertFalse(matcher.matches("foobar"));
-        assertFalse(matcher.matches("foob"));
-        assertTrue(matcher.matches("foo"));
+        matcher = RequirementMatcherFactory.createExactMatcher( "foo" );
+        assertFalse( matcher.matches( "bar" ) );
+        assertFalse( matcher.matches( "foobar" ) );
+        assertFalse( matcher.matches( "foob" ) );
+        assertTrue( matcher.matches( "foo" ) );
     }
 
     /**
      * Test of createVersionMatcher method, of class RequirementMatcherFactory.
      */
-    public void testCreateVersionMatcher() {
+    public void testCreateVersionMatcher()
+    {
         RequirementMatcher matcher;
-        matcher = RequirementMatcherFactory.createVersionMatcher("1.5.2");
-        assertFalse(matcher.matches("1.5"));
-        assertTrue(matcher.matches("1.5.2"));
-        assertFalse(matcher.matches("[1.4,1.5)"));
-        assertFalse(matcher.matches("[1.5,1.5.2)"));
-        assertFalse(matcher.matches("(1.5.2,1.6)"));
-        assertTrue(matcher.matches("(1.4,1.5.2]"));
-        assertTrue(matcher.matches("(1.5,)"));
+        matcher = RequirementMatcherFactory.createVersionMatcher( "1.5.2" );
+        assertFalse( matcher.matches( "1.5" ) );
+        assertTrue( matcher.matches( "1.5.2" ) );
+        assertFalse( matcher.matches( "[1.4,1.5)" ) );
+        assertFalse( matcher.matches( "[1.5,1.5.2)" ) );
+        assertFalse( matcher.matches( "(1.5.2,1.6)" ) );
+        assertTrue( matcher.matches( "(1.4,1.5.2]" ) );
+        assertTrue( matcher.matches( "(1.5,)" ) );
     }
 
 }
diff --git a/pom.xml b/pom.xml
index 8c19dd6..d1b0f63 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,14 +16,13 @@
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven-parent</artifactId>
-    <version>11</version>
+    <version>15</version>
     <relativePath>../pom/maven/pom.xml</relativePath>
   </parent>
 
@@ -126,57 +125,20 @@
       <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-jar-plugin</artifactId>
-          <version>2.1</version>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>2.0.2</version>
           <configuration>
             <source>1.5</source>
             <target>1.5</target>
           </configuration>
         </plugin>
         <plugin>
-          <artifactId>maven-assembly-plugin</artifactId>
-          <version>2.2-beta-4</version>
-        </plugin>
-        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-shade-plugin</artifactId>
           <version>1.0</version>
         </plugin>
         <plugin>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.3</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-deploy-plugin</artifactId>
-          <version>2.3</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-install-plugin</artifactId>
-          <version>2.1</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-site-plugin</artifactId>
-          <version>2.0</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-resources-plugin</artifactId>
-          <version>2.2</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-remote-resources-plugin</artifactId>
-          <version>1.0-beta-2</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-clean-plugin</artifactId>
-          <version>2.1.1</version>
-        </plugin>
-        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
-          <version>2.0-beta-7</version>
           <configuration>
             <tagBase>https://svn.apache.org/repos/asf/maven/maven-2/tags</tagBase>
             <autoVersionSubmodules>true</autoVersionSubmodules>
@@ -212,7 +174,6 @@
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>clirr-maven-plugin</artifactId>
-          <version>2.2.1</version>
           <configuration>
             <!-- needed for release: default value "(,${project.version})" for 2.0.10 is 2.0.10-SNAPSHOT -->
             <comparisonVersion>2.2.0</comparisonVersion>
@@ -228,7 +189,6 @@
     <plugins>
       <plugin>
         <artifactId>maven-enforcer-plugin</artifactId>
-        <version>1.0-alpha-4</version>
         <executions>
           <execution>
             <id>enforce-jdk</id>
@@ -278,7 +238,7 @@
     <doxiaVersion>1.1</doxiaVersion>
   </properties>
 
-  <!--start-->
+  <!--bootstrap-start-comment-->
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
@@ -289,10 +249,10 @@
   </dependencies>
 
   <dependencyManagement>
-    <!--end-->
+    <!--bootstrap-end-comment-->
     <dependencies>
       <!-- Maven -->
-      <!--start-->
+      <!--bootstrap-start-comment-->
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-plugin-descriptor</artifactId>
@@ -383,7 +343,7 @@
         <artifactId>maven-toolchain</artifactId>
         <version>${mavenVersion}</version>
       </dependency>
-      <!--end-->
+      <!--bootstrap-end-comment-->
       <dependency>
         <groupId>commons-cli</groupId>
         <artifactId>commons-cli</artifactId>
@@ -466,11 +426,6 @@
         <version>1.5.6</version>
       </dependency>
       <dependency>
-        <groupId>backport-util-concurrent</groupId>
-        <artifactId>backport-util-concurrent</artifactId>
-        <version>3.1</version>
-      </dependency>
-      <dependency>
         <groupId>easymock</groupId>
         <artifactId>easymock</artifactId>
         <version>1.2_Java1.3</version>
@@ -482,9 +437,9 @@
         <version>1.1</version>
       </dependency>
     </dependencies>
-    <!--start-->
+    <!--bootstrap-start-comment-->
   </dependencyManagement>
-  <!--end-->
+  <!--bootstrap-end-comment-->
 
   <distributionManagement>
     <site>
@@ -516,7 +471,7 @@
       </build>
     </profile>
     <profile>
-      <id>release</id>
+      <id>apache-release</id>
       <build>
         <plugins>
           <!-- This is here until it is enabled in the parent -->
@@ -545,11 +500,6 @@
       <id>reporting</id>
       <reporting>
         <plugins>
-          <plugin><!-- TODO: remove when upgrading parent to version 12 -->
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-project-info-reports-plugin</artifactId>
-            <version>2.1.1</version>
-          </plugin><!-- /TODO -->
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>clirr-maven-plugin</artifactId>
@@ -602,6 +552,9 @@
                 <link>http://logging.apache.org/log4j/1.2/apidocs/</link>
                 <link>http://jakarta.apache.org/regexp/apidocs/</link>
                 <link>http://velocity.apache.org/engine/releases/velocity-1.5/apidocs/</link>
+                <link>http://plexus.codehaus.org/plexus-utils/apidocs/</link>
+                <link>http://plexus.codehaus.org/plexus-classworlds/apidocs/</link>
+                <link>http://plexus.codehaus.org/plexus-containers/plexus-container-default/apidocs/</link>
               </links>
               <aggregate>true</aggregate>
             </configuration>
diff --git a/src/site/site.xml b/src/site/site.xml
index 0955715..5090f43 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -20,14 +20,8 @@
 -->
 
 <project>
-  <!-- TODO remove when using Maven Parent 11+ -->
-  <skin>
-    <groupId>org.apache.maven.skins</groupId>
-    <artifactId>maven-stylus-skin</artifactId>
-    <version>1.1</version>
-  </skin>
   <body>
     <menu ref="modules"/>
     <menu ref="reports"/>
   </body>
-</project>
\ No newline at end of file
+</project>