Add a script to check for outdated Maven dependencies
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 9 Jul 2015 18:30:50 +0000 (14:30 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 8 Oct 2015 22:11:24 +0000 (18:11 -0400)
We already have a Hudson job that runs this, we could commit
the script in the git tree so that it can be run locally.

Change-Id: Iefcae17dad4639e917e3440bce6929811773bd9c
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/51682
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-by: Hudson CI
releng/check_mvn_plugin_versions.sh [new file with mode: 0755]

diff --git a/releng/check_mvn_plugin_versions.sh b/releng/check_mvn_plugin_versions.sh
new file mode 100755 (executable)
index 0000000..88eee47
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2015 Ericsson, EfficiOS Inc. and others
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Marc-AndrĂ© Laperle - Initial version
+#     Alexandre Montplaisir - Initial version
+###############################################################################
+
+# Point ourselves to the script's directory (so it can be run "out-of-tree")
+DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+output=`mvn versions:display-plugin-updates -f $DIR/../pom.xml`
+
+#filter only updates and show unique
+summary=`echo "${output}" | grep "\\->" | sort | uniq`
+echo -e "Summary:\n${summary}"
+
+#remove empty lines and count lines
+outdatedNb=`echo "${summary}" | sed '/^\s*$/d' | wc -l`
+echo Number of outdated plugins: "${outdatedNb}"
+exit ${outdatedNb}
This page took 0.039927 seconds and 5 git commands to generate.