Class MavenBuildSettings.Builder
java.lang.Object
io.spring.initializr.generator.buildsystem.BuildSettings.Builder<MavenBuildSettings.Builder>
io.spring.initializr.generator.buildsystem.maven.MavenBuildSettings.Builder
- Enclosing class:
- MavenBuildSettings
public static class MavenBuildSettings.Builder
extends BuildSettings.Builder<MavenBuildSettings.Builder>
Builder for
BuildSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aBuildSettingswith the current state of this builder.coordinates(String groupId, String artifactId) Set the coordinates of the project.defaultGoal(String defaultGoal) Set the default goal or phase to execute if none is given.description(String description) Set a human readable description of the project.developers(MavenDeveloper... developers) Set the developers of the project.Set the name of the bundled project when it is finally built.licenses(MavenLicense... licenses) Set the licenses of the project.Set the name of the project.Set the packaging of the project.Set the coordinates of the parent, to be resolved against the repository.Set the coordinates of the parent and its relative path.scm(Consumer<MavenScm.Builder> scm) Customize thescmsection using the specified consumer.sourceDirectory(String sourceDirectory) Set the the location of main source code.testSourceDirectory(String testSourceDirectory) Set the the location of test source code.Methods inherited from class io.spring.initializr.generator.buildsystem.BuildSettings.Builder
artifact, group, self, version
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
coordinates
Set the coordinates of the project.- Parameters:
groupId- the group ID of the projectartifactId- the artifact ID of the project- Returns:
- this for method chaining
-
parent
Set the coordinates of the parent, to be resolved against the repository.- Parameters:
groupId- the groupID of the parentartifactId- the artifactID of the parentversion- the version of the parent- Returns:
- this for method chaining
- See Also:
-
parent
public MavenBuildSettings.Builder parent(String groupId, String artifactId, String version, String relativePath) Set the coordinates of the parent and its relative path. The relative path can be set tonullto let Maven search the parent using local file search, for instancepom.xmlin the parent directory. It can also be set to an empty string to specify that it should be resolved against the repository.- Parameters:
groupId- the groupID of the parentartifactId- the artifactID of the parentversion- the version of the parentrelativePath- the relative path- Returns:
- this for method chaining
-
packaging
Set the packaging of the project.- Parameters:
packaging- the packaging- Returns:
- this for method chaining
- See Also:
-
name
Set the name of the project.- Parameters:
name- the name of the project- Returns:
- this for method chaining
-
description
Set a human readable description of the project.- Parameters:
description- the description of the project- Returns:
- this for method chaining
-
licenses
Set the licenses of the project.- Parameters:
licenses- the licenses associated with the project- Returns:
- this for method chaining
-
developers
Set the developers of the project.- Parameters:
developers- the developers associated with the project- Returns:
- this for method chaining
-
scm
Customize thescmsection using the specified consumer.- Parameters:
scm- a consumer of the current version control section- Returns:
- this for method chaining
-
finalName
Set the name of the bundled project when it is finally built.- Parameters:
finalName- the final name of the artifact- Returns:
- this for method chaining
-
defaultGoal
Set the default goal or phase to execute if none is given.- Parameters:
defaultGoal- the default goal ornullto use the default- Returns:
- this for method chaining
-
sourceDirectory
Set the the location of main source code. Can use Maven properties such as${basedir}.- Parameters:
sourceDirectory- the location of main source code ornullto use the default- Returns:
- this for method chaining
-
testSourceDirectory
Set the the location of test source code. Can use Maven properties such as${basedir}.- Parameters:
testSourceDirectory- the location of test source code ornullto use the default- Returns:
- this for method chaining
-
build
Description copied from class:BuildSettings.BuilderBuild aBuildSettingswith the current state of this builder.- Overrides:
buildin classBuildSettings.Builder<MavenBuildSettings.Builder>- Returns:
- a
BuildSettings
-