Class MavenRepository.Builder

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

public static class MavenRepository.Builder extends Object
  • Constructor Details

  • Method Details

    • id

      Set the id of the repository.
      Parameters:
      id - the identifier
      Returns:
      this for method chaining
    • name

      public MavenRepository.Builder name(String name)
      Set the name of the repository.
      Parameters:
      name - the name
      Returns:
      this for method chaining
    • url

      public MavenRepository.Builder url(String url)
      Set the url of the repository.
      Parameters:
      url - the url
      Returns:
      this for method chaining
    • releasesEnabled

      public MavenRepository.Builder releasesEnabled(boolean releasesEnabled)
      Specify whether releases are enabled.
      Parameters:
      releasesEnabled - whether releases are served by the repository
      Returns:
      this for method chaining
    • snapshotsEnabled

      public MavenRepository.Builder snapshotsEnabled(boolean snapshotsEnabled)
      Specify whether snapshots are enabled.
      Parameters:
      snapshotsEnabled - whether snapshots are served by the repository
      Returns:
      this for method chaining
    • onlyReleases

      public MavenRepository.Builder onlyReleases()
      Specify that the repository should only be used for releases.
      Returns:
      this for method chaining
    • onlySnapshots

      public MavenRepository.Builder onlySnapshots()
      Specify that the repository should only be used for snapshots.
      Returns:
      this for method chaining
    • build

      public MavenRepository build()
      Build a MavenRepository with the current state of this builder.
      Returns:
      a MavenRepository