You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2012/10/08 23:02:53 UTC

svn commit: r1395776 - in /incubator/jspwiki/trunk: ChangeLog build.xml

Author: juanpablo
Date: Mon Oct  8 21:02:52 2012
New Revision: 1395776

URL: http://svn.apache.org/viewvc?rev=1395776&view=rev
Log:
* Added rat-report task. It requires at least Apache Ant 1.7.1, though.

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/build.xml

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1395776&r1=1395775&r2=1395776&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Mon Oct  8 21:02:52 2012
@@ -1,3 +1,7 @@
+2012-10-08  Juan Pablo Santos (juanpablo AT apache DOT org)
+       
+       * Added rat-report task. It requires at least Apache Ant 1.7.1, though.
+
 2012-09-25  Florian Holeczek (florianh AT apache DOT org)
 
        * no version bump

Modified: incubator/jspwiki/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=1395776&r1=1395775&r2=1395776&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Mon Oct  8 21:02:52 2012
@@ -104,6 +104,7 @@
   <property name="tests.src" value="tests" />
   <property name="tests.build" value="tests/build" />
   <property name="tests.reports" value="tests/reports" />
+  <property name="doc.rat" value="doc/rat" />
 	
   <!-- dirs holding libs -->
   <property name="libs.main" value="lib" />
@@ -318,6 +319,7 @@
     <delete file="tests/etc/jspwiki_vers.properties" />
     <delete dir="tests/etc/db" />
     <delete dir="tests/etc/WEB-INF/dtd" />
+    <delete dir="${doc.rat}" />
     <delete file="tests/etc/WEB-INF/web.xml" />
     <delete>
       <fileset dir="." includes="**/*~" defaultexcludes="no"/>
@@ -1674,5 +1676,37 @@ To automate the JAR signing processs, yo
     
     <sonar:sonar key="org.apache.jspwiki:jspwiki" version="${jspwiki.version}" xmlns:sonar="antlib:org.sonar.ant"/>
   </target>
+  
+  <target name="rat-report">
+    <mkdir dir="${doc.rat}/lib" />
+    <get-element to-file="${doc.rat}/lib/apache-rat-tasks-0.8.jar" 
+                 url="${central.url}/org/apache/rat/apache-rat-tasks/0.8/apache-rat-tasks-0.8.jar" />
+    <get-element to-file="${doc.rat}/lib/apache-rat-core-0.8.jar" 
+                 url="${central.url}/org/apache/rat/apache-rat-core/0.8/apache-rat-core-0.8.jar" />
+    <get-element to-file="${doc.rat}/lib/commons-cli-1.2.jar" 
+                 url="${central.url}/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" />
+    <get-element to-file="${doc.rat}/lib/commons-collections-3.2.jar" 
+                 url="${central.url}/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" />
+    <get-element to-file="${doc.rat}/lib/commons-lang-2.1.jar" url="${central.url}/commons-lang/commons-lang/2.1/commons-lang-2.1.jar" />
+    <get-element to-file="${doc.rat}/lib/commons-compress-1.0.jar" 
+                 url="${central.url}/org/apache/commons/commons-compress/1.0/commons-compress-1.0.jar" />
+    <get-element to-file="${doc.rat}/lib/commons-io-1.4.jar" url="${central.url}/commons-io/commons-io/1.4/commons-io-1.4.jar" />
+    
+    <path id="rat.libs.path">
+      <fileset dir="${doc.rat}/lib">
+        <include name="*.jar" />
+      </fileset>
+    </path>
+    <taskdef resource="org/apache/rat/anttasks/antlib.xml">
+      <classpath refid="rat.libs.path" />
+    </taskdef>
+    
+    <report reportFile="${doc.rat}/rat.txt" addLicenseHeaders="true">
+      <fileset dir="src/org"/>
+      <fileset dir="src/webdocs" excludes="**/*.js">
+      </fileset>
+      <fileset dir="tests/org"/>
+    </report>
+  </target>
 
 </project>