vmassol 2003/11/10 05:21:17
Modified: dashboard plugin.jelly
Log:
refactoring
Revision Changes Path
1.4 +35 -21 maven-plugins/dashboard/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/dashboard/plugin.jelly,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- plugin.jelly 9 Nov 2003 20:51:00 -0000 1.3
+++ plugin.jelly 10 Nov 2003 13:21:17 -0000 1.4
@@ -114,7 +114,7 @@
<!--
========================================================================
- Generate a dashboard report.
+ Generate a dashboard report for a single project
========================================================================
-->
<goal name="dashboard:report-single">
@@ -122,6 +122,40 @@
<a:dirname property="singleReportDir" file="${maven.dashboard.report.single}"/>
<a:mkdir dir="${singleReportDir}"/>
+ <attainGoal name="dashboard:run-goals"/>
+
+ <!-- Generate report data file -->
+ <u:tokenize var="aggregatorNames"
delim=",">${maven.dashboard.aggregators}</u:tokenize>
+ <j:file name="${maven.dashboard.report.single}" prettyPrint="true"
+ xmlns="dashboard">
+ <dashboard-single>
+ <j:forEach var="aggregatorName" items="${aggregatorNames}">
+ <x:element name="aggregator">
+
+ <!-- Add aggregator name -->
+ <x:attribute name="name">${aggregatorName}</x:attribute>
+
+ <!-- Add aggregator content -->
+ <j:set var="scriptProperty"
+ value="maven.dashboard.aggregator.${aggregatorName}.script"/>
+ <j:import file="${context.getVariable(scriptProperty)}"
+ inherit="true"/>
+
+ </x:element>
+ </j:forEach>
+ </dashboard-single>
+ </j:file>
+
+ </goal>
+
+ <!--
+ ========================================================================
+ Execute goals associated with aggregators so that the data sources
+ from which we extract report data are available.
+ ========================================================================
+ -->
+ <goal name="dashboard:run-goals">
+
<u:tokenize var="aggregatorNames"
delim=",">${maven.dashboard.aggregators}</u:tokenize>
<!-- Property used to remember what goals have already been called -->
@@ -165,26 +199,6 @@
</j:forEach>
</j:if>
-
- <j:file name="${maven.dashboard.report.single}" prettyPrint="true"
- xmlns="dashboard">
- <dashboard-single>
- <j:forEach var="aggregatorName" items="${aggregatorNames}">
- <x:element name="aggregator">
-
- <!-- Add aggregator name -->
- <x:attribute name="name">${aggregatorName}</x:attribute>
-
- <!-- Add aggregator content -->
- <j:set var="scriptProperty"
- value="maven.dashboard.aggregator.${aggregatorName}.script"/>
- <j:import file="${context.getVariable(scriptProperty)}"
- inherit="true"/>
-
- </x:element>
- </j:forEach>
- </dashboard-single>
- </j:file>
</goal>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]