Skip to content

Commit

Permalink
Move trivial commands as defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamas committed Mar 25, 2024
1 parent 4a1ab6a commit edfc501
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,30 @@ default String getVersion() {
/**
* Parses artifact mapper string into {@link ArtifactMapper}.
*/
ArtifactMapper parseArtifactMapperSpec(String spec);
default ArtifactMapper parseArtifactMapperSpec(String spec) {
return ArtifactMapper.parse(spec);
}

/**
* Parses artifact matcher string into {@link ArtifactMatcher}.
*/
ArtifactMatcher parseArtifactMatcherSpec(String spec);
default ArtifactMatcher parseArtifactMatcherSpec(String spec) {
return ArtifactMatcher.parse(spec);
}

/**
* Parses artifact name mapper string into {@link ArtifactNameMapper}.
*/
ArtifactNameMapper parseArtifactNameMapperSpec(String spec);
default ArtifactNameMapper parseArtifactNameMapperSpec(String spec) {
return ArtifactNameMapper.parse(spec);
}

/**
* Parses dependency matcher string into {@link DependencyMatcher}.
*/
DependencyMatcher parseDependencyMatcherSpec(String spec);
default DependencyMatcher parseDependencyMatcherSpec(String spec) {
return DependencyMatcher.parse(spec);
}

/**
* Parses remote repository string into {@link RemoteRepository}. It may be {@code url} only, {@code id::url} or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,26 +220,6 @@ public boolean dump(boolean verbose, Output output) {
return true;
}

@Override
public ArtifactMapper parseArtifactMapperSpec(String spec) {
return ArtifactMapper.parse(spec);
}

@Override
public ArtifactMatcher parseArtifactMatcherSpec(String spec) {
return ArtifactMatcher.parse(spec);
}

@Override
public ArtifactNameMapper parseArtifactNameMapperSpec(String spec) {
return ArtifactNameMapper.parse(spec);
}

@Override
public DependencyMatcher parseDependencyMatcherSpec(String spec) {
return DependencyMatcher.parse(spec);
}

@Override
public RemoteRepository parseRemoteRepository(String spec) {
return toolboxResolver.parseRemoteRepository(spec);
Expand Down

0 comments on commit edfc501

Please sign in to comment.