continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r431980 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Wed, 16 Aug 2006 18:35:10 GMT
Author: carlos
Date: Wed Aug 16 11:35:09 2006
New Revision: 431980

URL: http://svn.apache.org/viewvc?rev=431980&view=rev
Log:
Improve project adding error logging

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=431980&r1=431979&r2=431980&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Wed Aug 16 11:35:09 2006
@@ -833,28 +833,33 @@
         ContinuumProjectBuildingResult result = (ContinuumProjectBuildingResult) context
             .get( CreateProjectsFromMetadata.KEY_PROJECT_BUILDING_RESULT );
 
-        if ( result.getProjects() != null )
+        if ( getLogger().isInfoEnabled() )
         {
-            getLogger().info( "Created " + result.getProjects().size() + " projects." );
-        }
-        if ( result.getProjectGroups() != null )
-        {
-            getLogger().info( "Created " + result.getProjectGroups().size() + " project groups."
);
-        }
-        getLogger().info( result.getErrors().size() + " errors." );
+            if ( result.getProjects() != null )
+            {
+                getLogger().info( "Created " + result.getProjects().size() + " projects."
);
+            }
+            if ( result.getProjectGroups() != null )
+            {
+                getLogger().info( "Created " + result.getProjectGroups().size() + " project
groups." );
+            }
+            getLogger().info( result.getErrors().size() + " errors." );
 
-        // ----------------------------------------------------------------------
-        // Look for any warnings.
-        // ----------------------------------------------------------------------
+            // ----------------------------------------------------------------------
+            // Look for any errors.
+            // ----------------------------------------------------------------------
 
-        if ( result.getErrors().size() > 0 )
-        {
-            for ( Iterator i = result.getErrors().iterator(); i.hasNext(); )
+            if ( result.hasErrors() )
             {
-                getLogger().info( (String) i.next() );
-            }
+                getLogger().info( result.getErrors().size() + " errors during project add:
" );
 
-            return result;
+                for ( Iterator i = result.getErrors().iterator(); i.hasNext(); )
+                {
+                    getLogger().info( (String) i.next() );
+                }
+
+                return result;
+            }
         }
 
         // ----------------------------------------------------------------------



Mime
View raw message