You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by cu...@apache.org on 2009/11/24 20:07:02 UTC

svn commit: r883817 - in /hadoop/avro/trunk: CHANGES.txt build.xml ivy.xml src/c++/MainPage.dox src/c/io/file_container.c src/rat-excludes.txt

Author: cutting
Date: Tue Nov 24 19:07:01 2009
New Revision: 883817

URL: http://svn.apache.org/viewvc?rev=883817&view=rev
Log:
Add Apache RAT to tests, to validate licenses.

Added:
    hadoop/avro/trunk/src/rat-excludes.txt
Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/build.xml
    hadoop/avro/trunk/ivy.xml
    hadoop/avro/trunk/src/c++/MainPage.dox
    hadoop/avro/trunk/src/c/io/file_container.c

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=883817&r1=883816&r2=883817&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Tue Nov 24 19:07:01 2009
@@ -99,6 +99,8 @@
 
     AVRO-220. Dynamic schema resolution from writer to reader. (sbanacho)
 
+    AVRO-213. Add Apache RAT to tests, to validate licenses.  (cutting)
+
   OPTIMIZATIONS
 
     AVRO-172. More efficient schema processing (massie)

Modified: hadoop/avro/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=883817&r1=883816&r2=883817&view=diff
==============================================================================
--- hadoop/avro/trunk/build.xml (original)
+++ hadoop/avro/trunk/build.xml Tue Nov 24 19:07:01 2009
@@ -282,7 +282,25 @@
     </sequential>
   </macrodef>
 
-  <target name="test" depends="test-java,test-py,test-c,test-cpp,test-interop,test-avroj"/>
+  <target name="test" depends="test-java,test-py,test-c,test-cpp,test-interop,test-avroj,rat"/>
+
+  <target name="rat" depends="ivy-retrieve-test,package">
+    <typedef resource="org/apache/rat/anttasks/antlib.xml"
+             uri="antlib:org.apache.rat.anttasks">
+      <classpath refid="test.java.classpath"/>
+    </typedef>
+
+    <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
+		reportFile="${build.dir}/rat-report.log">
+      <fileset dir="${dist.dir}" excludesfile="${src.dir}/rat-excludes.txt"/>
+    </rat:report>
+    <condition property="rat.passed">
+      <isfileselected file="${build.dir}/rat-report.log">
+	<containsregexp expression="^0 Unknown Licenses"/>
+      </isfileselected>
+    </condition>
+    <fail unless="rat.passed">Unknown licenses: See build/rat-report.txt.</fail>
+  </target>
 
   <macrodef name="test-runner">
     <attribute name="files.location" />

Modified: hadoop/avro/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/ivy.xml?rev=883817&r1=883816&r2=883817&view=diff
==============================================================================
--- hadoop/avro/trunk/ivy.xml (original)
+++ hadoop/avro/trunk/ivy.xml Tue Nov 24 19:07:01 2009
@@ -44,6 +44,8 @@
     <dependency org="junit" name="junit" rev="4.7" conf="test->default"/>
     <dependency org="checkstyle" name="checkstyle" rev="5.0"
 		conf="test->default"/>
+    <dependency org="org.apache.rat" name="apache-rat" rev="0.6"
+		conf="test->default"/>
   </dependencies>
 
 </ivy-module>

Modified: hadoop/avro/trunk/src/c++/MainPage.dox
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c%2B%2B/MainPage.dox?rev=883817&r1=883816&r2=883817&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c++/MainPage.dox (original)
+++ hadoop/avro/trunk/src/c++/MainPage.dox Tue Nov 24 19:07:01 2009
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 /*!
 \mainpage

Modified: hadoop/avro/trunk/src/c/io/file_container.c
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/c/io/file_container.c?rev=883817&r1=883816&r2=883817&view=diff
==============================================================================
--- hadoop/avro/trunk/src/c/io/file_container.c (original)
+++ hadoop/avro/trunk/src/c/io/file_container.c Tue Nov 24 19:07:01 2009
@@ -1,3 +1,22 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
 #include "avro_private.h"
 #include <apr_file_io.h>
 #include "util/dump.h"

Added: hadoop/avro/trunk/src/rat-excludes.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/rat-excludes.txt?rev=883817&view=auto
==============================================================================
--- hadoop/avro/trunk/src/rat-excludes.txt (added)
+++ hadoop/avro/trunk/src/rat-excludes.txt Tue Nov 24 19:07:01 2009
@@ -0,0 +1,25 @@
+**/*.avpr
+**/*.avsc
+**/*.gperf
+**/*.html
+**/*.js
+**/*.la
+**/*.m4
+**/*.md5
+**/*.pom
+**/*.sha1
+**/*.txt
+**/.gitignore
+**/Makefile**
+**/configure**
+doc/**
+lib/py/odict.py
+lib/py/simplejson/**
+src/c++/Doxyfile
+src/c++/jsonschemas/**
+src/c/autom4te.cache/**
+src/c/config**
+src/c/docs/**
+src/c/json/**
+src/c/tests/**
+src/c/version.sh