You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2014/07/28 10:40:46 UTC

[1/3] git commit: add tips for using & abusing RAT

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 <al...@cloudsoftcorp.com>
Authored: Fri Jul 25 13:40:13 2014 -0400
Committer: Alex Heneveld <al...@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.


[3/3] git commit: This closes #97

Posted by al...@apache.org.
This closes #97


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

Branch: refs/heads/master
Commit: d0af9815bc2e24409b0f47b52fe16b3730531744
Parents: 35f5ff2 2051011
Author: Aled Sage <al...@gmail.com>
Authored: Mon Jul 28 09:40:10 2014 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Mon Jul 28 09:40:10 2014 +0100

----------------------------------------------------------------------
 docs/dev/build/index.md | 27 +++++++++++++++++++++++++++
 pom.xml                 |  3 +--
 2 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[2/3] git commit: ignore target when running rat

Posted by al...@apache.org.
ignore target when running 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/2051011d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/2051011d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/2051011d

Branch: refs/heads/master
Commit: 2051011df5c8d63e68a83c24080364d3bd3dde0a
Parents: 004589f
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Jul 25 14:06:03 2014 -0400
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Jul 25 14:06:03 2014 -0400

----------------------------------------------------------------------
 docs/dev/build/index.md | 1 +
 pom.xml                 | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/2051011d/docs/dev/build/index.md
----------------------------------------------------------------------
diff --git a/docs/dev/build/index.md b/docs/dev/build/index.md
index c7ebf65..b543da4 100644
--- a/docs/dev/build/index.md
+++ b/docs/dev/build/index.md
@@ -57,6 +57,7 @@ Often the problem is one of the following:
 
 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!)
 
+If there is a good reason that a file, pattern, or directory should be permanently ignored, that is easy to add inside the root `pom.xml`.
 
 
 ## Other Handy Hints

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/2051011d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 111abf1..a53ae40 100644
--- a/pom.xml
+++ b/pom.xml
@@ -725,6 +725,7 @@
                   <exclude>**/.settings/**</exclude>
                   <exclude>**/*.log</exclude>
                   <exclude>**/brooklyn*.log.*</exclude>
+                  <exclude>**/target/**</exclude>
                   <!-- files not requiring licence -->
                   <exclude>ignored/**</exclude>
                   <exclude>LICENSE.md</exclude>
@@ -744,8 +745,6 @@
                   <exclude>**/src/main/resources/banner.txt</exclude>
                   <exclude>**/src/test/resources/ssl/certs/localhost/info.txt</exclude>
                   <exclude>**/sandbox/examples/src/main/scripts/amis.txt</exclude>
-                  <exclude>**/sandbox/*/target/classes/**</exclude>
-                  <exclude>**/sandbox/*/target/test-classes/**</exclude>
                   <!-- see notes in https://issues.apache.org/jira/browse/BROOKLYN-18 -->
                   <!-- FIXME: Check licences for docs -->
                   <exclude>docs/**</exclude>