removed temporary OS_* values (deprecated already in 2.0.x) and instead us the Os.OS_* values

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@609089 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brian E Fox 2008-01-05 04:03:39 +00:00
parent c754ccad3a
commit ff53010e7e
2 changed files with 14 additions and 29 deletions

View File

@ -1,5 +1,16 @@
package org.apache.maven.cli;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.Properties;
import java.util.TimeZone;
import org.apache.maven.embedder.MavenEmbedderConsoleLogger;
import org.apache.maven.embedder.MavenEmbedderLogger;
import org.apache.maven.errors.CoreErrorReporter;
@ -12,17 +23,7 @@ import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingException;
import org.apache.maven.reactor.MavenExecutionException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.Locale;
import java.util.Properties;
import java.util.TimeZone;
import org.codehaus.plexus.util.Os;
/**
* Utility class used to report errors, statistics, application version info, etc.
@ -39,13 +40,6 @@ public final class CLIReportingUtils
public static final int SEC_PER_MIN = 60;
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 );
private static final String NEWLINE = System.getProperty( "line.separator" );
private CLIReportingUtils()
@ -78,8 +72,8 @@ public final class CLIReportingUtils
+ 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 + "\"" );
System.out.println( "OS name: \"" + Os.OS_NAME + "\" version: \"" + Os.OS_VERSION
+ "\" arch: \"" + Os.OS_ARCH + "\"" );
}
catch ( IOException e )
{

View File

@ -45,15 +45,6 @@ public class MavenCli
{
public static final String LOCAL_REPO_PROPERTY = "maven.repo.local";
/** @deprecated use {@link CLIReportingUtils#OS_NAME} */
public static final String OS_NAME = CLIReportingUtils.OS_NAME;
/** @deprecated use {@link CLIReportingUtils#OS_ARCH} */
public static final String OS_ARCH = CLIReportingUtils.OS_ARCH;
/** @deprecated use {@link CLIReportingUtils#OS_VERSION} */
public static final String OS_VERSION = CLIReportingUtils.OS_VERSION;
public static void main( String[] args )
{
ClassWorld classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() );