From: Gandin M. <mg...@us...> - 2005-07-29 16:17:32
|
mgandin 05/07/29 09:17:25 Modified: maven-dashboard-history/maven-plugins plugin.jelly Log: Some correction in the plugin src, due to some refactoring with packages names Revision Changes Path 1.2 +73 -33 maven-plugins/maven-dashboard-history/maven-plugins/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/maven-dashboard-history/maven-plugins/plugin.jelly,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- plugin.jelly 12 Jul 2005 14:37:43 -0000 1.1 +++ plugin.jelly 29 Jul 2005 16:17:25 -0000 1.2 @@ -9,33 +9,29 @@ <goal name="dashboard-history:report"> <ant:mkdir dir="${maven.build.dir}"/> <ant:mkdir dir="${maven.historical.projectresultpath}"/> + <ant:path id="compile.classpath"> + + <ant:fileset dir="${maven.repo.local}\\maven_history_dashboard\\jars"> + <ant:include name="**/*.jar"/> + </ant:fileset> + <ant:fileset dir="${maven.repo.local}\\jfree\\jars"> + <ant:include name="**/*.jar"/> + </ant:fileset> + <ant:fileset dir="${maven.repo.local}\\xalan\\jars"> + <ant:include name="**/*.jar"/> + </ant:fileset> + </ant:path> <ant:taskdef name="historic" - classname="com.octo.dashboard.historic.task.HistoricTask"> - <ant:classpath> - <pathelement location="${maven.repo.local}\\maven_historic_dashboard\\jars\\historic_dashboard-${dashboardhistorical.version}.jar"/> - <pathelement location="${maven.repo.local}\\maven_historic_dashboard\\jars\\ant_historic_dashboard-${dashboardhistorical.version}.jar"/> - <pathelement location="${maven.repo.local}\\jfreechart\\jars\\jcommon-0.9.6.jar"/> - <pathelement location="${maven.repo.local}\\jfreechart\\jars\\jfreechart-0.9.21.jar"/> - </ant:classpath> - </ant:taskdef> + classname="com.octo.dashboard.history.task.HistoryTask" classpathref="compile.classpath"/> <ant:taskdef name="historicgraph" - classname="com.octo.dashboard.historic.task.HistoricalGraphTask" - > - <ant:classpath> - <pathelement location="${maven.repo.local}\\maven_historic_dashboard\\jars\\historic_dashboard-${dashboardhistorical.version}.jar"/> - <pathelement location="${maven.repo.local}\\maven_historic_dashboard\\jars\\ant_historic_dashboard-${dashboardhistorical.version}.jar"/> - <pathelement location="${maven.repo.local}\\jfreechart\\jars\\jcommon-0.9.6.jar"/> - <pathelement location="${maven.repo.local}\\jfreechart\\jars\\jfreechart-0.9.21.jar"/> - <pathelement location="${maven.repo.local}\\xalan\\jars\\xalan-2.5.1.jar"/> - </ant:classpath> - </ant:taskdef> - + classname="com.octo.dashboard.history.task.HistoryGraphTask" + classpathref="compile.classpath"/> <!-- Generate dashboard data for all sub-projects if it is required --> - <j:set var="runreactor" value="${maven.dashboard.runreactor}"/> - <j:choose> - <j:when test="${runreactor == 'true'}"> + <j:set var="runreactor" value="${maven.dashboard.runreactor}"/> + <j:choose> + <j:when test="${runreactor == 'true'}"> <m:reactor basedir="${maven.dashboard.basedir}" banner="Generating dashboard data for" @@ -44,12 +40,12 @@ postProcessing="true" goals="dashboard:report-single" ignoreFailures="${maven.dashboard.ignoreFailures}"/> - </j:when> - <j:otherwise> + </j:when> + <!--j:otherwise--> <!-- We need to run the reactor to gather the list of projects because the reactor creates a reactorProjects jelly property that we need in the dashboard:aggregate goal. --> - <m:reactor + <!--m:reactor basedir="${maven.dashboard.basedir}" banner="Gathering project list for" includes="${maven.dashboard.includes}" @@ -57,14 +53,14 @@ postProcessing="true" collectOnly="true" ignoreFailures="${maven.dashboard.ignoreFailures}"/> - </j:otherwise> - </j:choose> + </j:otherwise--> + </j:choose> - <ant:historic destination="${maven.historical.destination}" - dashboardfilename="${maven.historical.dashboardfilename}" - projectresultpath="${maven.historical.projectresultpath}" - filetype="${maven.historical.filetype}" - historicalfilename="${maven.historical.filename}"/> + <ant:historic destination="${maven.historical.destination}" + dashboardfilename="${maven.historical.dashboardfilename}" + projectresultpath="${maven.historical.projectresultpath}" + filetype="${maven.historical.filetype}" + historicalfilename="${maven.historical.filename}"/> <u:tokenize var="indicators" delim=",">${maven.dashboard.aggregators}</u:tokenize> @@ -83,8 +79,12 @@ </j:forEach> </j:forEach> <attainGoal name="dashboard-history:xdoc"/> + <attainGoal name="dashboard-history:archive"/> </goal> + <!-- + Generate the report of dashboard history + --> <goal name="dashboard-history:xdoc"> <d:jsl @@ -108,7 +108,47 @@ </ant:copy> </goal> - + <!-- + Copy all the result into a repository of dashbord result, for making + an history + --> + <goal name="dashboard-history:archive"> + <j:new var="currentDate" className="java.util.Date"/> + <j:set var="myYear" value="${currentDate.getYear()+1900}"/> + <j:set var="offset" value=""/> + <j:if test="${10>currentDate.getMonth()}"> + <j:set var="offset" value="0"/> + </j:if> + <j:set var="myMonth" value="${offset}${currentDate.getMonth()+1}"/> + + <j:set var="offset" value=""/> + <j:if test="${10>currentDate.getDate()}"> + <j:set var="offset" value="0"/> + </j:if> + <j:set var="myDay" value="${offset}${currentDate.getDate()}"/> + + <j:set var="offset" value=""/> + <j:if test="${9>currentDate.getHours()}"> + <j:set var="offset" value="0"/> + </j:if> + <j:set var="myHours" value="${offset}${currentDate.getHours()+1}"/> + + <j:set var="offset" value=""/> + <j:if test="${9>currentDate.getMinutes()}"> + <j:set var="offset" value="0"/> + </j:if> + <j:set var="myMinutes" value="${offset}${currentDate.getMinutes()+1}"/> + + <j:set var="offset" value=""/> + <j:if test="${9>currentDate.getSeconds()}"> + <j:set var="offset" value="0"/> + </j:if> + <j:set var="mySeconds" value="${offset}${currentDate.getSeconds()+1}"/> + <j:set var="currentDateAsStr" value="${myYear}${myMonth}${myDay}${myHours}${myMinutes}${mySeconds}"/> + + <copy todir="${maven.historical.projectresultpath}/${currentDateAsStr}" file="${maven.build.dir}/dashboard-data.xml"/> + + </goal> <!-- ======================================================================== |