maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject [maven] 01/01: [MNG-5756] Java home output in mvn -v is misleading
Date Sat, 05 May 2018 22:10:17 GMT
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-5756
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 0062eba2f82c07d4c13610fb31c8dbbb79b9184c
Author: Michael Osipov <michaelo@apache.org>
AuthorDate: Sun May 6 00:01:55 2018 +0200

    [MNG-5756] Java home output in mvn -v is misleading
    
    The Java home displayed corresponds to the property 'java.home' which points to
    the JRE installation running the given Maven instance. It is not the value of
    $JAVA_HOME which causes confusion.
    
    Ref: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
    
    This closes #115 and #117.
---
 .../src/main/java/org/apache/maven/cli/CLIReportingUtils.java        | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index 52f2053..b9e4e7c 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -63,12 +63,11 @@ public final class CLIReportingUtils
             properties.getProperty( "distributionShortName" ) + " home: " + System.getProperty(
"maven.home",
                                                                                         
       "<unknown Maven "
                                                                                         
           + "home>" ) ) )
-            .append(
-            ls );
+            .append( ls );
         version.append( "Java version: " ).append(
             System.getProperty( "java.version", "<unknown Java version>" ) ).append(
", vendor: " ).append(
             System.getProperty( "java.vendor", "<unknown vendor>" ) ).append( ls );
-        version.append( "Java home: " ).append( System.getProperty( "java.home", "<unknown
Java home>" ) ).append( ls );
+        version.append( "JRE used: " ).append( System.getProperty( "java.home", "<unknown
JRE>" ) ).append( ls );
         version.append( "Default locale: " ).append( Locale.getDefault() ).append( ", platform
encoding: " ).append(
             System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( ls
);
         version.append( "OS name: \"" ).append( Os.OS_NAME ).append( "\", version: \"" ).append(
Os.OS_VERSION ).append(

-- 
To stop receiving notification emails like this one, please contact
michaelo@apache.org.

Mime
View raw message