Better handling if the goal called to generate aggregator artifact fails.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114285 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
51a1ec3b77
commit
206130be32
@ -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'}">
|
||||
|
||||
<j:set var="executedGoals"
|
||||
value="${goalProperty},${executedGoals}"/>
|
||||
<a:echo>Calling goal [${goalName}] to generate data...</a:echo>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user