|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
org.gradle.api.artifacts.repositories.ArtifactRepository org.gradle.api.artifacts.maven.PomFilterContainer org.gradle.api.artifacts.maven.MavenDeployer org.gradle.api.artifacts.maven.MavenResolver
public interface MavenDeployer extends 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 Upload.getRepositories container
Field Summary |
---|
Fields inherited from interface PomFilterContainer | |
---|---|
DEFAULT_ARTIFACT_POM_NAME |
Method Summary | |
---|---|
void
|
addProtocolProviderJars(Collection jars)
Out of the box only uploading to the filesysten and via http is supported. |
Object
|
getRepository()
Returns the repository o be used for uploading artifacts. |
Object
|
getSnapshotRepository()
Returns the repository o be used for uploading snapshot artifacts. |
boolean
|
isUniqueVersion()
Returns whether to assign snapshots a unique version comprised of the timestamp and build number, or to use the same version each time. |
void
|
setRepository(Object repository)
Sets the repository to be used for uploading artifacts. |
void
|
setSnapshotRepository(Object snapshotRepository)
Sets the repository to be used for uploading snapshot artifacts. |
void
|
setUniqueVersion(boolean uniqueVersion)
Sets whether to assign snapshots a unique version comprised of the timestamp and build number, or to use the same version each time. |
Methods inherited from interface MavenResolver | |
---|---|
beforeDeployment, beforeDeployment, getSettings |
Methods inherited from interface ArtifactRepository | |
---|---|
getName, setName |
Methods inherited from interface PomFilterContainer | |
---|---|
addFilter, addFilter, filter, filter, getActivePomFilters, getFilter, getPom, pom, pom, pom, setFilter, setPom |
Method Detail |
---|
public void addProtocolProviderJars(Collection jars)
public Object getRepository()
public Object getSnapshotRepository()
public boolean isUniqueVersion()
public void setRepository(Object repository)
repository
- The repository to be used
public void setSnapshotRepository(Object snapshotRepository)
snapshotRepository
- The repository to be used
public void setUniqueVersion(boolean uniqueVersion)
Gradle API 1.12