[maven-release-plugin]  copy for tag apache-rat-project-0.11

git-svn-id: https://svn.apache.org/repos/asf/creadur/rat/tags/apache-rat-project-0.11@1618388 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/BUILD.txt b/BUILD.txt
index 951fab7..d18e56a 100644
--- a/BUILD.txt
+++ b/BUILD.txt
@@ -1,6 +1,8 @@
-How to build
-============
+How to build RAT
+================
 
+There is a maven default goal configured that builds and installs a fresh artifact. Just launch maven without any goals in the project root directory.
+or
 Normal development:
 
     mvn install
diff --git a/README.txt b/README.txt
index 1d1d54b..9a32668 100644
--- a/README.txt
+++ b/README.txt
@@ -47,7 +47,7 @@
 
 In response to demands from project quality tool developers, Rat is available as a
 library (rat-lib jar) suitable for inclusion in tools. Note that binary compatibility
-is not gauranteed between 0.x releases. The XML output format is not yet in it's
+is not guaranteed between 0.x releases. The XML output format is not yet in it's
 final form and so library users are recommended to either use the supplied
 stylesheets or keep in close touch with the code.
 
diff --git a/ant-task-examples.xml b/ant-task-examples.xml
index d12ceec..ea365e9 100644
--- a/ant-task-examples.xml
+++ b/ant-task-examples.xml
@@ -25,7 +25,7 @@
   </description>
 
   <property name="src-dir" location="apache-rat-core/src/main/java"/>
-  <property name="version" value="0.9-SNAPSHOT"/>
+  <property name="version" value="0.11"/>
   <property name="src-jar"
             location="apache-rat-core/target/apache-rat-core-${version}-sources.jar"/>
 
diff --git a/apache-rat-core/pom.xml b/apache-rat-core/pom.xml
index 09bf78f..373fb9a 100644
--- a/apache-rat-core/pom.xml
+++ b/apache-rat-core/pom.xml
@@ -28,7 +28,7 @@
   <description>The core functionality, shared by the Ant tasks
     and the Maven plugin.</description>
 
-  <build>   
+  <build>
     <resources>
       <resource>
         <filtering>false</filtering>
@@ -89,7 +89,7 @@
       <artifactId>commons-collections</artifactId>
     </dependency>
     <dependency>
-	  <groupId>commons-lang</groupId>
+      <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
     </dependency>
     <dependency>
diff --git a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/CDDL1License.java b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/CDDL1License.java
index 88b1ee9..ec0eb62 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/analysis/license/CDDL1License.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/analysis/license/CDDL1License.java
@@ -34,7 +34,7 @@
 
     public static final String LICENSE_URL =
             ".*https://oss.oracle.com/licenses/CDDL.*";
-    private static final Pattern LICENSE_URL_PATTERN = Pattern.compile(LICENSE_URL);    
+    private static final Pattern LICENSE_URL_PATTERN = Pattern.compile(LICENSE_URL);
 
 
     public CDDL1License() {
@@ -46,10 +46,10 @@
     @Override
     protected boolean matches(final String pLine) {
         if (pLine != null) {
-        	return 
-        			super.matches(pLine) ||
-        			LICENSE_LINE_PATTERN.matcher(pLine).find() ||
-        			LICENSE_URL_PATTERN.matcher(pLine).find();
+            return
+                    super.matches(pLine) ||
+                    LICENSE_LINE_PATTERN.matcher(pLine).find() ||
+                    LICENSE_URL_PATTERN.matcher(pLine).find();
         }
         return false;
     }
diff --git a/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java b/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java
index 40f3c5e..762fc9c 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/annotation/AbstractLicenceAppender.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.annotation;
 
 import java.io.BufferedReader;
@@ -36,11 +36,11 @@
  * existence of an existing licence header, it is assumed that either a second
  * licence header is intentional or that there is no licence header present
  * already.
- * 
+ *
  */
 public abstract class AbstractLicenceAppender {
     private static final String DOT = ".";
-	private static final int TYPE_UNKNOWN = 0;
+    private static final int TYPE_UNKNOWN = 0;
     private static final int TYPE_JAVA = 1;
     private static final int TYPE_XML = 2;
     private static final int TYPE_HTML = 3;
@@ -188,7 +188,7 @@
 
     /**
      * Append the default licence header to the supplied document.
-     * 
+     *
      * @param document document to append to.
      * @throws IOException
      *           if there is a problem while reading or writing the file
@@ -341,7 +341,7 @@
 
     /**
      * Detect the type of document.
-     * 
+     *
      * @param document to retrieve type from.
      * @return not null
      * @TODO use existing mechanism to detect the type of a file and record it in the report output, thus we will not need this duplication here.
@@ -363,7 +363,7 @@
      * Set the force flag on this appender. If this flag is set
      * to true then files will be modified directly, otherwise
      * new files will be created alongside the existing files.
-     * 
+     *
      * @param force force flag.
      */
     public void setForce(boolean force) {
@@ -372,14 +372,14 @@
 
     /**
      * @return Get the licence header of a document.
-     * @param document document to extract from. 
+     * @param document document to extract from.
      */
     public abstract String getLicenceHeader(File document);
 
     /**
      * Get the first line of the licence header formatted
      * for the given type of file.
-     * 
+     *
      * @param type the type of file, see the TYPE_* constants
      * @return not null
      */
@@ -396,7 +396,7 @@
     /**
      * Get the last line of the licence header formatted
      * for the given type of file.
-     * 
+     *
      * @param type the type of file, see the TYPE_* constants
      * @return not null
      */
@@ -413,7 +413,7 @@
     /**
      * Get a line of the licence header formatted
      * for the given type of file.
-     * 
+     *
      * @param type the type of file, see the TYPE_* constants
      * @param content the content for this line
      * @return not null
diff --git a/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java b/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java
index ed88eca..16e9e4e 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/document/impl/MonolithicFileDocument.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.document.impl;
 
 import java.io.File;
@@ -32,13 +32,14 @@
 
 public class MonolithicFileDocument extends AbstractMonolithicDocument {
     private static final String UTF_8 = "UTF-8";
-	private static final String FILE_URL_PREFIX = "file";
-	
-	private final File file;
+
+    private static final String FILE_URL_PREFIX = "file";
+
+    private final File file;
 
     /**
-     * @return Creates and returns a new instance. 
-     * 
+     * @return Creates and returns a new instance.
+     *
      * @param url The document is read from the given URL.
      */
     public static Document newInstance(final URL url) {
diff --git a/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/ArchiveGuesser.java b/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/ArchiveGuesser.java
index 85055d2..deb9c9a 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/ArchiveGuesser.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/ArchiveGuesser.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.document.impl.guesser;
 
 import java.util.Locale;
@@ -23,9 +23,10 @@
 import org.apache.rat.api.Document;
 
 public class ArchiveGuesser {
-    
+
     private static final String DOT = ".";
-	public static final String[] ARCHIVE_EXTENSIONS = {
+
+    public static final String[] ARCHIVE_EXTENSIONS = {
         "jar", "gz",
         "zip", "tar",
         "bz", "bz2",
@@ -38,7 +39,7 @@
     };
 
     /**
-     * @param document the current document. 
+     * @param document the current document.
      * @return whether the given document is an archive.
      */
     public static final boolean isArchive(final Document document) {
diff --git a/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/BinaryGuesser.java b/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/BinaryGuesser.java
index cb4060c..4ad9f74 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/BinaryGuesser.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/BinaryGuesser.java
@@ -38,7 +38,7 @@
 
     private static final String DOT = ".";
 
-	private static boolean isBinaryDocument(Document document) {
+    private static boolean isBinaryDocument(Document document) {
         boolean result = false;
         InputStream stream = null;
         try
diff --git a/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java b/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java
index 4ff5d94..ed66cbc 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the    *
  * specific language governing permissions and limitations      *
  * under the License.                                           *
- */ 
+ */
 package org.apache.rat.document.impl.guesser;
 
 import java.util.Arrays;
@@ -26,11 +26,12 @@
 public class NoteGuesser {
 
     private static final String DOT = ".";
-	public static final String[] NOTE_FILE_NAMES = {
+
+    public static final String[] NOTE_FILE_NAMES = {
         "NOTICE", "LICENSE",
         "LICENSE.TXT", "NOTICE.TXT",
         "INSTALL", "INSTALL.TXT",
-        "README", "README.TXT", 
+        "README", "README.TXT",
         "NEWS", "NEWS.TXT",
         "AUTHOR", "AUTHOR.TXT",
         "AUTHORS", "AUTHORS.txt",
@@ -50,17 +51,17 @@
         "LICENSE", "LICENSE.TXT",
         "NOTICE", "NOTICE.TXT",
     };
-    
+
     /**
      * @return Is a file by that name a note file?
      * @param name file name.
      */
     public static final boolean isNote(final String name) {
         if (name == null) {return false;}
-    
+
         List<String> l = Arrays.asList(NoteGuesser.NOTE_FILE_NAMES);
         String normalisedName = GuessUtils.normalise(name);
-        
+
         if (l.contains(name) || l.contains(normalisedName)) {
             return true;
         }
@@ -70,7 +71,7 @@
                 return true;
             }
         }
-        
+
         return false;
     }
 
diff --git a/apache-rat-core/src/main/java/org/apache/rat/license/GPL1LicenseFamily.java b/apache-rat-core/src/main/java/org/apache/rat/license/GPL1LicenseFamily.java
index 2262836..bdfd86e 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/license/GPL1LicenseFamily.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/license/GPL1LicenseFamily.java
@@ -21,7 +21,7 @@
 import org.apache.rat.api.MetaData;
 
 /**
- * Base implementation for GPLv3 or later.
+ * Base implementation for GPLv1 or later.
  */
 public class GPL1LicenseFamily extends SimpleLicenseFamily {
     public GPL1LicenseFamily() {
diff --git a/apache-rat-core/src/main/java/org/apache/rat/license/GPL2LicenseFamily.java b/apache-rat-core/src/main/java/org/apache/rat/license/GPL2LicenseFamily.java
index 8bec680..e2d2522 100644
--- a/apache-rat-core/src/main/java/org/apache/rat/license/GPL2LicenseFamily.java
+++ b/apache-rat-core/src/main/java/org/apache/rat/license/GPL2LicenseFamily.java
@@ -21,7 +21,7 @@
 import org.apache.rat.api.MetaData;
 
 /**
- * Base implementation for GPLv3 or later.
+ * Base implementation for GPLv2 or later.
  */
 public class GPL2LicenseFamily extends SimpleLicenseFamily {
     public GPL2LicenseFamily() {
diff --git a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/DirectoryScanner.java b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/DirectoryScanner.java
index b522d44..8d9a67b 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/analysis/license/DirectoryScanner.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/analysis/license/DirectoryScanner.java
@@ -32,7 +32,7 @@
 
 class DirectoryScanner {
 
-    @SuppressWarnings("boxing")
+    @SuppressWarnings("boxing") // OK in test code
     /**
      * Get list of files in a directory, and scan for license matches
      * @param directory the directory containing the files
diff --git a/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java b/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
index b85fdd9..dbc43bd 100644
--- a/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
+++ b/apache-rat-core/src/test/java/org/apache/rat/annotation/TestLicenceAppender.java
@@ -549,10 +549,10 @@
                     throws IOException {
                     writer.write(firstLine + "\n");
                     writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp\", \"Tutorials\\ConsoleApp\\cs\\src\\ConsoleApp.csproj\", \"{933969DF-2BC5-44E6-8B1A-400FC276A23F}\"\n");
-                    writer.write("	ProjectSection(WebsiteProperties) = preProject\n");
-                    writer.write("		Debug.AspNetCompiler.Debug = \"True\"\n");
-                    writer.write("		Release.AspNetCompiler.Debug = \"False\"\n");
-                    writer.write("	EndProjectSection\n");
+                    writer.write("\tProjectSection(WebsiteProperties) = preProject\n");
+                    writer.write("\t\tDebug.AspNetCompiler.Debug = \"True\"\n");
+                    writer.write("\t\tRelease.AspNetCompiler.Debug = \"False\"\n");
+                    writer.write("\tEndProjectSection\n");
                     writer.write("EndProject\n");
                 }
             },
@@ -573,10 +573,10 @@
                     writer.write(firstLine + "\n");
                     writer.write(secondLine + "\n");
                     writer.write("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"ConsoleApp\", \"Tutorials\\ConsoleApp\\cs\\src\\ConsoleApp.csproj\", \"{933969DF-2BC5-44E6-8B1A-400FC276A23F}\"\n");
-                    writer.write("	ProjectSection(WebsiteProperties) = preProject\n");
-                    writer.write("		Debug.AspNetCompiler.Debug = \"True\"\n");
-                    writer.write("		Release.AspNetCompiler.Debug = \"False\"\n");
-                    writer.write("	EndProjectSection\n");
+                    writer.write("\tProjectSection(WebsiteProperties) = preProject\n");
+                    writer.write("\t\tDebug.AspNetCompiler.Debug = \"True\"\n");
+                    writer.write("\t\tRelease.AspNetCompiler.Debug = \"False\"\n");
+                    writer.write("\tEndProjectSection\n");
                     writer.write("EndProject\n");
                 }
             },
diff --git a/apache-rat-plugin/pom.xml b/apache-rat-plugin/pom.xml
index 0e4545e..62844fb 100644
--- a/apache-rat-plugin/pom.xml
+++ b/apache-rat-plugin/pom.xml
@@ -91,14 +91,15 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-invoker-plugin</artifactId>
+        <version>${mavenInvokerPluginVersion}</version>
         <configuration>
-          <projectsDirectory>src/test/invoker</projectsDirectory>
+          <projectsDirectory>src/it</projectsDirectory>
           <cloneProjectsTo>${project.build.directory}/invoker</cloneProjectsTo>
           <pomIncludes>
             <pomInclude>*/pom.xml</pomInclude>
           </pomIncludes>
           <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
-          <settingsFile>src/test/invoker/settings.xml</settingsFile>
+          <settingsFile>src/it/settings.xml</settingsFile>
           <postBuildHookScript>verify</postBuildHookScript>
         </configuration>
         <executions>
@@ -125,9 +126,9 @@
             <configuration>
               <excludes>
                 <!-- These files does not have license headers because they are used to test license headers -->
-                <exclude>src/test/invoker/it1/src.apt</exclude>
-                <exclude>src/test/it2/src.txt</exclude>
-                <exclude>src/test/it3/src.apt</exclude>
+                <exclude>src/it/it1/src.apt</exclude>
+                <exclude>src/test/resources/unit/it2/src.txt</exclude>
+                <exclude>src/test/resources/unit/it3/src.apt</exclude>
               </excludes>
             </configuration>
             <executions>
diff --git a/apache-rat-plugin/src/test/invoker/it1/invoker.properties b/apache-rat-plugin/src/it/it1/invoker.properties
similarity index 92%
rename from apache-rat-plugin/src/test/invoker/it1/invoker.properties
rename to apache-rat-plugin/src/it/it1/invoker.properties
index 712ea7a..6e8c347 100644
--- a/apache-rat-plugin/src/test/invoker/it1/invoker.properties
+++ b/apache-rat-plugin/src/it/it1/invoker.properties
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-invoker.goals = clean org.apache.rat:apache-rat-plugin::check
+invoker.goals = clean apache-rat:check
diff --git a/apache-rat-plugin/src/test/invoker/it1/pom.xml b/apache-rat-plugin/src/it/it1/pom.xml
similarity index 100%
rename from apache-rat-plugin/src/test/invoker/it1/pom.xml
rename to apache-rat-plugin/src/it/it1/pom.xml
diff --git a/apache-rat-plugin/src/test/invoker/it1/src.apt b/apache-rat-plugin/src/it/it1/src.apt
similarity index 100%
rename from apache-rat-plugin/src/test/invoker/it1/src.apt
rename to apache-rat-plugin/src/it/it1/src.apt
diff --git a/apache-rat-plugin/src/test/invoker/it1/verify.groovy b/apache-rat-plugin/src/it/it1/verify.groovy
similarity index 100%
rename from apache-rat-plugin/src/test/invoker/it1/verify.groovy
rename to apache-rat-plugin/src/it/it1/verify.groovy
diff --git a/apache-rat-plugin/src/test/invoker/it1/invoker.properties b/apache-rat-plugin/src/it/it4_RAT-168/invoker.properties
similarity index 92%
copy from apache-rat-plugin/src/test/invoker/it1/invoker.properties
copy to apache-rat-plugin/src/it/it4_RAT-168/invoker.properties
index 712ea7a..6486eb1 100644
--- a/apache-rat-plugin/src/test/invoker/it1/invoker.properties
+++ b/apache-rat-plugin/src/it/it4_RAT-168/invoker.properties
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-invoker.goals = clean org.apache.rat:apache-rat-plugin::check
+invoker.goals = clean apache-rat:rat
diff --git a/apache-rat-plugin/src/it/it4_RAT-168/pom.xml b/apache-rat-plugin/src/it/it4_RAT-168/pom.xml
new file mode 100644
index 0000000..bfc69b3
--- /dev/null
+++ b/apache-rat-plugin/src/it/it4_RAT-168/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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
+    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">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.rat.test</groupId>
+  <artifactId>it1</artifactId>
+  <version>1.0</version>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <version>@pom.version@</version>
+        <configuration>
+          <includes>
+            <include>pom.xml</include>
+          </includes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/apache-rat-plugin/src/it/it4_RAT-168/verify.groovy b/apache-rat-plugin/src/it/it4_RAT-168/verify.groovy
new file mode 100644
index 0000000..3786118
--- /dev/null
+++ b/apache-rat-plugin/src/it/it4_RAT-168/verify.groovy
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+content = new File( basedir, 'build.log' ).text;
+
+assert content.contains( 'BUILD SUCCESS' );
+
+/*
+ * [WARNING] No resources included
+ */
+assert ! content.contains( '[WARNING]' );
+
+report = new File( basedir, 'target/site/rat-report.html' ).text;
+
+assert report.contains( 'AL    pom.xml' );
diff --git a/apache-rat-plugin/src/test/invoker/settings.xml b/apache-rat-plugin/src/it/settings.xml
similarity index 100%
rename from apache-rat-plugin/src/test/invoker/settings.xml
rename to apache-rat-plugin/src/it/settings.xml
diff --git a/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java b/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
index aa1700e..ea70eba 100644
--- a/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
+++ b/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
@@ -51,458 +51,457 @@
  * Abstract base class for Mojos, which are running Rat.
  */
 public abstract class AbstractRatMojo extends AbstractMojo {
-	/**
-	 * The Maven specific default excludes.
-	 */
-	static final List<String> MAVEN_DEFAULT_EXCLUDES = Collections
-			.unmodifiableList(Arrays.asList("target/**/*", //
-					"cobertura.ser", //
-					"release.properties", //
-					"pom.xml.releaseBackup"));
-
-	/**
-	 * The Eclipse specific default excludes.
-	 */
-	static final List<String> ECLIPSE_DEFAULT_EXCLUDES = Collections
-			.unmodifiableList(Arrays.asList(".classpath",//
-					".project", //
-					".settings/**/*"));
-
-	/**
-	 * The IDEA specific default excludes.
-	 */
-	static final List<String> IDEA_DEFAULT_EXCLUDES = Collections
-			.unmodifiableList(Arrays.asList(//
-					"*.iml", //
-					"*.ipr", //
-					"*.iws", //
-					".idea/**/*"));
-
-	/**
-	 * The base directory, in which to search for files.
-	 *
-	 */
-	@Parameter(property = "rat.basedir", defaultValue = "${basedir}", required = true)
-	protected File basedir;
-
-	/**
-	 * Specifies the licenses to accept. Deprecated, use {@link #licenses}
-	 * instead.
-	 *
-	 * @deprecated Use {@link #licenses} instead.
-	 */
-	@Deprecated
-	@Parameter
-	private HeaderMatcherSpecification[] licenseMatchers;
-
-	/**
-	 * Specifies the licenses to accept. By default, these are added to the
-	 * default licenses, unless you set {@link #addDefaultLicenseMatchers} to
-	 * true.
-	 *
-	 * @since 0.8
-	 */
-	@Parameter
-	private IHeaderMatcher[] licenses;
-
-	/**
-	 * The set of approved license family names.
-	 * 
-	 * @deprecated Use {@link #licenseFamilies} instead.
-	 */
-	@Deprecated
-	private LicenseFamilySpecification[] licenseFamilyNames;
-
-	/**
-	 * Specifies the license families to accept.
-	 *
-	 * @since 0.8
-	 */
-	@Parameter
-	private ILicenseFamily[] licenseFamilies;
-
-	/**
-	 * Whether to add the default list of license matchers.
-	 *
-	 */
-	@Parameter(property = "rat.addDefaultLicenseMatchers", defaultValue = "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. The default
-	 * excludes are:
-	 * <ul>
-	 * <li>meta data files for version control systems</li>
-	 * <li>temporary files used by Maven, see <a
-	 * href="#useMavenDefaultExcludes">useMavenDefaultExcludes</a></li>
-	 * <li>configuration files for Eclipse, see <a
-	 * href="#useEclipseDefaultExcludes">useEclipseDefaultExcludes</a></li>
-	 * <li>configuration files for IDEA, see <a
-	 * href="#useIdeaDefaultExcludes">useIdeaDefaultExcludes</a></li>
-	 * </ul>
-	 */
-	@Parameter(property = "rat.useDefaultExcludes", defaultValue = "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 <code>target</code> directory, the
-	 * <code>cobertura.ser</code> file, and so on.
-	 */
-	@Parameter(property = "rat.useMavenDefaultExcludes", defaultValue = "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 <code>.classpath</code> and
-	 * <code>.project</code> files, the <code>.settings</code> directory, and so
-	 * on.
-	 */
-	@Parameter(property = "rat.useEclipseDefaultExcludes", defaultValue = "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 <code>*.iml</code>, <code>*.ipr</code> and
-	 * <code>*.iws</code> files and the <code>.idea</code> directory.
-	 */
-	@Parameter(property = "rat.useIdeaDefaultExcludes", defaultValue = "true")
-	private boolean useIdeaDefaultExcludes;
-
-	/**
-	 * Whether to exclude subprojects. This is recommended, if you want a
-	 * separate apache-rat-plugin report for each subproject.
-	 *
-	 */
-	@Parameter(property = "rat.excludeSubprojects", defaultValue = "true")
-	private boolean excludeSubProjects;
-
-	/**
-     * 
+    /**
+     * The Maven specific default excludes.
      */
-	@Parameter(name = "project", readonly = true)
-	private MavenProject project;
+    static final List<String> MAVEN_DEFAULT_EXCLUDES = Collections
+            .unmodifiableList(Arrays.asList("target/**/*", //
+                    "cobertura.ser", //
+                    "release.properties", //
+                    "pom.xml.releaseBackup"));
 
-	/**
-	 * @return Returns the Maven project.
-	 */
-	protected MavenProject getProject() {
-		return project;
-	}
+    /**
+     * The Eclipse specific default excludes.
+     */
+    static final List<String> ECLIPSE_DEFAULT_EXCLUDES = Collections
+            .unmodifiableList(Arrays.asList(".classpath",//
+                    ".project", //
+                    ".settings/**/*"));
 
-	/**
-	 * 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<IHeaderMatcher> list = new ArrayList<IHeaderMatcher>();
-		if (licenses != null) {
-			list.addAll(Arrays.asList(licenses));
-		}
+    /**
+     * The IDEA specific default excludes.
+     */
+    static final List<String> IDEA_DEFAULT_EXCLUDES = Collections
+            .unmodifiableList(Arrays.asList(//
+                    "*.iml", //
+                    "*.ipr", //
+                    "*.iws", //
+                    ".idea/**/*"));
 
-		if (licenseMatchers != null) {
-			for (final HeaderMatcherSpecification spec : licenseMatchers) {
-				final String className = spec.getClassName();
-				final IHeaderMatcher headerMatcher = newInstance(
-						IHeaderMatcher.class, className);
-				list.add(headerMatcher);
-			}
-		}
+    /**
+     * The base directory, in which to search for files.
+     *
+     */
+    @Parameter(property = "rat.basedir", defaultValue = "${basedir}", required = true)
+    private File basedir;
 
-		if (addDefaultLicenseMatchers) {
-			list.addAll(Arrays.asList(Defaults.DEFAULT_MATCHERS));
-		}
-		return list.toArray(new IHeaderMatcher[list.size()]);
-	}
+    /**
+     * Specifies the licenses to accept. Deprecated, use {@link #licenses}
+     * instead.
+     *
+     * @deprecated Use {@link #licenses} instead.
+     */
+    @Deprecated
+    @Parameter
+    private HeaderMatcherSpecification[] licenseMatchers;
 
-	private <T> T newInstance(final Class<T> clazz, final String className)
-			throws MojoExecutionException, MojoFailureException {
-		try {
-			final ClassLoader cl = Thread.currentThread()
-					.getContextClassLoader();
-			@SuppressWarnings("unchecked")
-			// incorrect cast will be caught below
-			final T o = (T) cl.loadClass(className).newInstance();
+    /**
+     * Specifies the licenses to accept. By default, these are added to the
+     * default licenses, unless you set {@link #addDefaultLicenseMatchers} to
+     * true.
+     *
+     * @since 0.8
+     */
+    @Parameter
+    private IHeaderMatcher[] licenses;
 
-			if (!clazz.isAssignableFrom(o.getClass())) {
-				throw new MojoFailureException("The class "
-						+ o.getClass().getName() + " does not implement "
-						+ clazz.getName());
-			}
-			return o;
-		} 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);
-		}
-	}
+    /**
+     * The set of approved license family names.
+     *
+     * @deprecated Use {@link #licenseFamilies} instead.
+     */
+    @Deprecated
+    private LicenseFamilySpecification[] licenseFamilyNames;
 
-	/**
-	 * 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 static void add(List<String> pList, String[] pArray) {
-		if (pArray != null) {
-			Collections.addAll(pList, pArray);
-		}
-	}
+    /**
+     * Specifies the license families to accept.
+     *
+     * @since 0.8
+     */
+    @Parameter
+    private ILicenseFamily[] licenseFamilies;
 
-	/**
-	 * Creates an iterator over the files to check.
-	 *
-	 * @return A container of files, which are being checked.
-	 */
-	protected IReportable getResources() {
-		final DirectoryScanner ds = new DirectoryScanner();
-		ds.setBasedir(basedir);
-		setExcludes(ds);
-		setIncludes(ds);
-		ds.scan();
-		whenDebuggingLogExcludedFiles(ds);
-		final String[] files = ds.getIncludedFiles();
-		logAboutIncludedFiles(files);
-		try {
-			return new FilesReportable(basedir, files);
-		} catch (IOException e) {
-			throw new UndeclaredThrowableException(e);
-		}
-	}
+    /**
+     * Whether to add the default list of license matchers.
+     *
+     */
+    @Parameter(property = "rat.addDefaultLicenseMatchers", defaultValue = "true")
+    private boolean addDefaultLicenseMatchers;
 
-	private void logAboutIncludedFiles(final String[] files) {
-		if (files.length == 0) {
-			getLog().warn("No resources included.");
-		} else {
-			getLog().info(
-					files.length
-							+ " resources included (use -debug for more details)");
-			if (getLog().isDebugEnabled()) {
-				for (String resource : files) {
-					getLog().debug(" - included " + resource);
-				}
-			}
-		}
-	}
+    /**
+     * Specifies files, which are included in the report. By default, all files
+     * are included.
+     *
+     */
+    @Parameter
+    private String[] includes;
 
-	private void whenDebuggingLogExcludedFiles(final DirectoryScanner ds) {
-		if (getLog().isDebugEnabled()) {
-			final String[] excludedFiles = ds.getExcludedFiles();
-			if (excludedFiles.length == 0) {
-				getLog().debug("No excluded resources.");
-			} else {
-				getLog().debug(
-						"Excluded " + excludedFiles.length + " resources:");
-				for (final String resource : excludedFiles) {
-					getLog().debug(" - excluded " + resource);
-				}
-			}
-		}
-	}
+    /**
+     * Specifies files, which are excluded in the report. By default, no files
+     * are excluded.
+     *
+     */
+    @Parameter
+    private String[] excludes;
 
-	private void setIncludes(DirectoryScanner ds) {
-		if (includes != null) {
-			ds.setIncludes(includes);
-		}
-	}
+    /**
+     * Whether to use the default excludes when scanning for files. The default
+     * excludes are:
+     * <ul>
+     * <li>meta data files for version control systems</li>
+     * <li>temporary files used by Maven, see <a
+     * href="#useMavenDefaultExcludes">useMavenDefaultExcludes</a></li>
+     * <li>configuration files for Eclipse, see <a
+     * href="#useEclipseDefaultExcludes">useEclipseDefaultExcludes</a></li>
+     * <li>configuration files for IDEA, see <a
+     * href="#useIdeaDefaultExcludes">useIdeaDefaultExcludes</a></li>
+     * </ul>
+     */
+    @Parameter(property = "rat.useDefaultExcludes", defaultValue = "true")
+    private boolean useDefaultExcludes;
 
-	private void setExcludes(DirectoryScanner ds) {
-		final List<String> excludeList = buildDefaultExclusions();
-		if (excludes == null || excludes.length == 0) {
-			getLog().info("No excludes explicitly specified.");
-		} else {
-			for (String exclude : excludes) {
-				getLog().info("Exclude: " + exclude);
-			}
-		}
-		add(excludeList, excludes);
-		if (!excludeList.isEmpty()) {
-			String[] allExcludes = excludeList.toArray(new String[excludeList
-					.size()]);
-			ds.setExcludes(allExcludes);
-		}
-	}
+    /**
+     * 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 <code>target</code> directory, the
+     * <code>cobertura.ser</code> file, and so on.
+     */
+    @Parameter(property = "rat.useMavenDefaultExcludes", defaultValue = "true")
+    private boolean useMavenDefaultExcludes;
 
-	private List<String> buildDefaultExclusions() {
-		final List<String> results = new ArrayList<String>();
+    /**
+     * 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 <code>.classpath</code> and
+     * <code>.project</code> files, the <code>.settings</code> directory, and so
+     * on.
+     */
+    @Parameter(property = "rat.useEclipseDefaultExcludes", defaultValue = "true")
+    private boolean useEclipseDefaultExcludes;
 
-		addPlexusDefaults(results);
+    /**
+     * 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 <code>*.iml</code>, <code>*.ipr</code> and
+     * <code>*.iws</code> files and the <code>.idea</code> directory.
+     */
+    @Parameter(property = "rat.useIdeaDefaultExcludes", defaultValue = "true")
+    private boolean useIdeaDefaultExcludes;
 
-		addMavenDefaults(results);
+    /**
+     * Whether to exclude subprojects. This is recommended, if you want a
+     * separate apache-rat-plugin report for each subproject.
+     *
+     */
+    @Parameter(property = "rat.excludeSubprojects", defaultValue = "true")
+    private boolean excludeSubProjects;
 
-		addEclipseDefaults(results);
+    /**
+    * Holds the maven-internal project to allow resolution of artifact properties during mojo runs.
+    */
+    @Parameter(defaultValue = "${project}", required = true, readonly = true)
+    private MavenProject project;
 
-		addIdeaDefaults(results);
+    /**
+     * @return Returns the Maven project.
+     */
+    protected MavenProject getProject() {
+        return project;
+    }
 
-		if (excludeSubProjects && project != null
-				&& project.getModules() != null) {
-			for (Object o : project.getModules()) {
-				String moduleSubPath = (String) o;
-				results.add(moduleSubPath + "/**/*");
-			}
-		}
+    /**
+     * 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<IHeaderMatcher> list = new ArrayList<IHeaderMatcher>();
+        if (licenses != null) {
+            list.addAll(Arrays.asList(licenses));
+        }
 
-		getLog().debug("Finished creating list of implicit excludes.");
-		if (results.isEmpty()) {
-			getLog().info("No excludes implicitly specified.");
-		} else {
-			getLog().info(
-					results.size()
-							+ " implicit excludes (use -debug for more details).");
-			for (final String exclude : results) {
-				getLog().debug("Implicit exclude: " + exclude);
-			}
-		}
+        if (licenseMatchers != null) {
+            for (final HeaderMatcherSpecification spec : licenseMatchers) {
+                final String className = spec.getClassName();
+                final IHeaderMatcher headerMatcher = newInstance(
+                        IHeaderMatcher.class, className);
+                list.add(headerMatcher);
+            }
+        }
 
-		return results;
-	}
+        if (addDefaultLicenseMatchers) {
+            list.addAll(Arrays.asList(Defaults.DEFAULT_MATCHERS));
+        }
+        return list.toArray(new IHeaderMatcher[list.size()]);
+    }
 
-	private void addPlexusDefaults(final List<String> excludeList1) {
-		if (useDefaultExcludes) {
-			getLog().debug("Adding plexus default exclusions...");
-			Collections.addAll(excludeList1, DirectoryScanner.DEFAULTEXCLUDES);
-		} else {
-			getLog().debug(
-					"rat.useDefaultExcludes set to false. "
-							+ "Plexus default exclusions will not be added");
-		}
-	}
+    private <T> T newInstance(final Class<T> clazz, final String className)
+            throws MojoExecutionException, MojoFailureException {
+        try {
+            final ClassLoader cl = Thread.currentThread()
+                    .getContextClassLoader();
+            @SuppressWarnings("unchecked") // incorrect cast will be caught below
+            final T o = (T) cl.loadClass(className).newInstance();
 
-	private void addMavenDefaults(final List<String> excludeList1) {
-		if (useMavenDefaultExcludes) {
-			getLog().debug(
-					"Adding exclusions often needed by Maven projects...");
-			excludeList1.addAll(MAVEN_DEFAULT_EXCLUDES);
-		} else {
-			getLog().debug(
-					"rat.useMavenDefaultExcludes set to false. "
-							+ "Exclusions often needed by Maven projects will not be added.");
-		}
-	}
+            if (!clazz.isAssignableFrom(o.getClass())) {
+                throw new MojoFailureException("The class "
+                        + o.getClass().getName() + " does not implement "
+                        + clazz.getName());
+            }
+            return o;
+        } 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);
+        }
+    }
 
-	private void addEclipseDefaults(final List<String> excludeList1) {
-		if (useEclipseDefaultExcludes) {
-			getLog().debug(
-					"Adding exclusions often needed by projects "
-							+ "developed in Eclipse...");
-			excludeList1.addAll(ECLIPSE_DEFAULT_EXCLUDES);
-		} else {
-			getLog().debug(
-					"rat.useEclipseDefaultExcludes set to false. "
-							+ "Exclusions often needed by projects developed in "
-							+ "Eclipse will not be added.");
-		}
-	}
+    /**
+     * 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 static void add(List<String> pList, String[] pArray) {
+        if (pArray != null) {
+            Collections.addAll(pList, pArray);
+        }
+    }
 
-	private void addIdeaDefaults(final List<String> excludeList1) {
-		if (useIdeaDefaultExcludes) {
-			getLog().debug(
-					"Adding exclusions often needed by projects "
-							+ "developed in IDEA...");
-			excludeList1.addAll(IDEA_DEFAULT_EXCLUDES);
-		} else {
-			getLog().debug(
-					"rat.useIdeaDefaultExcludes set to false. "
-							+ "Exclusions often needed by projects developed in "
-							+ "IDEA will not be added.");
-		}
-	}
+    /**
+     * Creates an iterator over the files to check.
+     *
+     * @return A container of files, which are being checked.
+     */
+    protected IReportable getResources() {
+        final DirectoryScanner ds = new DirectoryScanner();
+        ds.setBasedir(basedir);
+        setExcludes(ds);
+        setIncludes(ds);
+        ds.scan();
+        whenDebuggingLogExcludedFiles(ds);
+        final String[] files = ds.getIncludedFiles();
+        logAboutIncludedFiles(files);
+        try {
+            return new FilesReportable(basedir, files);
+        } catch (IOException e) {
+            throw new UndeclaredThrowableException(e);
+        }
+    }
 
-	/**
-	 * 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, or <code>null</code> for raw XML
-	 * 
-	 * @return the current statistic.
-	 * 
-	 * @throws MojoFailureException
-	 *             An error in the plugin configuration was detected.
-	 * @throws MojoExecutionException
-	 *             Another error occurred while creating the report.
-	 */
-	protected ClaimStatistic createReport(Writer out, InputStream style)
-			throws MojoExecutionException, MojoFailureException {
-		final ReportConfiguration configuration = getConfiguration();
-		try {
-			if (style != null) {
-				return Report.report(out, getResources(), style, configuration);
-			} else {
-				return Report.report(getResources(), out, configuration);
-			}
-		} 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 (RatException e) {
-			throw new MojoExecutionException(e.getMessage(), e);
-		}
-	}
+    private void logAboutIncludedFiles(final String[] files) {
+        if (files.length == 0) {
+            getLog().warn("No resources included.");
+        } else {
+            getLog().info(
+                    files.length
+                            + " resources included (use -debug for more details)");
+            if (getLog().isDebugEnabled()) {
+                for (String resource : files) {
+                    getLog().debug(" - included " + resource);
+                }
+            }
+        }
+    }
 
-	protected ReportConfiguration getConfiguration()
-			throws MojoFailureException, MojoExecutionException {
-		final ReportConfiguration configuration = new ReportConfiguration();
-		configuration.setHeaderMatcher(new HeaderMatcherMultiplexer(
-				getLicenseMatchers()));
-		configuration.setApprovedLicenseNames(getApprovedLicenseNames());
-		return configuration;
-	}
+    private void whenDebuggingLogExcludedFiles(final DirectoryScanner ds) {
+        if (getLog().isDebugEnabled()) {
+            final String[] excludedFiles = ds.getExcludedFiles();
+            if (excludedFiles.length == 0) {
+                getLog().debug("No excluded resources.");
+            } else {
+                getLog().debug(
+                        "Excluded " + excludedFiles.length + " resources:");
+                for (final String resource : excludedFiles) {
+                    getLog().debug(" - excluded " + resource);
+                }
+            }
+        }
+    }
 
-	private ILicenseFamily[] getApprovedLicenseNames()
-			throws MojoExecutionException, MojoFailureException {
-		final List<ILicenseFamily> list = new ArrayList<ILicenseFamily>();
-		if (licenseFamilies != null) {
-			list.addAll(Arrays.asList(licenseFamilies));
-		}
-		if (licenseFamilyNames != null) {
-			for (LicenseFamilySpecification spec : licenseFamilyNames) {
-				list.add(newInstance(ILicenseFamily.class, spec.getClassName()));
-			}
-		}
+    private void setIncludes(DirectoryScanner ds) {
+        if (includes != null) {
+            ds.setIncludes(includes);
+        }
+    }
 
-		if (list.isEmpty()) {
-			return null;
-		}
-		return list.toArray(new ILicenseFamily[list.size()]);
-	}
+    private void setExcludes(DirectoryScanner ds) {
+        final List<String> excludeList = buildDefaultExclusions();
+        if (excludes == null || excludes.length == 0) {
+            getLog().info("No excludes explicitly specified.");
+        } else {
+            for (String exclude : excludes) {
+                getLog().info("Exclude: " + exclude);
+            }
+        }
+        add(excludeList, excludes);
+        if (!excludeList.isEmpty()) {
+            String[] allExcludes = excludeList.toArray(new String[excludeList
+                    .size()]);
+            ds.setExcludes(allExcludes);
+        }
+    }
+
+    private List<String> buildDefaultExclusions() {
+        final List<String> results = new ArrayList<String>();
+
+        addPlexusDefaults(results);
+
+        addMavenDefaults(results);
+
+        addEclipseDefaults(results);
+
+        addIdeaDefaults(results);
+
+        if (excludeSubProjects && project != null
+                && project.getModules() != null) {
+            for (Object o : project.getModules()) {
+                String moduleSubPath = (String) o;
+                results.add(moduleSubPath + "/**/*");
+            }
+        }
+
+        getLog().debug("Finished creating list of implicit excludes.");
+        if (results.isEmpty()) {
+            getLog().info("No excludes implicitly specified.");
+        } else {
+            getLog().info(
+                    results.size()
+                            + " implicit excludes (use -debug for more details).");
+            for (final String exclude : results) {
+                getLog().debug("Implicit exclude: " + exclude);
+            }
+        }
+
+        return results;
+    }
+
+    private void addPlexusDefaults(final List<String> excludeList1) {
+        if (useDefaultExcludes) {
+            getLog().debug("Adding plexus default exclusions...");
+            Collections.addAll(excludeList1, DirectoryScanner.DEFAULTEXCLUDES);
+        } else {
+            getLog().debug(
+                    "rat.useDefaultExcludes set to false. "
+                            + "Plexus default exclusions will not be added");
+        }
+    }
+
+    private void addMavenDefaults(final List<String> excludeList1) {
+        if (useMavenDefaultExcludes) {
+            getLog().debug(
+                    "Adding exclusions often needed by Maven projects...");
+            excludeList1.addAll(MAVEN_DEFAULT_EXCLUDES);
+        } else {
+            getLog().debug(
+                    "rat.useMavenDefaultExcludes set to false. "
+                            + "Exclusions often needed by Maven projects will not be added.");
+        }
+    }
+
+    private void addEclipseDefaults(final List<String> excludeList1) {
+        if (useEclipseDefaultExcludes) {
+            getLog().debug(
+                    "Adding exclusions often needed by projects "
+                            + "developed in Eclipse...");
+            excludeList1.addAll(ECLIPSE_DEFAULT_EXCLUDES);
+        } else {
+            getLog().debug(
+                    "rat.useEclipseDefaultExcludes set to false. "
+                            + "Exclusions often needed by projects developed in "
+                            + "Eclipse will not be added.");
+        }
+    }
+
+    private void addIdeaDefaults(final List<String> excludeList1) {
+        if (useIdeaDefaultExcludes) {
+            getLog().debug(
+                    "Adding exclusions often needed by projects "
+                            + "developed in IDEA...");
+            excludeList1.addAll(IDEA_DEFAULT_EXCLUDES);
+        } else {
+            getLog().debug(
+                    "rat.useIdeaDefaultExcludes set to false. "
+                            + "Exclusions often needed by projects developed in "
+                            + "IDEA will not be added.");
+        }
+    }
+
+    /**
+     * 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, or <code>null</code> for raw XML
+     *
+     * @return the current statistic.
+     *
+     * @throws MojoFailureException
+     *             An error in the plugin configuration was detected.
+     * @throws MojoExecutionException
+     *             Another error occurred while creating the report.
+     */
+    protected ClaimStatistic createReport(Writer out, InputStream style)
+            throws MojoExecutionException, MojoFailureException {
+        final ReportConfiguration configuration = getConfiguration();
+        try {
+            if (style != null) {
+                return Report.report(out, getResources(), style, configuration);
+            } else {
+                return Report.report(getResources(), out, configuration);
+            }
+        } 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 (RatException e) {
+            throw new MojoExecutionException(e.getMessage(), e);
+        }
+    }
+
+    protected ReportConfiguration getConfiguration()
+            throws MojoFailureException, MojoExecutionException {
+        final ReportConfiguration configuration = new ReportConfiguration();
+        configuration.setHeaderMatcher(new HeaderMatcherMultiplexer(
+                getLicenseMatchers()));
+        configuration.setApprovedLicenseNames(getApprovedLicenseNames());
+        return configuration;
+    }
+
+    private ILicenseFamily[] getApprovedLicenseNames()
+            throws MojoExecutionException, MojoFailureException {
+        final List<ILicenseFamily> list = new ArrayList<ILicenseFamily>();
+        if (licenseFamilies != null) {
+            list.addAll(Arrays.asList(licenseFamilies));
+        }
+        if (licenseFamilyNames != null) {
+            for (LicenseFamilySpecification spec : licenseFamilyNames) {
+                list.add(newInstance(ILicenseFamily.class, spec.getClassName()));
+            }
+        }
+
+        if (list.isEmpty()) {
+            return null;
+        }
+        return list.toArray(new ILicenseFamily[list.size()]);
+    }
 }
diff --git a/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java b/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
index d450079..df5cee6 100644
--- a/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
+++ b/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
@@ -168,11 +168,11 @@
      */
     public void execute() throws MojoExecutionException, MojoFailureException
     {
-    	if(skip) {
-    		getLog().info("RAT will not execute since it is configured to be skipped via system property 'rat.skip'.");
-    		return;
-    	}
-    	
+        if(skip) {
+            getLog().info("RAT will not execute since it is configured to be skipped via system property 'rat.skip'.");
+            return;
+        }
+
         final File parent = reportFile.getParentFile();
         if(!parent.mkdirs() && !parent.isDirectory()) {
             throw new MojoExecutionException("Could not create report parent directory " + parent);
diff --git a/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java b/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java
index ecd9a24..a738ab0 100644
--- a/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java
+++ b/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java
@@ -19,6 +19,18 @@
  * 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;
@@ -46,24 +58,11 @@
 import org.apache.rat.Defaults;
 import org.codehaus.doxia.sink.Sink;
 
-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;
-
 
 /**
  * Generates a report with Rat's output.
  */
-// MavenReport.java induces the deprecated Sink implementation
-@SuppressWarnings("deprecation")
+@SuppressWarnings("deprecation") // MavenReport invokes the deprecated Sink implementation
 @Mojo(name = "rat", requiresDependencyResolution = ResolutionScope.TEST)
 public class RatReportMojo extends AbstractRatMojo implements MavenReport
 {
@@ -75,8 +74,8 @@
 
     @Component
     private ArtifactResolver resolver;
-	
-	/**
+
+    /**
      * Specifies the directory where the report will be generated
      */
     @Parameter(defaultValue = "${project.reporting.outputDirectory}", required = true)
@@ -87,7 +86,7 @@
 
     /**
      * Returns the skins artifact file.
-     * 
+     *
      * @throws MojoFailureException
      *             An error in the plugin configuration was detected.
      * @throws MojoExecutionException
@@ -131,7 +130,7 @@
 
     /**
      * 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
@@ -186,7 +185,7 @@
 
     /**
      * Called from Maven to invoke the plugin.
-     * 
+     *
      * @throws MojoFailureException
      *             An error in the plugin configuration was detected.
      * @throws MojoExecutionException
@@ -237,7 +236,7 @@
 
     /**
      * Returns, whether the report may be generated.
-     * 
+     *
      * @return Always true.
      */
     public boolean canGenerateReport()
@@ -247,7 +246,7 @@
 
     /**
      * Searches for a Rat artifact in the dependency list and returns its version.
-     * 
+     *
      * @return Version number, if found, or null.
      */
     private String getRatVersion()
@@ -266,8 +265,8 @@
 
     /**
      * Writes the report to the Doxia sink.
-     * 
-     * 
+     *
+     *
      * @param sink
      *            The doxia sink, kind of a SAX handler.
      * @param locale
@@ -327,7 +326,7 @@
 
     /**
      * Returns the reports category name.
-     * 
+     *
      * @return {@link MavenReport#CATEGORY_PROJECT_REPORTS}
      */
     public String getCategoryName()
@@ -337,7 +336,7 @@
 
     /**
      * Returns the reports bundle
-     * 
+     *
      * @param locale
      *            Requested locale of the bundle
      * @return The bundle, which is used to read localized strings.
@@ -349,7 +348,7 @@
 
     /**
      * 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.
@@ -361,7 +360,7 @@
 
     /**
      * 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.
@@ -373,7 +372,7 @@
 
     /**
      * Returns the reports file name.
-     * 
+     *
      * @return "rat-report"
      */
     public String getOutputName()
@@ -383,7 +382,7 @@
 
     /**
      * Returns the reports output directory.
-     * 
+     *
      * @return Value of the "outputDirectory" parameter.
      */
     public File getReportOutputDirectory()
@@ -393,7 +392,7 @@
 
     /**
      * Returns, whether this is an external report.
-     * 
+     *
      * @return Always false.
      */
     public boolean isExternalReport()
@@ -403,7 +402,7 @@
 
     /**
      * Sets the reports output directory.
-     * 
+     *
      * @param pOutputDirectory
      *            Reports target directory.
      */
diff --git a/apache-rat-plugin/src/test/java/org/apache/rat/mp/AbstractRatMojoTest.java b/apache-rat-plugin/src/test/java/org/apache/rat/mp/AbstractRatMojoTest.java
index f66ccf9..0e66d07 100644
--- a/apache-rat-plugin/src/test/java/org/apache/rat/mp/AbstractRatMojoTest.java
+++ b/apache-rat-plugin/src/test/java/org/apache/rat/mp/AbstractRatMojoTest.java
@@ -23,11 +23,11 @@
 
 public class AbstractRatMojoTest {
 
-	@Test
-	public void testAmountOfExclusions() {
-		assertEquals("Did you change the amount of eclipse excludes?", 3, AbstractRatMojo.ECLIPSE_DEFAULT_EXCLUDES.size());
-		assertEquals("Did you change the amount of idea excludes?", 4, AbstractRatMojo.IDEA_DEFAULT_EXCLUDES.size());
-		assertEquals("Did you change the amount of mvn excludes?", 4, AbstractRatMojo.MAVEN_DEFAULT_EXCLUDES.size());
-	}
+    @Test
+    public void testNumberOfExclusions() {
+        assertEquals("Did you change the number of eclipse excludes?", 3, AbstractRatMojo.ECLIPSE_DEFAULT_EXCLUDES.size());
+        assertEquals("Did you change the number of idea excludes?", 4, AbstractRatMojo.IDEA_DEFAULT_EXCLUDES.size());
+        assertEquals("Did you change the number of mvn excludes?", 4, AbstractRatMojo.MAVEN_DEFAULT_EXCLUDES.size());
+    }
 
 }
diff --git a/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java b/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java
index bd28328..1638c90 100644
--- a/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java
+++ b/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatCheckMojoTest.java
@@ -17,353 +17,152 @@
  * limitations under the License.
  */
 
+import static org.apache.rat.mp.RatTestHelpers.ensureRatReportIsCorrect;
+import static org.apache.rat.mp.RatTestHelpers.getSourceDirectory;
+import static org.apache.rat.mp.RatTestHelpers.newArtifactFactory;
+import static org.apache.rat.mp.RatTestHelpers.newArtifactRepository;
+import static org.apache.rat.mp.RatTestHelpers.newArtifactResolver;
+import static org.apache.rat.mp.RatTestHelpers.newSiteRenderer;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
 
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.factory.DefaultArtifactFactory;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.resolver.ArtifactResolver;
-import org.apache.maven.artifact.resolver.DefaultArtifactResolver;
-import org.apache.maven.doxia.siterenderer.Renderer;
 import org.apache.maven.model.Build;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-import org.apache.maven.settings.Settings;
-import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
-import org.apache.rat.mp.AbstractRatMojo;
-import org.apache.rat.mp.RatCheckException;
-import org.apache.rat.mp.RatCheckMojo;
-import org.apache.rat.mp.RatReportMojo;
-import org.codehaus.plexus.util.DirectoryScanner;
-
 
 /**
- * Test case for the {@link RatCheckMojo}.
+ * Test case for the {@link RatCheckMojo} and {@link RatReportMojo}.
  */
-public class RatCheckMojoTest extends AbstractMojoTestCase
-{
-    /**
-     * Creates a new instance of {@link Renderer}.
-     * @return A configured instance of {@link DefaultRenderer}.
-     * @throws Exception Creating the object failed.
-     */
-    private Renderer newSiteRenderer()
-            throws Exception
-    {
-        return (Renderer) container.lookup( Renderer.ROLE, "default" );
-    }
-
-    /**
-     * Creates a new instance of {@link ArtifactFactory}.
-     * @return A configured instance of {@link DefaultArtifactFactory}.
-     * @throws Exception Creating the object failed.
-     */
-    private ArtifactFactory newArtifactFactory()
-            throws Exception
-    {
-        final InvocationHandler handler = new InvocationHandler(){
-            public Object invoke( Object pProxy, Method pMethod, Object[] pArgs )
-                throws Throwable
-            {
-                System.out.println("Invoking method " + pMethod);
-                throw new IllegalStateException( "Not implemented" );
-            }
-        };
-        return (ArtifactFactory)
-            Proxy.newProxyInstance( Thread.currentThread().getContextClassLoader(),
-                                    new Class[]{ ArtifactFactory.class },
-                                    handler );
-    }
-
-    /**
-     * Creates a new instance of {@link ArtifactResolver}.
-     * @return A configured instance of {@link DefaultArtifactResolver}.
-     * @throws Exception Creating the object failed.
-     */
-    private ArtifactResolver newArtifactResolver()
-            throws Exception
-    {
-        final InvocationHandler handler = new InvocationHandler(){
-            public Object invoke( Object pProxy, Method pMethod, Object[] pArgs )
-                throws Throwable
-            {
-                System.out.println("Invoking method " + pMethod);
-                throw new IllegalStateException( "Not implemented" );
-            }
-        };
-        return (ArtifactResolver)
-            Proxy.newProxyInstance( Thread.currentThread().getContextClassLoader(),
-                                    new Class[]{ ArtifactResolver.class },
-                                    handler );
-    }
-
-    /**
-     * Creates an instance of {@link ArtifactRepository}.
-     * @return A configured instance of {@link DefaultArtifactRepository}.
-     * @throws Exception Creating the object failed.
-     */
-    private ArtifactRepository newArtifactRepository()
-            throws Exception
-    {
-        File m2Dir = new File( System.getProperty( "user.home" ), ".m2" );
-        File settingsFile = new File( m2Dir, "settings.xml" );
-        String localRepo = null;
-        if ( settingsFile.exists() )
-        {
-            Settings settings = new SettingsXpp3Reader().read( new FileReader( settingsFile ) );
-            localRepo = settings.getLocalRepository();
-        }
-        if ( localRepo == null )
-        {
-            localRepo = System.getProperty( "user.home" ) + "/.m2/repository";
-        }
-        ArtifactRepositoryLayout repositoryLayout =
-            (ArtifactRepositoryLayout) container.lookup(ArtifactRepositoryLayout.ROLE, "default" );
-        return new DefaultArtifactRepository( "local", "file://" + localRepo, repositoryLayout );
-    }
+public class RatCheckMojoTest extends AbstractMojoTestCase {
 
     /**
      * Creates a new instance of {@link RatCheckMojo}.
-     * @param pDir The directory, where to look for a pom.xml file.
+     *
+     * @param pDir
+     *            The directory, where to look for a pom.xml file.
      * @return The configured Mojo.
-     * @throws Exception An error occurred while creating the Mojo.
+     * @throws Exception
+     *             An error occurred while creating the Mojo.
      */
-    private RatCheckMojo newRatCheckMojo( String pDir )
-            throws Exception
-    {
-        return (RatCheckMojo) newRatMojo( pDir, "check", false );
+    private RatCheckMojo newRatCheckMojo(String pDir) throws Exception {
+        return (RatCheckMojo) newRatMojo(pDir, "check", false);
     }
 
     /**
      * Creates a new instance of {@link AbstractRatMojo}.
-     * @param pDir The directory, where to look for a pom.xml file.
-     * @param pGoal The goal, which the Mojo must implement.
+     *
+     * @param pDir
+     *            The directory, where to look for a pom.xml file.
+     * @param pGoal
+     *            The goal, which the Mojo must implement.
      * @return The configured Mojo.
-     * @throws Exception An error occurred while creating the Mojo.
+     * @throws Exception
+     *             An error occurred while creating the Mojo.
      */
-    private AbstractRatMojo newRatMojo( String pDir, String pGoal, boolean pCreateCopy )
-            throws Exception
-    {
-        final File baseDir = new File( getBasedir() );
-        final File testBaseDir = getSourceDirectory(pDir, pCreateCopy, baseDir);
-        File testPom = new File( testBaseDir, "pom.xml" );
-        AbstractRatMojo mojo = (AbstractRatMojo) lookupMojo( pGoal, testPom );
-        assertNotNull( mojo );
-        final File buildDirectory = new File( new File( baseDir, "target/test" ), pDir );
-        setVariableValueToObject( mojo, "basedir", testBaseDir );
-        setVariableValueToObject( mojo, "addDefaultLicenseMatchers", Boolean.TRUE );
-        setVariableValueToObject( mojo, "useDefaultExcludes", Boolean.TRUE );
-        setVariableValueToObject( mojo, "useMavenDefaultExcludes", Boolean.TRUE );
-        setVariableValueToObject( mojo, "useEclipseDefaultExcludes", Boolean.TRUE );
-        setVariableValueToObject( mojo, "addLicenseHeaders", "false" );
+    private AbstractRatMojo newRatMojo(String pDir, String pGoal,
+            boolean pCreateCopy) throws Exception {
+        final File baseDir = new File(getBasedir());
+        final File testBaseDir = getSourceDirectory(getBasedir(), pDir,
+                pCreateCopy, baseDir);
+        File testPom = new File(testBaseDir, "pom.xml");
+        AbstractRatMojo mojo = (AbstractRatMojo) lookupMojo(pGoal, testPom);
+        assertNotNull(mojo);
+        final File buildDirectory = new File(new File(baseDir, "target/test"),
+                pDir);
+        setVariableValueToObject(mojo, "basedir", testBaseDir);
+        setVariableValueToObject(mojo, "addDefaultLicenseMatchers",
+                Boolean.TRUE);
+        setVariableValueToObject(mojo, "useDefaultExcludes", Boolean.TRUE);
+        setVariableValueToObject(mojo, "useMavenDefaultExcludes", Boolean.TRUE);
+        setVariableValueToObject(mojo, "useEclipseDefaultExcludes",
+                Boolean.TRUE);
+        setVariableValueToObject(mojo, "addLicenseHeaders", "false");
         final Build build = new Build();
-        build.setDirectory( buildDirectory.getPath() );
-        final MavenProjectStub project = new MavenProjectStub(){
+        build.setDirectory(buildDirectory.getPath());
+        final MavenProjectStub project = new MavenProjectStub() {
             @Override
-            public Build getBuild()
-            {
+            public Build getBuild() {
                 return build;
             }
         };
-        setVariableValueToObject( mojo, "project", project );
-        if (mojo instanceof RatReportMojo)
-        {
-            setVariableValueToObject( mojo, "localRepository", newArtifactRepository() );
-            setVariableValueToObject( mojo, "resolver", newArtifactResolver() );
-            setVariableValueToObject( mojo, "factory", newArtifactFactory() );
-            setVariableValueToObject( mojo, "siteRenderer", newSiteRenderer() );
-        }
-        else if ( mojo instanceof RatCheckMojo )
-        {
-            final File ratTxtFile = new File( buildDirectory, "rat.txt" );
-            setVariableValueToObject( mojo, "reportFile", ratTxtFile );
+        setVariableValueToObject(mojo, "project", project);
+        assertNotNull(
+                "Problem in test setup - you are missing a project in your mojo.",
+                project);
+        assertNotNull(
+                "The mojo is missing its MavenProject, which will result in an NPE during rat runs.",
+                mojo.getProject());
+        assertNotNull(
+                "No artifactRepos found, which will result in an NPE during rat runs.",
+                project.getRemoteArtifactRepositories());
+
+        if (mojo instanceof RatReportMojo) {
+            setVariableValueToObject(mojo, "localRepository",
+                    newArtifactRepository(container));
+            setVariableValueToObject(mojo, "resolver", newArtifactResolver());
+            setVariableValueToObject(mojo, "factory", newArtifactFactory());
+            setVariableValueToObject(mojo, "siteRenderer",
+                    newSiteRenderer(container));
+        } else if (mojo instanceof RatCheckMojo) {
+            final File ratTxtFile = new File(buildDirectory, "rat.txt");
+            setVariableValueToObject(mojo, "reportFile", ratTxtFile);
         }
         return mojo;
     }
 
-    private File getSourceDirectory(String pDir, boolean pCreateCopy,
-            final File baseDir) throws IOException {
-        return makeSourceDirectory( new File( new File( baseDir, "src/test" ), pDir ), pDir, pCreateCopy );
-    }
-
-    private void remove( File pDir ) throws IOException {
-        if ( pDir.isFile() )
-        {
-            if ( ! pDir.delete() )
-            {
-                throw new IOException( "Unable to delete file: " + pDir );
-            }
-        }
-        else if ( pDir.isDirectory() )
-        {
-            final File[] files = pDir.listFiles();
-            for (File file : files) {
-                remove(file);
-            }
-            if ( ! pDir.delete() )
-            {
-                throw new IOException( "Unable to delete directory: " + pDir );
-            }
-        }
-        else if ( pDir.exists() )
-        {
-            throw new IOException( "Unable to delete unknown object " + pDir );
-        }
-    }
-
-    private void copy( File pSource, File pTarget ) throws IOException
-    {
-        if ( pSource.isDirectory() )
-        {
-            if ( !pTarget.isDirectory()  &&  !pTarget.mkdirs() ) {
-                throw new IOException("Unable to create directory: " + pTarget);
-            }
-            final DirectoryScanner scanner = new DirectoryScanner();
-            scanner.setBasedir(pSource);
-            scanner.addDefaultExcludes();
-            scanner.setIncludes(new String[]{"*"});
-            scanner.scan();
-            final String[] dirs = scanner.getIncludedDirectories();
-
-            for (final String dir : dirs) {
-                if (!"".equals(dir)) {
-                    copy(new File(pSource, dir), new File(pTarget, dir));
-                }
-            }
-            final String[] files = scanner.getIncludedFiles();
-            for (String file : files) {
-                copy(new File(pSource, file), new File(pTarget, file));
-            }
-        }
-        else if ( pSource.isFile() )
-        {
-            final FileInputStream fis = new FileInputStream( pSource );
-            final FileOutputStream fos = new FileOutputStream( pTarget );
-            final byte[] buffer = new byte[8192];
-            for ( ;; )
-            {
-                int res = fis.read(buffer);
-                if (res == -1) {
-                    break;
-                }
-                if (res > 0) {
-                    fos.write(buffer, 0, res);
-                }
-            }
-            fos.close();
-            fis.close();
-        }
-        else
-        {
-            throw new IOException( "Unable to copy unknown object " + pSource );
-        }
-    }
-    
-    private File makeSourceDirectory(File pFile, String pDir, boolean pCreateCopy) throws IOException {
-        if ( ! pCreateCopy )
-        {
-            return pFile;
-        }
-
-        final File baseDir = new File( getBasedir() );
-        final File targetDir = new File( new File( baseDir, "target/it-source" ), pDir );
-        remove( targetDir );
-        copy( pFile, targetDir );
-        return targetDir;
-    }
-
     /**
      * Reads the location of the rat text file from the Mojo.
-     * @param pMojo The configured Mojo.
+     *
+     * @param pMojo
+     *            The configured Mojo.
      * @return Value of the "reportFile" property.
-     * @throws Exception An error occurred while reading the property.
+     * @throws Exception
+     *             An error occurred while reading the property.
      */
-    private File getRatTxtFile( RatCheckMojo pMojo )
-            throws Exception
-    {
-        return (File) getVariableValueFromObject( pMojo, "reportFile" );
+    private File getRatTxtFile(RatCheckMojo pMojo) throws Exception {
+        return (File) getVariableValueFromObject(pMojo, "reportFile");
     }
 
     /**
      * Runs a check, which should expose no problems.
-     * @throws Exception The test failed.
+     *
+     * @throws Exception
+     *             The test failed.
      */
     public void testIt1() throws Exception {
-        final RatCheckMojo mojo = newRatCheckMojo( "it1" );
+        final RatCheckMojo mojo = newRatCheckMojo("it1");
         final File ratTxtFile = getRatTxtFile(mojo);
         mojo.execute();
-        checkResult( ratTxtFile, 1, 0 );
-    }
-
-    /**
-     * Reads the created report file and verifies, whether the detected numbers
-     * are matching.
-     * @param pRatTxtFile The file to read.
-     * @param pNumALFiles The number of files with AL.
-     * @param pNumNoLicenseFiles The number of files without license.
-     * @throws IOException An error occurred while reading the file.
-     */
-    private void checkResult( File pRatTxtFile, int pNumALFiles, int pNumNoLicenseFiles )
-            throws IOException
-    {
-        assertTrue( pRatTxtFile.exists() );
-        BufferedReader reader = new BufferedReader( new FileReader( pRatTxtFile ) );
-        Integer numALFiles = null;
-        Integer numNoLicenseFiles = null;
-        for (;;)
-        {
-            String line = reader.readLine();
-            if ( line == null )
-            {
-                break;
-            }
-            int offset = line.indexOf( "Apache Licensed: " );
-            if ( offset >= 0 )
-            {
-                numALFiles = new Integer( line.substring( offset + "Apache Licensed: ".length() ).trim() );
-            }
-            offset = line.indexOf( "Unknown Licenses" );
-            if ( offset >= 0 )
-            {
-                numNoLicenseFiles = new Integer( line.substring( 0, offset ).trim() );
-            }
-        }
-        reader.close();
-        assertEquals( new Integer( pNumALFiles), numALFiles );
-        assertEquals( new Integer( pNumNoLicenseFiles ), numNoLicenseFiles );
+        ensureRatReportIsCorrect(ratTxtFile, 1, 0);
     }
 
     /**
      * Runs a check, which should detect a problem.
-     * @throws Exception The test failed.
+     *
+     * @throws Exception
+     *             The test failed.
      */
     public void testIt2() throws Exception {
-        final RatCheckMojo mojo = newRatCheckMojo( "it2" );
+        final RatCheckMojo mojo = newRatCheckMojo("it2");
         final File ratTxtFile = getRatTxtFile(mojo);
-        try
-        {
+        try {
             mojo.execute();
-            fail( "Expected RatCheckException" );
-        }
-        catch ( RatCheckException e )
-        {
+            fail("Expected RatCheckException");
+        } catch (RatCheckException e) {
             final String msg = e.getMessage();
-            final String REPORTFILE = "rat.txt"; // Default: defaultValue = "${project.build.directory}/rat.txt"
-            assertTrue("report filename was not contained in '" + msg +"'", msg.contains(REPORTFILE));
-            assertFalse("no null allowed in '" + msg +"'", (msg.toUpperCase().indexOf("NULL") > -1));
+            // default value is "${project.build.directory}/rat.txt"
+            final String REPORTFILE = "rat.txt";
+
+            assertTrue("report filename was not contained in '" + msg + "'",
+                    msg.contains(REPORTFILE));
+            assertFalse("no null allowed in '" + msg + "'", (msg.toUpperCase()
+                    .indexOf("NULL") > -1));
         }
-        checkResult( ratTxtFile, 1, 1 );
+        ensureRatReportIsCorrect(ratTxtFile, 1, 1);
     }
 
     private String getFirstLine(File pFile) throws IOException {
@@ -374,24 +173,29 @@
         breader.close();
         return result;
     }
-    
+
     /**
      * Tests adding license headers.
      */
     public void testIt3() throws Exception {
-        final RatCheckMojo mojo = (RatCheckMojo) newRatMojo( "it3", "check", true );
-        setVariableValueToObject( mojo, "addLicenseHeaders", "true" );
-        setVariableValueToObject( mojo, "numUnapprovedLicenses", Integer.valueOf(1));
+        final RatCheckMojo mojo = (RatCheckMojo) newRatMojo("it3", "check",
+                true);
+        setVariableValueToObject(mojo, "addLicenseHeaders", "true");
+        setVariableValueToObject(mojo, "numUnapprovedLicenses",
+                Integer.valueOf(1));
         mojo.execute();
-        final File ratTxtFile = getRatTxtFile( mojo );
-        checkResult( ratTxtFile, 1, 1 );
+        final File ratTxtFile = getRatTxtFile(mojo);
+        ensureRatReportIsCorrect(ratTxtFile, 1, 1);
 
-        final File baseDir = new File( getBasedir() );
-        final File sourcesDir = new File( new File( baseDir, "target/it-source" ), "it3" );
-        final String firstLineOrig = getFirstLine(new File(sourcesDir, "src.apt"));
+        final File baseDir = new File(getBasedir());
+        final File sourcesDir = new File(new File(baseDir, "target/it-source"),
+                "it3");
+        final String firstLineOrig = getFirstLine(new File(sourcesDir,
+                "src.apt"));
         assertTrue(firstLineOrig.indexOf("--") != -1);
         assertTrue(firstLineOrig.indexOf("~~") == -1);
-        final String firstLineModified = getFirstLine(new File(sourcesDir, "src.apt.new"));
+        final String firstLineModified = getFirstLine(new File(sourcesDir,
+                "src.apt.new"));
         assertTrue(firstLineModified.indexOf("--") == -1);
         assertTrue(firstLineModified.indexOf("~~") != -1);
     }
diff --git a/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatTestHelpers.java b/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatTestHelpers.java
new file mode 100644
index 0000000..0a0db8b
--- /dev/null
+++ b/apache-rat-plugin/src/test/java/org/apache/rat/mp/RatTestHelpers.java
@@ -0,0 +1,282 @@
+package org.apache.rat.mp;
+
+/*
+ * 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.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.factory.DefaultArtifactFactory;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.resolver.DefaultArtifactResolver;
+import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.settings.Settings;
+import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.util.DirectoryScanner;
+
+/**
+ * Test helpers used when verifying mojo interaction in RAT integration tests.
+ */
+public final class RatTestHelpers {
+
+    /**
+     * @param pDir
+     *            Removes the given directory recursively.
+     * @throws IOException
+     *             in case of errors.
+     */
+    public static void remove(File pDir) throws IOException {
+        if (pDir.isFile()) {
+            if (!pDir.delete()) {
+                throw new IOException("Unable to delete file: " + pDir);
+            }
+        } else if (pDir.isDirectory()) {
+            final File[] files = pDir.listFiles();
+            for (File file : files) {
+                remove(file);
+            }
+            if (!pDir.delete()) {
+                throw new IOException("Unable to delete directory: " + pDir);
+            }
+        } else if (pDir.exists()) {
+            throw new IOException("Unable to delete unknown object " + pDir);
+        }
+    }
+
+    /**
+     * Copies the given files recursively in order to get all integration test
+     * files into a target director.
+     *
+     * @param pSource
+     *            source files.
+     * @param pTarget
+     *            target directory
+     * @throws IOException
+     *             in case of errors.
+     */
+    public static void copy(File pSource, File pTarget) throws IOException {
+        if (pSource.isDirectory()) {
+            if (!pTarget.isDirectory() && !pTarget.mkdirs()) {
+                throw new IOException("Unable to create directory: " + pTarget);
+            }
+            final DirectoryScanner scanner = new DirectoryScanner();
+            scanner.setBasedir(pSource);
+            scanner.addDefaultExcludes();
+            scanner.setIncludes(new String[] { "*" });
+            scanner.scan();
+            final String[] dirs = scanner.getIncludedDirectories();
+
+            for (final String dir : dirs) {
+                if (!"".equals(dir)) {
+                    copy(new File(pSource, dir), new File(pTarget, dir));
+                }
+            }
+            final String[] files = scanner.getIncludedFiles();
+            for (String file : files) {
+                copy(new File(pSource, file), new File(pTarget, file));
+            }
+        } else if (pSource.isFile()) {
+            final FileInputStream fis = new FileInputStream(pSource);
+            final FileOutputStream fos = new FileOutputStream(pTarget);
+            final byte[] buffer = new byte[8192];
+            for (;;) {
+                int res = fis.read(buffer);
+                if (res == -1) {
+                    break;
+                }
+                if (res > 0) {
+                    fos.write(buffer, 0, res);
+                }
+            }
+            fos.close();
+            fis.close();
+        } else {
+            throw new IOException("Unable to copy unknown object " + pSource);
+        }
+    }
+
+    /**
+     * Creates a new instance of {@link Renderer}.
+     *
+     * @param container
+     *            current plexus container.
+     * @return A configured instance of {@link DefaultRenderer}.
+     * @throws Exception
+     *             Creating the object failed.
+     */
+    public static Renderer newSiteRenderer(PlexusContainer container)
+            throws Exception {
+        return (Renderer) container.lookup(Renderer.ROLE, "default");
+    }
+
+    /**
+     * Creates a new instance of {@link ArtifactFactory}.
+     *
+     * @return A configured instance of {@link DefaultArtifactFactory}.
+     * @throws Exception
+     *             Creating the object failed.
+     */
+    public static ArtifactFactory newArtifactFactory() throws Exception {
+        final InvocationHandler handler = new InvocationHandler() {
+            public Object invoke(Object pProxy, Method pMethod, Object[] pArgs)
+                    throws Throwable {
+                System.out.println("Invoking method " + pMethod);
+                throw new IllegalStateException("Not implemented");
+            }
+        };
+        return (ArtifactFactory) Proxy.newProxyInstance(Thread.currentThread()
+                .getContextClassLoader(),
+                new Class[] { ArtifactFactory.class }, handler);
+    }
+
+    /**
+     * Creates a new instance of {@link ArtifactResolver}.
+     *
+     * @return A configured instance of {@link DefaultArtifactResolver}.
+     * @throws Exception
+     *             Creating the object failed.
+     */
+    public static ArtifactResolver newArtifactResolver() throws Exception {
+        final InvocationHandler handler = new InvocationHandler() {
+            public Object invoke(Object pProxy, Method pMethod, Object[] pArgs)
+                    throws Throwable {
+                System.out.println("Invoking method " + pMethod);
+                throw new IllegalStateException("Not implemented");
+            }
+        };
+        return (ArtifactResolver) Proxy.newProxyInstance(Thread.currentThread()
+                .getContextClassLoader(),
+                new Class[] { ArtifactResolver.class }, handler);
+    }
+
+    /**
+     * Creates an instance of {@link ArtifactRepository}.
+     *
+     * @param container
+     *            current plexus container.
+     * @return A configured instance of {@link DefaultArtifactRepository}.
+     * @throws Exception
+     *             Creating the object failed.
+     */
+    public static ArtifactRepository newArtifactRepository(
+            PlexusContainer container) throws Exception {
+        File m2Dir = new File(System.getProperty("user.home"), ".m2");
+        File settingsFile = new File(m2Dir, "settings.xml");
+        String localRepo = null;
+        if (settingsFile.exists()) {
+            Settings settings = new SettingsXpp3Reader().read(new FileReader(
+                    settingsFile));
+            localRepo = settings.getLocalRepository();
+        }
+        if (localRepo == null) {
+            localRepo = System.getProperty("user.home") + "/.m2/repository";
+        }
+        ArtifactRepositoryLayout repositoryLayout = (ArtifactRepositoryLayout) container
+                .lookup(ArtifactRepositoryLayout.ROLE, "default");
+        return new DefaultArtifactRepository("local", "file://" + localRepo,
+                repositoryLayout);
+    }
+
+    public static File makeSourceDirectory(String mvnBaseDir, File pFile,
+            String pDir, boolean pCreateCopy) throws IOException {
+        if (!pCreateCopy) {
+            return pFile;
+        }
+
+        final File targetDir = new File(new File(new File(mvnBaseDir),
+                "target/it-source"), pDir);
+        remove(targetDir);
+        copy(pFile, targetDir);
+        return targetDir;
+    }
+
+    public static File getSourceDirectory(String mvnBaseDir, String pDir,
+            boolean pCreateCopy, final File baseDir) throws IOException {
+        return makeSourceDirectory(mvnBaseDir, new File(new File(baseDir,
+                "src/test/resources/unit"), pDir), pDir, pCreateCopy);
+    }
+
+    /**
+     * Reads the created report file and verifies, whether the detected numbers
+     * are matching.
+     *
+     * @param pRatTxtFile
+     *            The file to read.
+     * @param pNumALFiles
+     *            The number of files with AL.
+     * @param pNumNoLicenseFiles
+     *            The number of files without license.
+     * @throws IOException
+     *             An error occurred while reading the file or the file does not
+     *             exist at all.
+     * @throws IllegalArgumentException
+     *             In case of mismatches in file numbers passed in as parameter.
+     */
+    public static void ensureRatReportIsCorrect(File pRatTxtFile,
+            int pNumALFiles, int pNumNoLicenseFiles) throws IOException {
+        if (!pRatTxtFile.exists()) {
+            throw new FileNotFoundException("Could not find " + pRatTxtFile);
+        }
+
+        BufferedReader reader = new BufferedReader(new FileReader(pRatTxtFile));
+        Integer numALFiles = null;
+        Integer numNoLicenseFiles = null;
+        for (;;) {
+            String line = reader.readLine();
+            if (line == null) {
+                break;
+            }
+            int offset = line.indexOf("Apache Licensed: ");
+            if (offset >= 0) {
+                numALFiles = new Integer(line.substring(
+                        offset + "Apache Licensed: ".length()).trim());
+            }
+            offset = line.indexOf("Unknown Licenses");
+            if (offset >= 0) {
+                numNoLicenseFiles = new Integer(line.substring(0, offset)
+                        .trim());
+            }
+        }
+        reader.close();
+
+        if (!new Integer(pNumALFiles).equals(numALFiles)) {
+            throw new IllegalArgumentException(
+                    "Amount of licensed files does not match. Expected "
+                            + pNumALFiles + ", got " + numALFiles);
+        }
+
+        if (!new Integer(pNumNoLicenseFiles).equals(numNoLicenseFiles)) {
+            throw new IllegalArgumentException(
+                    "Amount of licensed files does not match. Expected "
+                            + pNumALFiles + ", got " + numALFiles);
+        }
+
+    }
+
+}
diff --git a/apache-rat-plugin/src/test/it1/pom.xml b/apache-rat-plugin/src/test/resources/unit/it1/pom.xml
similarity index 100%
rename from apache-rat-plugin/src/test/it1/pom.xml
rename to apache-rat-plugin/src/test/resources/unit/it1/pom.xml
diff --git a/apache-rat-plugin/src/test/it2/pom.xml b/apache-rat-plugin/src/test/resources/unit/it2/pom.xml
similarity index 100%
rename from apache-rat-plugin/src/test/it2/pom.xml
rename to apache-rat-plugin/src/test/resources/unit/it2/pom.xml
diff --git a/apache-rat-plugin/src/test/it2/src.txt b/apache-rat-plugin/src/test/resources/unit/it2/src.txt
similarity index 100%
rename from apache-rat-plugin/src/test/it2/src.txt
rename to apache-rat-plugin/src/test/resources/unit/it2/src.txt
diff --git a/apache-rat-plugin/src/test/it3/pom.xml b/apache-rat-plugin/src/test/resources/unit/it3/pom.xml
similarity index 100%
rename from apache-rat-plugin/src/test/it3/pom.xml
rename to apache-rat-plugin/src/test/resources/unit/it3/pom.xml
diff --git a/apache-rat-plugin/src/test/it3/src.apt b/apache-rat-plugin/src/test/resources/unit/it3/src.apt
similarity index 100%
rename from apache-rat-plugin/src/test/it3/src.apt
rename to apache-rat-plugin/src/test/resources/unit/it3/src.apt
diff --git a/pom.xml b/pom.xml
index a10b988..72ed116 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
     <!--
     Publication to the website is a two phase operation:
 
-     1. Deploy to local stage: mvn site:deploy
+     1. Deploy to local stage: mvn site-deploy
      2. Publish to Apache CMS: mvn scm-publish:publish-scm
 
     This will only work when the origin for scm-publish:publish-scm
@@ -77,6 +77,7 @@
     <rat.site.id>org.apache.rat.site</rat.site.id>
 
     <!-- maven plugin versions -->
+    <mavenInvokerPluginVersion>1.9</mavenInvokerPluginVersion>
     <mavenPluginPluginVersion>3.3</mavenPluginPluginVersion>
     <surefire.version>2.17</surefire.version>
   </properties>
diff --git a/src/site/xdoc/download_rat.xml b/src/site/xdoc/download_rat.xml.vm
similarity index 62%
rename from src/site/xdoc/download_rat.xml
rename to src/site/xdoc/download_rat.xml.vm
index abeaac0..d3c630b 100644
--- a/src/site/xdoc/download_rat.xml
+++ b/src/site/xdoc/download_rat.xml.vm
@@ -20,7 +20,7 @@
     <title>Downloads</title>
   </properties>
   <body>
-    <section name="Download Apache Rat">
+    <section name="Download ${project.name}">
       <subsection name="Using a Mirror">
         <p>
           We recommend you use a mirror to download our release
@@ -69,48 +69,48 @@
         </p>
       </subsection>
     </section>
-    <section name="Apache Rat 0.10">
+    <section name="${project.name} ${project.version}">
       <subsection name="Binaries">
         <table>
           <tr>
-              <td><a href="[preferred]/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.bz2">apache-rat-0.10-bin.tar.bz2</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.bz2.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.bz2.sha1">sha1</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.bz2.asc">pgp</a></td>
+              <td><a href="[preferred]/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.bz2">apache-rat-${project.version}-bin.tar.bz2</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.bz2.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.bz2.sha1">sha1</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.bz2.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz">apache-rat-0.10-bin.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz.sha1">sha1</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.gz">apache-rat-${project.version}-bin.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.gz.sha1">sha1</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/creadur/apache-rat-0.10/apache-rat-0.10-bin.zip">apache-rat-0.10-bin.zip</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.zip.sha1">sha1</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-bin.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.zip">apache-rat-${project.version}-bin.zip</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.zip.sha1">sha1</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-bin.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>
       <subsection name="Source">
         <table>
           <tr>
-              <td><a href="[preferred]/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.bz2">apache-rat-0.10-src.tar.bz2</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.bz2.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.bz2.sha1">sha1</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.bz2.asc">pgp</a></td>
+              <td><a href="[preferred]/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.bz2">apache-rat-${project.version}-src.tar.bz2</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.bz2.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.bz2.sha1">sha1</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.bz2.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.gz">apache-rat-0.10-src.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.gz.sha1">sha1</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.gz">apache-rat-${project.version}-src.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.gz.sha1">sha1</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/creadur/apache-rat-0.10/apache-rat-0.10-src.zip">apache-rat-0.10-src.zip</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.zip.sha1">sha1</a></td>
-              <td><a href="http://www.apache.org/dist/creadur/apache-rat-0.10/apache-rat-0.10-src.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.zip">apache-rat-${project.version}-src.zip</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.zip.sha1">sha1</a></td>
+              <td><a href="http://www.apache.org/dist/creadur/apache-rat-${project.version}/apache-rat-${project.version}-src.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>
@@ -120,7 +120,7 @@
           Older releases can be obtained from the archives.
         </p>
         <ul>
-          <li class="download"><a href="[preferred]/creadur/apache-rat-0.9/">browse download area</a></li>
+          <li class="download"><a href="[preferred]/creadur/">browse download area</a></li>
           <li><a href="http://archive.apache.org/dist/creadur/">archives...</a></li>
           <li><a href="http://archive.apache.org/dist/incubator/rat/">Incubator archives...</a></li>
         </ul>