You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2009/09/11 08:57:02 UTC

svn commit: r813685 [1/2] - in /maven/maven-2/branches/maven-2.2.x/maven-project/src: main/java/org/apache/maven/profiles/ main/java/org/apache/maven/project/ main/java/org/apache/maven/project/artifact/ main/java/org/apache/maven/project/inheritance/ ...

Author: hboutemy
Date: Fri Sep 11 06:57:01 2009
New Revision: 813685

URL: http://svn.apache.org/viewvc?rev=813685&view=rev
Log:
fixed errors reported by Checkstyle

Modified:
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/test/java/org/apache/maven/project/inheritance/t04/ProjectInheritanceTest.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/test/java/org/apache/maven/project/inheritance/t05/ProjectInheritanceTest.java
    maven/maven-2/branches/maven-2.2.x/maven-project/src/test/java/org/apache/maven/project/inheritance/t06/ProjectInheritanceTest.java

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java Fri Sep 11 06:57:01 2009
@@ -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

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java Fri Sep 11 06:57:01 2009
@@ -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,19 +1132,19 @@
                 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() );
                     }
                 }
@@ -1207,8 +1207,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 +1248,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 +1285,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 +1303,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 +1341,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 +1389,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 +1403,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 +1432,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 +1451,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 +1478,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 +1587,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 +1635,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 +1679,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 +1724,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 +1771,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 +1814,7 @@
     {
         calculateConcreteStateInternal( project, config, true, new HashSet() );
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1823,11 +1823,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 +1837,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 +1893,7 @@
                                                                               getLogger().isDebugEnabled() );
 
             project.preserveScriptSourceRoots( originalInterpolatedScriptSourceRoots );
-            
+
             // TODO: MNG-3731
             project.setScriptSourceRoots( originalInterpolatedScriptSourceRoots );
 //            project.setScriptSourceRoots( originalInterpolatedScriptSourceRoots == null ? null
@@ -1908,12 +1908,12 @@
             project.preserveProperties();
             project.preserveBasedir();
             project.setBuild( model.getBuild() );
-            
+
             if ( project.getExecutionProject() != null )
             {
                 calculateConcreteStateInternal( project.getExecutionProject(), config, processProjectReferences, processedProjects );
             }
-            
+
             project.setConcrete( true );
         }
 
@@ -1988,7 +1988,7 @@
     {
         restoreDynamicStateInternal( project, config, true, new HashSet() );
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1997,11 +1997,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 +2011,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 +2042,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 +2088,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 +2105,12 @@
                 for ( Iterator it = changedPlugins.iterator(); it.hasNext(); )
                 {
                     Plugin plugin = (Plugin) it.next();
-                    
+
                     dynamicBuild.addPlugin( plugin );
                 }
             }
         }
-        
+
         dynamicBuild.flushPluginMap();
     }
 
@@ -2249,7 +2249,7 @@
                                                       debugMessages ) );
 
         propagateNewPlugins( project );
-        
+
         project.setBuild( dynamicBuild );
 
         project.clearRestorableBuild();
@@ -2314,7 +2314,7 @@
                                                                      project.getBasedir(),
                                                                      config,
                                                                      debugMessages );
-        
+
         interpolatedOriginal = pathTranslator.unalignFromBaseDirectory( interpolatedOriginal, project.getBasedir() );
 
         String interpolatedOriginal2 = modelInterpolator.interpolate( originalInterpolatedString,
@@ -2322,7 +2322,7 @@
                                                                       project.getBasedir(),
                                                                       config,
                                                                       debugMessages );
-        
+
         interpolatedOriginal2 = pathTranslator.alignToBaseDirectory( interpolatedOriginal2, project.getBasedir() );
 
         String interpolatedChanged = modelInterpolator.interpolate( changedString,
@@ -2330,7 +2330,7 @@
                                                                     project.getBasedir(),
                                                                     config,
                                                                     debugMessages );
-        
+
         interpolatedChanged = pathTranslator.alignToBaseDirectory( interpolatedChanged, project.getBasedir() );
 
         String relativeInterpolatedChanged = modelInterpolator.interpolate( relativeChangedString,
@@ -2400,7 +2400,7 @@
                                                                  project.getBasedir(),
                                                                  config,
                                                                  debugMessages );
-            
+
             interpolated = pathTranslator.alignToBaseDirectory( interpolated, project.getBasedir() );
 
             String relativeInterpolated = modelInterpolator.interpolate( relativeChangedString,
@@ -2408,7 +2408,7 @@
                                                                          project.getBasedir(),
                                                                          config,
                                                                          debugMessages );
-            
+
             String[] original = (String[]) orig.get( interpolated );
             if ( original == null )
             {

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/MavenProject.java Fri Sep 11 06:57:01 2009
@@ -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;

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java Fri Sep 11 06:57:01 2009
@@ -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 );
     }
-    
+
 
 }

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectSorter.java Fri Sep 11 06:57:01 2009
@@ -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;

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java Fri Sep 11 06:57:01 2009
@@ -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;
     }

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java Fri Sep 11 06:57:01 2009
@@ -78,7 +78,7 @@
 
     // lazily instantiated and cached.
     private MavenProject superProject;
-    
+
     // cache
     private final Set<String> warnedPoms;
     
@@ -114,20 +114,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 +194,7 @@
                 catch ( InvalidProjectModelException e )
                 {
                     String id = pomArtifact.getId();
-                    
+
                     if ( !warnedPoms.contains( id ) )
                     {
                         warnedPoms.add( pomArtifact.getId() );
@@ -225,8 +225,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 +261,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 +277,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 +287,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 +312,7 @@
         ProjectRelocation rel = new ProjectRelocation();
         rel.project = project;
         rel.pomArtifact = pomArtifact;
-        
+
         return rel;
     }
 
@@ -325,12 +325,12 @@
         throws ArtifactMetadataRetrievalException
     {
         ProjectRelocation rel = retrieveRelocatedProject( artifact, localRepository, remoteRepositories );
-        
+
         if ( rel == null )
         {
             return null;
         }
-        
+
         MavenProject project = rel.project;
         Artifact pomArtifact = rel.pomArtifact;
 
@@ -364,8 +364,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 +467,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 +481,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 +559,11 @@
 
         return versions;
     }
-    
+
     private static final class ProjectRelocation
     {
         private MavenProject project;
         private Artifact pomArtifact;
     }
-    
+
 }

Modified: maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
URL: http://svn.apache.org/viewvc/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java?rev=813685&r1=813684&r2=813685&view=diff
==============================================================================
--- maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java (original)
+++ maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java Fri Sep 11 06:57:01 2009
@@ -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(),