publicationName, ivyPublication.getClass());
continue;
}
IvyPublicationInternal ivyPublicationInternal = (IvyPublicationInternal) ivyPublication;
IvyNormalizedPublication ivyNormalizedPublication = ivyPublicationInternal.asNormalisedPublication();
IvyPublicationIdentity projectIdentity = ivyNormalizedPublication.getProjectIdentity();
// First adding the descriptor
File file = ivyNormalizedPublication.getDescriptorFile();
DeployDetails.Builder builder = createBuilder(processedFiles, file, publicationName);
if (builder != null) {
PublishArtifactInfo artifactInfo = new PublishArtifactInfo(
projectIdentity.getModule(), "xml", "ivy", null, file);
addIvyArtifactToDeployDetails(deployDetails, publicationName, projectIdentity, builder, artifactInfo);
}
IvyArtifactSet artifacts = ivyPublication.getArtifacts();
for (IvyArtifact artifact : artifacts) {
file = artifact.getFile();
builder = createBuilder(processedFiles, file, publicationName);
if (builder == null) continue;
PublishArtifactInfo artifactInfo = new PublishArtifactInfo(
artifact.getName(), artifact.getExtension(), artifact.getType(), artifact.getClassifier(),
file);
addIvyArtifactToDeployDetails(deployDetails, publicationName, projectIdentity, builder, artifactInfo);
}
}
for (MavenPublication mavenPublication : mavenPublications) {
String publicationName = mavenPublication.getName();
if (!(mavenPublication instanceof MavenPublicationInternal)) {
// TODO: Check how the descriptor file can be extracted without using asNormalisedPublication
log.warn("Maven publication name '{}' is of unsupported type '{}'!",
publicationName, mavenPublication.getClass());
continue;
}
MavenPublicationInternal mavenPublicationInternal = (MavenPublicationInternal) mavenPublication;
MavenNormalizedPublication mavenNormalizedPublication = mavenPublicationInternal.asNormalisedPublication();
MavenProjectIdentity projectIdentity = mavenNormalizedPublication.getProjectIdentity();
// First adding the descriptor
File file = mavenNormalizedPublication.getPomFile();
DeployDetails.Builder builder = createBuilder(processedFiles, file, publicationName);
if (builder != null) {
PublishArtifactInfo artifactInfo = new PublishArtifactInfo(
projectIdentity.getArtifactId(), "pom", "pom", null, file);
addMavenArtifactToDeployDetails(deployDetails, publicationName, projectIdentity, builder, artifactInfo);
}
MavenArtifactSet artifacts = mavenPublication.getArtifacts();
for (MavenArtifact artifact : artifacts) {
file = artifact.getFile();
builder = createBuilder(processedFiles, file, publicationName);
if (builder == null) continue;
PublishArtifactInfo artifactInfo = new PublishArtifactInfo(
projectIdentity.getArtifactId(), artifact.getExtension(),
artifact.getExtension(), artifact.getClassifier(),
file);
addMavenArtifactToDeployDetails(deployDetails, publicationName, projectIdentity, builder, artifactInfo);
}
}