Pom pom = new Pom();
pom.setProject(installOrDeployTask.getProject());
pom.setFile(publication.getPomFile());
installOrDeployTask.addPom(pom);
MavenArtifact mainArtifact = determineMainArtifact(publication.getName(), publication.getArtifacts());
installOrDeployTask.setFile(mainArtifact == null ? publication.getPomFile() : mainArtifact.getFile());
for (MavenArtifact mavenArtifact : publication.getArtifacts()) {
if (mavenArtifact == mainArtifact) {
continue;
}