Fixing RAT checks for Apache Giraph release

Test Plan:
mvn apache-rat:check -Phadoop_2
mvn apache-rat:check -Phadoop_1
mvn clean verify -Phadoop_facebook

Reviewers: maja.kabiljo, majakabiljo, dionysis.logothetis

Reviewed By: dionysis.logothetis

Differential Revision: https://reviews.facebook.net/D64917
diff --git a/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/algo/TestMultiSeedBreadthFirstSearch.java b/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/algo/TestMultiSeedBreadthFirstSearch.java
index c3aae07..51eedb8 100644
--- a/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/algo/TestMultiSeedBreadthFirstSearch.java
+++ b/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/algo/TestMultiSeedBreadthFirstSearch.java
@@ -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.
+ */
 package org.apache.giraph.block_app.library.algo;
 
 import org.apache.giraph.block_app.framework.BlockUtils;
diff --git a/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/pagerank/PageRankTest.java b/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/pagerank/PageRankTest.java
index f8ce74d..7b19d93 100644
--- a/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/pagerank/PageRankTest.java
+++ b/giraph-block-app-8/src/test/java/org/apache/giraph/block_app/library/pagerank/PageRankTest.java
@@ -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.
+ */
 package org.apache.giraph.block_app.library.pagerank;
 
 import org.apache.giraph.block_app.framework.BlockUtils;
diff --git a/giraph-block-app-8/src/test/java/org/apache/giraph/writable/kryo/KryoWritableWrapperJava8Test.java b/giraph-block-app-8/src/test/java/org/apache/giraph/writable/kryo/KryoWritableWrapperJava8Test.java
index d8b4cc1..1f528f0 100644
--- a/giraph-block-app-8/src/test/java/org/apache/giraph/writable/kryo/KryoWritableWrapperJava8Test.java
+++ b/giraph-block-app-8/src/test/java/org/apache/giraph/writable/kryo/KryoWritableWrapperJava8Test.java
@@ -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.
+ */
 package org.apache.giraph.writable.kryo;
 
 import java.io.IOException;
diff --git a/giraph-block-app/src/test/java/org/apache/giraph/block_app/framework/MultipleSimultanousMutationsTest.java b/giraph-block-app/src/test/java/org/apache/giraph/block_app/framework/MultipleSimultanousMutationsTest.java
index d442d5d..97fd5e3 100644
--- a/giraph-block-app/src/test/java/org/apache/giraph/block_app/framework/MultipleSimultanousMutationsTest.java
+++ b/giraph-block-app/src/test/java/org/apache/giraph/block_app/framework/MultipleSimultanousMutationsTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
+
 package org.apache.giraph.block_app.framework;
 
 import org.apache.giraph.block_app.framework.api.BlockWorkerSendApi;
diff --git a/giraph-debugger/.gitignore b/giraph-debugger/.gitignore
deleted file mode 100644
index c2a737f..0000000
--- a/giraph-debugger/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Maven stuffs
-/target
-
-# Eclipse files
-/.classpath
-/.project
-/.settings
-/.checkstyle
diff --git a/giraph-debugger/README.md b/giraph-debugger/README.md
index 4e62041..694350e 100644
--- a/giraph-debugger/README.md
+++ b/giraph-debugger/README.md
@@ -1,3 +1,18 @@
+# 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.
+
 # Giraph Debugger
 
 ## Overview
diff --git a/giraph-debugger/giraph-debug b/giraph-debugger/giraph-debug
index 53a7c93..8408ee6 100644
--- a/giraph-debugger/giraph-debug
+++ b/giraph-debugger/giraph-debug
@@ -1,4 +1,19 @@
 #!/usr/bin/env bash
+# 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.
+#
 # giraph-debug -- a script for launching Giraph jar with our debugger
 # 
 # To debug your Giraph computation, simply run:
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/app.css b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/app.css
index cbaf5ad..5dd5c08 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/app.css
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/app.css
@@ -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.
+ */
 /* 
  * Style for debugger.
  */
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/valpanel.css b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/valpanel.css
index 1bd7da8..a6935c4 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/valpanel.css
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/css/valpanel.css
@@ -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.
+ */
 .valpanel-icons-container {
 	height: 30px;
 	width: 100%;
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/index.html b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/index.html
index b58ec98..a6e21a4 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/index.html
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/index.html
@@ -1,4 +1,21 @@
 <!DOCTYPE html>
+<!--
+ 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.
+-->
 <html>
   <head>
     <meta charset="utf-8">
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/debugger.js b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/debugger.js
index d67f7fc..b1a9d34 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/debugger.js
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/debugger.js
@@ -1,4 +1,21 @@
 /*
+ * 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.
+ */
+/*
  * Abstracts the debugger controls.
  */
 
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.core.js b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.core.js
index 2536e3b..1bb1825 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.core.js
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.core.js
@@ -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.
+ */
 /*
  * Graph Editor is based on Directed Graph Editor by rkirsling http://bl.ocks.org/rkirsling/5001347.
  */
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.utils.js b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.utils.js
index 863a8d9..fdbac04 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.utils.js
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/editor.utils.js
@@ -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.
+ */
 /*
  * Sets the size of the graph editing window.
  * The graph is always centered in the container according to these dimensions.
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.js b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.js
index a0b9167..08baf32 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.js
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.js
@@ -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.
+ */
 /*
  * Utility functions used in other JS files. 
  * Parts of this file are borrowed from others. A comment is placed on top in such cases.
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
index 4c4d91b..430ea5f 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/utils.sampleGraphs.js
@@ -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.
+ */
 /*
  * Map of sample graphs and their corresponding init handlers.
  * Format is "<human readable graph type>" : function() { }
diff --git a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/valpanel.js b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/valpanel.js
index 98da751..387de8c 100644
--- a/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/valpanel.js
+++ b/giraph-debugger/src/main/resources/org/apache/giraph/debugger/gui/js/valpanel.js
@@ -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.
+ */
 /*
  * ValidationPanel is a class that abstracts the message, vertex 
  * and exception details. It has three view modes - compact, preview and expanded.
diff --git a/giraph-gora/pom.xml b/giraph-gora/pom.xml
index 34a7058..811a047 100644
--- a/giraph-gora/pom.xml
+++ b/giraph-gora/pom.xml
@@ -71,6 +71,13 @@
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <basedir>${project.basedir}/..</basedir>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
diff --git a/pom.xml b/pom.xml
index fdab2bb..be50789 100644
--- a/pom.xml
+++ b/pom.xml
@@ -782,14 +782,18 @@
                 <exclude>.idea/**</exclude>
                 <exclude>**/*.iml</exclude>
                 <exclude>**/*.ipr</exclude>
+                <exclude>**/*.json</exclude>
                 <!-- test resources (for Giraph on YARN profile) -->
                 <exclude>**/test/resources/**</exclude>
                 <!-- Gora configs -->
-                <exclude>giraph-gora/conf/*</exclude>
+                <exclude>giraph-gora/conf/**</exclude>
                 <!-- Rexster resource -->
                 <exclude>giraph-rexster/giraph-kibble/src/main/resources/META-INF/services/com.tinkerpop.rexster.extension.RexsterExtension</exclude> 
                 <!-- site images -->
-                <exclude>src/site/resources/images/*.svg</exclude> 
+                <exclude>src/site/resources/images/*.svg</exclude>
+                <exclude>giraph-debugger/src/main/resources/org/apache/giraph/debugger/mock/*.vm</exclude>
+                <exclude>giraph-debugger/src/main/protobuf/*.proto</exclude> 
+                <exclude>giraph-debugger/gui</exclude>
               </excludes>
           </configuration>
         </plugin>