continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r723121 - in /continuum/trunk: ./ continuum-core/src/main/java/org/apache/maven/continuum/execution/ continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/ continuum-core/src/test/java/org/apache/maven/continuum/executi...
Date Wed, 03 Dec 2008 23:07:37 GMT
Author: olamy
Date: Wed Dec  3 15:07:36 2008
New Revision: 723121

URL: http://svn.apache.org/viewvc?rev=723121&view=rev
Log:
merge -r 723118:723119 from 1.2.x branch
fix  [CONTINUUM-1915]


Added:
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutorTest.java
      - copied unchanged from r723119, continuum/branches/continuum-1.2.x/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutorTest.java
    continuum/trunk/continuum-core/src/test/resources/applicationContextSlf4jPlexusLogger.xml
      - copied unchanged from r723119, continuum/branches/continuum-1.2.x/continuum-core/src/test/resources/applicationContextSlf4jPlexusLogger.xml
Modified:
    continuum/trunk/   (props changed)
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
    continuum/trunk/continuum-core/src/test/resources/log4j.xml
    continuum/trunk/continuum-docs/src/site/xdoc/   (props changed)

Propchange: continuum/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  3 15:07:36 2008
@@ -1 +1 @@
-/continuum/branches/continuum-1.2.x:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624
+/continuum/branches/continuum-1.2.x:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=723121&r1=723120&r2=723121&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Wed Dec  3 15:07:36 2008
@@ -36,6 +36,8 @@
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.util.Collections;
@@ -52,6 +54,9 @@
     extends AbstractLogEnabled
     implements ContinuumBuildExecutor, Initializable
 {
+    
+    protected Logger logger = LoggerFactory.getLogger( getClass() );
+    
     private static final String SUDO_EXECUTABLE = "sudo";
 
     private static final String CHROOT_EXECUTABLE = "chroot";

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=723121&r1=723120&r2=723121&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
Wed Dec  3 15:07:36 2008
@@ -25,7 +25,6 @@
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -54,6 +53,8 @@
 import org.codehaus.plexus.util.DirectoryScanner;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -63,6 +64,7 @@
     extends AbstractBuildExecutor
     implements ContinuumBuildExecutor
 {
+    
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -394,15 +396,17 @@
         throws ContinuumBuildExecutorException
     {
         //Check if it's a recursive build
-        boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) &&
!(
-            buildDefinition.getArguments().indexOf( "-N" ) < 0 ||
-                buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 );
-
-        if ( isRecursive )
+        boolean isRecursive = false;
+        if (StringUtils.isNotEmpty( buildDefinition.getArguments() ) )
+            {
+            isRecursive =  buildDefinition.getArguments().indexOf( "-N" ) < 0 &&
+                buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 ;
+            }
+        if ( isRecursive && changes != null && !changes.isEmpty() )
         {
-            if ( getLogger().isDebugEnabled() )
+            if ( logger.isInfoEnabled() )
             {
-                getLogger().debug( "isRecursive --> shouldBuild = true" );
+                logger.info( "recursive build and changes found --> building" );
             }
             return true;
         }
@@ -412,15 +416,15 @@
         //CONTINUUM-1815: additional check for projects recently released
         if ( !continuumProject.getVersion().equals( project.getVersion() ) )
         {
-            getLogger().info( "Found changes in project's version ( maybe project was recently
released ), building" );
+            logger.info( "Found changes in project's version ( maybe project was recently
released ), building" );
             return true;
         }
         
         if ( changes.isEmpty() )
         {
-            if ( getLogger().isDebugEnabled() )
+            if ( logger.isInfoEnabled() )
             {
-                getLogger().info( "Found no changes, not building" );
+                logger.info( "Found no changes, not building" );
             }
             return false;
         }
@@ -438,15 +442,28 @@
         while ( i <= files.size() - 1 )
         {
             ChangeFile file = files.get( i );
+            if ( logger.isDebugEnabled() )
+            {
+                logger.debug( "changeFile.name " + file.getName() );
+                logger.debug( "check in modules " + modules );
+            }
             boolean found = false;
             for ( String module : modules )
             {
-                if ( file.getName().indexOf( module ) > 0 )
+                if ( file.getName().indexOf( module ) >= 0 )
                 {
+                    if ( logger.isDebugEnabled() )
+                    {
+                        logger.debug( "changeFile.name " + file.getName() + " removed because
in a module" );
+                    }                    
                     files.remove( file );
                     found = true;
                     break;
                 }
+                if (logger.isDebugEnabled())
+                {
+                    logger.debug( "no remving file " + file.getName() + " not in module "
+ module );
+                }
             }
             if ( !found )
             {
@@ -458,12 +475,12 @@
 
         if ( !shouldBuild )
         {
-            getLogger().info( "Changes are only in sub-modules." );
+            logger.info( "Changes are only in sub-modules." );
         }
 
-        if ( getLogger().isDebugEnabled() )
+        if ( logger.isDebugEnabled() )
         {
-            getLogger().debug( "shoulbuild = " + shouldBuild );
+            logger.debug( "shoulbuild = " + shouldBuild );
         }
         return shouldBuild;
     }

Modified: continuum/trunk/continuum-core/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/resources/log4j.xml?rev=723121&r1=723120&r2=723121&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/resources/log4j.xml (original)
+++ continuum/trunk/continuum-core/src/test/resources/log4j.xml Wed Dec  3 15:07:36 2008
@@ -1,41 +1,40 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-<!-- ===================================================================== -->
-<!-- Log4j Configuration -->
-<!-- ===================================================================== -->
 
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
-  debug="false">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
 
   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
     <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}.%M](%L) %m%n"/>
+      <param name="ConversionPattern" value="%d %-5p %c %x - %m%n"/>
     </layout>
   </appender>
 
   <!-- quiet spring loading :-) -->
-  <category name="org.springframework">
-    <priority value="ERROR"/>
-  </category>
-  <category name="org.codehaus.plexus">
-    <priority value="ERROR"/>
-  </category>
+  <logger name="org.springframework">
+    <level value="ERROR"/>
+  </logger>
+  <logger name="org.codehaus.plexus">
+    <level value="ERROR"/>
+  </logger>
   
-  <category name="org.apache.commons">
-    <priority value="ERROR"/>
-  </category>  
+  <logger name="org.apache.commons">
+    <level value="ERROR"/>
+  </logger>  
+  
+  <logger name="org.apache.maven.continuum.execution.maven.m2">
+    <level value="debug" />
+  </logger>
 
   <!-- JPOX -->
-  <category name="JPOX">
-    <priority value="WARN"/>
-  </category>
-  <category name="JPOX.RDBMS">
-    <priority value="ERROR"/>
-  </category>
+  <logger name="JPOX">
+    <level value="WARN"/>
+  </logger>
+  <logger name="JPOX.RDBMS">
+    <level value="ERROR"/>
+  </logger>
 
   <root>
-    <priority value="INFO"/>
+    <level value="INFO"/>
     <appender-ref ref="CONSOLE"/>
   </root>
 

Propchange: continuum/trunk/continuum-docs/src/site/xdoc/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  3 15:07:36 2008
@@ -1,2 +1,2 @@
-/continuum/branches/continuum-1.2.x/continuum-docs/src/site/xdoc:698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624
+/continuum/branches/continuum-1.2.x/continuum-docs/src/site/xdoc:698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119
 /continuum/trunk/continuum-docs/src/site/xdoc:690494-690520



Mime
View raw message