Return-Path: X-Original-To: apmail-maven-dev-archive@www.apache.org Delivered-To: apmail-maven-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8AE3F19693 for ; Sat, 16 Apr 2016 19:54:29 +0000 (UTC) Received: (qmail 50228 invoked by uid 500); 16 Apr 2016 19:54:29 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 50143 invoked by uid 500); 16 Apr 2016 19:54:29 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 50131 invoked by uid 99); 16 Apr 2016 19:54:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2016 19:54:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4B6BA1A00B8 for ; Sat, 16 Apr 2016 19:54:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 9mHCglnBD1lM for ; Sat, 16 Apr 2016 19:54:26 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 810DC5F1E9 for ; Sat, 16 Apr 2016 19:54:25 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id g184so178943028lfb.3 for ; Sat, 16 Apr 2016 12:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=wVrmzwPQLIdBaVZ9C4RA80u8pG8W8SWn15+8HK4DdQw=; b=cd7HDUQbZNWyyvu5RWw+qZNR0ezCA97nYFTp7WaIyt+8fWIfILk1DMCopXsGsBECXU VKbrH7XEUalj6nqsdFH7/1AzqDbfPQw75pAySYzGUXoJZZfJMNnNcR9sjkeMX1FxkVRj B2SEWmYcQ0lN/OLeSYhuZdkDNZA17SjCs3pN7yiP3RF4nOq9tQMP0blEXVuvEkjP4SKy 5Pul/J7xE7bIdbkkMfz7APz1GpO8cvRp0RfizwxVKxEXKV/QnahrdlEcQv5WqgCcJ2Lp /wttIq3zN+DPmnjC4tEcOZ8J0JFTUqb8l6qIyHhWTsb9DzI4dQDWZhf9D+ynpV46Ui2U hMSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=wVrmzwPQLIdBaVZ9C4RA80u8pG8W8SWn15+8HK4DdQw=; b=DnPoGtdqtACYVk6GFBnZ4knuSWBpw3k/HhZReH6nuPXsFL35GIrqfLnrLlUORekqFN oIpdqxWrh5jvHqmXGuQAjCX0Z+5vUIxxQqNPpX/J4g44DjoiQWsud2CHRu4UtjJAQBqo iS8shyzlaEirmBDqjv/iCMsVFTsVzJt26iG1pzOKebyn9L4RVl3AiD+NxHIfCp2Hv4aa L2K5yh5hciaqJ5h5JbtSNBbeM2xqhGBeg2V6plwcvtBFsSD2Ki0Jb6Qy+98xnGky3LYa PTK2EjhwjV1fb6Um17YLsfsKYZLsIX+1Yqf6aq7yWmyetjGoBLzgxNhMb2ogKxzPhhtJ oCEA== X-Gm-Message-State: AOPr4FWGLETjgA0k1FzL4zdyoW1jNczJTXTmFzFXXu8j0zaCWTc9L4GdDkAIFc5EAI8+2QAZBZ9lVmdU9YB17A== X-Received: by 10.25.87.19 with SMTP id l19mr9610502lfb.27.1460836463983; Sat, 16 Apr 2016 12:54:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.135.193 with HTTP; Sat, 16 Apr 2016 12:54:04 -0700 (PDT) In-Reply-To: References: <57115055.6090507@apache.org> <6a41a941-6116-c53d-eaeb-19a274c09223@apache.org> From: =?UTF-8?Q?Arnaud_H=C3=A9ritier?= Date: Sat, 16 Apr 2016 21:54:04 +0200 Message-ID: Subject: Re: RFC on MNG-6003: Drastically reduce JAVA_HOME discovery code To: Maven Developers List Content-Type: multipart/alternative; boundary=001a1140ead882c1f105309f7e71 --001a1140ead882c1f105309f7e71 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 wrote= : > Am 2016-04-16 um 17:07 schrieb Robert Scholte: > >> On Sat, 16 Apr 2016 16:48:42 +0200, Michael Osipov >> 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 variab= le >>>> as well, but that's not necessary the same JAVA_HOME you want to use f= or >>>> 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 >>>> 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 discove= r >>>>> 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 wit= h >>>>> 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=3Dmaven.git;a=3Dcommitdiff;= h=3D196234a95f7d5ade0b0b905308c2083e856cd121 >>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> 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 > > --=20 ----- Arnaud H=C3=A9ritier http://aheritier.net Mail/GTalk: aheritier AT gmail DOT com Twitter/Skype : aheritier --001a1140ead882c1f105309f7e71--