This is an automated email from the ASF dual-hosted git repository.

kapil pushed a commit to branch 1.4.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 5581925db9aeae9c5d6ee621e7aa2ac9a19609eb
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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 8f7c4ac..2e24267 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1778,7 +1778,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 -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
@@ -1917,6 +1918,7 @@ CLEANFILES += $(EXAMPLES_JAR)
 
 maven-install: $(MESOS_JAR) java/mesos.pom
        $(MVN) -B -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

Reply via email to