Skip to content

Commit

Permalink
Remove empty dependency scope from the api
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Feb 7, 2024
1 parent 76794c0 commit cc40ce8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ public enum DependencyScope {
*/
NONE("none", false),

/**
* Empty scope.
*/
EMPTY("", false),

/**
* Compile only.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,16 @@ public interface PathScope extends ExtensibleEnum {
PathScope MAIN_COMPILE = pathScope(
"main-compile",
ProjectScope.MAIN,
DependencyScope.EMPTY,
DependencyScope.COMPILE_ONLY,
DependencyScope.COMPILE,
DependencyScope.PROVIDED);

PathScope MAIN_RUNTIME = pathScope(
"main-runtime", ProjectScope.MAIN, DependencyScope.EMPTY, DependencyScope.COMPILE, DependencyScope.RUNTIME);
PathScope MAIN_RUNTIME =
pathScope("main-runtime", ProjectScope.MAIN, DependencyScope.COMPILE, DependencyScope.RUNTIME);

PathScope TEST_COMPILE = pathScope(
"test-compile",
ProjectScope.TEST,
DependencyScope.EMPTY,
DependencyScope.COMPILE,
DependencyScope.PROVIDED,
DependencyScope.TEST_ONLY,
Expand All @@ -75,7 +73,6 @@ public interface PathScope extends ExtensibleEnum {
PathScope TEST_RUNTIME = pathScope(
"test-runtime",
ProjectScope.TEST,
DependencyScope.EMPTY,
DependencyScope.COMPILE,
DependencyScope.RUNTIME,
DependencyScope.PROVIDED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
import java.util.Collection;
import java.util.Collections;

import org.apache.maven.api.ArtifactCoordinate;
import org.apache.maven.api.Dependency;
import org.apache.maven.api.Exclusion;
import org.apache.maven.api.Session;
import org.apache.maven.api.*;
import org.apache.maven.api.annotations.Experimental;
import org.apache.maven.api.annotations.Immutable;
import org.apache.maven.api.annotations.Nonnull;
Expand Down Expand Up @@ -110,7 +107,7 @@ class DependencyCoordinateFactoryRequestBuilder {
private String extension;
private String type;
private String coordinateString;
private String scope;
private String scope = DependencyScope.COMPILE.id();
private boolean optional;
private Collection<Exclusion> exclusions = Collections.emptyList();

Expand Down

0 comments on commit cc40ce8

Please sign in to comment.