Class MavenProfileActivation.Builder

java.lang.Object
io.spring.initializr.generator.buildsystem.maven.MavenProfileActivation.Builder
Enclosing class:
MavenProfileActivation

public static class MavenProfileActivation.Builder extends Object
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • activeByDefault

      public MavenProfileActivation.Builder activeByDefault(Boolean 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

      public MavenProfileActivation.Builder os(String name, String family, String arch, String version)
      Specify the OS to match to enable the profile.
      Parameters:
      name - the name of the OS
      family - the family os OS
      arch - the cpu architecture
      version - the version of the OS
      Returns:
      this for method chaining
    • property

      public MavenProfileActivation.Builder property(String name, String value)
      Specify the property to match to enable the profile.
      Parameters:
      name - the name of the property
      value - the value of the property
      Returns:
      this for method chaining
    • fileExists

      public MavenProfileActivation.Builder fileExists(String existingFile)
      Specify the file that should exist to enable the profile.
      Parameters:
      existingFile - the file that should exist
      Returns:
      this for method chaining
    • fileMissing

      public MavenProfileActivation.Builder fileMissing(String missingFile)
      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

      public MavenProfileActivation build()
      Create a MavenProfileActivation with the current state of this builder.
      Returns:
      a MavenProfileActivation.