You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2018/09/03 22:14:37 UTC
[mesos] 02/04: Fixed maven invocation with proper JAVA_HOME.
This is an automated email from the ASF dual-hosted git repository.
kapil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 4670aca10943ff8df83e667691e6611aeac9555b
Author: Kapil Arya <ka...@mesosphere.io>
AuthorDate: Mon Sep 3 09:52:45 2018 -0400
Fixed maven invocation with proper JAVA_HOME.
On some distros, JAVA_HOME environment variable is not set by default.
However, on such systems, our configure script is able to successfully
compute the value of JAVA_HOME based on PATH, etc. We use this computed
JAVA_HOME to set the environment variable when invoking maven.
Review: https://reviews.apache.org/r/68611
---
src/Makefile.am | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 3023061..5bc82d3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1931,7 +1931,8 @@ if HAS_JAVA
$(MESOS_JAR): $(MESOS_JAR_SOURCE) $(MESOS_JAR_GENERATED) java/mesos.pom
@echo "Building mesos-$(PACKAGE_VERSION).jar ..."
- @cd $(abs_top_builddir)/src/java && $(MVN) -B -q -f mesos.pom clean package
+ @cd $(abs_top_builddir)/src/java && \
+ env JAVA_HOME=$(JAVA_HOME) $(MVN) -B -q -f mesos.pom clean package
# Convenience library for JNI bindings.
# TODO(Charles Reiss): We really should be building the Java library
@@ -2069,7 +2070,7 @@ $(EXAMPLES_JAR): $(EXAMPLES_SOURCE)
CLEANFILES += $(EXAMPLES_JAR)
maven-install: $(MESOS_JAR) java/mesos.pom
- $(MVN) -B -q -f java/mesos.pom install
+ env JAVA_HOME=$(JAVA_HOME) $(MVN) -B -q -f java/mesos.pom install
PHONY_TARGETS += maven-install
endif # HAS_JAVA