[opennms-devel] [PATCH] Offer hints if mvn not there

Alex Bennee <[email protected]>
Newsgroups gmane.network.opennms.bugs
Message-ID <1210698087.18331.3.camel__4110.72081556103$1210698213$gmane$org@pitcairn.cambridgebroadband.com>
I'm not sure if this is valid but this seems like a friendlier solution.
I'm new to this java stuff but I'm pretty sure you shouldn't *have to*
distribute your build tools in the source tree (which is what the wiki
says).

>From 0a981ce1303b2741a4a9ec26cb36772273339a59 Mon Sep 17 00:00:00 2001
From: Alex Bennee <[email protected]>
Date: Tue, 13 May 2008 17:56:53 +0100
Subject: [PATCH] Warn early and offer solution if no Maven distributed
with the source tree

---
 build.sh |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/build.sh b/build.sh
index 357f20c..e1e9dfb 100755
--- a/build.sh
+++ b/build.sh
@@ -56,5 +56,14 @@ fi
 
 MAVEN_OPTS=-Xmx512m
 export MAVEN_OPTS
-[ -z "$MVN" ] && MVN="$PREFIX/maven/bin/mvn"
+
+if [ -z "$MVN" ]; then
+    MVN="$PREFIX/maven/bin/mvn"
+    if [ ! -f "$MVN" ]; then
+	echo "Can't find mvn at $MVN"
+	echo "Please export MVN=/to/point/at/it"
+	exit 1;
+    fi
+fi
+
 "$MVN" -Droot.dir=$PREFIX -D$MAVEN_SKIP=true "$@"
-- 
1.5.5.1.178.g1f811.dirty


-- 
Alex Bennee, Software Engineer
Life is knowing how far to go without crossing the line.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.