Add missing license headers where possible.
Configure explicit RAT exclusions for the files that cannot contain a license header.
This plugin now passes the checks done by RAT.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1523310 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 6d3eca1..37530c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,6 +121,19 @@
             <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
           </configuration>
         </plugin>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>0.10</version>
+          <configuration>
+            <excludes>
+              <!--
+                The manifest specification does not describe any method for writing comments into the manifest.
+              -->
+              <exclude>src/test/resources/unit/basic-rar-with-manifest/src/main/rar/META-INF/MANIFEST.MF</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
       </plugins>
     </pluginManagement>
 
diff --git a/src/it/default/src/main/custom/ra.xml b/src/it/default/src/main/custom/ra.xml
index dfd9a98..e74236b 100644
--- a/src/it/default/src/main/custom/ra.xml
+++ b/src/it/default/src/main/custom/ra.xml
@@ -1,4 +1,22 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+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.
+-->
 <connector>
   <fake-content></fake-content>
 </connector>
\ No newline at end of file
diff --git a/src/it/default/src/main/rar/SomeResource.txt b/src/it/default/src/main/rar/SomeResource.txt
index 0c93d8d..9c4d2c2 100644
--- a/src/it/default/src/main/rar/SomeResource.txt
+++ b/src/it/default/src/main/rar/SomeResource.txt
@@ -1 +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.
+
 foo=${project.version}
\ No newline at end of file
diff --git a/src/it/default/verify.bsh b/src/it/default/verify.bsh
index b60c491..78575e1 100644
--- a/src/it/default/verify.bsh
+++ b/src/it/default/verify.bsh
@@ -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.
+ */
+
 import java.io.*;
 import java.util.*;
 import java.util.jar.*;
diff --git a/src/it/filtered/src/main/custom/ra.xml b/src/it/filtered/src/main/custom/ra.xml
index dfd9a98..e74236b 100644
--- a/src/it/filtered/src/main/custom/ra.xml
+++ b/src/it/filtered/src/main/custom/ra.xml
@@ -1,4 +1,22 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+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.
+-->
 <connector>
   <fake-content></fake-content>
 </connector>
\ No newline at end of file
diff --git a/src/it/filtered/src/main/ext-filtered/wine.txt b/src/it/filtered/src/main/ext-filtered/wine.txt
index de240e8..ca1589c 100644
--- a/src/it/filtered/src/main/ext-filtered/wine.txt
+++ b/src/it/filtered/src/main/ext-filtered/wine.txt
@@ -1 +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.
+
 foo=${bestwine}
\ No newline at end of file
diff --git a/src/it/filtered/src/main/ext/wine.txt b/src/it/filtered/src/main/ext/wine.txt
index de240e8..ca1589c 100644
--- a/src/it/filtered/src/main/ext/wine.txt
+++ b/src/it/filtered/src/main/ext/wine.txt
@@ -1 +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.
+
 foo=${bestwine}
\ No newline at end of file
diff --git a/src/it/filtered/src/main/rar/SomeResource.txt b/src/it/filtered/src/main/rar/SomeResource.txt
index 0c93d8d..9c4d2c2 100644
--- a/src/it/filtered/src/main/rar/SomeResource.txt
+++ b/src/it/filtered/src/main/rar/SomeResource.txt
@@ -1 +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.
+
 foo=${project.version}
\ No newline at end of file
diff --git a/src/it/filtered/verify.bsh b/src/it/filtered/verify.bsh
index ac639c4..91317e6 100644
--- a/src/it/filtered/verify.bsh
+++ b/src/it/filtered/verify.bsh
@@ -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.
+ */
+
 import java.io.*;
 import java.util.*;
 import java.util.jar.*;
diff --git a/src/test/remote-repo/org/apache/maven/test/maven-artifact01/1.0-SNAPSHOT/maven-artifact01-1.0-SNAPSHOT.pom b/src/test/remote-repo/org/apache/maven/test/maven-artifact01/1.0-SNAPSHOT/maven-artifact01-1.0-SNAPSHOT.pom
index b8a67be..70fd568 100644
--- a/src/test/remote-repo/org/apache/maven/test/maven-artifact01/1.0-SNAPSHOT/maven-artifact01-1.0-SNAPSHOT.pom
+++ b/src/test/remote-repo/org/apache/maven/test/maven-artifact01/1.0-SNAPSHOT/maven-artifact01-1.0-SNAPSHOT.pom
@@ -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.

+-->

 <project>

   <modelVersion>4.0.0</modelVersion>

   <groupId>org.apache.maven.test</groupId>

diff --git a/src/test/remote-repo/org/apache/maven/test/maven-artifact02/1.0-SNAPSHOT/maven-artifact02-1.0-SNAPSHOT.pom b/src/test/remote-repo/org/apache/maven/test/maven-artifact02/1.0-SNAPSHOT/maven-artifact02-1.0-SNAPSHOT.pom
index 56ca46e..88b44ec 100644
--- a/src/test/remote-repo/org/apache/maven/test/maven-artifact02/1.0-SNAPSHOT/maven-artifact02-1.0-SNAPSHOT.pom
+++ b/src/test/remote-repo/org/apache/maven/test/maven-artifact02/1.0-SNAPSHOT/maven-artifact02-1.0-SNAPSHOT.pom
@@ -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.

+-->

 <project>

   <modelVersion>4.0.0</modelVersion>

   <groupId>org.apache.maven.test</groupId>