Class MavenBuildSettings.Builder

java.lang.Object
io.spring.initializr.generator.buildsystem.BuildSettings.Builder<MavenBuildSettings.Builder>
io.spring.initializr.generator.buildsystem.maven.MavenBuildSettings.Builder
Enclosing class:
MavenBuildSettings

public static class MavenBuildSettings.Builder extends BuildSettings.Builder<MavenBuildSettings.Builder>
Builder for BuildSettings.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • coordinates

      public MavenBuildSettings.Builder coordinates(String groupId, String artifactId)
      Set the coordinates of the project.
      Parameters:
      groupId - the group ID of the project
      artifactId - the artifact ID of the project
      Returns:
      this for method chaining
    • parent

      public MavenBuildSettings.Builder parent(String groupId, String artifactId, String version)
      Set the coordinates of the parent, to be resolved against the repository.
      Parameters:
      groupId - the groupID of the parent
      artifactId - the artifactID of the parent
      version - the version of the parent
      Returns:
      this for method chaining
      See Also:
    • parent

      public MavenBuildSettings.Builder parent(String groupId, String artifactId, String version, String relativePath)
      Set the coordinates of the parent and its relative path. The relative path can be set to null to let Maven search the parent using local file search, for instance pom.xml in the parent directory. It can also be set to an empty string to specify that it should be resolved against the repository.
      Parameters:
      groupId - the groupID of the parent
      artifactId - the artifactID of the parent
      version - the version of the parent
      relativePath - the relative path
      Returns:
      this for method chaining
    • packaging

      public MavenBuildSettings.Builder packaging(String packaging)
      Set the packaging of the project.
      Parameters:
      packaging - the packaging
      Returns:
      this for method chaining
      See Also:
    • name

      public MavenBuildSettings.Builder name(String name)
      Set the name of the project.
      Parameters:
      name - the name of the project
      Returns:
      this for method chaining
    • description

      public MavenBuildSettings.Builder description(String description)
      Set a human readable description of the project.
      Parameters:
      description - the description of the project
      Returns:
      this for method chaining
    • licenses

      public MavenBuildSettings.Builder licenses(MavenLicense... licenses)
      Set the licenses of the project.
      Parameters:
      licenses - the licenses associated with the project
      Returns:
      this for method chaining
    • developers

      public MavenBuildSettings.Builder developers(MavenDeveloper... developers)
      Set the developers of the project.
      Parameters:
      developers - the developers associated with the project
      Returns:
      this for method chaining
    • scm

      Customize the scm section using the specified consumer.
      Parameters:
      scm - a consumer of the current version control section
      Returns:
      this for method chaining
    • finalName

      public MavenBuildSettings.Builder finalName(String finalName)
      Set the name of the bundled project when it is finally built.
      Parameters:
      finalName - the final name of the artifact
      Returns:
      this for method chaining
    • defaultGoal

      public MavenBuildSettings.Builder defaultGoal(String defaultGoal)
      Set the default goal or phase to execute if none is given.
      Parameters:
      defaultGoal - the default goal or null to use the default
      Returns:
      this for method chaining
    • sourceDirectory

      public MavenBuildSettings.Builder sourceDirectory(String sourceDirectory)
      Set the the location of main source code. Can use Maven properties such as ${basedir}.
      Parameters:
      sourceDirectory - the location of main source code or null to use the default
      Returns:
      this for method chaining
    • testSourceDirectory

      public MavenBuildSettings.Builder testSourceDirectory(String testSourceDirectory)
      Set the the location of test source code. Can use Maven properties such as ${basedir}.
      Parameters:
      testSourceDirectory - the location of test source code or null to use the default
      Returns:
      this for method chaining
    • build

      public MavenBuildSettings build()
      Description copied from class: BuildSettings.Builder
      Build a BuildSettings with the current state of this builder.
      Overrides:
      build in class BuildSettings.Builder<MavenBuildSettings.Builder>
      Returns:
      a BuildSettings