maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vmas...@apache.org
Subject svn commit: r160064 - in maven/maven-1/plugins/trunk/clover: ./ src/plugin-test/testGenerateHistoryReport/ src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/ src/plugin-test/testSiteReportAndXmlReportGeneration/ xdocs/
Date Mon, 04 Apr 2005 17:32:25 GMT
Author: vmassol
Date: Mon Apr  4 10:32:23 2005
New Revision: 160064

URL: http://svn.apache.org/viewcvs?view=rev&rev=160064
Log:
MPCLOVER-31: Added PDF report generation

Added:
    maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/
      - copied from r159768, maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/
Removed:
    maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndXmlReportGeneration/
Modified:
    maven/maven-1/plugins/trunk/clover/plugin.jelly
    maven/maven-1/plugins/trunk/clover/plugin.properties
    maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/maven.xml
    maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/project.properties
    maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/maven.xml
    maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.properties
    maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.xml
    maven/maven-1/plugins/trunk/clover/xdocs/changes.xml
    maven/maven-1/plugins/trunk/clover/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/clover/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/plugin.jelly?view=diff&r1=160063&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/clover/plugin.jelly Mon Apr  4 10:32:23 2005
@@ -19,13 +19,13 @@
  -->
 
 <project 
-  xmlns:j="jelly:core" 
-  xmlns:ant="jelly:ant" 
-  xmlns:maven="jelly:maven"
-  xmlns:java="java"
-  xmlns:test="test"
-  xmlns:doc="doc"
-  xmlns:u="jelly:util">
+    xmlns:j="jelly:core" 
+    xmlns:ant="jelly:ant" 
+    xmlns:maven="jelly:maven"
+    xmlns:java="java"
+    xmlns:test="test"
+    xmlns:doc="doc"
+    xmlns:u="jelly:util">
 
   <!--
      ========================================================================
@@ -275,7 +275,10 @@
         <j:if test="${context.getVariable('maven.clover.report.swing') == 'true'}">
           <attainGoal name="clover:swing-report-internal"/>
         </j:if>
-        
+        <j:if test="${context.getVariable('maven.clover.report.pdf') == 'true'}">
+          <attainGoal name="clover:pdf-report-internal"/>
+        </j:if> 
+              
       </j:when>
       <j:otherwise>
         <ant:echo>No Clover database found, skipping report generation</ant:echo>
@@ -292,7 +295,7 @@
   <goal name="clover:xml-report-internal">
     <ant:clover-report>
       <ant:current outfile="${maven.build.dir}/clover.xml" 
-      	title="${pom.name} - ${pom.currentVersion}">
+        	title="${pom.name} - ${pom.currentVersion}">
         <ant:format type="xml" orderBy="${maven.clover.orderBy}">
 
           <!-- Add context filtering -->
@@ -305,10 +308,9 @@
       </ant:current>
     </ant:clover-report>
   </goal>
-  <goal 
-    name="clover:xml-report" 
-    description="Generate XML test coverage reports with Clover"
-    prereqs="clover:test,clover:xml-report-internal"/>
+  <goal name="clover:xml-report" 
+      description="Generate XML test coverage reports with Clover"
+      prereqs="clover:test,clover:xml-report-internal"/>
 
   <!--
      ========================================================================
@@ -323,8 +325,8 @@
     <ant:clover-report>
 
       <ant:current 
-      	outfile="${cloverReportDirectory}" 
-      	title="${pom.name} - ${pom.currentVersion}">
+        	outfile="${cloverReportDirectory}" 
+        	title="${pom.name} - ${pom.currentVersion}">
         <ant:format type="html" orderBy="${maven.clover.orderBy}">
 
           <!-- Add context filtering -->
@@ -343,8 +345,8 @@
         <ant:mkdir dir="${cloverHistoryReportDirectory}"/>
       
         <ant:historical outfile="${cloverHistoryReportDirectory}" 
-          historyDir="${maven.clover.history.dir}"
-        	title="${pom.name} - ${pom.currentVersion} - History">
+            historyDir="${maven.clover.history.dir}"
+          	title="${pom.name} - ${pom.currentVersion} - History">
           <ant:format type="html"/>
         </ant:historical>
 
@@ -353,10 +355,9 @@
     </ant:clover-report>
 
   </goal>
-  <goal 
-    name="clover:html-report" 
-    description="Generate HTML test coverage reports with Clover"
-    prereqs="clover:test,clover:html-report-internal"/>
+  <goal name="clover:html-report" 
+      description="Generate HTML test coverage reports with Clover"
+      prereqs="clover:test,clover:html-report-internal"/>
 
   <!--
      ========================================================================
@@ -366,10 +367,56 @@
   <goal name="clover:swing-report-internal">
     <ant:clover-view initString="${clover.initstring}"/>
   </goal>
-  <goal
-    name="clover:swing-report"
-    description="Generate Swing test coverage reports with Clover"
-    prereqs="clover:test,clover:swing-report-internal"/>
+  <goal name="clover:swing-report"
+      description="Generate Swing test coverage reports with Clover"
+      prereqs="clover:test,clover:swing-report-internal"/>
+
+  <!--
+     ========================================================================
+       Generate PDF test coverage report.
+     ========================================================================
+  -->
+  <goal name="clover:pdf-report-internal">
+
+    <j:set var="cloverReportDirectory" value="${maven.docs.dest}/clover"/>
+    <j:set var="cloverPDFReportFile" value="${cloverReportDirectory}/clover.pdf"/>
  
+    <ant:mkdir dir="${cloverReportDirectory}"/>
+
+    <ant:clover-report>
+      <ant:current outfile="${cloverPDFReportFile}" 
+          title="${pom.name} - ${pom.currentVersion}" summary="true">
+        <ant:format type="pdf" orderBy="${maven.clover.orderBy}">
+
+          <!-- Add context filtering -->
+          <j:set var="contextFilters" value="${maven.clover.context.method.names} ${maven.clover.context.statement.names}
${maven.clover.context.block.names}"/>
+          <j:if test="${!empty(contextFilters.trim())}">
+            <ant:setProperty name="filter" value="${contextFilters}"/>
+          </j:if>
+
+        </ant:format>
+      </ant:current>
+
+      <!-- Only generate history report if there is at least one history point -->
+      <j:if test="${historyDirAsFile.exists() and !empty(historyDirAsFile.listFiles())}">
+
+        <j:set var="cloverHistoryReportDirectory" value="${maven.docs.dest}/clover/history"/>
+        <j:set var="cloverPDFHistoryReportFile" value="${cloverHistoryReportDirectory}/clover-history.pdf"/>
+        <ant:mkdir dir="${cloverHistoryReportDirectory}"/>
+
+        <ant:historical outfile="${cloverPDFHistoryReportFile}" 
+            historyDir="${maven.clover.history.dir}" 
+            title="${pom.name} - ${pom.currentVersion} - History">
+          <ant:format type="pdf"/>
+        </ant:historical>
+
+      </j:if>
+
+    </ant:clover-report>
+  
+  </goal>
+  <goal name="clover:pdf-report" 
+      description="Generate PDF test coverage reports with Clover" 
+      prereqs="clover:test,clover:pdf-report-internal"/>
 
   <!--
      ========================================================================

Modified: maven/maven-1/plugins/trunk/clover/plugin.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/plugin.properties?view=diff&r1=160063&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/clover/plugin.properties Mon Apr  4 10:32:23 2005
@@ -50,6 +50,7 @@
 maven.clover.report.html = true
 maven.clover.report.xml = false
 maven.clover.report.swing = false
+maven.clover.report.pdf = false
 
 # Decide whether to execute generate Clover data during the site report 
 # generation or not. If false, the plugin will only generate Clover reports

Modified: maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/maven.xml?view=diff&r1=160063&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/maven.xml
(original)
+++ maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/maven.xml
Mon Apr  4 10:32:23 2005
@@ -34,6 +34,7 @@
 
     <!-- Verifications -->
     <assert:assertFileExists file="${maven.docs.dest}/clover/history/historical.html"/>
+    <assert:assertFileExists file="${maven.docs.dest}/clover/history/clover-history.pdf"/>
 
   </goal>
 

Modified: maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/project.properties?view=diff&r1=160063&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/project.properties
(original)
+++ maven/maven-1/plugins/trunk/clover/src/plugin-test/testGenerateHistoryReport/project.properties
Mon Apr  4 10:32:23 2005
@@ -13,3 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # -------------------------------------------------------------------
+
+# Also generate PDF history reports
+maven.clover.report.pdf = true

Modified: maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/maven.xml?view=diff&r1=159768&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/maven.xml
(original)
+++ maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/maven.xml
Mon Apr  4 10:32:23 2005
@@ -43,11 +43,12 @@
     <!-- Verifications -->
     <assert:assertFileExists file="${maven.docs.dest}/clover/index.html"/>
 
-    <!-- Call report which will generate both the HTML and XML reports -->
+    <!-- Call report which will generate the HTML, XML and PDF reports -->
     <attainGoal name="clover"/>
 
     <!-- Verifications -->
     <assert:assertFileExists file="${maven.build.dir}/clover.xml"/>
+    <assert:assertFileExists file="${maven.docs.dest}/clover/clover.pdf"/>
 
   </goal>
 

Modified: maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.properties?view=diff&r1=159768&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.properties
(original)
+++ maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.properties
Mon Apr  4 10:32:23 2005
@@ -15,4 +15,6 @@
 # -------------------------------------------------------------------
 
 maven.clover.report.xml = true
+maven.clover.report.pdf = true
+
 maven.clover.instrument.tests = true

Modified: maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.xml?view=diff&r1=159768&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.xml
(original)
+++ maven/maven-1/plugins/trunk/clover/src/plugin-test/testSiteReportAndGenerationOfDifferentFormats/project.xml
Mon Apr  4 10:32:23 2005
@@ -20,8 +20,8 @@
 
 <project>
   <extend>${basedir}/../project.xml</extend>
-  <id>testSiteReportAndXmlReportGeneration</id>
-  <name>testSiteReportAndXmlReportGeneration</name>
+  <id>testSiteReportAndGenerationOfDifferentFormats</id>
+  <name>testSiteReportAndGenerationOfDifferentFormats</name>
   <build>
     <sourceDirectory>src/main</sourceDirectory>
     <unitTestSourceDirectory>src/test</unitTestSourceDirectory>

Modified: maven/maven-1/plugins/trunk/clover/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/xdocs/changes.xml?view=diff&r1=160063&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/clover/xdocs/changes.xml Mon Apr  4 10:32:23 2005
@@ -26,6 +26,9 @@
   </properties>
   <body>
     <release version="1.9-SNAPSHOT" date="in SVN">
+      <action dev="vmassol" type="add" issue="MPCLOVER-31" due-to="Olivier Jacob">
+        Added PDF report generation.
+      </action>
     </release>
     <release version="1.8" date="2005-03-04">
       <action dev="vmassol" type="add">Added support for historical reports by adding
a new

Modified: maven/maven-1/plugins/trunk/clover/xdocs/properties.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/clover/xdocs/properties.xml?view=diff&r1=160063&r2=160064
==============================================================================
--- maven/maven-1/plugins/trunk/clover/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/clover/xdocs/properties.xml Mon Apr  4 10:32:23 2005
@@ -87,6 +87,16 @@
           </td>
         </tr>
         <tr>
+          <td>maven.clover.report.pdf</td>
+          <td>Yes</td>
+          <td>
+            Decides whether a PDF report will be generated.
+          </td>
+          <td>
+            <code>false</code>
+          </td>
+        </tr>
+        <tr>
           <td>maven.clover.database</td>
           <td>Yes</td>
           <td>



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


Mime
View raw message