mirror of https://github.com/apache/maven.git
[MNG-7874] Use name constants instead of free string literals (#1229)
Maven Resolver Provider: get rid of name free string literals.
Forward port of bbd84c6c87
---
https://issues.apache.org/jira/browse/MNG-7874
This commit is contained in:
parent
1c050eee7b
commit
0ea8879eea
|
@ -30,9 +30,11 @@ import org.eclipse.aether.installation.InstallRequest;
|
|||
/**
|
||||
* Maven G level metadata generator factory.
|
||||
*/
|
||||
@Named("plugins")
|
||||
@Named(PluginsMetadataGeneratorFactory.NAME)
|
||||
@Singleton
|
||||
public class PluginsMetadataGeneratorFactory implements MetadataGeneratorFactory {
|
||||
public static final String NAME = "plugins";
|
||||
|
||||
@Override
|
||||
public MetadataGenerator newInstance(RepositorySystemSession session, InstallRequest request) {
|
||||
return new PluginsMetadataGenerator(session, request);
|
||||
|
|
|
@ -30,9 +30,11 @@ import org.eclipse.aether.installation.InstallRequest;
|
|||
/**
|
||||
* Maven GAV level metadata generator factory.
|
||||
*/
|
||||
@Named("snapshot")
|
||||
@Named(SnapshotMetadataGeneratorFactory.NAME)
|
||||
@Singleton
|
||||
public class SnapshotMetadataGeneratorFactory implements MetadataGeneratorFactory {
|
||||
public static final String NAME = "snapshot";
|
||||
|
||||
@Override
|
||||
public MetadataGenerator newInstance(RepositorySystemSession session, InstallRequest request) {
|
||||
return new LocalSnapshotMetadataGenerator(session, request);
|
||||
|
|
|
@ -30,9 +30,11 @@ import org.eclipse.aether.installation.InstallRequest;
|
|||
/**
|
||||
* Maven GA level metadata generator factory.
|
||||
*/
|
||||
@Named("versions")
|
||||
@Named(VersionsMetadataGeneratorFactory.NAME)
|
||||
@Singleton
|
||||
public class VersionsMetadataGeneratorFactory implements MetadataGeneratorFactory {
|
||||
public static final String NAME = "versions";
|
||||
|
||||
@Override
|
||||
public MetadataGenerator newInstance(RepositorySystemSession session, InstallRequest request) {
|
||||
return new VersionsMetadataGenerator(session, request);
|
||||
|
|
Loading…
Reference in New Issue