continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r169245 - /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/notification/mail /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store /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-model /maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/tool
Date Mon, 09 May 2005 07:37:04 GMT
Author: trygvis
Date: Mon May  9 00:37:02 2005
New Revision: 169245

URL: http://svn.apache.org/viewcvs?rev=169245&view=rev
Log:
Fixing CONTINUUM-123: "Remove the "build signaled" state".

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/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.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/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-model/pom.xml
    maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/tool/ContinuumStateContentGenerator.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=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum.py Mon May  9 00:37:02 2005
@@ -9,7 +9,7 @@
 STATE_OK = "ok"
 STATE_FAILED = "failed"
 STATE_ERROR = "error"
-STATE_BUILD_SIGNALED = "build signaled"
+#STATE_BUILD_SIGNALED = "build signaled"
 STATE_BUILDING = "building"
 STATE_CHECKING_OUT = "checking out"
 STATE_UPDATING = "updating"
@@ -43,8 +43,8 @@
         return STATE_FAILED
     elif ( state == 4 ):
         return STATE_ERROR
-    elif ( state == 5 ):
-        return STATE_BUILD_SIGNALED
+#    elif ( state == 5 ):
+#        return STATE_BUILD_SIGNALED
     elif ( state == 6 ):
         return STATE_BUILDING
     elif ( state == 7 ):

Modified: maven/continuum/trunk/continuum-core-it/it.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/it.py?rev=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/it.py (original)
+++ maven/continuum/trunk/continuum-core-it/it.py Mon May  9 00:37:02 2005
@@ -185,8 +185,7 @@
     print "waiting for build: " + buildId
     build = continuum.getBuild( buildId )
 
-    while( build.state == continuum.STATE_BUILD_SIGNALED or 
-           build.state == continuum.STATE_UPDATING or
+    while( build.state == continuum.STATE_UPDATING or
            build.state == continuum.STATE_BUILDING ):
 
         if ( timeout <= 0 ):

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=169245&r1=169244&r2=169245&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
Mon May  9 00:37:02 2005
@@ -359,7 +359,7 @@
         {
             ContinuumProject project = store.getProject( projectId );
 
-            store.setBuildSignalled( projectId );
+//            store.setBuildSignalled( projectId );
 
             getLogger().info( "Enqueuing '" + project.getName() + "'." );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java?rev=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java
Mon May  9 00:37:02 2005
@@ -73,10 +73,10 @@
 
             Assert.assertNotNull( result );
 
-            if ( result.getState() == ContinuumProjectState.BUILD_SIGNALED )
-            {
-                continue;
-            }
+//            if ( result.getState() == ContinuumProjectState.BUILD_SIGNALED )
+//            {
+//                continue;
+//            }
 
             if ( result.getState() != ContinuumProjectState.BUILDING )
             {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java?rev=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
Mon May  9 00:37:02 2005
@@ -55,10 +55,10 @@
         {
             return "Error";
         }
-        else if ( state == ContinuumProjectState.BUILD_SIGNALED )
-        {
-            return "Build signaled";
-        }
+//        else if ( state == ContinuumProjectState.BUILD_SIGNALED )
+//        {
+//            return "Build signaled";
+//        }
         else if ( state == ContinuumProjectState.BUILDING )
         {
             return "Building";

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java?rev=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
Mon May  9 00:37:02 2005
@@ -60,7 +60,7 @@
      * the actual build starts to make.
      */
 //    public final static ContinuumProjectState BUILD_SIGNALED = new ContinuumProjectState(
"signaled" );
-    public final static int BUILD_SIGNALED = 5;
+//    public final static int BUILD_SIGNALED = 5;
 
     /**
      * This state indicates that a project is currently beeing build.

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java?rev=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java
Mon May  9 00:37:02 2005
@@ -41,16 +41,20 @@
         ContinuumProjectState.CHECKING_OUT,
     };
 
-    private final static int[] BUILD_SIGNALED_PREVIOUS_STATES = {
+//    private final static int[] BUILD_SIGNALED_PREVIOUS_STATES = {
+//        ContinuumProjectState.NEW,
+//        ContinuumProjectState.ERROR,
+//        ContinuumProjectState.OK,
+//        ContinuumProjectState.FAILED,
+//        ContinuumProjectState.BUILD_SIGNALED,
+//    };
+
+    private final static int[] UPDATING_PREVIOUS_STATES = {
+//        ContinuumProjectState.BUILD_SIGNALED,
         ContinuumProjectState.NEW,
         ContinuumProjectState.ERROR,
         ContinuumProjectState.OK,
         ContinuumProjectState.FAILED,
-        ContinuumProjectState.BUILD_SIGNALED,
-    };
-
-    private final static int[] UPDATING_PREVIOUS_STATES = {
-        ContinuumProjectState.BUILD_SIGNALED,
     };
 
     private final static int[] BUILDING_PREVIOUS_STATES = {
@@ -116,10 +120,10 @@
         {
             assertInStates( project.getState(), UPDATING_PREVIOUS_STATES, "updating" );
         }
-        else if ( newState == ContinuumProjectState.BUILD_SIGNALED )
-        {
-            assertInStates( project.getState(), BUILD_SIGNALED_PREVIOUS_STATES, "build signaled"
);
-        }
+//        else if ( newState == ContinuumProjectState.BUILD_SIGNALED )
+//        {
+//            assertInStates( project.getState(), BUILD_SIGNALED_PREVIOUS_STATES, "build
signaled" );
+//        }
         else if ( newState == ContinuumProjectState.BUILDING )
         {
             assertInStates( project.getState(), BUILDING_PREVIOUS_STATES, "building" );
@@ -266,8 +270,8 @@
                 return "failed";
             case ContinuumProjectState.ERROR:
                 return "error";
-            case ContinuumProjectState.BUILD_SIGNALED:
-                return "build signaled";
+//            case ContinuumProjectState.BUILD_SIGNALED:
+//                return "build signaled";
             case ContinuumProjectState.BUILDING:
                 return "building";
             case ContinuumProjectState.CHECKING_OUT:

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=169245&r1=169244&r2=169245&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
Mon May  9 00:37:02 2005
@@ -107,8 +107,8 @@
     // Project and Build state transitions
     // ----------------------------------------------------------------------
 
-    void setBuildSignalled( String projectId )
-        throws ContinuumStoreException;
+//    void setBuildSignalled( String projectId )
+//        throws ContinuumStoreException;
 
     void setCheckoutDone( String projectId, CheckOutScmResult scmResult )
         throws ContinuumStoreException;

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=169245&r1=169244&r2=169245&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
Mon May  9 00:37:02 2005
@@ -591,28 +591,28 @@
     //
     // ----------------------------------------------------------------------
 
-    public void setBuildSignalled( String projectId )
-        throws ContinuumStoreException
-    {
-        try
-        {
-            store.begin();
-
-            ContinuumProject project = store.getContinuumProject( projectId, false );
-
-            projectStateGuard.assertTransition( project, ContinuumProjectState.BUILD_SIGNALED
);
-
-            project.setState( ContinuumProjectState.BUILD_SIGNALED );
-
-            store.commit();
-        }
-        catch ( Exception e )
-        {
-            rollback( store );
-
-            throw new ContinuumStoreException( "Error while setting project state: '" + projectId
+ "'.", e );
-        }
-    }
+//    public void setBuildSignalled( String projectId )
+//        throws ContinuumStoreException
+//    {
+//        try
+//        {
+//            store.begin();
+//
+//            ContinuumProject project = store.getContinuumProject( projectId, false );
+//
+//            projectStateGuard.assertTransition( project, ContinuumProjectState.BUILD_SIGNALED
);
+//
+//            project.setState( ContinuumProjectState.BUILD_SIGNALED );
+//
+//            store.commit();
+//        }
+//        catch ( Exception e )
+//        {
+//            rollback( store );
+//
+//            throw new ContinuumStoreException( "Error while setting project state: '" +
projectId + "'.", e );
+//        }
+//    }
 
     public void setCheckoutDone( String projectId, CheckOutScmResult scmResult )
         throws ContinuumStoreException

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=169245&r1=169244&r2=169245&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
Mon May  9 00:37:02 2005
@@ -38,7 +38,7 @@
 
         String projectId = ModelloJPoxContinuumStoreTest.addProject( store, "Test Project"
);
 
-        store.setBuildSignalled( projectId );
+//        store.setBuildSignalled( projectId );
 
         store.setIsUpdating( projectId );
 

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=169245&r1=169244&r2=169245&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
Mon May  9 00:37:02 2005
@@ -370,7 +370,7 @@
 
         String projectId = addProject( "Test Project" );
 
-        store.setBuildSignalled( projectId );
+//        store.setBuildSignalled( projectId );
 
         store.setIsUpdating( projectId );
 
@@ -408,7 +408,7 @@
 
         String projectId = addProject( "Test Project" );
 
-        store.setBuildSignalled( projectId );
+//        store.setBuildSignalled( projectId );
 
         store.setIsUpdating( projectId );
 
@@ -444,7 +444,7 @@
 
         String projectId = addProject( "Test Project" );
 
-        store.setBuildSignalled( projectId );
+//        store.setBuildSignalled( projectId );
 
         store.setIsUpdating( projectId );
 
@@ -452,7 +452,7 @@
 
         String projectIdFoo = addProject( "Foo Project" );
 
-        store.setBuildSignalled( projectIdFoo );
+//        store.setBuildSignalled( projectIdFoo );
 
         store.setIsUpdating( projectIdFoo );
 
@@ -460,7 +460,7 @@
 
         String projectIdBar = addProject( "Bar Project" );
 
-        store.setBuildSignalled( projectIdBar );
+//        store.setBuildSignalled( projectIdBar );
 
         store.setIsUpdating( projectIdBar );
 
@@ -519,9 +519,9 @@
 
         String projectId = addProject( "Test Project" );
 
-        store.setBuildSignalled( projectId );
+//        store.setBuildSignalled( projectId );
 
-        assertInState( projectId, ContinuumProjectState.BUILD_SIGNALED );
+//        assertInState( projectId, ContinuumProjectState.BUILD_SIGNALED );
 
         store.setIsUpdating( projectId );
 

Modified: maven/continuum/trunk/continuum-model/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/pom.xml?rev=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/pom.xml (original)
+++ maven/continuum/trunk/continuum-model/pom.xml Mon May  9 00:37:02 2005
@@ -17,8 +17,8 @@
       <groupId>jpox</groupId>
       <artifactId>jpox-enhancer</artifactId>
       <version>1.0.4</version>
-    </dependency>    
-  </dependencies>  
+    </dependency>
+  </dependencies>
   <build>
     <plugins>
       <plugin>
@@ -33,20 +33,64 @@
           <version>1.0.0</version>
           <packageWithVersion>false</packageWithVersion>
           <model>src/main/resources/continuum.mdo</model>
+          <!--
+          -->
         </configuration>
         <goals>
           <goal>
             <id>java</id>
+            <!--
+            <configuration>
+              <models>
+                <mdo>
+                  <path>src/main/resources/continuum.mdo</path>
+                </mdo>
+                <mdo>
+                  <path>src/main/models/gump/repository.mdo.xml</path>
+                  <version>2.3</version>
+                </mdo>
+              </models>
+            </configuration>
+            -->
           </goal>
           <goal>
             <id>jpox-jdo-mapping</id>
             <configuration>
               <outputDirectory>target/classes</outputDirectory>
+              <!--
+              <models>
+                <mdo>
+                  <path>src/main/resources/continuum.mdo</path>
+                </mdo>
+              </models>
+              -->
             </configuration>
-          </goal>          
+          </goal>
           <goal>
             <id>jpox-store</id>
-          </goal>                    
+            <configuration>
+              <!--
+              <models>
+                <mdo>
+                  <path>src/main/resources/continuum.mdo</path>
+                </mdo>
+              </models>
+              -->
+            </configuration>
+          </goal>
+          <!--
+          <goal>
+            <id>xpp3-reader</id>
+            <configuration>
+              <models>
+                <mdo>
+                  <path>src/main/models/gump/repository.mdo.xml</path>
+                  <version>2.3</version>
+                </mdo>
+              </models>
+            </configuration>
+          </goal>
+          -->
         </goals>
       </plugin>
     </plugins>

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/tool/ContinuumStateContentGenerator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/tool/ContinuumStateContentGenerator.java?rev=169245&r1=169244&r2=169245&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/tool/ContinuumStateContentGenerator.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/codehaus/continuum/web/tool/ContinuumStateContentGenerator.java
Mon May  9 00:37:02 2005
@@ -44,10 +44,11 @@
         {
             return "<img src=\"/continuum/images/icon_warning_sml.gif\" alt=\"Error\"/>";
         }
-        else if ( state == ContinuumProjectState.BUILD_SIGNALED )
-        {
-            return "Build Queued";
-        }
+        // TODO: Indicate in some way else
+//        else if ( state == ContinuumProjectState.BUILD_SIGNALED )
+//        {
+//            return "Build Queued";
+//        }
         else if ( state == ContinuumProjectState.BUILDING )
         {
             return "Building";



Mime
View raw message