use of org.gradle.api.publish.maven.InvalidMavenPublicationException in project gradle by gradle.
the class ValidatingMavenPublisher method parsePomFileIntoMavenModel.
private Model parsePomFileIntoMavenModel(MavenNormalizedPublication publication) {
File pomFile = publication.getPomArtifact().getFile();
try {
Model model = readModelFromPom(pomFile);
model.setPomFile(pomFile);
return model;
} catch (XmlPullParserException parseException) {
throw new InvalidMavenPublicationException(publication.getName(), "POM file is invalid. Check any modifications you have made to the POM file.", parseException);
} catch (IOException ex) {
throw new UncheckedIOException(ex);
}
}
Aggregations