maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Osipov <micha...@apache.org>
Subject Re: RFC on MNG-6003: Drastically reduce JAVA_HOME discovery code
Date Sat, 16 Apr 2016 09:03:34 GMT
Am 2016-04-16 um 01:27 schrieb Christian Schulte:
> Am 04/15/16 um 22:34 schrieb Michael Osipov:
>> In MNG-6003 [1], I propose to throw away all of this code and solely
>> rely on the dev's input. If he/she it not able to set it properly,
>> he/she shouldn't write code at all. Most of the time, on Unix/Linux,
>> this isn't even necessary because a JDK is installed by default.
>
> +1
>
> I would go even further. Just error out if JAVA_HOME is not defined. In
> my opinion discovery of the 'java' launcher to use based on `which java`
> should also go away. Just make the scripts require JAVA_HOME to be
> defined and not try to discover anything automatically. On my machine I
> have
>
> /usr/local/jdk-1.7.0
> /usr/local/jre-1.7.0
> /usr/local/jdk-1.8.0
> /usr/local/jre-1.8.0
>
> The PATH contains /usr/local/jre-1.8.0/bin. The JRE directories have the
> java jurisdiction policy files installed. The JDK directories do not.
> The JDK keystores contain certificates the JRE directories do not
> contain etc. With my setup, `which java` points to a JRE launcher, not a
> JDK launcher. JAVA_HOME always points to a JDK. So `which java` is
> useless here and somehow error prone if I screw up JAVA_HOME.

In this case, you can simply set JAVA_HOME as instructed by the install 
docs. `which java` is an assumption which works mostly on Unix.

The keystore problem is solely your distro problem.

Is there a reason why you did install the JRE at all? I haven't done 
this on Linux, FreeBSD and HP-UX becuase I see no reason to waste 
duplicate space.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message