Class MavenResourceContainer
java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenResourceContainer
A container for
MavenResources.- Author:
- Stephane Nicoll
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a resource with default settings for the specifieddirectory.voidadd(String directory, Consumer<MavenResource.Builder> resource) Add a resource with default settings for the specifieddirectoryandConsumerto customize the resource.booleanSpecify if this container has a resource the specifieddirectory.booleanisEmpty()Specify if this container is empty.booleanRemove the resource with the specifieddirectory.values()Returns aStreamof registeredMavenResources.
-
Constructor Details
-
MavenResourceContainer
public MavenResourceContainer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
trueif noMavenResourceis added
-
has
Specify if this container has a resource the specifieddirectory.- Parameters:
directory- the resource directory- Returns:
trueif an item for the specifieddirectoryexists
-
values
Returns aStreamof registeredMavenResources.- Returns:
- a stream of
MavenResources
-
add
Add a resource with default settings for the specifieddirectory.- Parameters:
directory- the directory to add
-
add
Add a resource with default settings for the specifieddirectoryandConsumerto customize the resource. If the resource has already been added, the consumer can be used to further tune the existing resource configuration.- Parameters:
directory- the directory to addresource- aConsumerto customize theMavenResource
-
remove
Remove the resource with the specifieddirectory.- Parameters:
directory- the directory to remove- Returns:
trueif such a resource was registered,falseotherwise
-