continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r385807 - in /maven/continuum/branches/continuum-1.0.x: continuum-core/src/main/java/org/apache/maven/continuum/ continuum-web/src/main/resources/META-INF/plexus/ continuum-web/src/main/resources/templates/screens/
Date Tue, 14 Mar 2006 14:15:56 GMT
Author: evenisse
Date: Tue Mar 14 06:15:53 2006
New Revision: 385807

URL: http://svn.apache.org/viewcvs?rev=385807&view=rev
Log:
[CONTINUUM-412] Add 'Build Now' link for each build definition in project view

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-web/src/main/resources/META-INF/plexus/components.xml
    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=385807&r1=385806&r2=385807&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
Tue Mar 14 06:15:53 2006
@@ -417,19 +417,26 @@
         buildProject( projectId, ContinuumProjectState.TRIGGER_FORCED );
     }
 
-    public void buildProject( int projectId, int trigger )
+    public void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId )
         throws ContinuumException
     {
-        if ( isInBuildingQueue( projectId ) || isInCheckoutQueue( projectId ) )
-        {
-            return;
-        }
+        buildProject( projectId, buildDefinitionId, ContinuumProjectState.TRIGGER_FORCED
);
+    }
+
 
+    public void buildProject( int projectId, int trigger )
+        throws ContinuumException
+    {
         BuildDefinition buildDef = getDefaultBuildDefinition( projectId );
 
         if ( buildDef == null )
         {
             throw new ContinuumException( "Project (id=" + projectId + " doens't have a default
build definition." );
+        }
+
+        if ( isInBuildingQueue( projectId, buildDef.getId() ) || isInCheckoutQueue( projectId
) )
+        {
+            return;
         }
 
         buildProject( projectId, buildDef.getId(), trigger, false );

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/META-INF/plexus/components.xml?rev=385807&r1=385806&r2=385807&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/resources/META-INF/plexus/components.xml
Tue Mar 14 06:15:53 2006
@@ -547,6 +547,10 @@
             <expression>buildProject(#id)</expression>
           </call>
           <call>
+            <cid>buildProjectWithBuildDefinition</cid>
+            <expression>buildProjectWithBuildDefinition(#id, #buildDefinitionId)</expression>
+          </call>
+          <call>
             <cid>buildAllProjects</cid>
             <expression>buildProjects()</expression>
           </call>

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=385807&r1=385806&r2=385807&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
Tue Mar 14 06:15:53 2006
@@ -99,13 +99,17 @@
         </td>
         <td>Project</td>
         <td>
+          #if ( $continuum.security.isAuthorized( $c1user, "buildProject" ) )
+            #set ( $buildNowLink = $link.addPathInfo('action', 'cam').addPathInfo('cid','buildProjectWithBuildDefinition').addPathInfo('id',
$item.id).addPathInfo('buildDefinitionId', $buildDefinition.id) )
+            <a href="$buildNowLink">Build Now</a> |
+          #end
           #if ( $continuum.security.isAuthorized( $c1user, "editBuildDefinition" ) )
-          #set ( $buildDefinitionLink = $link.setPage('BuildDefinition.vm').addPathInfo('view','BuildDefinition').addPathInfo('buildDefinitionId',
$buildDefinition.id).addPathInfo('id', $item.id) )
-          <a href="$buildDefinitionLink">Edit</a> |
+            #set ( $buildDefinitionLink = $link.setPage('BuildDefinition.vm').addPathInfo('view','BuildDefinition').addPathInfo('buildDefinitionId',
$buildDefinition.id).addPathInfo('id', $item.id) )
+            <a href="$buildDefinitionLink">Edit</a> |
           #end
           #if ( $continuum.security.isAuthorized( $c1user, "deleteBuildDefinition" ) )
-          #set ( $deleteBuildDefinitionLink = $link.setPage('DeleteBuildDefinition.vm').addPathInfo('buildDefinitionId',
$buildDefinition.id).addPathInfo('id', $item.id).addPathInfo('executorId', $item.executorId)
)
-          <a href="$deleteBuildDefinitionLink">Delete</a>
+            #set ( $deleteBuildDefinitionLink = $link.setPage('DeleteBuildDefinition.vm').addPathInfo('buildDefinitionId',
$buildDefinition.id).addPathInfo('id', $item.id).addPathInfo('executorId', $item.executorId)
)
+            <a href="$deleteBuildDefinitionLink">Delete</a>
           #end
         </td>
       </tr>



Mime
View raw message