pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/53083: devel/gradle package hard-codes JAVA_HOME

>Number:         53083
>Category:       pkg
>Synopsis:       devel/gradle package hard-codes JAVA_HOME
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 08 20:00:00 +0000 2018
>Originator:     Nathan Arthur
>Release:        pkgsrc-current
Darwin narthur-pro.preemptive.internal 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

The `gradle-launcher` script included with devel/gradle is installed as the `gradle` command. That script has the following line:


The effect of this is that all runs of the `gradle` command will end up using the Java version that was configured at build time (and for precompiled packages, on the build server). This breaks longstanding gradle behavior where it observes/obeys the JAVA_HOME set in the environment.
Configure JAVA_HOME
Build and install devel/gradle
Change JAVA_HOME to point somewhere else
Run `gradle`
Observe that it uses the wrong Java version
A suggested fix:


Home | Main Index | Thread Index | Old Index