rename group metadata

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@265618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-01 01:56:04 +00:00
parent c0b0b37e2b
commit 9b6a7939db
4 changed files with 14 additions and 11 deletions

View File

@ -16,26 +16,29 @@ package org.apache.maven.artifact.repository.metadata;
* limitations under the License. * limitations under the License.
*/ */
public class PluginMappingMetadata public class GroupRepositoryMetadata
implements RepositoryMetadata 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; private final String groupId;
public PluginMappingMetadata( String groupId ) public GroupRepositoryMetadata( String groupId )
{ {
this.groupId = groupId; this.groupId = groupId;
} }
public String getRepositoryPath() public String getRepositoryPath()
{ {
return groupId + "/" + PLUGIN_MAPPING_FILE; return groupId + "/" + METADATA_FILE;
} }
public String toString() public String toString()
{ {
return PLUGIN_MAPPING_FILE + " (plugin mappings) for group: \'" + groupId + "\'"; return "repository metadata for group: \'" + groupId + "\'";
} }
} }

View File

@ -17,9 +17,9 @@ package org.apache.maven.plugin;
*/ */
import org.apache.maven.artifact.repository.ArtifactRepository; 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.Metadata;
import org.apache.maven.artifact.repository.metadata.Plugin; 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.RepositoryMetadataManagementException;
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
import org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader; 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 ) private void loadPluginMappings( String groupId, List pluginRepositories, ArtifactRepository localRepository )
throws RepositoryMetadataManagementException throws RepositoryMetadataManagementException
{ {
PluginMappingMetadata metadata = new PluginMappingMetadata( groupId ); GroupRepositoryMetadata metadata = new GroupRepositoryMetadata( groupId );
// TOOD: aggregate the results of this instead // TOOD: aggregate the results of this instead
repositoryMetadataManager.resolve( metadata, pluginRepositories, localRepository ); repositoryMetadataManager.resolve( metadata, pluginRepositories, localRepository );

View File

@ -17,7 +17,7 @@ package org.apache.maven.plugin.plugin.metadata;
*/ */
import org.apache.maven.artifact.repository.ArtifactRepository; 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.RepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManagementException; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManagementException;
import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoExecutionException;
@ -36,7 +36,7 @@ public class PluginMappingDeployMojo
public void execute() public void execute()
throws MojoExecutionException throws MojoExecutionException
{ {
RepositoryMetadata metadata = new PluginMappingMetadata( getProject().getGroupId() ); RepositoryMetadata metadata = new GroupRepositoryMetadata( getProject().getGroupId() );
ArtifactRepository distributionRepository = getProject().getDistributionManagementArtifactRepository(); ArtifactRepository distributionRepository = getProject().getDistributionManagementArtifactRepository();

View File

@ -16,7 +16,7 @@ package org.apache.maven.plugin.plugin.metadata;
* limitations under the License. * 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.RepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManagementException; import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManagementException;
import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoExecutionException;
@ -34,7 +34,7 @@ public class PluginMappingInstallMojo
public void execute() public void execute()
throws MojoExecutionException throws MojoExecutionException
{ {
RepositoryMetadata metadata = new PluginMappingMetadata( getProject().getGroupId() ); RepositoryMetadata metadata = new GroupRepositoryMetadata( getProject().getGroupId() );
try try
{ {