Class MavenPluginContainer
java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenPluginContainer
A container for
MavenPlugins.- Author:
- HaiTao Zhang
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd(String groupId, String artifactId, Consumer<MavenPlugin.Builder> plugin) booleanSpecify if this container has a plugin with the specifiedgroupIdandartifactId.booleanisEmpty()Specify if this container is empty.booleanRemove the plugin with the specifiedgroupIdandartifactId.values()Returns aStreamof registeredMavenPlugins.
-
Constructor Details
-
MavenPluginContainer
public MavenPluginContainer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
trueif noMavenPluginis added
-
has
Specify if this container has a plugin with the specifiedgroupIdandartifactId.- Parameters:
groupId- the groupId of the pluginartifactId- the artifactId of the plugin- Returns:
trueif an item with the specifiedgroupIdandartifactIdexists
-
values
Returns aStreamof registeredMavenPlugins.- Returns:
- a stream of
MavenPlugins
-
add
Add aMavenPluginwith the specifiedgroupIdandartifactId. Does nothing if the plugin has already been added.- Parameters:
groupId- the groupId of the pluginartifactId- the artifactId of the plugin- See Also:
-
add
Add aMavenPluginwith the specifiedgroupIdandartifactIdandConsumerto customize the plugin. If the plugin has already been added, the consumer can be used to further tune the existing plugin configuration.- Parameters:
groupId- the groupId of the pluginartifactId- the artifactId of the pluginplugin- aConsumerto customize theMavenPlugin
-
remove
Remove the plugin with the specifiedgroupIdandartifactId.- Parameters:
groupId- the groupId of the plugin to removeartifactId- the artifactId of the plugin to remove- Returns:
trueif such a plugin was registered,falseotherwise
-