Class MavenProfileActivation.Builder
java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenProfileActivation.Builder
- Enclosing class:
- MavenProfileActivation
Builder for
MavenProfileActivation
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactiveByDefault
(Boolean activeByDefault) Specify if the profile should be enabled if no profile is active.build()
Create aMavenProfileActivation
with the current state of this builder.fileExists
(String existingFile) Specify the file that should exist to enable the profile.fileMissing
(String missingFile) Specify the file that should be missing to enable the profile.Specify the JDK(s) to match to enable the profile.Specify the OS to match to enable the profile.Specify the property to match to enable the profile.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
activeByDefault
Specify if the profile should be enabled if no profile is active.- Parameters:
activeByDefault
- whether to enable the profile is no profile is active- Returns:
- this for method chaining
-
jdk
Specify the JDK(s) to match to enable the profile. Can be a JDK value or an OSGi range.- Parameters:
jdk
- the jdk (or JDKs range) to match- Returns:
- this for method chaining
-
os
Specify the OS to match to enable the profile.- Parameters:
name
- the name of the OSfamily
- the family os OSarch
- the cpu architectureversion
- the version of the OS- Returns:
- this for method chaining
-
property
Specify the property to match to enable the profile.- Parameters:
name
- the name of the propertyvalue
- the value of the property- Returns:
- this for method chaining
-
fileExists
Specify the file that should exist to enable the profile.- Parameters:
existingFile
- the file that should exist- Returns:
- this for method chaining
-
fileMissing
Specify the file that should be missing to enable the profile.- Parameters:
missingFile
- the file that should be missing- Returns:
- this for method chaining
-
build
Create aMavenProfileActivation
with the current state of this builder.- Returns:
- a
MavenProfileActivation
.
-