From 9b6a7939dbcb43d9f7cbc19c615977cd4bef8716 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Thu, 1 Sep 2005 01:56:04 +0000 Subject: [PATCH] rename group metadata git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@265618 13f79535-47bb-0310-9956-ffa450edef68 --- .../metadata/GroupRepositoryMetadata.java | 13 ++++++++----- .../maven/plugin/DefaultPluginMappingManager.java | 4 ++-- .../plugin/metadata/PluginMappingDeployMojo.java | 4 ++-- .../plugin/metadata/PluginMappingInstallMojo.java | 4 ++-- 4 files changed, 14 insertions(+), 11 deletions(-) rename maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/PluginMappingMetadata.java => maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java (73%) diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/PluginMappingMetadata.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java similarity index 73% rename from maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/PluginMappingMetadata.java rename to maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java index c2180b6fec..b3cdf7b27e 100644 --- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/repository/metadata/PluginMappingMetadata.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.java @@ -16,26 +16,29 @@ package org.apache.maven.artifact.repository.metadata; * limitations under the License. */ -public class PluginMappingMetadata +public class GroupRepositoryMetadata implements RepositoryMetadata { - private static final String PLUGIN_MAPPING_FILE = "plugins.xml"; + /** + * TODO: reuse. + */ + protected static final String METADATA_FILE = "maven-metadata.xml"; private final String groupId; - public PluginMappingMetadata( String groupId ) + public GroupRepositoryMetadata( String groupId ) { this.groupId = groupId; } public String getRepositoryPath() { - return groupId + "/" + PLUGIN_MAPPING_FILE; + return groupId + "/" + METADATA_FILE; } public String toString() { - return PLUGIN_MAPPING_FILE + " (plugin mappings) for group: \'" + groupId + "\'"; + return "repository metadata for group: \'" + groupId + "\'"; } } diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginMappingManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginMappingManager.java index 92d9b31bde..4ed204841d 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginMappingManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginMappingManager.java @@ -17,9 +17,9 @@ package org.apache.maven.plugin; */ import org.apache.maven.artifact.repository.ArtifactRepository; +import org.apache.maven.artifact.repository.metadata.GroupRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.Plugin; -import org.apache.maven.artifact.repository.metadata.PluginMappingMetadata; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManagementException; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager; import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader; @@ -97,7 +97,7 @@ public class DefaultPluginMappingManager private void loadPluginMappings( String groupId, List pluginRepositories, ArtifactRepository localRepository ) throws RepositoryMetadataManagementException { - PluginMappingMetadata metadata = new PluginMappingMetadata( groupId ); + GroupRepositoryMetadata metadata = new GroupRepositoryMetadata( groupId ); // TOOD: aggregate the results of this instead repositoryMetadataManager.resolve( metadata, pluginRepositories, localRepository ); diff --git a/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java b/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java index 66b6addaca..9cfe323c95 100644 --- a/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java +++ b/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingDeployMojo.java @@ -17,7 +17,7 @@ package org.apache.maven.plugin.plugin.metadata; */ import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.repository.metadata.PluginMappingMetadata; +import org.apache.maven.artifact.repository.metadata.GroupRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManagementException; import org.apache.maven.plugin.MojoExecutionException; @@ -36,7 +36,7 @@ public class PluginMappingDeployMojo public void execute() throws MojoExecutionException { - RepositoryMetadata metadata = new PluginMappingMetadata( getProject().getGroupId() ); + RepositoryMetadata metadata = new GroupRepositoryMetadata( getProject().getGroupId() ); ArtifactRepository distributionRepository = getProject().getDistributionManagementArtifactRepository(); diff --git a/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingInstallMojo.java b/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingInstallMojo.java index 65ea039c0d..950928e4ae 100644 --- a/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingInstallMojo.java +++ b/maven-plugins/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/PluginMappingInstallMojo.java @@ -16,7 +16,7 @@ package org.apache.maven.plugin.plugin.metadata; * limitations under the License. */ -import org.apache.maven.artifact.repository.metadata.PluginMappingMetadata; +import org.apache.maven.artifact.repository.metadata.GroupRepositoryMetadata; import org.apache.maven.artifact.repository.metadata.RepositoryMetadata; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManagementException; import org.apache.maven.plugin.MojoExecutionException; @@ -34,7 +34,7 @@ public class PluginMappingInstallMojo public void execute() throws MojoExecutionException { - RepositoryMetadata metadata = new PluginMappingMetadata( getProject().getGroupId() ); + RepositoryMetadata metadata = new GroupRepositoryMetadata( getProject().getGroupId() ); try {