diff --git a/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorArtifactMetadata.java b/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorArtifactMetadata.java index bd36b376..7ad31e73 100644 --- a/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorArtifactMetadata.java +++ b/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorArtifactMetadata.java @@ -69,7 +69,10 @@ public void storeInLocalRepository(ArtifactRepository localRepository, ArtifactR File destination = new File( localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata(this, remoteRepository)); - destination.getParentFile().mkdirs(); + if (!destination.getParentFile().mkdirs()) { + throw new RepositoryMetadataStoreException( + "Could not create artifact directory " + destination + " in local repository"); + } try (Writer writer = new XmlStreamWriter(destination)) { new SiteXpp3Writer().write(writer, siteModel);