continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r168132 - /maven/continuum/trunk/continuum-core-it /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/alarmclock /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/socket /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/test/resources /maven/continuum/trunk/continuum-model/src/main/resources /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc
Date Wed, 04 May 2005 14:37:00 GMT
Author: trygvis
Date: Wed May  4 07:36:57 2005
New Revision: 168132

URL: http://svn.apache.org/viewcvs?rev=168132&view=rev
Log:
o Fixing CONTINUUM-100: "Add the ability to force a build"
o Adding a "forced" flag to ContinuumBuild.
o Adding a force parameter to Continuum.buildProject() and
  ContinuumXmlRpc.buildProject().
o Updated the BuildProjectTask and task evaluator to obey the forced flag.
o Updated the socket and alarm triggers with the new API, they will both not
  force the build.

Modified:
    maven/continuum/trunk/continuum-core-it/continuum.py
    maven/continuum/trunk/continuum-core-it/it.py
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.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/buildqueue/BuildProjectTask.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/alarmclock/AlarmClockTrigger.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/socket/SimpleSocketTrigger.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
    maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties
    maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java

Modified: maven/continuum/trunk/continuum-core-it/continuum.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/continuum.py?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum.py Wed May  4 07:36:57 2005
@@ -85,8 +85,8 @@
 # Build handling
 ####################################################################
 
-def buildProject( projectId ):
-    result = checkResult( server.continuum.buildProject( projectId ) )
+def buildProject( projectId, force=False ):
+    result = checkResult( server.continuum.buildProject( projectId, force ) )
 
     return result[ "buildId" ]
 
@@ -185,13 +185,15 @@
 
 class Build:
     def __init__( self, map ):
+        map[ "state" ] = decodeState( int( map[ "state" ] ) )
+        map[ "forced" ] = bool( map[ "forced" ] )
         map[ "totalTime" ] = int( map[ "endTime" ] )/ 1000 - int( map[ "startTime" ] ) /
1000
         map[ "startTime" ] = strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime( int( map[ "startTime"
] ) / 1000 ) )
         map[ "endTime" ] = strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime( int( map[ "endTime"
] ) / 1000 ) )
-        map[ "state" ] = decodeState( int( map[ "state" ] ) )
 
         self.id = map[ "id" ]
         self.state = map[ "state" ]
+        self.forced = map[ "forced" ]
         self.startTime = map[ "startTime" ]
         self.endTime = map[ "endTime" ]
         self.totalTime = map[ "totalTime" ]

Modified: maven/continuum/trunk/continuum-core-it/it.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/it.py?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/it.py (original)
+++ maven/continuum/trunk/continuum-core-it/it.py Wed May  4 07:36:57 2005
@@ -24,6 +24,9 @@
     if( expected == actual ):
         return
 
+    fail( message, expected, actual )
+
+def fail( message, expected, actual ):
     print
     print "##############################################"
     print "ASSERTION FAILURE!"
@@ -47,12 +50,10 @@
     assertEquals( message, False, condition )
 
 def assertNotNull( message, condition ):
-    if( condition != None ):
+    if ( condition != None ):
         return
 
-    print message
-
-    sys.exit( -1 )
+    fail( message, None, condition )
 
 def assertProject( projectId, name, nagEmailAddress, state, version, builderId, project ):
     assertNotNull( "project.id", projectId )
@@ -112,6 +113,8 @@
     assertTrue( "Standard output didn't contain the 'BUILD SUCCESSFUL' message.", buildResult.standardOutput.find(
"BUILD SUCCESSFUL" ) != -1 )
     assertEquals( "Standard error wasn't empty.", 0, len( buildResult.standardError ) )
 
+    return build
+
 def assertSuccessfulAntBuild( buildId ):
     build = waitForBuild( buildId )
     assertEquals( "The build wasn't successful.", continuum.STATE_OK, build.state )
@@ -406,6 +409,11 @@
     progress( "Test that a build without any files changed won't execute the builder" )
     build = continuum.buildProject( maven2.id )
     assertSuccessfulNoBuildPerformed( build )
+
+    progress( "Test that a forced build without any files changed executes the builder" )
+    build = continuum.buildProject( maven2.id, True )
+    build = assertSuccessfulMaven2Build( build )
+    assertTrue( "The 'build forces' flag wasn't true", build.forced );
 
     removeProject( maven2Id )
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
Wed May  4 07:36:57 2005
@@ -77,7 +77,7 @@
     Iterator getAllProjects( int start, int end )
         throws ContinuumException;
 
-    String buildProject( String projectId )
+    String buildProject( String projectId, boolean force )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=168132&r1=168131&r2=168132&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 May  4 07:36:57 2005
@@ -339,7 +339,7 @@
         }
     }
 
-    public String buildProject( String projectId )
+    public String buildProject( String projectId, boolean force )
         throws ContinuumException
     {
         try
@@ -348,11 +348,11 @@
 
             getLogger().info( "Enqueuing '" + project.getName() + "'." );
 
-            String buildId = store.createBuild( project.getId() );
+            String buildId = store.createBuild( project.getId(), force );
 
             getLogger().info( "Build id: '" + buildId + "'." );
 
-            buildQueue.put( new BuildProjectTask( projectId, buildId ) );
+            buildQueue.put( new BuildProjectTask( projectId, buildId, force ) );
 
             return buildId;
         }

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=168132&r1=168131&r2=168132&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
Wed May  4 07:36:57 2005
@@ -203,25 +203,29 @@
         ContinuumBuildResult result;
 
         // ----------------------------------------------------------------------
-        // Build the project if there was any updated files or if the project is
-        // new (never been built before)
+        // Build the project if
+        // * there was any updated files
+        // * the project is new (never been built before)
+        // * the build is "forced"
         // ----------------------------------------------------------------------
 
-        if ( scmResult.getUpdatedFiles().size() > 0 || isNew( project ) )
+        if ( scmResult.getUpdatedFiles().size() > 0 ||
+             isNew( project ) ||
+             build.isForced() )
         {
-            String id = project.getId();
-
             File workingDirectory = new File( project.getWorkingDirectory() );
 
             builder.updateProjectFromCheckOut( workingDirectory, project );
 
-            store.updateProject( id,
+            String projectId = project.getId();
+
+            store.updateProject( projectId,
                                  project.getName(),
                                  project.getScmUrl(),
                                  project.getNagEmailAddress(),
                                  project.getVersion() );
 
-//            store.updateProjectConfiguration( id, project.getConfiguration() );
+//            store.updateProjectConfiguration( projectId, project.getConfiguration() );
 
             try
             {
@@ -243,6 +247,8 @@
         }
         else
         {
+            getLogger().info( "No files updated, not building. Build id '" + build.getId()
+ "'." );
+
             result = new ContinuumBuildResult();
 
             result.setSuccess( true );

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
Wed May  4 07:36:57 2005
@@ -31,13 +31,17 @@
 
     private long timestamp;
 
-    public BuildProjectTask( String projectId, String buildId )
+    private boolean force;
+
+    public BuildProjectTask( String projectId, String buildId, boolean force )
     {
         this.projectId = projectId;
 
         this.buildId = buildId;
 
         this.timestamp = System.currentTimeMillis();
+
+        this.force = force;
     }
 
     public String getProjectId()
@@ -53,5 +57,10 @@
     public long getTimestamp()
     {
         return timestamp;
+    }
+
+    public boolean isForce()
+    {
+        return force;
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
Wed May  4 07:36:57 2005
@@ -102,6 +102,19 @@
                 continue;
             }
 
+            // ----------------------------------------------------------------------
+            // If this build is forces, don't remove it
+            // ----------------------------------------------------------------------
+
+            if ( buildProjectTask.isForce() )
+            {
+                continue;
+            }
+
+            // ----------------------------------------------------------------------
+            //
+            // ----------------------------------------------------------------------
+
             long interval = buildProjectTask.getTimestamp() - okTask.getTimestamp();
 
             if ( interval < requiredBuildInterval )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
Wed May  4 07:36:57 2005
@@ -82,7 +82,7 @@
     // Build
     // ----------------------------------------------------------------------
 
-    String createBuild( String projectId )
+    String createBuild( String projectId, boolean forced )
         throws ContinuumStoreException;
 
     void setBuildResult( String buildId, int state, ContinuumBuildResult result, Throwable
error )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
Wed May  4 07:36:57 2005
@@ -383,7 +383,7 @@
     // Build
     // ----------------------------------------------------------------------
 
-    public String createBuild( String projectId )
+    public String createBuild( String projectId, boolean forced )
         throws ContinuumStoreException
     {
         try
@@ -403,6 +403,8 @@
             build.setState( ContinuumProjectState.BUILD_SIGNALED );
 
             build.setProject( project );
+
+            build.setForced( forced );
 
             Object id = store.addContinuumBuild( build );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/alarmclock/AlarmClockTrigger.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/alarmclock/AlarmClockTrigger.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/alarmclock/AlarmClockTrigger.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/alarmclock/AlarmClockTrigger.java
Wed May  4 07:36:57 2005
@@ -105,7 +105,7 @@
 
             try
             {
-                getContinuum().buildProject( project.getId() );
+                getContinuum().buildProject( project.getId(), false );
             }
             catch ( ContinuumException ex )
             {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/socket/SimpleSocketTrigger.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/socket/SimpleSocketTrigger.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/socket/SimpleSocketTrigger.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/trigger/socket/SimpleSocketTrigger.java
Wed May  4 07:36:57 2005
@@ -68,7 +68,7 @@
                 return;
             }
 
-            String buildId = getContinuum().buildProject( id );
+            String buildId = getContinuum().buildProject( id, false );
 
             out( printer, "OK" );
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
Wed May  4 07:36:57 2005
@@ -18,6 +18,7 @@
 
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ModelloJPoxContinuumStoreTest;
+import org.apache.maven.continuum.project.ContinuumProject;
 
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.taskqueue.Task;
@@ -51,18 +52,18 @@
 
         String project = ModelloJPoxContinuumStoreTest.addProject( store, name );
 
-        String build = enqueue( project );
+        String build = buildProject( project, false );
 
         assertNextBuildIs( build );
 
         assertNextBuildIsNull();
 
-        String buildX = enqueue( project );
+        String buildX = buildProject( project, false );
 
-        enqueue( project );
-        enqueue( project );
-        enqueue( project );
-        enqueue( project );
+        buildProject( project, false );
+        buildProject( project, false );
+        buildProject( project, false );
+        buildProject( project, false );
 
         assertNextBuildIs( buildX );
 
@@ -80,9 +81,9 @@
 
         String project2 = ModelloJPoxContinuumStoreTest.addProject( store, name2 );
 
-        String build1 = enqueue( project1 );
+        String build1 = buildProject( project1, false );
 
-        String build2 = enqueue( project2 );
+        String build2 = buildProject( project2, false );
 
         assertNextBuildIs( build1 );
 
@@ -90,36 +91,65 @@
 
         assertNextBuildIsNull();
 
-        String buildX1 = enqueue( project1 );
+        String buildX1 = buildProject( project1, false );
 
-        String buildX2 = enqueue( project2 );
+        String buildX2 = buildProject( project2, false );
 
-        enqueue( project1 );
-        enqueue( project2 );
-        enqueue( project1 );
-        enqueue( project2 );
-        enqueue( project1 );
-        enqueue( project2 );
-        enqueue( project1 );
-        enqueue( project2 );
+        buildProject( project1, false );
+        buildProject( project2, false );
+        buildProject( project1, false );
+        buildProject( project2, false );
+        buildProject( project1, false );
+        buildProject( project2, false );
+        buildProject( project1, false );
+        buildProject( project2, false );
 
         assertNextBuildIs( buildX1 );
-
         assertNextBuildIs( buildX2 );
 
         assertNextBuildIsNull();
     }
 
+    public void testTestTheQueueWithASingleProjectAndForcedBuilds()
+        throws Exception
+    {
+        String name = "Project 1";
+
+        String project = ModelloJPoxContinuumStoreTest.addProject( store, name );
+
+        String build = buildProject( project, true );
+
+        assertNextBuildIs( build );
+
+        assertNextBuildIsNull();
+
+        String build1 = buildProject( project, true );
+        String build2 = buildProject( project, true );
+        String build3 = buildProject( project, true );
+        String build4 = buildProject( project, true );
+        String build5 = buildProject( project, true );
+
+        assertNextBuildIs( build1 );
+        assertNextBuildIs( build2 );
+        assertNextBuildIs( build3 );
+        assertNextBuildIs( build4 );
+        assertNextBuildIs( build5 );
+
+        assertNextBuildIsNull();
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    private String enqueue( String projectId )
+    private String buildProject( String projectId, boolean force )
         throws Exception
     {
-        String buildId = store.createBuild( projectId );
+        ContinuumProject project = store.getProject( projectId );
+
+        String buildId = store.createBuild( project.getId(), force );
 
-        buildQueue.put( new BuildProjectTask( projectId, buildId ) );
+        buildQueue.put( new BuildProjectTask( projectId, buildId, force ) );
 
         return buildId;
     }

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
Wed May  4 07:36:57 2005
@@ -42,7 +42,7 @@
 
         String projectId = ModelloJPoxContinuumStoreTest.addProject( store, "Test Project"
);
 
-        String buildId = store.createBuild( projectId );
+        String buildId = store.createBuild( projectId, false );
 
         ContinuumBuild build = store.getBuild( buildId );
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
Wed May  4 07:36:57 2005
@@ -374,7 +374,7 @@
 
         String projectId = addProject( "Test Project" );
 
-        String buildId = store.createBuild( projectId );
+        String buildId = store.createBuild( projectId, false );
 
         store.setIsUpdating( buildId );
 
@@ -410,7 +410,7 @@
 
         String projectId = addProject( "Test Project" );
 
-        String buildId = store.createBuild( projectId );
+        String buildId = store.createBuild( projectId, false );
 
         Iterator it = store.getBuildsForProject( projectId, 0, 0 );
 
@@ -450,13 +450,13 @@
 
         for ( int i = 0; i < 10; i++ )
         {
-            expectedBuilds.add( 0, store.createBuild( projectId ) );
+            expectedBuilds.add( 0, store.createBuild( projectId, false ) );
 
-            store.createBuild( projectIdFoo );
+            store.createBuild( projectIdFoo, false );
 
-            store.createBuild( projectIdBar );
+            store.createBuild( projectIdBar, false );
 
-            store.createBuild( projectIdFoo );
+            store.createBuild( projectIdFoo, false );
         }
 
         // ----------------------------------------------------------------------
@@ -500,7 +500,7 @@
 
         long now = System.currentTimeMillis();
 
-        String buildId = store.createBuild( projectId );
+        String buildId = store.createBuild( projectId, false );
 
         assertIsCommitted( store );
 

Modified: maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties (original)
+++ maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties Wed May  4 07:36:57
2005
@@ -4,7 +4,7 @@
 log4j.appender.root.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
 
 # JPOX Categories
-log4j.category.JPOX=INFO, root
+log4j.category.JPOX=ERROR, root
 
 #log4j.category.JPOX.JDO=DEBUG, root
 #log4j.category.JPOX.Cache=DEBUG, root

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=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo Wed May  4 07:36:57
2005
@@ -191,6 +191,11 @@
           -->
         </field>
         <field>
+          <name>forced</name>
+          <version>1.0.0</version>
+          <type>boolean</type>
+        </field>
+        <field>
           <name>startTime</name>
           <version>1.0.0</version>
           <type>long</type>

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
Wed May  4 07:36:57 2005
@@ -44,7 +44,7 @@
     // Build handling
     // ----------------------------------------------------------------------
 
-    Hashtable buildProject( String projectId );
+    Hashtable buildProject( String projectId, boolean force );
 
     Hashtable getBuildsForProject( String projectId, int start, int end );
 

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java?rev=168132&r1=168131&r2=168132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
Wed May  4 07:36:57 2005
@@ -286,11 +286,11 @@
     // Builds
     // ----------------------------------------------------------------------
 
-    public Hashtable buildProject( String projectId )
+    public Hashtable buildProject( String projectId, boolean force )
     {
         try
         {
-            return makeHashtable( "buildId", continuum.buildProject( projectId ) );
+            return makeHashtable( "buildId", continuum.buildProject( projectId, force ) );
         }
         catch ( Throwable e )
         {



Mime
View raw message