Skip to content

Commit

Permalink
[MNG-7874] Use name constants instead of free string literals (#1229)
Browse files Browse the repository at this point in the history
Maven Resolver Provider: get rid of name free string literals.

---

https://issues.apache.org/jira/browse/MNG-7874
  • Loading branch information
cstamas committed Sep 8, 2023
1 parent 84ee422 commit bbd84c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
/**
* 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
/**
* 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
/**
* 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);
Expand Down

0 comments on commit bbd84c6

Please sign in to comment.