Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.publish.maven.tasks
[Java] Class PublishToMavenRepository

    java.lang.Object
      org.gradle.api.internal.AbstractTask
          org.gradle.api.DefaultTask
              org.gradle.api.publish.maven.tasks.PublishToMavenRepository

    @Incubating
    public class PublishToMavenRepository
    extends DefaultTask

Publishes a MavenPublication to a MavenArtifactRepository.

Since:
  1.4

Constructor Summary
`PublishToMavenRepository(Factory loggingManagerFactory)`

Method Summary
`protected void` | `doPublish(MavenPublicationInternal publication, MavenArtifactRepository repository)`
`protected Factory` | `getLoggingManagerFactory()`
`MavenPublication` | `getPublication()` The publication to be published.
`MavenArtifactRepository` | `getRepository()` The repository to publish to.
`void` | `publish()`
`void` | `setPublication(MavenPublication publication)` Sets the publication to be published.
`void` | `setRepository(MavenArtifactRepository repository)` Sets the repository to publish to.

Constructor Detail

### PublishToMavenRepository

    @Inject
    public PublishToMavenRepository(Factory loggingManagerFactory)

Method Detail

### doPublish

    protected void doPublish(MavenPublicationInternal publication, MavenArtifactRepository repository)

### getLoggingManagerFactory

    protected Factory getLoggingManagerFactory()

### getPublication

    public MavenPublication getPublication()

  The publication to be published.
  Returns:
    The publication to be published

### getRepository

    public MavenArtifactRepository getRepository()

  The repository to publish to.
  Returns:
    The repository to publish to

### publish

    @TaskAction
    public void publish()

### setPublication

    public void setPublication(MavenPublication publication)

  Sets the publication to be published.
  Parameters:
    `publication` - The publication to be published

### setRepository

    public void setRepository(MavenArtifactRepository repository)

  Sets the repository to publish to.
  Parameters:
    `repository` - The repository to publish to

Gradle API 1.10