Package org.codehaus.mojo.versions.utils
Class DependencyBuilder
java.lang.Object
org.codehaus.mojo.versions.utils.DependencyBuilder
Builder class for Dependency
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.maven.model.Dependencybuild()Builds the Dependency instancestatic org.apache.maven.model.DependencydependencyWith(String groupId, String artifactId, String version) Convenience builder methodstatic org.apache.maven.model.DependencydependencyWith(String groupId, String artifactId, String version, String type, String classifier, String scope) Convenience builder methodstatic DependencyBuilderCreates a new instance of the builderwithArtifactId(String artifactId) Passes artifactId to the builderwithClassifier(String classifier) Passes classifier to the builderwithGroupId(String groupId) Passes groupId to the builderwithOptional(boolean optional) Passes optional to the builder as booleanwithOptional(String optional) Passes optional to the builder as StringPasses scope to the builderPasses type to the builderwithVersion(String version) Passes version to the builder
-
Method Details
-
withGroupId
Passes groupId to the builder- Parameters:
groupId- given groupId- Returns:
- builder instance
-
withArtifactId
Passes artifactId to the builder- Parameters:
artifactId- given artifactId- Returns:
- builder instance
-
withVersion
Passes version to the builder- Parameters:
version- given version- Returns:
- builder instance
-
withType
Passes type to the builder- Parameters:
type- given type- Returns:
- builder instance
-
withClassifier
Passes classifier to the builder- Parameters:
classifier- given classifier- Returns:
- builder instance
-
withScope
Passes scope to the builder- Parameters:
scope- given scope- Returns:
- builder instance
-
withOptional
Passes optional to the builder as String- Parameters:
optional- given optional as String- Returns:
- builder instance
-
withOptional
Passes optional to the builder as boolean- Parameters:
optional- given optional as boolean- Returns:
- builder instance
-
newBuilder
Creates a new instance of the builder- Returns:
- new instance of the builder
-
dependencyWith
public static org.apache.maven.model.Dependency dependencyWith(String groupId, String artifactId, String version) Convenience builder method- Parameters:
groupId- groupId of the dependencyartifactId- artifactId of the dependencyversion- version of the dependency- Returns:
- new instance of Dependency
-
dependencyWith
public static org.apache.maven.model.Dependency dependencyWith(String groupId, String artifactId, String version, String type, String classifier, String scope) Convenience builder method- Parameters:
groupId- groupId of the dependencyartifactId- artifactId of the dependencyversion- version of the dependencytype- type of the dependencyclassifier- classifier of the dependencyscope- scope of the dependency- Returns:
- new instance of Dependency
-
build
public org.apache.maven.model.Dependency build()Builds the Dependency instance- Returns:
- Dependency instance
-