diff --git a/maven-core/src/main/java/org/apache/maven/MavenConstants.java b/maven-core/src/main/java/org/apache/maven/MavenConstants.java deleted file mode 100644 index 374a7f03f0..0000000000 --- a/maven-core/src/main/java/org/apache/maven/MavenConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.apache.maven; - -/* ==================================================================== - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ==================================================================== - */ - -public class MavenConstants -{ - public static final String MAVEN_MODEL_VERSION = "4.0.0"; - - // ---------------------------------------------------------------------- - // Maven cli - // ---------------------------------------------------------------------- - - public static final String MAVEN_USER_CONFIGURATION_DIRECTORY = ".m2"; - - public static final String MAVEN_REPOSITORY = "repository"; -} diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index 5045b212cb..6699601183 100644 --- a/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -16,10 +16,8 @@ package org.apache.maven.project; * limitations under the License. */ -import org.apache.maven.MavenConstants; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.MavenMetadataSource; -import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException; import org.apache.maven.artifact.factory.ArtifactFactory; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryFactory; @@ -99,6 +97,8 @@ public class DefaultMavenProjectBuilder private final Map modelCache = new HashMap(); + public static final String MAVEN_MODEL_VERSION = "4.0.0"; + public void initialize() { modelReader = new MavenXpp3Reader(); @@ -554,7 +554,7 @@ public class DefaultMavenProjectBuilder private Model getSuperModel() throws ProjectBuildingException { - URL url = DefaultMavenProjectBuilder.class.getResource( "pom-" + MavenConstants.MAVEN_MODEL_VERSION + ".xml" ); + URL url = DefaultMavenProjectBuilder.class.getResource( "pom-" + MAVEN_MODEL_VERSION + ".xml" ); return readModel( url ); } diff --git a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java index 33b5f37179..5aeb711f41 100644 --- a/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java +++ b/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java @@ -16,7 +16,6 @@ package org.apache.maven.settings; * limitations under the License. */ -import org.apache.maven.MavenConstants; import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader; import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; @@ -96,8 +95,7 @@ public class DefaultMavenSettingsBuilder if ( settings.getActiveProfile() == null ) { - File mavenUserConfigurationDirectory = new File( userHome, - MavenConstants.MAVEN_USER_CONFIGURATION_DIRECTORY ); + File mavenUserConfigurationDirectory = new File( userHome, ".m2" ); if ( !mavenUserConfigurationDirectory.exists() ) { if ( !mavenUserConfigurationDirectory.mkdirs() ) @@ -106,7 +104,7 @@ public class DefaultMavenSettingsBuilder } } - String localRepository = new File( mavenUserConfigurationDirectory, MavenConstants.MAVEN_REPOSITORY ).getAbsolutePath(); + String localRepository = new File( mavenUserConfigurationDirectory, "repository" ).getAbsolutePath(); settings.initializeActiveProfile( localRepository ); }