installOrDeployTask.addPom(pom);
if (defaultMavenDeployment.getMainArtifact() != null) {
installOrDeployTask.setFile(defaultMavenDeployment.getMainArtifact().getFile());
}
for (PublishArtifact classifierArtifact : defaultMavenDeployment.getAttachedArtifacts()) {
AttachedArtifact attachedArtifact = installOrDeployTask.createAttach();
attachedArtifact.setClassifier(classifierArtifact.getClassifier());
attachedArtifact.setFile(classifierArtifact.getFile());
attachedArtifact.setType(classifierArtifact.getType());
}
}