continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r386085 - in /maven/continuum/branches/continuum-1.0.x: continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ continuum-core/src/main/java/org/apache/maven/continuu...
Date Wed, 15 Mar 2006 14:49:05 GMT
Author: evenisse
Date: Wed Mar 15 06:49:02 2006
New Revision: 386085

URL: http://svn.apache.org/viewcvs?rev=386085&view=rev
Log:
o Add CHECKOUTED state, it's similar to NEW state but the difference is that sources are checkouted
o Print working directory link only when sources are checkouted

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
    maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
    maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
    maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
    maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
    maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/Summary.vm
    maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/View.vm

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Wed Mar 15 06:49:02 2006
@@ -463,8 +463,9 @@
         {
             Project project = store.getProject( projectId );
 
-            if ( project.getState() != ContinuumProjectState.NEW && project.getState()
!= ContinuumProjectState.OK &&
-                project.getState() != ContinuumProjectState.FAILED &&
+            if ( project.getState() != ContinuumProjectState.NEW &&
+                project.getState() != ContinuumProjectState.CHECKOUTED &&
+                project.getState() != ContinuumProjectState.OK && project.getState()
!= ContinuumProjectState.FAILED &&
                 project.getState() != ContinuumProjectState.ERROR )
             {
                 ContinuumBuildExecutor executor = executorManager.getBuildExecutor( project.getExecutorId()
);
@@ -1471,8 +1472,8 @@
 
             if ( configuration.get( "conf.deploymentRepositoryDirectory" ) != null )
             {
-                configurationService.setDeploymentRepositoryDirectory(
-                    configurationService.getFile( (String) configuration.get( "conf.deploymentRepositoryDirectory"
) ) );
+                configurationService.setDeploymentRepositoryDirectory( configurationService.getFile(
+                    (String) configuration.get( "conf.deploymentRepositoryDirectory" ) )
);
             }
 
             if ( configuration.get( "conf.url" ) != null )
@@ -1838,8 +1839,9 @@
         {
             Project project = (Project) it.next();
 
-            if ( project.getState() != ContinuumProjectState.NEW && project.getState()
!= ContinuumProjectState.OK &&
-                project.getState() != ContinuumProjectState.FAILED &&
+            if ( project.getState() != ContinuumProjectState.NEW &&
+                project.getState() != ContinuumProjectState.CHECKOUTED &&
+                project.getState() != ContinuumProjectState.OK && project.getState()
!= ContinuumProjectState.FAILED &&
                 project.getState() != ContinuumProjectState.ERROR )
             {
                 project.setState( project.getOldState() );

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Wed Mar 15 06:49:02 2006
@@ -236,7 +236,10 @@
                 }
 
                 if ( allChangesUnknown && project.getOldState() != ContinuumProjectState.NEW
&&
-                    trigger != ContinuumProjectState.TRIGGER_FORCED && project.getState()
!= ContinuumProjectState.NEW )
+                    project.getOldState() != ContinuumProjectState.CHECKOUTED &&
+                    trigger != ContinuumProjectState.TRIGGER_FORCED &&
+                    project.getState() != ContinuumProjectState.NEW &&
+                    project.getState() != ContinuumProjectState.CHECKOUTED )
                 {
                     getLogger().info( "The project was not built because all changes are
unknown." );
 
@@ -346,8 +349,9 @@
                 getLogger().error( "Internal error while building the project.", ex );
             }
 
-            if ( project.getState() != ContinuumProjectState.NEW && project.getState()
!= ContinuumProjectState.OK &&
-                project.getState() != ContinuumProjectState.FAILED &&
+            if ( project.getState() != ContinuumProjectState.NEW &&
+                project.getState() != ContinuumProjectState.CHECKOUTED &&
+                project.getState() != ContinuumProjectState.OK && project.getState()
!= ContinuumProjectState.FAILED &&
                 project.getState() != ContinuumProjectState.ERROR )
             {
                 try

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
Wed Mar 15 06:49:02 2006
@@ -44,8 +44,6 @@
     {
         Project project = store.getProject( getProjectId( context ) );
 
-        int state = project.getState();
-
         project.setState( ContinuumProjectState.CHECKING_OUT );
 
         store.updateProject( project );
@@ -92,7 +90,7 @@
         }
         finally
         {
-            project.setState( state );
+            project.setState( ContinuumProjectState.CHECKOUTED );
 
             store.updateProject( project );
         }

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
Wed Mar 15 06:49:02 2006
@@ -79,7 +79,8 @@
         // This is really a precondition for this action to execute
         // ----------------------------------------------------------------------
 
-        if ( project.getOldState() != ContinuumProjectState.NEW && scmResult.getChanges().size()
== 0 &&
+        if ( project.getOldState() != ContinuumProjectState.NEW &&
+            project.getOldState() != ContinuumProjectState.CHECKOUTED && scmResult.getChanges().size()
== 0 &&
             trigger != ContinuumProjectState.TRIGGER_FORCED && !isNew( project )
)
         {
             getLogger().info( "No files updated, not building. Project id '" + project.getId()
+ "'." );
@@ -178,6 +179,7 @@
 
     private boolean isNew( Project project )
     {
-        return project.getState() == ContinuumProjectState.NEW;
+        return project.getState() == ContinuumProjectState.NEW ||
+            project.getState() == ContinuumProjectState.CHECKOUTED;
     }
 }

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/FormatterTool.java
Wed Mar 15 06:49:02 2006
@@ -39,7 +39,7 @@
     // TODO: Add i18n
     public String formatProjectState( int state )
     {
-        if ( state == ContinuumProjectState.NEW )
+        if ( state == ContinuumProjectState.NEW || state == ContinuumProjectState.CHECKOUTED
)
         {
             return "New";
         }

Modified: maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
Wed Mar 15 06:49:02 2006
@@ -56,7 +56,6 @@
     /**
      * This state indicates that a project is currently beeing build.
      */
-//    public final static ContinuumProjectState BUILDING = new ContinuumProjectState( "building"
);
     public final static int BUILDING = 6;
 
     public final static int CHECKING_OUT = 7;
@@ -64,6 +63,11 @@
     public final static int UPDATING = 8;
 
     public final static int WARNING = 9;
+
+    /**
+     * This state indicates that sources are checkouted.
+     */
+    public final static int CHECKOUTED = 10;
 
     private String name;
 

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
Wed Mar 15 06:49:02 2006
@@ -49,7 +49,7 @@
             state = buildResult.getState();
         }
 
-        if ( state == ContinuumProjectState.NEW )
+        if ( state == ContinuumProjectState.NEW || state == ContinuumProjectState.CHECKOUTED
)
         {
             return "New";
         }

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuild.vm
Wed Mar 15 06:49:02 2006
@@ -15,8 +15,10 @@
       <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$infoLink">Info</a>
       #set ( $buildsLink = $link.setPage('ProjectBuilds.vm').addPathInfo('view', "ProjectBuilds").addPathInfo('id',
$project.id) )
       <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$buildsLink">Builds</a>
-      #set ( $workingCopy = $link.setPage('WorkingCopy.vm').addPathInfo('view', "WorkingCopy").addPathInfo('id',
$project.id) )
-      <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$workingCopy">Working&nbsp;Copy</a>
+        #if ( $item.state == 10 || $item.state == 2 || $item.state == 3 || $item.state ==
4 || $item.state == 6 )
+        #set ( $workingCopy = $link.setPage('WorkingCopy.vm').addPathInfo('view', "WorkingCopy").addPathInfo('id',
$project.id) )
+        <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$workingCopy">Working&nbsp;Copy</a>
+      #end
     </p>
   </div>
   #end

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/ProjectBuilds.vm
Wed Mar 15 06:49:02 2006
@@ -14,8 +14,10 @@
       #set ( $infoLink = $link.setPage('View.vm').addPathInfo('fid', "$!{project.executorId}Project").addPathInfo('id',
$project.id) )
       <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$infoLink">Info</a>
       <b style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;">Builds</b>
-      #set ( $workingCopy = $link.setPage('WorkingCopy.vm').addPathInfo('view', "WorkingCopy").addPathInfo('id',
$project.id) )
-      <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$workingCopy">Working&nbsp;Copy</a>
+        #if ( $item.state == 10 || $item.state == 2 || $item.state == 3 || $item.state ==
4 || $item.state == 6 )
+        #set ( $workingCopy = $link.setPage('WorkingCopy.vm').addPathInfo('view', "WorkingCopy").addPathInfo('id',
$project.id) )
+        <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$workingCopy">Working&nbsp;Copy</a>
+      #end
     </p>
   </div>
   #end

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/Summary.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/Summary.vm?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/Summary.vm
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/Summary.vm
Wed Mar 15 06:49:02 2006
@@ -50,7 +50,7 @@
       <tr class="$css.nextClass">
         <td bordercolor="#999999">
           <div align="center">
-          #if ( $item.state == 1 || $item.state == 2 || $item.state == 3 || $item.state ==
4 )
+          #if ( $item.state == 1 || $item.state == 10 || $item.state == 2 || $item.state
== 3 || $item.state == 4 )
             #set ( $latestBuild = $buildResults.get( $item.id ) )
             #set ( $generatedState = $state.generate( $item ) )
             #if ( $latestBuild && $generatedState != "New" )
@@ -69,7 +69,7 @@
           <div align="center">
           #if ( $continuum.isInBuildingQueue( $item.id ) || $continuum.isInCheckoutQueue(
$item.id ) )
             <b><img src="$requestUtil.getContextPath()/images/inqueue.gif" alt="In
Queue" title="In Queue" width="16" height="16"></b>
-          #elseif ( $item.state == 1 || $item.state == 2 || $item.state == 3 || $item.state
== 4 )
+          #elseif ( $item.state == 1 || $item.state == 10 || $item.state == 2 || $item.state
== 3 || $item.state == 4 )
             #if ( $item.buildNumber != 0 )
               #set ( $build = $buildResultsInSuccess.get( $item.id ) )
               <a href="$link.setPage('ProjectBuild.vm').addQueryData('view','ProjectBuild').addQueryData('buildId',$build.id).addQueryData('id',$item.id)">$item.buildNumber</a>
@@ -95,7 +95,7 @@
           <td width="1%">
           #if ( $continuum.isInBuildingQueue( $item.id ) || $continuum.isInCheckoutQueue(
$item.id ) )
             &nbsp;
-          #elseif ( $item.state == 1 || $item.state == 2 || $item.state == 3 || $item.state
== 4 )
+          #elseif ( $item.state == 1 || $item.state == 10 || $item.state == 2 || $item.state
== 3 || $item.state == 4 )
             <a href="$link.addPathInfo('action', 'cam').addPathInfo('cid','buildProject').addPathInfo('id',
$item.id)"><img src="$requestUtil.getContextPath()/images/buildnow.gif" alt="Build Now"
title="Build Now" width="16" height="16" border="0"></a>
           #else
             &nbsp;
@@ -112,7 +112,7 @@
         </td>
 
         <td width="1%">
-        #if ( $item.state == 1 || $item.state == 2 || $item.state == 3 || $item.state ==
4 || $item.state == 6 )
+        #if ( $item.state == 10 || $item.state == 2 || $item.state == 3 || $item.state ==
4 || $item.state == 6 )
           <a href="$link.setPage('WorkingCopy.vm').addPathInfo('view', "WorkingCopy").addPathInfo('id',
$item.id)"><img src="$requestUtil.getContextPath()/images/workingcopy.gif" alt="Working
Copy" title="Working Copy" width="16" height="16" border="0"></a>
         #else
           &nbsp;
@@ -121,7 +121,7 @@
 
         #if ( $continuum.security.isAuthorized( $c1user, "deleteProject" ) )
           <td width="1%">
-          #if ( $item.state == 1 || $item.state == 2 || $item.state == 3 || $item.state ==
4 )
+          #if ( $item.state == 1 || $item.state == 10 || $item.state == 2 || $item.state
== 3 || $item.state == 4 )
           <a href="$link.setPage('Delete.vm').addPathInfo('fid', "$!{item.executorId}Project").addPathInfo('id',
$item.id)"><img src="$requestUtil.getContextPath()/images/delete.gif" alt="Delete" title="Delete"
width="16" height="16" border="0"></a>
           #else
           &nbsp;

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/View.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/View.vm?rev=386085&r1=386084&r2=386085&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/View.vm
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/templates/screens/View.vm
Wed Mar 15 06:49:02 2006
@@ -14,8 +14,10 @@
       <b style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;">Info</b>
       #set ( $buildsLink = $link.setPage('ProjectBuilds.vm').addPathInfo('view', "ProjectBuilds").addPathInfo('id',
$item.id) )
       <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$buildsLink">Builds</a>
-      #set ( $workingCopy = $link.setPage('WorkingCopy.vm').addPathInfo('view', "WorkingCopy").addPathInfo('id',
$item.id) )
-      <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$workingCopy">Working&nbsp;Copy</a>
+        #if ( $item.state == 10 || $item.state == 2 || $item.state == 3 || $item.state ==
4 || $item.state == 6 )
+        #set ( $workingCopy = $link.setPage('WorkingCopy.vm').addPathInfo('view', "WorkingCopy").addPathInfo('id',
$item.id) )
+        <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration:
none;" href="$workingCopy">Working&nbsp;Copy</a>
+      #end
     </p>
   </div>
   #end



Mime
View raw message