Author: nbubna
Date: Tue Dec  2 08:28:04 2008
New Revision: 722511

URL: http://svn.apache.org/viewvc?rev=722511&view=rev
Log:
add experimental RAT target

Modified:
    velocity/tools/trunk/build.xml

Modified: velocity/tools/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/velocity/tools/trunk/build.xml?rev=722511&r1=722510&r2=722511&view=diff
==============================================================================
--- velocity/tools/trunk/build.xml (original)
+++ velocity/tools/trunk/build.xml Tue Dec  2 08:28:04 2008
@@ -766,6 +766,26 @@
     </echo>
   </target>
 
+  <target name="rat" depends="release.source,prepare"
+    description="Runs Apache RAT against the source code.">
+    <!-- TODO: download RAT and deps -->
+    <echo>
+      NOTE: At this time, you must add Apache RAT, Apache RAT AntTasks
+      Commons-Lang, Commons-Collections and Commons-CLI to Ant's lib directory
+      to use this.
+    </echo>
+    <typedef resource="org/apache/rat/anttasks/antlib.xml" 
uri="antlib:rat.anttasks"/>
+    <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
+      reportFile="${build.dir}/rat-report.txt">
+      <tarfileset>
+        <gzipresource>
+          <file file="${dist.dir}/${project.id}-src.tar.gz"/>
+        </gzipresource>
+      </tarfileset>
+    </rat:report>
+    <echo>Your RAT report is here: ${build.dir}/rat-report.txt</echo>
+  </target>
+
   <!-- Prepare to use Maven Ant Tasks -->
   <target name="maven.prepare">
     <ant antfile="${basedir}/download.xml" target="build-download" />


Reply via email to