You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/11/09 21:51:00 UTC

cvs commit: maven-plugins/dashboard plugin.jelly

vmassol     2003/11/09 12:51:00

  Modified:    dashboard plugin.jelly
  Log:
  Better handling if the goal called to generate aggregator artifact fails.
  
  Revision  Changes    Path
  1.3       +22 -5     maven-plugins/dashboard/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/dashboard/plugin.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- plugin.jelly	5 Nov 2003 19:26:59 -0000	1.2
  +++ plugin.jelly	9 Nov 2003 20:51:00 -0000	1.3
  @@ -134,17 +134,34 @@
       <j:if test="${rungoals == 'true'}">
         <j:forEach var="aggregatorName" items="${aggregatorNames}">
   
  +        <a:echo>Generating data for aggregator [${aggregatorName}]</a:echo>
  +
           <j:set var="goalProperty" 
               value="maven.dashboard.aggregator.${aggregatorName}.goal"/>
  +        <j:set var="goalName" value="${context.getVariable(goalProperty)}"/>
   
           <!-- Only run if the artifact has not already been created by
                a previous goal run -->
  -        <j:if test="${executedGoals.indexOf(context.getVariable(goalProperty)) == '-1'}">
  -          <attainGoal name="${context.getVariable(goalProperty)}"/>
  -        </j:if>
  +        <j:if test="${executedGoals.indexOf(goalName) == '-1'}">
  +
  +          <a:echo>Calling goal [${goalName}] to generate data...</a:echo>
   
  -        <j:set var="executedGoals" 
  -            value="${goalProperty},${executedGoals}"/>
  +          <!-- Make sure plugin doesn't fail if goal fails to be called -->
  +          <j:catch var="exception">
  +            <attainGoal name="${goalName}"/>
  +          </j:catch>
  +          <j:choose>
  +            <j:when test="${exception != null}">
  +              <a:echo>Error while calling goal [${goalName}]:</a:echo>
  +              <a:echo>${exception}</a:echo>
  +            </j:when>
  +            <j:otherwise>
  +              <j:set var="executedGoals" 
  +                  value="${goalName},${executedGoals}"/>
  +            </j:otherwise>
  +          </j:choose>
  +
  +        </j:if>
   
         </j:forEach>
       </j:if>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org