Author: pottlinger
Date: Thu Sep 11 21:02:17 2014
New Revision: 1624390
URL: http://svn.apache.org/r1624390
Log:
RAT-173 Skip reports as well
* Applying patch from Chris Burroughs - thanks.
* LHF: Adding release notes snippets.
Modified:
creadur/rat/trunk/RELEASE_NOTES.txt
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java
Modified: creadur/rat/trunk/RELEASE_NOTES.txt
URL:
http://svn.apache.org/viewvc/creadur/rat/trunk/RELEASE_NOTES.txt?rev=1624390&r1=1624389&r2=1624390&view=diff
==============================================================================
--- creadur/rat/trunk/RELEASE_NOTES.txt (original)
+++ creadur/rat/trunk/RELEASE_NOTES.txt Thu Sep 11 21:02:17 2014
@@ -1,8 +1,13 @@
-Rat 0.12
-========
+Rat 0.12 (SNAPSHOT)
+===================
* We now require Maven 3.0.5+ to build Rat, but as before we only require
Maven 2.2.1+ if you want to use Rat in your own Maven projects.
+ * We've integrated Rat into the ASF Jenkins to ensure continuous builds with
various JDK versions.
+ * Issues resolved (see http://issues.apache.org/jira):
+ * Bugs:
+ * [RAT-173] - Allow complete skip of RAT plugin with rat.skip property
+ (thanks to Chris Burroughs)
Rat 0.11
========
Modified:
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
URL:
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java?rev=1624390&r1=1624389&r2=1624390&view=diff
==============================================================================
---
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
(original)
+++
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
Thu Sep 11 21:02:17 2014
@@ -179,6 +179,13 @@ public abstract class AbstractRatMojo ex
private boolean excludeSubProjects;
/**
+ * Will skip the plugin execution, e.g. for technical builds that do not
take licence compliance into account.
+ * @since 0.11
+ */
+ @Parameter(property = "rat.skip", defaultValue = "false")
+ protected boolean skip;
+
+ /**
* Holds the maven-internal project to allow resolution of artifact
properties during mojo runs.
*/
@Parameter(defaultValue = "${project}", required = true, readonly = true)
Modified:
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
URL:
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java?rev=1624390&r1=1624389&r2=1624390&view=diff
==============================================================================
---
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
(original)
+++
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
Thu Sep 11 21:02:17 2014
@@ -89,13 +89,6 @@ public class RatCheckMojo extends Abstra
@Parameter(property = "rat.ignoreErrors", defaultValue = "false")
private boolean ignoreErrors;
- /**
- * Will skip the plugin execution, e.g. for technical builds that do not
take licence compliance into account.
- * @since 0.11
- */
- @Parameter(property = "rat.skip", defaultValue = "false")
- private boolean skip;
-
private ClaimStatistic getRawReport()
throws MojoExecutionException, MojoFailureException
{
Modified:
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java
URL:
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java?rev=1624390&r1=1624389&r2=1624390&view=diff
==============================================================================
---
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java
(original)
+++
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatReportMojo.java
Thu Sep 11 21:02:17 2014
@@ -193,6 +193,11 @@ public class RatReportMojo extends Abstr
*/
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;
+ }
+
DecorationModel model = new DecorationModel();
model.setBody( new Body() );
Map<String, String> attributes = new HashMap<String, String>();