api / org.gradle.api.artifacts.maven / GroovyMavenDeployer

GroovyMavenDeployer

interface GroovyMavenDeployer : MavenDeployer

Adds Groovy configuration convenience methods on top of the MavenDeployer. This class provides also a builder for repository and snapshot-repository:

 mavenUploader.repository(url: 'file://repoDir') { authentication(userName: 'myName') releases(updatePolicy: 'never') snapshots(updatePolicy: 'always') } 
This call set the repository object and also returns an instance of this object. If you use 'snapshotRepository' instead of repository, the snapshot repository is build.

See Also
MavenDeployer

Inherited Functions

addProtocolProviderJars

abstract fun addProtocolProviderJars(jars: MutableCollection<File>): Unit

Out of the box only uploading to the filesysten and via http is supported. If other protocolls should be used, the appropriate Maven wagon jars have to be passed via this method.

getRepository

abstract fun getRepository(): Any

Returns the repository to be used for uploading artifacts.

getSnapshotRepository

abstract fun getSnapshotRepository(): Any

Returns the repository to be used for uploading snapshot artifacts.

isUniqueVersion

abstract fun isUniqueVersion(): Boolean

Returns whether to assign snapshots a unique version comprised of the timestamp and build number, or to use the same version each time. Defaults to true.

setRepository

abstract fun setRepository(repository: Any): Unit

Sets the repository to be used for uploading artifacts. If #getSnapshotRepository() is not set, this repository is also used for uploading snapshot artifacts.

setSnapshotRepository

abstract fun setSnapshotRepository(snapshotRepository: Any): Unit

Sets the repository to be used for uploading snapshot artifacts. If this is not set, the #getRepository() is used for uploading snapshot artifacts.

setUniqueVersion

abstract fun setUniqueVersion(uniqueVersion: Boolean): Unit

Sets whether to assign snapshots a unique version comprised of the timestamp and build number, or to use the same version each time. Defaults to true.