brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/3] git commit: add tips for using & abusing RAT
Date Mon, 28 Jul 2014 08:40:46 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 35f5ff2db -> d0af9815b


add tips for using & abusing RAT


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/004589f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/004589f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/004589f3

Branch: refs/heads/master
Commit: 004589f3e2e5e356a18988b7dbf7cdee70c5b37d
Parents: 2a4de4d
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Fri Jul 25 13:40:13 2014 -0400
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Fri Jul 25 13:40:13 2014 -0400

----------------------------------------------------------------------
 docs/dev/build/index.md | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/004589f3/docs/dev/build/index.md
----------------------------------------------------------------------
diff --git a/docs/dev/build/index.md b/docs/dev/build/index.md
index 927c42d..c7ebf65 100644
--- a/docs/dev/build/index.md
+++ b/docs/dev/build/index.md
@@ -33,6 +33,32 @@ Key things to note if you're new to Maven:
   (that link has some tips for resolving them too)
 
 
+## When the RAT Bites
+
+We use RAT to ensure that all files are compliant to Apache standards.  Most of the time
you shouldn't see it or need to know about it, but if it detects a violation, you'll get a
message such as:
+
+    [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.10:check (default)
on project brooklyn-parent: Too many files with unapproved license: 1 See RAT report in: /Users/alex/Data/cloudsoft/dev/gits/brooklyn/target/rat.txt
-> [Help 1]
+
+If there's a problem, see the file `rat.txt` in the `target` directory of the failed project.
 (Maven will show you this link in its output.)
+
+Often the problem is one of the following:
+
+* You've added a file which requires the license header but doesn't have it
+
+  **Resolution:**  Simply copy the header from another file
+
+* You've got some temporary files which RAT things should have headers
+
+  **Resolution:**  Move the files away, add headers, or turn off RAT (see below)
+
+* The project structure has changed and you have stale files (e.g. in a `target` directory)
+
+  **Resolution:**  Remove the stale files, e.g. with `git clean -df` (and if needed a `find
. -name target -prune -exec rm -rf {} \;` to delete folders named `target`)
+
+To disable RAT checking on a build, set `rat.ignoreErrors`, e.g. `mvn -Drat.ignoreErrors=true
clean install`.  (But note you will need RAT to pass in order for a PR to be accepted!)
+
+
+
 ## Other Handy Hints
 
 * On some **Ubuntu** (e.g. 10.4 LTS) maven v3 is not currently available from the repositories.


Mime
View raw message