maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Héritier <aherit...@gmail.com>
Subject Re: RFC on MNG-6003: Drastically reduce JAVA_HOME discovery code
Date Sat, 16 Apr 2016 19:54:04 GMT
On MacOS I'using JENV which wraps tools calls like maven to setup
accordingly the JAVA_HOME based on the global/local/session setting

http://www.jenv.be

As a developper I have exactly the liberty I need and I can switch to any
version of java

On Sat, Apr 16, 2016 at 8:55 PM, Michael Osipov <michaelo@apache.org> wrote:

> Am 2016-04-16 um 17:07 schrieb Robert Scholte:
>
>> On Sat, 16 Apr 2016 16:48:42 +0200, Michael Osipov <michaelo@apache.org>
>> wrote:
>>
>> Am 2016-04-16 um 14:38 schrieb Robert Scholte:
>>>
>>>> Hi,
>>>>
>>>> Maybe this is also the right moment to introduce a Maven specific
>>>> JAVA_HOME, e.g. maven.JAVA_HOME
>>>> The reason: there are other tools which depend on the JAVA_HOME variable
>>>> as well, but that's not necessary the same JAVA_HOME you want to use for
>>>> Maven.
>>>>
>>>
>>> Which are?
>>>
>>
>> My first hits with Google are Glassfish and Confluence, but there are
>> many more.
>> IIRC SoapUI too and I know quite a lot of projects using this tool.
>>
>
> I thought you were refering anything inside Maven. Most of those tools
> start with the system and PATH is mostly naked...
>
>
>>> So it is best to fail when JAVA_HOME isn't set/valid?
>>>
>>
>> not sure, but I suggest to check for a Maven specific JAVA_HOME first,
>> next the (global) JAVA_HOME and finally installed version or fail.
>>
>
> This makes the stuff more compicated than I have intended. I wanted it to
> be as simple as possible. The rest is the dev's responsibility.
>
>
>
> On Fri, 15 Apr 2016 22:34:29 +0200, Michael Osipov <michaelo@apache.org>
>>>> wrote:
>>>>
>>>> Hi folks,
>>>>>
>>>>> we all know that people once in a while complain that my JAVA_HOME is
>>>>> not properly discovered on $PLATFORM, etc. Surprisingly, we require
>>>>> JAVA_HOME to be set in the installation documentation, yet we discover
>>>>> it anyway. This is a contradiction. Moreover, our discovery mechanism
>>>>> can never be complete and won't. It bloats.
>>>>>
>>>>> 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.
>>>>>
>>>>> I have created a feature branch [1] for this. If no one objects, I
>>>>> will merge this into master.
>>>>>
>>>>> The change have been tested with, without JAVA_HOME and invalid
>>>>> JAVA_HOME on
>>>>>
>>>>> * Windows 10
>>>>> * Cygwin (Git Bash)
>>>>> * Ubuntu 14.04 LTS (from /home as well as /opt and with symlinks from
>>>>> /usr/local/bin)
>>>>> * FreeBSD 10.2-RELEASE (from /home as well as from /usr/local and with
>>>>> symlinks from /usr/local/bin)
>>>>>
>>>>> Please have a look especially on your platform.
>>>>>
>>>>> Michael
>>>>>
>>>>> [1] https://issues.apache.org/jira/browse/MNG-6003
>>>>> [2]
>>>>>
>>>>> https://git-wip-us.apache.org/repos/asf?p=maven.git;a=commitdiff;h=196234a95f7d5ade0b0b905308c2083e856cd121
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 
-----
Arnaud Héritier
http://aheritier.net
Mail/GTalk: aheritier AT gmail DOT com
Twitter/Skype : aheritier

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message