use of org.gradle.api.artifacts.maven.MavenDeployment in project gradle by gradle.
the class DefaultArtifactPomContainer method createDeployableFilesInfos.
public Set<MavenDeployment> createDeployableFilesInfos() {
Set<MavenDeployment> mavenDeployments = new HashSet<MavenDeployment>();
for (String activeArtifactPomName : artifactPoms.keySet()) {
ArtifactPom activeArtifactPom = artifactPoms.get(activeArtifactPomName);
File pomFile = createPomFile(activeArtifactPomName);
PublishArtifact pomArtifact = activeArtifactPom.writePom(pomFile);
mavenDeployments.add(new DefaultMavenDeployment(pomArtifact, activeArtifactPom.getArtifact(), activeArtifactPom.getAttachedArtifacts()));
}
return mavenDeployments;
}
use of org.gradle.api.artifacts.maven.MavenDeployment 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);
}
}
Aggregations