continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r475722 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ continuum-core/src/main/java/org/apache/maven/continuum/core/action/ continuum-core/src/main/resources/org/apache/maven/continuum/...
Date Thu, 16 Nov 2006 13:09:50 GMT
Author: evenisse
Date: Thu Nov 16 05:09:49 2006
New Revision: 475722

URL: http://svn.apache.org/viewvc?view=rev&rev=475722
Log:
[CONTINUUM-232] Build when a dependency has been changed

Modified:
    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/AbstractContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?view=diff&rev=475722&r1=475721&r2=475722
==============================================================================
--- 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
Thu Nov 16 05:09:49 2006
@@ -46,10 +46,7 @@
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
- *
- * @plexus.component
- *   role="org.apache.maven.continuum.buildcontroller.BuildController"
- *   role-hint="default"
+ * @plexus.component role="org.apache.maven.continuum.buildcontroller.BuildController" role-hint="default"
  */
 public class DefaultBuildController
     extends AbstractLogEnabled
@@ -232,6 +229,8 @@
                 store.updateBuildResult( build );
 
                 build = store.getBuildResult( build.getId() );
+
+                context.setBuildResult( build );
             }
             catch ( ContinuumStoreException e )
             {
@@ -260,17 +259,7 @@
 
         if ( build.getModifiedDependencies() == null && context.getModifiedDependencies()
!= null )
         {
-            List dependencies = context.getModifiedDependencies();
-            if ( dependencies != null && !dependencies.isEmpty() )
-            {
-                List modifiedDependencies = new ArrayList();
-                for ( Iterator i = dependencies.iterator(); i.hasNext(); )
-                {
-                    ProjectDependency dep = (ProjectDependency) i.next();
-                    modifiedDependencies.add( dep.getGroupId() + ":" + dep.getArtifactId()
+ ":" + dep.getVersion() );
-                }
-                build.setModifiedDependencies( modifiedDependencies );
-            }
+            build.setModifiedDependencies( context.getModifiedDependencies() );
         }
     }
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?view=diff&rev=475722&r1=475721&r2=475722
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
Thu Nov 16 05:09:49 2006
@@ -153,7 +153,7 @@
 
     public static List getUpdatedDependencies( Map context )
     {
-        return (List) getObject( context, KEY_UPDATE_DEPENDENCIES );
+        return getUpdatedDependencies( context, null );
     }
 
     public static List getUpdatedDependencies( Map context, List defaultValue )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?view=diff&rev=475722&r1=475721&r2=475722
==============================================================================
--- 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
Thu Nov 16 05:09:49 2006
@@ -122,6 +122,8 @@
         build.setTrigger( trigger );
 
         build.setScmResult( scmResult );
+        
+        build.setModifiedDependencies( updatedDependencies );
 
         store.addBuildResult( project, build );
 

Modified: maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm?view=diff&rev=475722&r1=475721&r2=475722
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm
(original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/org/apache/maven/continuum/notification/mail/templates/common.vm
Thu Nov 16 05:09:49 2006
@@ -34,7 +34,7 @@
 
 #if ( $build.scmResult )
 ****************************************************************************
-Changes:
+SCM Changes:
 ****************************************************************************
 #if ( $build.scmResult.changes.size() == 0 )
 No files changed
@@ -63,6 +63,20 @@
 #end
 
 #end
+#end
+#end
+
+#if ( $build.modifiedDependencies )
+****************************************************************************
+Dependencies Changes:
+****************************************************************************
+#if ( $build.modifiedDependencies.size() == 0 )
+No dependencies changed
+
+#else
+#foreach ( $dep in $build.modifiedDependencies )
+$dep.groupId:$dep.artifactId:$dep.version
+
 #end
 #end
 #if ( $build.testResult )

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml?view=diff&rev=475722&r1=475721&r2=475722
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml Thu Nov 16 05:09:49 2006
@@ -453,7 +453,7 @@
           <name>modifiedDependencies</name>
           <version>1.0.0+</version>
           <association>
-            <type>String</type>
+            <type>ProjectDependency</type>
             <multiplicity>*</multiplicity>
           </association>
         </field>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?view=diff&rev=475722&r1=475721&r2=475722
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Thu Nov 16 05:09:49 2006
@@ -342,7 +342,9 @@
 buildResult.scmResult.changes.files = Files
 buildResult.dependencies.changes = Dependencies Changes
 buildResult.dependencies.noChanges = No dependencies changes
-buildResult.dependencies.title = Dependencies
+buildResult.dependencies.groupId = Group Id
+buildResult.dependencies.artifactId = Artifact Id
+buildResult.dependencies.version = Version
 buildResult.changesSinceLastSuccess = Other Changes Since Last Success
 buildResult.generatedReports.title = Generated Reports
 buildResult.generatedReports.surefire = Surefire Report

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp?view=diff&rev=475722&r1=475721&r2=475722
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp Thu
Nov 16 05:09:49 2006
@@ -73,24 +73,23 @@
 
         <h4><ww:text name="buildResult.dependencies.changes"/></h4>
         <ww:if test="buildResult.modifiedDependencies != null && buildResult.modifiedDependencies.size()
> 0">
-            aaa
-            <ww:set name="changes" value="buildResult.modifiedDependencies" scope="request"/>
-            <ec:table items="changes"
-                      var="change"
+            <ww:set name="dependencies" value="buildResult.modifiedDependencies" scope="request"/>
+            <ec:table items="dependencies"
+                      var="dep"
                       showExports="false"
                       showPagination="false"
                       showStatusBar="false"
                       sortable="false"
                       filterable="false">
               <ec:row>
-                <ec:column property="dependency" title="buildResult.dependencies.title">
-                  <c:out value="${pageScope.change}"/><br />
-                </ec:column>
+                <ec:column property="groupId" title="buildResult.dependencies.title"/>
+                <ec:column property="artifactId" title="buildResult.dependencies.title"/>
+                <ec:column property="version" title="buildResult.dependencies.title"/>
               </ec:row>
             </ec:table>
         </ww:if>
         <ww:else>
-          <b><ww:text name="buildResult.dependencies.noChanges"/>${buildResult.modifiedDependencies}</b>
+          <b><ww:text name="buildResult.dependencies.noChanges"/></b>
         </ww:else>
 
         <ww:if test="hasSurefireResults">



Mime
View raw message