incubator-rat-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r658848 - in /incubator/rat/main/trunk/scan: build.xml src/org/apache/rat/scan/antlib.xml
Date Wed, 21 May 2008 20:28:40 GMT
Author: rdonkin
Date: Wed May 21 13:28:40 2008
New Revision: 658848

URL: http://svn.apache.org/viewvc?rev=658848&view=rev
Log:
Ported publishing

Modified:
    incubator/rat/main/trunk/scan/build.xml
    incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml

Modified: incubator/rat/main/trunk/scan/build.xml
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/scan/build.xml?rev=658848&r1=658847&r2=658848&view=diff
==============================================================================
--- incubator/rat/main/trunk/scan/build.xml (original)
+++ incubator/rat/main/trunk/scan/build.xml Wed May 21 13:28:40 2008
@@ -20,8 +20,11 @@
         <taskdef uri="antlib:org.apache.rat.scan"
                     resource="org/apache/rat/scan/antlib.xml" classpath="src"/>   
         <property name='run.home' location='target/run'/>   
+        <property name='run.out' location='target/publish'/>    
         <mkdir dir='${run.home}'/>
-        <rat:DoAudit result-dir='${run.home}' host='thebes' src-dir='src'/>   
+        <mkdir dir='${run.out}'/>   
+        <rat:DoAudit result-dir='${run.home}' host='thebes' src-dir='src'/>
+        <rat:PublishAuditReports src-dir='src' input-dir='${run.home}' output-dir='${run.out}'
build-dir='target'/>
     </target>   
     
     <macrodef name="SetupBuildDirs">

Modified: incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml?rev=658848&r1=658847&r2=658848&view=diff
==============================================================================
--- incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml (original)
+++ incubator/rat/main/trunk/scan/src/org/apache/rat/scan/antlib.xml Wed May 21 13:28:40 2008
@@ -27,7 +27,9 @@
           </tstamp>
           <property name='org.apache.rat.scan.name.data' value='@{stem}-data-${org.apache.rat.scan.ISO_TODAY}.xml'/>
           <property name='org.apache.rat.scan.name.diff' value='@{stem}-diff-${org.apache.rat.scan.ISO_TODAY}.xml'/>
-        
+          <property name='org.apache.rat.scan.name.anakia' value='@{stem}-${org.apache.rat.scan.ISO_TODAY}.xml'/>
+          <property name='org.apache.rat.scan.name.txt' value='@{stem}-${org.apache.rat.scan.ISO_TODAY}.txt'/>
+          <property name='org.apache.rat.scan.name.props' value='org-apache-rat-scan.properties'/>
         </sequential>
     </macrodef>
     
@@ -92,4 +94,63 @@
             -->
         </sequential>
     </macrodef>
+    
+    <macrodef
+        name='PublishAuditReports' 
+        description='Generates audit web reports'>
+        <attribute 
+            name='src-dir'
+            description='Directory containing rat scan source'/>
+        <attribute 
+            name='stem' 
+            default='rat-scan'
+            description='File name prefix'/>
+        <attribute 
+            name='input-dir' 
+            description='Directory containing input xml'/>
+        <attribute 
+            name='output-dir' 
+            description='Directory into which output will be generated'/>
+        <attribute 
+            name='build-dir' 
+            description='Directory suitable for files used only during the build'
+            default='target'/>
+        <sequential>
+            
+            <current:AuditSetup/>
+            
+            <delete file="@{input-dir}/${org.apache.rat.scan.name.txt}"/>
+            <xslt 
+                style="@{src-dir}/org/apache/rat/scan/summary-txt.xsl" 
+                in='@{input-dir}/${org.apache.rat.scan.name.diff}'
+                out='@{output-dir}/${org.apache.rat.scan.name.txt}'></xslt>
+            
+            <!-- Replace by signed version -->           
+            <exec executable='gpg'>
+                <arg line='--output @{output-dir}/${org.apache.rat.scan.name.txt}.asc
--clearsign @{output-dir}/${org.apache.rat.scan.name.txt}'/>
+            </exec>
+            <move 
+                file="@{output-dir}/${org.apache.rat.scan.name.txt}.asc" 
+                tofile="@{output-dir}/${org.apache.rat.scan.name.txt}"
+                overwrite="true"/>
+     
+                
+            <delete file="@{input-dir}/${org.apache.rat.scan.name.anakia}"/>
+            <xslt 
+                style="@{src-dir}/org/apache/rat/scan/summary-web.xsl" 
+                in='@{input-dir}/${org.apache.rat.scan.name.diff}'
+                out='@{output-dir}/${org.apache.rat.scan.name.anakia}'></xslt>
+                
+            <xslt 
+                style="@{src-dir}/org/apache/rat/scan/ant-property.xsl" 
+                in='@{input-dir}/${org.apache.rat.scan.name.diff}'
+                out='@{build-dir}/${org.apache.rat.scan.name.props}'></xslt>
+                
+             <!-- 
+             <exec executable="svn">
+                <arg line="add ${org.apache.rat.scan.out.txt} ${org.apache.rat.scan.out.xml}
${org.apache.rat.scan.publish.html} ${org.apache.rat.scan.publish.txt}"/>
+             </exec>
+              -->
+        </sequential>
+    </macrodef>
 </antlib>



Mime
View raw message