You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2014/04/28 20:54:03 UTC
git commit: [MESOS-1252]: Support ENV MAVEN_HOME on the build.
Repository: mesos
Updated Branches:
refs/heads/master 1e777460f -> e3fe8a316
[MESOS-1252]: Support ENV MAVEN_HOME on the build.
The build now supports the `MAVEN_HOME` environment variable which is
used to resolve the `mvn` executable. If no `MAVEN_HOME` is specified
we will use the one available in the `PATH`.
Review: https://reviews.apache.org/r/20750
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e3fe8a31
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e3fe8a31
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e3fe8a31
Branch: refs/heads/master
Commit: e3fe8a316e82fe1ee983d627393ae5d1f5c55623
Parents: 1e77746
Author: Bernardo Gomez Palacio <be...@gmail.com>
Authored: Mon Apr 28 11:45:03 2014 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Mon Apr 28 11:53:35 2014 -0700
----------------------------------------------------------------------
configure.ac | 17 ++++++++++++++---
src/Makefile.am | 4 ++--
2 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e3fe8a31/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 4967fe4..27b2ac8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,6 +175,8 @@ AC_ARG_VAR([JAVA_CPPFLAGS], [preprocessor flags for JNI])
AC_ARG_VAR([JAVA_JVM_LIBRARY], [full path to libjvm.so])
+AC_ARG_VAR([MAVEN_HOME], [looks for mvn at MAVEN_HOME/bin/mvn])
+
AC_ARG_VAR([PYTHON], [which Python interpreter to use])
AC_MSG_NOTICE([Setting up build environment for ${target_cpu} ${target_os}])
@@ -532,9 +534,18 @@ __EOF__
has_java=yes
# Test for Maven so we can build the jar.
- AC_CHECK_PROG(MVN_CHECK, mvn, yes)
- if test x"$MVN_CHECK" != x"yes"; then
- AC_MSG_ERROR([Unable to find mvn on your path.])
+ if test -z "$MAVEN_HOME"; then
+ AC_PATH_PROG([MVN], [mvn], [$MVN])
+
+ if test "x$MVN" = "x"; then
+ AC_MSG_ERROR([can not find mvn on your path])
+ fi
+ else
+ AC_PATH_PROGS([MVN], [mvn], [$MVN], [$MAVEN_HOME/bin])
+
+ if test "x$MVN" = "x"; then
+ AC_MSG_ERROR([can not find mvn inside $MAVEN_HOME/bin])
+ fi
fi
fi
http://git-wip-us.apache.org/repos/asf/mesos/blob/e3fe8a31/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 429e4bb..cd06125 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -634,7 +634,7 @@ PROTOBUF_JAR = java/target/protobuf-java-$(PROTOBUF_VERSION).jar
$(MESOS_JAR): $(MESOS_JAR_SOURCE) $(MESOS_JAR_GENERATED) java/mesos.pom
@echo "Building mesos-$(PACKAGE_VERSION).jar ..."
- @cd $(abs_top_builddir)/src/java && mvn -f mesos.pom clean package
+ @cd $(abs_top_builddir)/src/java && $(MVN) -f mesos.pom clean package
# Convenience library for JNI bindings.
# TODO(Charles Reiss): We really should be building the Java library
@@ -740,7 +740,7 @@ $(EXAMPLES_JAR): $(EXAMPLES_SOURCE)
CLEANFILES += $(EXAMPLES_JAR)
maven-install: $(MESOS_JAR) java/mesos.pom
- mvn -f java/mesos.pom install
+ $(MVN) -f java/mesos.pom install
PHONY_TARGETS += maven-install
endif # HAS_JAVA