MNG-2582, MNG-2376 - added Java and OS info to debug output.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@526632 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brian E Fox 2007-04-09 02:27:05 +00:00
parent 7ef8e66ff0
commit f76116a78b
1 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
import java.util.StringTokenizer;
@ -48,6 +49,12 @@ public class MavenCli
{
public static final String LOCAL_REPO_PROPERTY = "maven.repo.local";
public static final String OS_NAME = System.getProperty( "os.name" ).toLowerCase( Locale.US );
public static final String OS_ARCH = System.getProperty( "os.arch" ).toLowerCase( Locale.US );
public static final String OS_VERSION = System.getProperty( "os.version" ).toLowerCase( Locale.US );
public static void main( String[] args )
{
ClassWorld classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() );
@ -428,6 +435,11 @@ public class MavenCli
{
System.out.println( "Maven version: " + properties.getProperty( "version", "unknown" ) );
}
System.out.println( "Java version: " + System.getProperty( "java.version", "<unknown java version>" ) );
//TODO: when plexus can return the family type, add that here because it will make it easier to know what profile activation settings to use.
System.out.println( "OS name: \"" + OS_NAME + "\" version: \"" + OS_VERSION + "\" arch: \"" + OS_ARCH + "\"" );
}
catch ( IOException e )
{