Class MavenDependency
java.lang.Object
io.spring.initializr.generator.buildsystem.Dependency
io.spring.initializr.generator.buildsystem.maven.MavenDependency
Maven-specific
Dependency
.- Author:
- Stephane Nicoll
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for a Maven dependency.Nested classes/interfaces inherited from class io.spring.initializr.generator.buildsystem.Dependency
Dependency.Exclusion
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MavenDependency.Builder
from
(Dependency dependency) Initialize a new dependencyMavenDependency.Builder
with the state of the specifiedDependency
.boolean
Return whether this dependency isoptional
.static MavenDependency.Builder
withCoordinates
(String groupId, String artifactId) Initialize a new dependencyMavenDependency.Builder
with the specified coordinates.Methods inherited from class io.spring.initializr.generator.buildsystem.Dependency
getArtifactId, getClassifier, getExclusions, getGroupId, getScope, getType, getVersion
-
Field Details
-
optional
protected final boolean optional
-
-
Constructor Details
-
MavenDependency
-
-
Method Details
-
withCoordinates
Initialize a new dependencyMavenDependency.Builder
with the specified coordinates.- Parameters:
groupId
- the group ID of the dependencyartifactId
- the artifact ID of the dependency- Returns:
- a new builder
-
from
Initialize a new dependencyMavenDependency.Builder
with the state of the specifiedDependency
.- Parameters:
dependency
- the dependency to use to initialize the builder- Returns:
- a new builder initialized with the same state as the
dependency
-
isOptional
public boolean isOptional()Return whether this dependency isoptional
.- Returns:
true
if the dependency is optional
-