accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [02/14] git commit: ACCUMULO-2169 tighten up rat check in build script
Date Tue, 25 Mar 2014 21:38:49 GMT
ACCUMULO-2169 tighten up rat check in build script


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2ab011c3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2ab011c3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2ab011c3

Branch: refs/heads/master
Commit: 2ab011c3a7dc2eaa52bd8845533af331e28ef7b5
Parents: edfbd2f
Author: Mike Drob <mdrob@cloudera.com>
Authored: Tue Mar 25 12:19:34 2014 -0400
Committer: Mike Drob <mdrob@cloudera.com>
Committed: Tue Mar 25 12:19:34 2014 -0400

----------------------------------------------------------------------
 src/assemble/build.sh | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2ab011c3/src/assemble/build.sh
----------------------------------------------------------------------
diff --git a/src/assemble/build.sh b/src/assemble/build.sh
index 867595b..6904535 100755
--- a/src/assemble/build.sh
+++ b/src/assemble/build.sh
@@ -15,6 +15,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+set -e
+
 loc=`dirname "$0"`
 loc=`cd "$loc/../.."; pwd`
 
@@ -38,16 +40,29 @@ runAt() {
   ( cd $1 ; echo in `pwd`; shift ; run $@ ) || fail 
 }
 
+verifyMissingLicenses() {
+  COUNT=$(grep -c '!????' $1)
+  EXPECTED=$2
+  if [[ "$COUNT" != "$EXPECTED" ]]; then
+    fail expected "$EXPECTED" files missing licenses, but saw "$COUNT"
+  fi
+}
+
+mvn -version | grep -q "Java version: 1.6" || fail "Need to use Java 6"
+
 run mvn -U -P distclean clean 
-mvn org.apache.rat:apache-rat-plugin:0.10:check
-COUNT=`grep '!????' target/rat.txt | wc -l`
-EXPECTED=51
-if [ "$COUNT" -ne $EXPECTED ]
-then
-   fail expected $EXPECTED files missing licenses, but saw "$COUNT"
-fi
+
+mvn org.apache.rat:apache-rat-plugin:0.10:check || :
+verifyMissingLicenses target/rat.txt 51
+
+find src -name pom.xml -not -path 'src/server/*' \
+	-exec mvn org.apache.rat:apache-rat-plugin:0.10:check -f {} \;
+
+mvn org.apache.rat:apache-rat-plugin:0.10:check -f src/server/pom.xml || :
+verifyMissingLicenses src/server/target/rat.txt 27
+
 #need to run mvn package twice to properly build docs/config.html
 run mvn package
-run mvn package javadoc:aggregate javadoc:jar source:jar
+run mvn package javadoc:aggregate javadoc:jar source:jar -DskipTests
 runAt ./src/server/src/main/c++ make 
 run mvn assembly:single -N


Mime
View raw message