diff --git a/maven-core/src/main/java/org/apache/maven/MavenConstants.java b/maven-core/src/main/java/org/apache/maven/MavenConstants.java index 951ff4ab36..374a7f03f0 100644 --- a/maven-core/src/main/java/org/apache/maven/MavenConstants.java +++ b/maven-core/src/main/java/org/apache/maven/MavenConstants.java @@ -19,8 +19,6 @@ package org.apache.maven; public class MavenConstants { - public static final String MAVEN_VERSION = "2.0-alpha-1-SNAPSHOT"; - public static final String MAVEN_MODEL_VERSION = "4.0.0"; // ---------------------------------------------------------------------- @@ -29,13 +27,5 @@ public class MavenConstants public static final String MAVEN_USER_CONFIGURATION_DIRECTORY = ".m2"; - public static final String MAVEN_PROPERTIES = "maven.properties"; - public static final String MAVEN_REPOSITORY = "repository"; - - // ---------------------------------------------------------------------- - // maven.properties - // ---------------------------------------------------------------------- - - public static final String MAVEN_ONLINE = "maven.online"; } diff --git a/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java index 99c74ded4e..5eac0a4acc 100644 --- a/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java +++ b/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java @@ -51,14 +51,11 @@ import org.codehaus.plexus.logging.LoggerManager; import org.codehaus.plexus.util.FileUtils; import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.util.Collections; import java.util.Enumeration; import java.util.List; -import java.util.Properties; /** * @author Jason van Zyl @@ -368,21 +365,6 @@ public class MavenCli return mavenUserConfigurationDirectory; } - protected static Properties getMavenProperties( File mavenHomeLocal ) - { - Properties mavenProperties = new Properties(); - File mavenPropertiesFile = new File( mavenHomeLocal, MavenConstants.MAVEN_PROPERTIES ); - try - { - mavenProperties.load( new FileInputStream( mavenPropertiesFile ) ); - } - catch ( IOException e ) - { - // do nothing - } - return mavenProperties; - } - protected static ArtifactRepository getLocalRepository( MavenSettings settings, ArtifactRepositoryFactory repoFactory, ArtifactRepositoryLayout repositoryLayout ) @@ -398,7 +380,7 @@ public class MavenCli if ( localRepository == null ) { - String userConfigurationDirectory = System.getProperty( "user.home" ) + "/.m2"; + File userConfigurationDirectory = getUserConfigurationDirectory(); localRepository = new File( userConfigurationDirectory, MavenConstants.MAVEN_REPOSITORY ).getAbsolutePath(); }