Class MavenPlugin.Builder
java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenPlugin.Builder
- Enclosing class:
- MavenPlugin
Builder for a
MavenPlugin
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build aMavenPlugin
with the current state of this builder.configuration
(Consumer<MavenPlugin.ConfigurationBuilder> configuration) Customize theconfiguration
of the plugin using the specified consumer.dependency
(String groupId, String artifactId, String version) Add a plugin dependency.execution
(String id, Consumer<MavenPlugin.ExecutionBuilder> execution) Add anexecution
with the specified id andConsumer
to customize the object.extensions
(boolean extensions) Set whether to load extensions of this plugin.Set the version of the plugin ornull
if the version is managed by the project.
-
Constructor Details
-
Builder
-
-
Method Details
-
version
Set the version of the plugin ornull
if the version is managed by the project.- Parameters:
version
- the version of the plugin ornull
- Returns:
- this for method chaining
-
extensions
Set whether to load extensions of this plugin.- Parameters:
extensions
- whether to load extensions- Returns:
- this for method chaining
-
configuration
Customize theconfiguration
of the plugin using the specified consumer.- Parameters:
configuration
- a consumer of the current configuration- Returns:
- this for method chaining
-
execution
Add anexecution
with the specified id andConsumer
to customize the object. If the execution has already been¬ added, the consumer can be used to further tune the existing plugin execution- Parameters:
id
- the id of the executionexecution
- aConsumer
to customize theMavenPlugin.Execution
- Returns:
- this for method chaining
-
dependency
Add a plugin dependency.- Parameters:
groupId
- the group ID of the dependencyartifactId
- the artifact ID of the dependencyversion
- the version of the dependency- Returns:
- this for method chaining
-
build
Build aMavenPlugin
with the current state of this builder.- Returns:
- a
MavenBuild
-