You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@creadur.apache.org by jo...@apache.org on 2008/04/27 22:50:20 UTC

svn commit: r652012 [1/2] - in /incubator/rat/import/rat-maven-plugin: ./ src/ src/changes/ src/main/ src/main/filtered-resources/ src/main/java/ src/main/java/org/ src/main/java/org/codehaus/ src/main/java/org/codehaus/mojo/ src/main/java/org/codehaus...

Author: jochen
Date: Sun Apr 27 13:49:55 2008
New Revision: 652012

URL: http://svn.apache.org/viewvc?rev=652012&view=rev
Log:
Copied the rat-maven-plugin from mojo.codehaus.org

Added:
    incubator/rat/import/rat-maven-plugin/
    incubator/rat/import/rat-maven-plugin/.project
    incubator/rat/import/rat-maven-plugin/LICENSE.txt
    incubator/rat/import/rat-maven-plugin/NOTICE.txt
    incubator/rat/import/rat-maven-plugin/pom.xml
    incubator/rat/import/rat-maven-plugin/src/
    incubator/rat/import/rat-maven-plugin/src/changes/
    incubator/rat/import/rat-maven-plugin/src/changes/changes.xml
    incubator/rat/import/rat-maven-plugin/src/main/
    incubator/rat/import/rat-maven-plugin/src/main/filtered-resources/
    incubator/rat/import/rat-maven-plugin/src/main/filtered-resources/rat-report.properties
    incubator/rat/import/rat-maven-plugin/src/main/java/
    incubator/rat/import/rat-maven-plugin/src/main/java/org/
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/AbstractRatMojo.java
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/FilesReportable.java
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/HeaderMatcherSpecification.java
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/LicenseFamilySpecification.java
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckException.java
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckMojo.java
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatReportMojo.java
    incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatStatistics.java
    incubator/rat/import/rat-maven-plugin/src/main/resources/
    incubator/rat/import/rat-maven-plugin/src/main/resources/org/
    incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/
    incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/
    incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/
    incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/identity.xsl
    incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/rat-report.properties
    incubator/rat/import/rat-maven-plugin/src/site/
    incubator/rat/import/rat-maven-plugin/src/site/apt/
    incubator/rat/import/rat-maven-plugin/src/site/apt/examples/
    incubator/rat/import/rat-maven-plugin/src/site/apt/examples/basic.apt
    incubator/rat/import/rat-maven-plugin/src/site/apt/examples/site.apt
    incubator/rat/import/rat-maven-plugin/src/site/apt/examples/verify.apt
    incubator/rat/import/rat-maven-plugin/src/site/apt/index.apt
    incubator/rat/import/rat-maven-plugin/src/site/apt/usage.apt
    incubator/rat/import/rat-maven-plugin/src/site/fml/
    incubator/rat/import/rat-maven-plugin/src/site/fml/faq.fml
    incubator/rat/import/rat-maven-plugin/src/site/site.xml
    incubator/rat/import/rat-maven-plugin/src/test/
    incubator/rat/import/rat-maven-plugin/src/test/it1/
    incubator/rat/import/rat-maven-plugin/src/test/it1/pom.xml
    incubator/rat/import/rat-maven-plugin/src/test/it2/
    incubator/rat/import/rat-maven-plugin/src/test/it2/pom.xml
    incubator/rat/import/rat-maven-plugin/src/test/it2/src.txt
    incubator/rat/import/rat-maven-plugin/src/test/it3/
    incubator/rat/import/rat-maven-plugin/src/test/it3/pom.xml
    incubator/rat/import/rat-maven-plugin/src/test/java/
    incubator/rat/import/rat-maven-plugin/src/test/java/org/
    incubator/rat/import/rat-maven-plugin/src/test/java/org/codehaus/
    incubator/rat/import/rat-maven-plugin/src/test/java/org/codehaus/mojo/
    incubator/rat/import/rat-maven-plugin/src/test/java/org/codehaus/mojo/rat/
    incubator/rat/import/rat-maven-plugin/src/test/java/org/codehaus/mojo/rat/RatCheckMojoTest.java

Added: incubator/rat/import/rat-maven-plugin/.project
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/.project?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/.project (added)
+++ incubator/rat/import/rat-maven-plugin/.project Sun Apr 27 13:49:55 2008
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>rat-maven-plugin</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

Added: incubator/rat/import/rat-maven-plugin/LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/LICENSE.txt?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/LICENSE.txt (added)
+++ incubator/rat/import/rat-maven-plugin/LICENSE.txt Sun Apr 27 13:49:55 2008
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

Added: incubator/rat/import/rat-maven-plugin/NOTICE.txt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/NOTICE.txt?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/NOTICE.txt (added)
+++ incubator/rat/import/rat-maven-plugin/NOTICE.txt Sun Apr 27 13:49:55 2008
@@ -0,0 +1,6 @@
+RAT Maven Plugin
+Copyright 2007 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+  
\ No newline at end of file

Added: incubator/rat/import/rat-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/pom.xml?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/pom.xml (added)
+++ incubator/rat/import/rat-maven-plugin/pom.xml Sun Apr 27 13:49:55 2008
@@ -0,0 +1,150 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>mojo</artifactId>
+    <groupId>org.codehaus.mojo</groupId>
+    <version>16</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>rat-maven-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>RAT Maven Plugin</name>
+  <version>1.0-alpha-4-SNAPSHOT</version>
+  <description>Maven 2 plugin for running RAT, the Release Audit Tool.</description>
+  <url>http://mojo.codehaus.org/rat-maven-plugin</url>
+  <prerequisites>
+    <maven>2.0.4</maven>
+  </prerequisites>
+  <inceptionYear>2007</inceptionYear>
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+  <scm>
+    <connection>scm:svn:http://svn.codehaus.org/mojo/trunk/mojo/rat-maven-plugin</connection>
+    <developerConnection>scm:svn:https://svn.codehaus.org/mojo/trunk/mojo/rat-maven-plugin</developerConnection>
+    <url>http://svn.codehaus.org/mojo/trunk/mojo/rat-maven-plugin</url>
+  </scm>
+  <organization>
+    <name>Apache Software Foundation</name>
+    <url>http://www.apache.org/</url>
+  </organization>
+  <build>
+    <resources>
+      <resource>
+        <filtering>false</filtering>
+        <directory>src/main/resources</directory>
+      </resource>
+      <resource>
+        <filtering>true</filtering>
+        <directory>src/main/filtered-resources</directory>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>rat-maven-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>target/**/*</exclude>
+            <exclude>.settings/**/*</exclude>
+            <exclude>.project</exclude>
+            <exclude>.classpath</exclude>
+            <exclude>.cvsignore</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-docck-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>com.google.code.p.arat</groupId>
+      <artifactId>rat-lib</artifactId>
+      <version>0.5.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-site-renderer</artifactId>
+      <version>1.0-alpha-8</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.reporting</groupId>
+      <artifactId>maven-reporting-impl</artifactId>
+      <version>2.0.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact-manager</artifactId>
+      <version>2.0.4</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-plugin-testing-harness</artifactId>
+      <version>1.0-beta-1</version>
+    </dependency>
+  </dependencies>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>rat-maven-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>2.0-beta-2</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>changes-report</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+  <developers>
+    <developer>
+      <id>jochen</id>
+      <name>Jochen Wiedmann</name>
+      <email>jochen.wiedmann@gmail.com</email>
+    </developer>
+  </developers>
+  <contributors>
+    <contributor>
+      <name>Bernd Bohmann</name>
+      <email>bommel@apache.org</email>
+    </contributor>
+    <contributor>
+      <name>Lars Trieloff</name>
+      <email>lars@trieloff.net</email>
+    </contributor>
+  </contributors>
+</project>
\ No newline at end of file

Added: incubator/rat/import/rat-maven-plugin/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/changes/changes.xml?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/changes/changes.xml (added)
+++ incubator/rat/import/rat-maven-plugin/src/changes/changes.xml Sun Apr 27 13:49:55 2008
@@ -0,0 +1,62 @@
+<!-- 
+   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.
+-->
+<document>
+  <properties>
+    <title>Changes in the Rat Maven Plugin</title>
+  </properties>
+  <body>
+    <release version="1.0-alpha-4" date="Not yet released">
+      <action dev="jochen" type="fix" issue="MOJO-866">
+        Added @requiresDependencyResolution to the RatReportMojo, so that
+        the dependencies are guaranteed to be present, if the mojo is
+        invoked from the command line.
+      </action>
+    </release>
+    <release version="1.0-alpha-3" date="2007-Aug-28">
+      <action dev="jochen" type="fix">
+        Upgraded rat-lib to 0.5.1.
+      </action>
+    </release>
+    <release version="1.0-alpha-2" date="2007-Jun-16">
+      <action dev="jochen" type="add" due-to="Bernd Bohmann"
+          due-to-email="bommel@apache.org" issue="MOJO-685">
+        Added the IDEA specific default excludes.
+      </action>
+      <action dev="jochen" type="add" due-to="Bernd Bohmann"
+          due-to-email="bommel@apache.org" issue="MOJO-685">
+        Added the possibility to exclude subprojects.
+      </action>
+      <action dev="jochen" type="fix" due-to="Lars Trieloff"
+          due-to-email="lars@trieloff.net" issue="MOJO-661">
+        Upgrade to rat-lib-0.5
+      </action>
+      <action dev="jochen" type="fix">
+        The plugin description on the project-reports page was wrong.
+      </action>
+      <action dev="jochen" type="fix" issue="MOJO-819">
+        The plugins report contains now relative paths in the
+        default configuration, in order to avoid exposing
+        unnecessary information on public sites.
+      </action>
+    </release>
+    <release version="1.0-alpha-1" date="2007-Feb-12">
+      <action dev="jochen" type="add">
+        Initial release.
+      </action>
+    </release>
+  </body>
+</document>

Added: incubator/rat/import/rat-maven-plugin/src/main/filtered-resources/rat-report.properties
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/filtered-resources/rat-report.properties?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/filtered-resources/rat-report.properties (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/filtered-resources/rat-report.properties Sun Apr 27 13:49:55 2008
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+report.rat.name=RAT Report
+report.rat.description=Report on compliance to license related source code policies
+report.rat.title=RAT (Release Audit Tool) results
+report.rat.link=The following document contains the results of
+report.rat.fullName=RAT (Release Audit Tool)
+report.rat.url=${project.url}

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/AbstractRatMojo.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/AbstractRatMojo.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/AbstractRatMojo.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/AbstractRatMojo.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,364 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.lang.reflect.UndeclaredThrowableException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.transform.TransformerConfigurationException;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.DirectoryScanner;
+
+import rat.Defaults;
+import rat.analysis.IHeaderMatcher;
+import rat.analysis.util.HeaderMatcherMultiplexer;
+import rat.license.ILicenseFamily;
+import rat.report.IReportable;
+import rat.report.RatReportFailedException;
+
+/**
+ * Abstract base class for Mojos, which are running RAT.
+ */
+public abstract class AbstractRatMojo extends AbstractMojo
+{
+    /**
+     * The Maven specific default excludes.
+     */
+    public static final String[] MAVEN_DEFAULT_EXCLUDES = new String[] { "target/**/*", "cobertura.ser" };
+
+    /**
+     * The Eclipse specific default excludes.
+     */
+    public static final String[] ECLIPSE_DEFAULT_EXCLUDES = new String[] { ".classpath", ".project", ".settings/**/*" };
+
+    /**
+     * The IDEA specific default excludes.
+     */
+    public static final String[] IDEA_DEFAULT_EXCLUDES = new String[] { "*.iml", "*.ipr", "*.iws" };
+
+    /**
+     * The base directory, in which to search for files.
+     * 
+     * @parameter expression="${rat.basedir}" default-value="${basedir}"
+     * @required
+     */
+    protected File basedir;
+
+    /**
+     * The licenses we want to match on.
+     * 
+     * @parameter
+     */
+    private HeaderMatcherSpecification[] licenseMatchers;
+
+    /**
+     * The set of approved license family names.
+     */
+    private LicenseFamilySpecification[] licenseFamilyNames;
+
+    /**
+     * Whether to add the default list of license matchers.
+     * 
+     * @parameter expression="${rat.addDefaultLicenseMatchers}" default-value="true"
+     */
+    private boolean addDefaultLicenseMatchers;
+
+    /**
+     * Specifies files, which are included in the report. By default, all files are included.
+     * 
+     * @parameter
+     */
+    private String[] includes;
+
+    /**
+     * Specifies files, which are excluded in the report. By default, no files are excluded.
+     * 
+     * @parameter
+     */
+    private String[] excludes;
+
+    /**
+     * Whether to use the default excludes when scanning for files.
+     * 
+     * @parameter expression="${rat.useDefaultExcludes}" default-value="true"
+     */
+    private boolean useDefaultExcludes;
+
+    /**
+     * Whether to use the Maven specific default excludes when scanning for files. Maven specific default excludes are
+     * given by the constant MAVEN_DEFAULT_EXCLUDES: The target directory, the cobertura.ser file, and so on.
+     * 
+     * @parameter expression="${rat.useMavenDefaultExcludes}" default-value="true"
+     */
+    private boolean useMavenDefaultExcludes;
+
+    /**
+     * Whether to use the Eclipse specific default excludes when scanning for files. Eclipse specific default excludes
+     * are given by the constant ECLIPSE_DEFAULT_EXCLUDES: The .classpath and .project files, the .settings directory,
+     * and so on.
+     * 
+     * @parameter expression="${rat.useEclipseDefaultExcludes}" default-value="true"
+     */
+    private boolean useEclipseDefaultExcludes;
+
+    /**
+     * Whether to use the IDEA specific default excludes when scanning for files. IDEA specific default excludes are
+     * given by the constant IDEA_DEFAULT_EXCLUDES: The *.iml, *.ipr and *.iws files.
+     * 
+     * @parameter expression="${rat.useIdeaDefaultExcludes}" default-value="true"
+     */
+    private boolean useIdeaDefaultExcludes;
+
+    /**
+     * Whether to exclude subprojects. This is recommended, if you want a separate rat-maven-plugin report for each
+     * subproject.
+     * 
+     * @parameter expression="${rat.excludeSubprojects}" default-value="true"
+     */
+    private boolean excludeSubProjects;
+
+    /**
+     * @parameter default-value="${project}"
+     * @required
+     * @readonly
+     */
+    private MavenProject project;
+
+    /**
+     * Returns the Maven project.
+     */
+    protected MavenProject getProject()
+    {
+        return project;
+    }
+
+    /**
+     * Returns the set of {@link IHeaderMatcher header matchers} to use.
+     * 
+     * @throws MojoFailureException
+     *             An error in the plugin configuration was detected.
+     * @throws MojoExecutionException
+     *             An error occurred while calculating the result.
+     * @return Array of license matchers to use
+     */
+    protected IHeaderMatcher[] getLicenseMatchers() throws MojoFailureException, MojoExecutionException
+    {
+        final List list = new ArrayList();
+        if ( licenseMatchers != null )
+        {
+            for ( int i = 0; i < licenseMatchers.length; i++ )
+            {
+                final HeaderMatcherSpecification spec = licenseMatchers[i];
+                final String className = spec.getClassName();
+                final IHeaderMatcher headerMatcher = (IHeaderMatcher) newInstance( IHeaderMatcher.class, className );
+                list.add( headerMatcher );
+            }
+        }
+
+        if ( addDefaultLicenseMatchers )
+        {
+            list.addAll( Arrays.asList( Defaults.DEFAULT_MATCHERS ) );
+        }
+        return (IHeaderMatcher[]) list.toArray( new IHeaderMatcher[list.size()] );
+    }
+
+    private Object newInstance( final Class clazz, final String className )
+        throws MojoExecutionException, MojoFailureException
+    {
+        final Object o;
+        try
+        {
+            final ClassLoader cl = Thread.currentThread().getContextClassLoader();
+            o = cl.loadClass( className ).newInstance();
+        }
+        catch ( InstantiationException e )
+        {
+            throw new MojoExecutionException( "Failed to instantiate class " + className + ": " + e.getMessage(), e );
+        }
+        catch ( ClassCastException e )
+        {
+            throw new MojoExecutionException( "The class " + className + " is not implementing " + clazz.getName()
+                            + ": " + e.getMessage(), e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new MojoExecutionException( "Illegal access to class " + className + ": " + e.getMessage(), e );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            throw new MojoExecutionException( "Class " + className + " not found: " + e.getMessage(), e );
+        }
+
+        if ( !clazz.isAssignableFrom( o.getClass() ) )
+        {
+            throw new MojoFailureException( "The class " + o.getClass().getName() + " does not implement "
+                            + clazz.getName() );
+        }
+        return o;
+    }
+
+    /**
+     * Adds the given string array to the list.
+     * 
+     * @param pList
+     *            The list to which the array elements are being added.
+     * @param pArray
+     *            The strings to add to the list.
+     */
+    private void add( List pList, String[] pArray )
+    {
+        if ( pArray != null )
+        {
+            for ( int i = 0; i < pArray.length; i++ )
+            {
+                pList.add( pArray[i] );
+            }
+        }
+    }
+
+    /**
+     * Creates an iterator over the files to check.
+     * 
+     * @return A container of files, which are being checked.
+     */
+    protected IReportable getResources()
+    {
+        DirectoryScanner ds = new DirectoryScanner();
+        ds.setBasedir( basedir );
+        setExcludes( ds );
+        setIncludes( ds );
+        ds.scan();
+        final String[] files = ds.getIncludedFiles();
+        try
+        {
+            return new FilesReportable( basedir, files );
+        }
+        catch ( IOException e )
+        {
+            throw new UndeclaredThrowableException( e );
+        }
+    }
+
+    private void setIncludes( DirectoryScanner ds )
+    {
+        if ( includes != null )
+        {
+            ds.setIncludes( includes );
+        }
+    }
+
+    private void setExcludes( DirectoryScanner ds )
+    {
+        final List excludeList1 = new ArrayList();
+        if ( useDefaultExcludes )
+        {
+            add( excludeList1, DirectoryScanner.DEFAULTEXCLUDES );
+        }
+        if ( useMavenDefaultExcludes )
+        {
+            add( excludeList1, MAVEN_DEFAULT_EXCLUDES );
+        }
+        if ( useEclipseDefaultExcludes )
+        {
+            add( excludeList1, ECLIPSE_DEFAULT_EXCLUDES );
+        }
+        if ( useIdeaDefaultExcludes )
+        {
+            add( excludeList1, IDEA_DEFAULT_EXCLUDES );
+        }
+        if ( excludeSubProjects && project != null && project.getModules() != null )
+        {
+            for ( Iterator it = project.getModules().iterator(); it.hasNext(); )
+            {
+                String moduleSubPath = (String) it.next();
+                excludeList1.add( moduleSubPath + "/**/*" );
+            }
+        }
+        final List excludeList = excludeList1;
+        add( excludeList, excludes );
+        if ( !excludeList.isEmpty() )
+        {
+            String[] allExcludes = (String[]) excludeList.toArray( new String[excludeList.size()] );
+            ds.setExcludes( allExcludes );
+        }
+    }
+
+    /**
+     * Writes the report to the given stream.
+     * 
+     * @param out The target writer, to which the report is being written.
+     * @param style The stylesheet to use
+     * @throws MojoFailureException
+     *             An error in the plugin configuration was detected.
+     * @throws MojoExecutionException
+     *             Another error occurred while creating the report.
+     */
+    protected void createReport( PrintWriter out, InputStream style ) throws MojoExecutionException, MojoFailureException
+    {
+        HeaderMatcherMultiplexer m = new HeaderMatcherMultiplexer( getLicenseMatchers() );
+        try
+        {
+            rat.Report.report( out, getResources(), style, m, getApprovedLicenseNames() );
+        }
+        catch ( TransformerConfigurationException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( InterruptedException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( RatReportFailedException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+    }
+
+    private ILicenseFamily[] getApprovedLicenseNames() throws MojoExecutionException, MojoFailureException
+    {
+        if ( licenseFamilyNames == null || licenseFamilyNames.length == 0 )
+        {
+            return null;
+        }
+        ILicenseFamily[] results = new ILicenseFamily[licenseFamilyNames.length];
+        for ( int i = 0; i < licenseFamilyNames.length; i++ )
+        {
+            LicenseFamilySpecification spec = licenseFamilyNames[i];
+            ILicenseFamily licenseFamily = (ILicenseFamily) newInstance( ILicenseFamily.class, spec.getClassName() );
+            results[i] = licenseFamily;
+        }
+        return results;
+    }
+}

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/FilesReportable.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/FilesReportable.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/FilesReportable.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/FilesReportable.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,97 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import rat.document.IDocument;
+import rat.document.IDocumentCollection;
+import rat.document.impl.DocumentImplUtils;
+import rat.document.impl.zip.ZipDocumentFactory;
+import rat.report.IReportable;
+import rat.report.RatReport;
+import rat.report.RatReportFailedException;
+
+/**
+ * Implementation of IReportable that traverses over a set of files.
+ */
+class FilesReportable implements IReportable
+{
+    private final File basedir;
+
+    private final String[] files;
+
+    FilesReportable( File basedir, String[] files )
+            throws IOException
+    {
+        final File currentDir = new File( System.getProperty( "user.dir" ) ).getCanonicalFile();
+        final File f = basedir.getCanonicalFile();
+        if ( currentDir.equals( f ) )
+        {
+            this.basedir = null;
+        }
+        else
+        {
+            this.basedir = basedir;
+        }
+        this.files = files;
+    }
+
+    public void run( RatReport report ) throws RatReportFailedException
+    {
+        FileDocument document = new FileDocument();
+        for ( int i = 0; i < files.length; i++ )
+        {
+            document.setFile( new File( basedir, files[i] ) );
+            report.report( document );
+        }
+    }
+
+    private class FileDocument implements IDocument
+    {
+        private File file;
+
+        void setFile( File file )
+        {
+            this.file = file;
+        }
+
+        public IDocumentCollection readArchive() throws IOException
+        {
+            return ZipDocumentFactory.load( file );
+        }
+
+        public Reader reader() throws IOException
+        {
+            final InputStream in = new FileInputStream( file );
+            return new InputStreamReader( in );
+        }
+
+        public String getName()
+        {
+            return DocumentImplUtils.toName( file );
+        }
+    }
+}
\ No newline at end of file

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/HeaderMatcherSpecification.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/HeaderMatcherSpecification.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/HeaderMatcherSpecification.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/HeaderMatcherSpecification.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,53 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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.
+ */
+
+/**
+ * Used to specify additional license matchers. A license matcher is basically a class, which implements
+ * {@link rat.analysis.IHeaderMatcher}.
+ */
+public class HeaderMatcherSpecification
+{
+    /**
+     * The license matchers class name.
+     */
+    private String className;
+
+    /**
+     * Returns the license matchers class name.
+     * 
+     * @return Class name of the license matcher.
+     */
+    public String getClassName()
+    {
+        return className;
+    }
+
+    /**
+     * Sets the license matchers class name. Required.
+     * 
+     * @param pClassName
+     *            Class name of the license matcher.
+     */
+    public void setClassName( String pClassName )
+    {
+        className = pClassName;
+    }
+}

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/LicenseFamilySpecification.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/LicenseFamilySpecification.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/LicenseFamilySpecification.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/LicenseFamilySpecification.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,53 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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.
+ */
+
+/**
+ * Used to specify additional license familys. A license family is basically a class, which implements
+ * {@link rat.license.ILicenseFamily}.
+ */
+public class LicenseFamilySpecification
+{
+    /**
+     * The license familys class name.
+     */
+    private String className;
+
+    /**
+     * Returns the license familys class name.
+     * 
+     * @return Class name of the license family.
+     */
+    public String getClassName()
+    {
+        return className;
+    }
+
+    /**
+     * Sets the license familys class name. Required.
+     * 
+     * @param pClassName
+     *            Class name of the license family.
+     */
+    public void setClassName( String pClassName )
+    {
+        className = pClassName;
+    }
+}

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckException.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckException.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckException.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckException.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,32 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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 org.apache.maven.plugin.MojoFailureException;
+
+public class RatCheckException extends MojoFailureException
+{
+    private static final long serialVersionUID = -1720861476741779140L;
+
+    public RatCheckException( String message )
+    {
+        super( message );
+    }
+}

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckMojo.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckMojo.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckMojo.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatCheckMojo.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,227 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import rat.Defaults;
+
+/**
+ * Run RAT to perform a violation check.
+ * 
+ * @goal check
+ * @phase verify
+ */
+public class RatCheckMojo extends AbstractRatMojo
+{
+    /**
+     * Where to store the report.
+     * 
+     * @parameter expression="${rat.outputFile}" default-value="${project.build.directory}/rat.txt"
+     */
+    private File reportFile;
+
+    /**
+     * Maximum number of files with unapproved licenses.
+     * @parameter expression="${rat.numUnapprovedLicenses}" default-value="0"
+     */
+    private int numUnapprovedLicenses;
+    
+    private URL getStylesheetURL()
+    {
+        URL url = Thread.currentThread().getContextClassLoader().getResource( "org/codehaus/mojo/rat/identity.xsl" );
+        if ( url == null )
+        {
+            throw new IllegalStateException( "Failed to locate stylesheet" );
+        }
+        return url;
+    }
+
+    private Document getRawReport()
+        throws MojoExecutionException, MojoFailureException
+    {
+        URL url = getStylesheetURL();
+        InputStream style = null;
+        try
+        {
+            style = url.openStream();
+            final StringWriter sw = new StringWriter();
+            createReport( new PrintWriter( sw ), style );
+            style.close();
+            style = null;
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware( true );
+            dbf.setValidating( false );
+            return dbf.newDocumentBuilder().parse( new InputSource( new StringReader( sw.toString() ) ) );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( SAXException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( ParserConfigurationException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        finally
+        {
+            if ( style != null )
+            {
+                try
+                {
+                    style.close();
+                }
+                catch ( Throwable t )
+                {
+                    /* Ignore me */
+                }
+            }
+        }
+    }
+
+    /**
+     * Invoked by Maven to execute the Mojo.
+     * 
+     * @throws MojoFailureException
+     *             An error in the plugin configuration was detected.
+     * @throws MojoExecutionException
+     *             Another error occurred while executing the plugin.
+     */
+    public void execute() throws MojoExecutionException, MojoFailureException
+    {
+        File parent = reportFile.getParentFile();
+        parent.mkdirs();
+
+        final Document report = getRawReport();
+        FileOutputStream fos = null;
+        try
+        {
+            fos = new FileOutputStream( reportFile );
+            Transformer t = TransformerFactory.newInstance().newTransformer( new StreamSource( Defaults.getDefaultStyleSheet() ) );
+            t.transform( new DOMSource( report ), new StreamResult( fos ) );
+            fos.close();
+            fos = null;
+        }
+        catch ( TransformerException e )
+        {
+            throw new MojoExecutionException( "Failed to create file " + reportFile + ": " + e.getMessage(), e );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Failed to create file " + reportFile + ": " + e.getMessage(), e );
+        }
+        finally
+        {
+            if ( fos != null )
+            {
+                try
+                {
+                    fos.close();
+                }
+                catch ( Throwable t )
+                {
+                    // Ignore me
+                }
+            }
+        }
+
+        check( report );
+    }
+
+    
+    private void count( RatStatistics pStatistics, Node node )
+    {
+        for ( Node child = node.getFirstChild();  child != null;  child = child.getNextSibling() )
+        {
+            switch ( child.getNodeType() )
+            {
+                case Node.ELEMENT_NODE:
+                    final Element e = (Element) child;
+                    final String uri = e.getNamespaceURI();
+                    if ( uri == null  ||  uri.length() == 0 )
+                    {
+                        final String localName = e.getLocalName();
+                        if ( "license-approval".equals( localName ) )
+                        {
+                            if ( Boolean.valueOf( e.getAttribute( "name" ) ).booleanValue() )
+                            {
+                                pStatistics.setNumApprovedLicenses( pStatistics.getNumApprovedLicenses() + 1 );
+                            }
+                            else
+                            {
+                                pStatistics.setNumUnapprovedLicenses( pStatistics.getNumUnapprovedLicenses() + 1 );
+                            }
+                        }
+                    }
+                    count( pStatistics, child );
+                    break;
+                case Node.DOCUMENT_FRAGMENT_NODE:
+                    count( pStatistics, child );
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+
+    protected void check( Document document )
+        throws MojoFailureException
+    {
+        RatStatistics statistics = new RatStatistics();
+        count( statistics, document );
+        check( statistics );
+    }
+
+    protected void check( RatStatistics statistics )
+        throws MojoFailureException
+    {
+        if ( numUnapprovedLicenses < statistics.getNumUnapprovedLicenses() )
+        {
+            throw new RatCheckException( "Too many unapproved licenses: " + statistics.getNumApprovedLicenses() );
+        }
+    }
+}

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatReportMojo.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatReportMojo.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatReportMojo.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatReportMojo.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,416 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.doxia.module.xhtml.decoration.render.RenderingContext;
+import org.apache.maven.doxia.site.decoration.Body;
+import org.apache.maven.doxia.site.decoration.DecorationModel;
+import org.apache.maven.doxia.site.decoration.Skin;
+import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.doxia.siterenderer.RendererException;
+import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
+import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.reporting.MavenReport;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.doxia.sink.Sink;
+
+import rat.Defaults;
+
+/**
+ * Generates a report with RAT's output.
+ * 
+ * @goal rat
+ * @requiresDependencyResolution test
+ */
+public class RatReportMojo extends AbstractRatMojo implements MavenReport
+{
+    /**
+     * Specifies the directory where the report will be generated
+     * 
+     * @parameter default-value="${project.reporting.outputDirectory}"
+     * @required
+     */
+    private File outputDirectory;
+
+    /**
+     * @component
+     */
+    private Renderer siteRenderer;
+
+    /**
+     * @component
+     */
+    private ArtifactFactory factory;
+
+    /**
+     * @component
+     */
+    private ArtifactResolver resolver;
+
+    /**
+     * @parameter default-value="${localRepository}"
+     * @required
+     * @readonly
+     */
+    private ArtifactRepository localRepository;
+
+    /**
+     * Returns the skins artifact file.
+     * 
+     * @throws MojoFailureException
+     *             An error in the plugin configuration was detected.
+     * @throws MojoExecutionException
+     *             An error occurred while searching for the artifact file.
+     * @return Artifact file
+     */
+    private File getSkinArtifactFile() throws MojoFailureException, MojoExecutionException
+    {
+        Skin skin = Skin.getDefaultSkin();
+
+        String version = skin.getVersion();
+        Artifact artifact;
+        try
+        {
+            if ( version == null )
+            {
+                version = Artifact.RELEASE_VERSION;
+            }
+            VersionRange versionSpec = VersionRange.createFromVersionSpec( version );
+            artifact =
+                factory.createDependencyArtifact( skin.getGroupId(), skin.getArtifactId(), versionSpec, "jar", null,
+                                                  null );
+
+            resolver.resolve( artifact, getProject().getRemoteArtifactRepositories(), localRepository );
+        }
+        catch ( InvalidVersionSpecificationException e )
+        {
+            throw new MojoFailureException( "The skin version '" + version + "' is not valid: " + e.getMessage() );
+        }
+        catch ( ArtifactResolutionException e )
+        {
+            throw new MojoExecutionException( "Unable to find skin", e );
+        }
+        catch ( ArtifactNotFoundException e )
+        {
+            throw new MojoFailureException( "The skin does not exist: " + e.getMessage() );
+        }
+
+        return artifact.getFile();
+    }
+
+    /**
+     * Creates the report as a string. Currently, this string will be embedded verbatimly into the report document.
+     * 
+     * @throws MojoFailureException
+     *             An error in the plugin configuration was detected.
+     * @throws MojoExecutionException
+     *             An error occurred while creating the report.
+     * @return Report contents
+     */
+    private String createReport() throws MojoExecutionException, MojoFailureException
+    {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = null;
+        try
+        {
+            pw = new PrintWriter( sw );
+            createReport( new PrintWriter( sw ), Defaults.getDefaultStyleSheet() );
+            final String result = sw.toString();
+            pw.close();
+            pw = null;
+            sw.close();
+            sw = null;
+            return result;
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        finally
+        {
+            if ( pw != null )
+            {
+                try
+                {
+                    pw.close();
+                }
+                catch ( Throwable t )
+                {
+                    // Ignore me
+                }
+            }
+            if ( sw != null )
+            {
+                try
+                {
+                    sw.close();
+                }
+                catch ( Throwable t )
+                {
+                    // Ignore me
+                }
+            }
+        }
+    }
+
+    /**
+     * Called from Maven to invoke the plugin.
+     * 
+     * @throws MojoFailureException
+     *             An error in the plugin configuration was detected.
+     * @throws MojoExecutionException
+     *             An error occurred while creating the report.
+     */
+    public void execute() throws MojoExecutionException, MojoFailureException
+    {
+        DecorationModel model = new DecorationModel();
+        model.setBody( new Body() );
+        Map attributes = new HashMap();
+        attributes.put( "outputEncoding", "UTF-8" );
+        Locale locale = Locale.getDefault();
+        try
+        {
+            SiteRenderingContext siteContext =
+                siteRenderer.createContextForSkin( getSkinArtifactFile(), attributes, model, getName( locale ),
+                                                   locale );
+            RenderingContext context = new RenderingContext( outputDirectory, getOutputName() + ".html" );
+
+            SiteRendererSink sink = new SiteRendererSink( context );
+            generate( sink, locale );
+
+            outputDirectory.mkdirs();
+
+            Writer writer = new FileWriter( new File( outputDirectory, getOutputName() + ".html" ) );
+
+            siteRenderer.generateDocument( writer, sink, siteContext );
+
+            siteRenderer.copyResources( siteContext, new File( getProject().getBasedir(), "src/site/resources" ),
+                                        outputDirectory );
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( MavenReportException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+        catch ( RendererException e )
+        {
+            throw new MojoExecutionException( e.getMessage(), e );
+        }
+    }
+
+    /**
+     * Returns, whether the report may be generated.
+     * 
+     * @return Always true.
+     */
+    public boolean canGenerateReport()
+    {
+        return true;
+    }
+
+    /**
+     * Searches for a RAT artifact in the dependency list and returns its version.
+     * 
+     * @return Version number, if found, or null.
+     */
+    private String getRatVersion()
+    {
+        for ( Iterator iter = getProject().getDependencyArtifacts().iterator(); iter.hasNext(); )
+        {
+            Artifact a = (Artifact) iter.next();
+            if ( "rat-lib".equals( a.getArtifactId() ) )
+            {
+                return a.getVersion();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Writes the report to the Doxia sink.
+     * 
+     * @param sink
+     *            The doxia sink, kind of a SAX handler.
+     * @param locale
+     *            The locale to use for writing the report.
+     * @throws MavenReportException
+     *             Writing the report failed.
+     */
+    public void generate( Sink sink, Locale locale ) throws MavenReportException
+    {
+        ResourceBundle bundle = getBundle( locale );
+        final String title = bundle.getString( "report.rat.title" );
+        sink.head();
+        sink.title();
+        sink.text( title );
+        sink.title_();
+        sink.head_();
+
+        sink.body();
+
+        sink.section1();
+        sink.sectionTitle1();
+        sink.text( title );
+        sink.sectionTitle1_();
+
+        sink.paragraph();
+        sink.text( bundle.getString( "report.rat.link" ) + " " );
+        sink.link( bundle.getString( "report.rat.url" ) );
+        sink.text( bundle.getString( "report.rat.fullName" ) );
+        sink.link_();
+        final String ratVersion = getRatVersion();
+        if ( ratVersion != null )
+        {
+            sink.text( " " + ratVersion );
+        }
+        sink.text( "." );
+        sink.paragraph_();
+
+        sink.paragraph();
+        sink.verbatim( true );
+        try
+        {
+            sink.text( createReport() );
+        }
+        catch ( MojoExecutionException e )
+        {
+            throw new MavenReportException( e.getMessage(), e );
+        }
+        catch ( MojoFailureException e )
+        {
+            throw new MavenReportException( e.getMessage(), e );
+        }
+        sink.verbatim_();
+        sink.paragraph_();
+        sink.body_();
+    }
+
+    /**
+     * Returns the reports category name.
+     * 
+     * @return {@link MavenReport#CATEGORY_PROJECT_REPORTS}
+     */
+    public String getCategoryName()
+    {
+        return MavenReport.CATEGORY_PROJECT_REPORTS;
+    }
+
+    /**
+     * Returns the reports bundle
+     * 
+     * @param locale
+     *            Requested locale of the bundle
+     * @return The bundle, which is used to read localized strings.
+     */
+    private ResourceBundle getBundle( Locale locale )
+    {
+        return ResourceBundle.getBundle( "org/codehaus/mojo/rat/rat-report", locale, getClass().getClassLoader() );
+    }
+
+    /**
+     * Returns the reports description.
+     * 
+     * @param locale
+     *            Requested locale of the bundle
+     * @return Report description, as given by the key "report.rat.description" in the bundle.
+     */
+    public String getDescription( Locale locale )
+    {
+        return getBundle( locale ).getString( "report.rat.description" );
+    }
+
+    /**
+     * Returns the reports name.
+     * 
+     * @param locale
+     *            Requested locale of the bundle
+     * @return Report name, as given by the key "report.rat.name" in the bundle.
+     */
+    public String getName( Locale locale )
+    {
+        return getBundle( locale ).getString( "report.rat.name" );
+    }
+
+    /**
+     * Returns the reports file name.
+     * 
+     * @return "rat-report"
+     */
+    public String getOutputName()
+    {
+        return "rat-report";
+    }
+
+    /**
+     * Returns the reports output directory.
+     * 
+     * @return Value of the "outputDirectory" parameter.
+     */
+    public File getReportOutputDirectory()
+    {
+        return outputDirectory;
+    }
+
+    /**
+     * Returns, whether this is an external report.
+     * 
+     * @return Always false.
+     */
+    public boolean isExternalReport()
+    {
+        return false;
+    }
+
+    /**
+     * Sets the reports output directory.
+     * 
+     * @param pOutputDirectory
+     *            Reports target directory.
+     */
+    public void setReportOutputDirectory( File pOutputDirectory )
+    {
+        outputDirectory = pOutputDirectory;
+    }
+}

Added: incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatStatistics.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatStatistics.java?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatStatistics.java (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/java/org/codehaus/mojo/rat/RatStatistics.java Sun Apr 27 13:49:55 2008
@@ -0,0 +1,62 @@
+package org.codehaus.mojo.rat;
+
+/*
+ * 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.
+ */
+
+/**
+ * An instance of this class is used to report
+ * statistics.
+ */
+public class RatStatistics
+{
+    private int numUnapprovedLicenses;
+    private int numApprovedLicenses;
+
+    /**
+     * Returns the number of files with unapproved licenses.
+     */
+    public int getNumUnapprovedLicenses()
+    {
+        return numUnapprovedLicenses;
+    }
+
+    /**
+     * Sets the number of files with unapproved licenses.
+     */
+    public void setNumUnapprovedLicenses( int numUnapprovedLicenses )
+    {
+        this.numUnapprovedLicenses = numUnapprovedLicenses;
+    }
+
+    /**
+     * Returns the number of files with unapproved licenses.
+     */
+    public int getNumApprovedLicenses()
+    {
+        return numApprovedLicenses;
+    }
+
+    /**
+     * Sets the number of files with approved licenses.
+     */
+    public void setNumApprovedLicenses( int numApprovedLicenses )
+    {
+        this.numApprovedLicenses = numApprovedLicenses;
+    }
+}

Added: incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/identity.xsl
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/identity.xsl?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/identity.xsl (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/identity.xsl Sun Apr 27 13:49:55 2008
@@ -0,0 +1,27 @@
+<!--
+
+   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.
+
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>
+

Added: incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/rat-report.properties
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/rat-report.properties?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/rat-report.properties (added)
+++ incubator/rat/import/rat-maven-plugin/src/main/resources/org/codehaus/mojo/rat/rat-report.properties Sun Apr 27 13:49:55 2008
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+report.rat.name=RAT Report
+report.rat.description=Report on compliance to license related source code policies
+report.rat.title=RAT (Release Audit Tool) results
+report.rat.link=The following document contains the results of
+report.rat.fullName=RAT (Release Audit Tool)
+report.rat.url=http://code.google.com/p/arat/

Added: incubator/rat/import/rat-maven-plugin/src/site/apt/examples/basic.apt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/site/apt/examples/basic.apt?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/site/apt/examples/basic.apt (added)
+++ incubator/rat/import/rat-maven-plugin/src/site/apt/examples/basic.apt Sun Apr 27 13:49:55 2008
@@ -0,0 +1,44 @@
+~~   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.
+
+ -----------------
+ Basic use
+ -----------------
+
+Basic use
+
+  Basic use means that you configure the plugin from the POM.
+  However, it doesn't run automatically, but on demand:
+
+------------------------------------------------------------------
+  mvn rat:check
+------------------------------------------------------------------
+
+  To achieve that, a section like the following needs to be
+  added to your POM:
+
+------------------------------------------------------------------
+  <build>
+    <plugins>
+      ...
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>rat-maven-plugin</artifactId>
+        <version>1.0-alpha-3</version>
+      </plugin>
+      ...
+    </plugins>
+  </build>
+------------------------------------------------------------------

Added: incubator/rat/import/rat-maven-plugin/src/site/apt/examples/site.apt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/site/apt/examples/site.apt?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/site/apt/examples/site.apt (added)
+++ incubator/rat/import/rat-maven-plugin/src/site/apt/examples/site.apt Sun Apr 27 13:49:55 2008
@@ -0,0 +1,44 @@
+~~   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.
+
+ ---------------------------------------
+ Adding a report to the generated site
+ ---------------------------------------
+
+Adding a report to the generated site
+
+  The typical use case is that you want the plugin to run whenever you invoke
+
+------------------------------------------------------------------
+  mvn site
+------------------------------------------------------------------
+
+  That way, the report will be added to the generated
+  site. This is done by simply adding the following section to
+  your POM:
+
+------------------------------------------------------------------
+  <reporting>
+    <plugins>
+      ...
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>rat-maven-plugin</artifactId>
+        <version>1.0-alpha-3</version>
+      </plugin>
+      ...
+    </plugins>
+  </reporting>
+------------------------------------------------------------------

Added: incubator/rat/import/rat-maven-plugin/src/site/apt/examples/verify.apt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/site/apt/examples/verify.apt?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/site/apt/examples/verify.apt (added)
+++ incubator/rat/import/rat-maven-plugin/src/site/apt/examples/verify.apt Sun Apr 27 13:49:55 2008
@@ -0,0 +1,86 @@
+~~   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.
+
+ -----------------
+ Verify phase example
+ -----------------
+
+Verify phase example
+
+  This example demonstrates how to configure the plugin to
+  run automatically as part of the "verify" phase:
+
+------------------------------------------------------------------
+  <build>
+    <plugins>
+      ...
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>rat-maven-plugin</artifactId>
+        <version>1.0-alpha-3</version>
+        <executions>
+          <execution>
+            <phase>verify</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      ...
+    </plugins>
+  </build>
+------------------------------------------------------------------
+
+  In larger projects, the plugin may take some time to run. In
+  such cases, it may be desirable not to run the plugin with
+  every build, but only in important cases like a release build:
+
+------------------------------------------------------------------
+  <profiles>
+    <profile>
+      <id>release</id>
+      <build>
+        <plugins>
+          ...
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>rat-maven-plugin</artifactId>
+            <version>1.0-alpha-3</version>
+            <executions>
+              <execution>
+                <phase>verify</phase>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          ...
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+------------------------------------------------------------------
+
+  Note, that this is almost the same example as before, except
+  that the plugin configuration has been embedded into a profile.
+  In this case, the plugin is only executed, when the "release"
+  profile is activated by adding <<<-Prelease>>> to the command
+  line, for example like this:
+
+------------------------------------------------------------------
+  mvn -Prelease install
+------------------------------------------------------------------

Added: incubator/rat/import/rat-maven-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat-maven-plugin/src/site/apt/index.apt?rev=652012&view=auto
==============================================================================
--- incubator/rat/import/rat-maven-plugin/src/site/apt/index.apt (added)
+++ incubator/rat/import/rat-maven-plugin/src/site/apt/index.apt Sun Apr 27 13:49:55 2008
@@ -0,0 +1,53 @@
+~~   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.
+
+ ------
+ Introduction
+ ------
+
+
+The Rat Maven Plugin
+
+  This plugin may be used to run RAT, the
+  {{{http://code.google.com/p/arat/}Release Audit Tool}}. It
+  verifies, whether your source code matches standards like the
+  {{{http://www.apache.org/legal/src-headers.html}ASF Source Header
+  and Copyright Notice Policy}}.
+
+* Goals Overview
+
+  The following goals are available:
+
+  * {{{check.html}rat:check}} Runs RAT and creates a report, which is written
+    to a plain text file.
+
+  * {{{rat.html}rat:rat}} Runs RAT and creates a report, which will be added
+    to the generated site.
+
+* Usage
+
+  Instructions on how to use the Rat Maven Plugin can be found on the {{{usage.html}usage page}}.
+
+* Examples
+
+  To provide you with better understanding of some usages of the Rat Maven Plugin,
+  you can take a look into the following examples:
+
+  * {{{examples/basic.html}Basic use}} of the rat:check goal.
+
+  * {{{examples/verify.html}Automatically}} running the rat:check goal
+    when the project is built.
+
+  * Adding the report to the {{{examples/site.html}generated site}}.