Skip to content

Apache Lucene open-source search software

LUCENE-1400: add rat-sources target to build.xml

Michael McCandless798f4676ed22
diff --git a/build.xml b/build.xml
index 535cdb6b583..26d640a8a71 100644
--- a/build.xml
+++ b/build.xml
@@ -628,4 +628,21 @@
<target name="apply-patch" depends="clean" description="Apply a patch file. Set -Dpatch.file, or -Dpatch.name when the patch is in the directory ../patches/">
<patch patchfile="${patch.file}" strip="0"/>
</target>
+
+ <target name="rat-sources-typedef">
+ <typedef resource="org/apache/rat/anttasks/antlib.xml" uri="antlib:rat.anttasks">
+ <classpath>
+ <fileset dir="." includes="rat*.jar"/>
+ </classpath>
+ </typedef>
+ </target>
+
+ <target name="rat-sources" depends="rat-sources-typedef"
+ description="runs the tasks over src/java">
+ <rat:report xmlns:rat="antlib:org.apache.rat.anttasks">
+ <fileset dir="src/java">
+ </fileset>
+ </rat:report>
+ </target>
+
</project>