Search in sources :

Example 1 with MavenPublishAction

use of org.gradle.api.publication.maven.internal.action.MavenPublishAction in project gradle by gradle.

the class AbstractMavenPublisher method publish.

public void publish(MavenNormalizedPublication publication, MavenArtifactRepository artifactRepository) {
    LOGGER.info("Publishing to repository {}", artifactRepository);
    MavenPublishAction deployTask = createDeployTask(publication.getPomFile(), mavenRepositoryLocator, artifactRepository);
    addPomAndArtifacts(deployTask, publication);
    execute(deployTask);
}
Also used : MavenPublishAction(org.gradle.api.publication.maven.internal.action.MavenPublishAction)

Example 2 with MavenPublishAction

use of org.gradle.api.publication.maven.internal.action.MavenPublishAction in project gradle by gradle.

the class AbstractMavenResolver method publish.

private void publish() {
    Set<MavenDeployment> mavenDeployments = getArtifactPomContainer().createDeployableFilesInfos();
    for (MavenDeployment mavenDeployment : mavenDeployments) {
        File pomFile = mavenDeployment.getPomArtifact().getFile();
        MavenPublishAction publishAction = createPublishAction(pomFile, mavenRepositoryLocator);
        beforeDeploymentActions.execute(mavenDeployment);
        addArtifacts(publishAction, mavenDeployment);
        execute(publishAction);
    }
}
Also used : MavenDeployment(org.gradle.api.artifacts.maven.MavenDeployment) File(java.io.File) MavenPublishAction(org.gradle.api.publication.maven.internal.action.MavenPublishAction)

Aggregations

MavenPublishAction (org.gradle.api.publication.maven.internal.action.MavenPublishAction)2 File (java.io.File)1 MavenDeployment (org.gradle.api.artifacts.maven.MavenDeployment)1