Class DistributionManagement

java.lang.Object
org.apache.maven.api.model.DistributionManagement
All Implemented Interfaces:
Serializable, InputLocationTracker

@Experimental @Generated @ThreadSafe @Immutable public class DistributionManagement extends Object implements Serializable, InputLocationTracker
This elements describes all that pertains to distribution for a project. It is primarily used for deployment of artifacts and the site produced by the build.
See Also:
  • Method Details

    • getRepository

      public DeploymentRepository getRepository()
      Information needed to deploy the artifacts generated by the project to a remote repository.
      Returns:
      a DeploymentRepository
    • getSnapshotRepository

      public DeploymentRepository getSnapshotRepository()
      Where to deploy snapshots of artifacts to. If not given, it defaults to the repository element.
      Returns:
      a DeploymentRepository
    • getSite

      public Site getSite()
      Information needed for deploying the web site of the project.
      Returns:
      a Site
    • getDownloadUrl

      public String getDownloadUrl()
      The URL of the project's download page. If not given users will be referred to the homepage given by url. This is given to assist in locating artifacts that are not in the repository due to licensing restrictions.
      Returns:
      a String
    • getRelocation

      public Relocation getRelocation()
      Relocation information of the artifact if it has been moved to a new group ID and/or artifact ID.
      Returns:
      a Relocation
    • getStatus

      public String getStatus()
      Gives the status of this artifact in the remote repository. This must not be set in your local project, as it is updated by tools placing it in the reposiory. Valid values are: none (default), converted (repository manager converted this from an Maven 1 POM), partner (directly synced from a partner Maven 2 repository), deployed (was deployed from a Maven 2 instance), verified (has been hand verified as correct and final).
      Returns:
      a String
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withRepository

      @Nonnull public DistributionManagement withRepository(DeploymentRepository repository)
      Creates a new DistributionManagement instance using the specified repository.
      Parameters:
      repository - the new DeploymentRepository to use
      Returns:
      a DistributionManagement with the specified repository
    • withSnapshotRepository

      @Nonnull public DistributionManagement withSnapshotRepository(DeploymentRepository snapshotRepository)
      Creates a new DistributionManagement instance using the specified snapshotRepository.
      Parameters:
      snapshotRepository - the new DeploymentRepository to use
      Returns:
      a DistributionManagement with the specified snapshotRepository
    • withSite

      @Nonnull public DistributionManagement withSite(Site site)
      Creates a new DistributionManagement instance using the specified site.
      Parameters:
      site - the new Site to use
      Returns:
      a DistributionManagement with the specified site
    • withDownloadUrl

      @Nonnull public DistributionManagement withDownloadUrl(String downloadUrl)
      Creates a new DistributionManagement instance using the specified downloadUrl.
      Parameters:
      downloadUrl - the new String to use
      Returns:
      a DistributionManagement with the specified downloadUrl
    • withRelocation

      @Nonnull public DistributionManagement withRelocation(Relocation relocation)
      Creates a new DistributionManagement instance using the specified relocation.
      Parameters:
      relocation - the new Relocation to use
      Returns:
      a DistributionManagement with the specified relocation
    • withStatus

      @Nonnull public DistributionManagement withStatus(String status)
      Creates a new DistributionManagement instance using the specified status.
      Parameters:
      status - the new String to use
      Returns:
      a DistributionManagement with the specified status
    • newInstance

      @Nonnull public static DistributionManagement newInstance()
      Creates a new DistributionManagement instance. Equivalent to newInstance( true ).
      Returns:
      a new DistributionManagement
      See Also:
    • newInstance

      @Nonnull public static DistributionManagement newInstance(boolean withDefaults)
      Creates a new DistributionManagement instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new DistributionManagement
    • newBuilder

      @Nonnull public static DistributionManagement.Builder newBuilder()
      Creates a new DistributionManagement builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static DistributionManagement.Builder newBuilder(boolean withDefaults)
      Creates a new DistributionManagement builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      Creates a new DistributionManagement builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the DistributionManagement instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static DistributionManagement.Builder newBuilder(DistributionManagement from, boolean forceCopy)
      Creates a new DistributionManagement builder instance using the specified object as a basis.
      Parameters:
      from - the DistributionManagement instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder