api / org.gradle.api.artifacts.maven

Package org.gradle.api.artifacts.maven

Types

Conf2ScopeMapping

open class Conf2ScopeMapping

An immutable mapping to map a dependency configuration to a Maven scope. This class has implemented equality and hashcode based on its values not on object identity.

Conf2ScopeMappingContainer

interface Conf2ScopeMappingContainer

Defines a set of rules for how to map the Gradle dependencies to a POM. This mapping is based on the configuration the dependencies belong to.

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.

MavenDeployer

interface MavenDeployer : MavenResolver

A resolver that can only be used for uploading artifacts to a Maven repository. If you use this resolver for getting dependencies from a Maven repository, an exception is thrown. This resolver support all aspects of Maven deployment, including snapshot deployment and metadata.xml manipulation.

You have to specify at least one repository. Otherwise, if there is only one artifact, usually there is not more to do. If there is more than one artifact you have to decide what to do about this, as a Maven POM can only deal with one artifact. There are two strategies. If you want to deploy only one artifact you have to specify a filter to select this artifact. If you want to deploy more than one artifact, you have to specify filters which select each artifact. Associated with each filter is a separate configurable POM.

You can create an instance of this type via the org.gradle.api.tasks.Upload#getRepositories() container

MavenDeployment

interface MavenDeployment

Represents the artifacts which will be deployed to a Maven repository. You can use this interface to modify the set of artifacts.

MavenPom

interface MavenPom

Is used for generating a Maven POM file and customizing the generation. To learn about the Maven POM see: http://maven.apache.org/pom.html

MavenResolver

interface MavenResolver : ArtifactRepository, PomFilterContainer

An ArtifactRepository which can be used to publish artifacts to Maven repositories.

PomFilterContainer

interface PomFilterContainer

Manages a set of MavenPom instances and their associated PublishFilter instances.

PublishFilter

interface PublishFilter

A filter for artifacts to be published.