continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r219742 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/execution/ continuum-core-it/src/test/java/org/apache/maven/continuum/it/ continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ c...
Date Tue, 19 Jul 2005 18:17:58 GMT
Author: trygvis
Date: Tue Jul 19 11:17:56 2005
New Revision: 219742

URL: http://svn.apache.org/viewcvs?rev=219742&view=rev
Log:
Fixing: CONTINUUM-234: "Remove ContinuumBuild.succesful"

Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java
    maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
    maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
    maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java
Tue Jul 19 11:17:56 2005
@@ -22,25 +22,15 @@
  */
 public class ContinuumBuildExecutionResult
 {
-    private boolean success;
-
     private String output;
 
     private int exitCode;
 
-    public ContinuumBuildExecutionResult( boolean success,
-                                          String output, int exitCode )
+    public ContinuumBuildExecutionResult( String output, int exitCode )
     {
-        this.success = success;
-
         this.output = output;
 
         this.exitCode = exitCode;
-    }
-
-    public boolean isSuccess()
-    {
-        return success;
     }
 
     public String getOutput()

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
(original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
Tue Jul 19 11:17:56 2005
@@ -36,6 +36,7 @@
 import org.apache.maven.continuum.xmlrpc.XmlRpcHelper;
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.AbstractContinuumTest;
+import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.scm.ScmResult;
 import org.apache.maven.continuum.scm.ScmFile;
@@ -91,7 +92,7 @@
 
         Properties properties = new Properties();
 
-        properties.load( new FileInputStream( getTestFile( "../continuum-plexus-application/app.properties"
) ) );
+        properties.load( new FileInputStream( getTestFile( "../continuum-plexus-application/test.properties"
) ) );
 
         String s = IOUtil.toString( new InterpolationFilterReader( reader, properties, "@",
"@" ) );
 
@@ -109,8 +110,6 @@
         }
 
         context.put( "plexus.home", plexusHome.getAbsolutePath() );
-
-        AbstractContinuumTest.makeConfiguration( plexusHome.getAbsolutePath() );
     }
 
     public final void setUp()
@@ -155,6 +154,8 @@
 
             continuum.removeProject( project.getId() );
         }
+
+        AbstractContinuumTest.setUpConfigurationService( (ConfigurationService) lookup( ConfigurationService.ROLE
) );
     }
 
     public final void tearDown()
@@ -182,10 +183,10 @@
         {
             return (Continuum) lookup( Continuum.ROLE );
         }
-        else if ( remotingMethod.equals( REMOTING_METHOD_XMLRPC ) )
-        {
-            return new ContinuumXmlRpcClient( getHost(), getPort(), getXmlRpcHelper() );
-        }
+//        else if ( remotingMethod.equals( REMOTING_METHOD_XMLRPC ) )
+//        {
+//            return new ContinuumXmlRpcClient( getHost(), getPort(), getXmlRpcHelper() );
+//        }
 
         fail( "Unsupported remoting method '" + remotingMethod + "'." );
 
@@ -570,8 +571,6 @@
 
         assertEquals( "The build wasn't successful.", ContinuumProjectState.OK, build.getState()
);
 
-        assertTrue( "The build wasn't successful", build.isSuccess() );
-
         return build;
     }
 
@@ -580,7 +579,7 @@
     {
         ContinuumBuild build = waitForBuild( buildId );
 
-        if ( build.getState() != ContinuumProjectState.OK || !build.isSuccess() )
+        if ( build.getState() != ContinuumProjectState.OK )
         {
             print( "Build state: " + build.getState() );
 

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
(original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
Tue Jul 19 11:17:56 2005
@@ -50,7 +50,7 @@
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
  */
-public class ContinuumXmlRpcClient
+public abstract class ContinuumXmlRpcClient
     implements Continuum
 {
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
(original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
Tue Jul 19 11:17:56 2005
@@ -98,8 +98,6 @@
 
         assertTrue( "The 'build forced' flag wasn't true", build.isForced() );
 
-        build = continuum.getBuild( buildId );
-
         removeProject( projectId );
     }
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Tue Jul 19 11:17:56 2005
@@ -264,8 +264,6 @@
 
         build.setEndTime( System.currentTimeMillis() );
 
-        build.setSuccess( false );
-
         build.setScmResult( scmResult );
 
         return build;

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
Tue Jul 19 11:17:56 2005
@@ -96,16 +96,8 @@
 
             ContinuumBuildExecutionResult result = buildExecutor.build( project );
 
-            if ( result.isSuccess() )
-            {
-                build.setState( ContinuumProjectState.OK );
-            }
-            else
-            {
-                build.setState( ContinuumProjectState.FAILED );
-            }
-
-            build.setSuccess( result.isSuccess() );
+            build.setState( result.getExitCode() == 0 ?
+                            ContinuumProjectState.OK : ContinuumProjectState.FAILED );
 
             build.setExitCode( result.getExitCode() );
 
@@ -114,8 +106,6 @@
         catch( Throwable e )
         {
             build.setState( ContinuumProjectState.ERROR );
-
-            build.setSuccess( false );
 
             build.setError( ContinuumUtils.throwableToString( e ) );
         }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Tue Jul 19 11:17:56 2005
@@ -178,8 +178,7 @@
 
             getLogger().info( "Exit code: " + result.getExitCode() );
 
-            return new ContinuumBuildExecutionResult( result.getExitCode() == 0,
-                                                      result.getOutput(),
+            return new ContinuumBuildExecutionResult( result.getOutput(),
                                                       result.getExitCode() );
         }
         catch ( Exception e )

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
Tue Jul 19 11:17:56 2005
@@ -182,8 +182,6 @@
 
         build.setState( state );
 
-        build.setSuccess( state == ContinuumProjectState.OK );
-
         build.setForced( true );
 
         build.setExitCode( 10 );

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTest.java
Tue Jul 19 11:17:56 2005
@@ -340,19 +340,17 @@
         setBuildResult( store,
                         buildId,
                         ContinuumProjectState.OK,
-                        makeContinuumBuildExecutionResult( true, "", 0 ),
+                        makeContinuumBuildExecutionResult( "", 0 ),
                         scmResult,
                         null );
 
         store.removeProject( projectId );
     }
 
-    private ContinuumBuildExecutionResult makeContinuumBuildExecutionResult( boolean success,
-                                                                             String output,
+    private ContinuumBuildExecutionResult makeContinuumBuildExecutionResult( String output,
                                                                              int exitCode
)
     {
-        return new ContinuumBuildExecutionResult( success,
-                                                  output,
+        return new ContinuumBuildExecutionResult( output,
                                                   exitCode );
     }
 
@@ -468,7 +466,7 @@
         setBuildComplete( store,
                           buildId,
                           scmResult,
-                          makeContinuumBuildExecutionResult( true, "output", 10 ) );
+                          makeContinuumBuildExecutionResult( "output", 10 ) );
 
         // ----------------------------------------------------------------------
         // Store and check the build object
@@ -497,8 +495,6 @@
 
         build.setScmResult( scmResult );
 
-        build.setSuccess( result.isSuccess() );
-
         build.setExitCode( result.getExitCode() );
 
         store.setBuildOutput( buildId, "output" );
@@ -637,7 +633,7 @@
         setBuildResult( store,
                         buildId,
                         ContinuumProjectState.OK,
-                        makeContinuumBuildExecutionResult( true, "output", 1 ),
+                        makeContinuumBuildExecutionResult(  "output", 1 ),
                         scmResult,
                         null );
 

Modified: maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo Tue Jul
19 11:17:56 2005
@@ -65,8 +65,8 @@
       <field name="delay" persistence-modifier="persistent"/>
       <field name="cronExpression" persistence-modifier="persistent"/>
       <fetch-group name="schedule-detail">
-        <field name="projects"/>        
-      </fetch-group>      
+        <field name="projects"/>
+      </fetch-group>
     </class>
 
     <class name="ContinuumNotifier" detachable="true" identity-type="datastore">
@@ -113,7 +113,6 @@
       <field name="error" persistence-modifier="persistent">
         <extension vendor-name="jpox" key="length" value="max 8000"/>
       </field>
-      <field name="success" persistence-modifier="persistent"/>
       <field name="exitCode" persistence-modifier="persistent"/>
       <field name="scmResult" persistence-modifier="persistent" default-fetch-group="true"
dependent="true"/>
     </class>

Modified: maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo Tue Jul 19 11:17:56
2005
@@ -417,17 +417,6 @@
           <name>error</name>
           <version>1.0.0</version>
           <type>String</type>
-          <!--
-          <association>
-            <type>java.lang.Throwable</type>
-          </association>
-          -->
-        </field>
-
-        <field>
-          <name>success</name>
-          <version>1.0.0</version>
-          <type>boolean</type>
         </field>
         <field>
           <name>exitCode</name>

Modified: maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java?rev=219742&r1=219741&r2=219742&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
(original)
+++ maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
Tue Jul 19 11:17:56 2005
@@ -20,8 +20,6 @@
 import java.util.Date;
 import java.util.List;
 import java.util.Properties;
-import java.io.File;
-import java.io.IOException;
 
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
@@ -39,8 +37,6 @@
 import org.apache.maven.continuum.configuration.ConfigurationService;
 
 import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.context.Context;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -58,10 +54,12 @@
     {
         super.setUp();
 
-        Context context = getContainer().getContext();
-
-        ConfigurationService configurationService = (ConfigurationService) lookup( ConfigurationService.ROLE
);
+        setUpConfigurationService( (ConfigurationService) lookup( ConfigurationService.ROLE
) );
+    }
 
+    public static void setUpConfigurationService( ConfigurationService configurationService
)
+        throws Exception
+    {
         configurationService.setBuildOutputDirectory( getTestFile( "target/build-output"
) );
     }
 
@@ -315,8 +313,6 @@
         // ----------------------------------------------------------------------
         // Copy over the build result
         // ----------------------------------------------------------------------
-
-        build.setSuccess( result.isSuccess() );
 
         build.setExitCode( result.getExitCode() );
 



Mime
View raw message