Package org.apache.maven.api.model
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create DistributionManagement instances. -
Method Summary
Modifier and TypeMethodDescriptionThe URL of the project's download page.getLocation
(Object key) Gets the location of the specified field in the input source.Relocation information of the artifact if it has been moved to a new group ID and/or artifact ID.Information needed to deploy the artifacts generated by the project to a remote repository.getSite()
Information needed for deploying the web site of the project.Where to deploy snapshots of artifacts to.Gives the status of this artifact in the remote repository.Creates a newDistributionManagement
builder instance.newBuilder
(boolean withDefaults) Creates a newDistributionManagement
builder instance using default values or not.Creates a newDistributionManagement
builder instance using the specified object as a basis.newBuilder
(DistributionManagement from, boolean forceCopy) Creates a newDistributionManagement
builder instance using the specified object as a basis.static DistributionManagement
Creates a newDistributionManagement
instance.static DistributionManagement
newInstance
(boolean withDefaults) Creates a newDistributionManagement
instance using default values or not.with()
Creates a new builder with this object as the basis.withDownloadUrl
(String downloadUrl) Creates a newDistributionManagement
instance using the specified downloadUrl.withRelocation
(Relocation relocation) Creates a newDistributionManagement
instance using the specified relocation.withRepository
(DeploymentRepository repository) Creates a newDistributionManagement
instance using the specified repository.Creates a newDistributionManagement
instance using the specified site.withSnapshotRepository
(DeploymentRepository snapshotRepository) Creates a newDistributionManagement
instance using the specified snapshotRepository.withStatus
(String status) Creates a newDistributionManagement
instance using the specified status.
-
Method Details
-
getRepository
Information needed to deploy the artifacts generated by the project to a remote repository.- Returns:
- a
DeploymentRepository
-
getSnapshotRepository
Where to deploy snapshots of artifacts to. If not given, it defaults to therepository
element.- Returns:
- a
DeploymentRepository
-
getSite
Information needed for deploying the web site of the project.- Returns:
- a
Site
-
getDownloadUrl
The URL of the project's download page. If not given users will be referred to the homepage given byurl
. This is given to assist in locating artifacts that are not in the repository due to licensing restrictions.- Returns:
- a
String
-
getRelocation
Relocation information of the artifact if it has been moved to a new group ID and/or artifact ID.- Returns:
- a
Relocation
-
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 repository. 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
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withRepository
Creates a newDistributionManagement
instance using the specified repository.- Parameters:
repository
- the newDeploymentRepository
to use- Returns:
- a
DistributionManagement
with the specified repository
-
withSnapshotRepository
@Nonnull public DistributionManagement withSnapshotRepository(DeploymentRepository snapshotRepository) Creates a newDistributionManagement
instance using the specified snapshotRepository.- Parameters:
snapshotRepository
- the newDeploymentRepository
to use- Returns:
- a
DistributionManagement
with the specified snapshotRepository
-
withSite
Creates a newDistributionManagement
instance using the specified site.- Parameters:
site
- the newSite
to use- Returns:
- a
DistributionManagement
with the specified site
-
withDownloadUrl
Creates a newDistributionManagement
instance using the specified downloadUrl.- Parameters:
downloadUrl
- the newString
to use- Returns:
- a
DistributionManagement
with the specified downloadUrl
-
withRelocation
Creates a newDistributionManagement
instance using the specified relocation.- Parameters:
relocation
- the newRelocation
to use- Returns:
- a
DistributionManagement
with the specified relocation
-
withStatus
Creates a newDistributionManagement
instance using the specified status.- Parameters:
status
- the newString
to use- Returns:
- a
DistributionManagement
with the specified status
-
newInstance
Creates a newDistributionManagement
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
DistributionManagement
- See Also:
-
newInstance
Creates a newDistributionManagement
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
DistributionManagement
-
newBuilder
Creates a newDistributionManagement
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newDistributionManagement
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 newDistributionManagement
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theDistributionManagement
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
@Nonnull public static DistributionManagement.Builder newBuilder(DistributionManagement from, boolean forceCopy) Creates a newDistributionManagement
builder instance using the specified object as a basis.- Parameters:
from
- theDistributionManagement
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-