Skip to content

Commit 54faaa8

Browse files
elharomichael-o
authored andcommitted
Earlier detection of mkdirs failure (#201)
1 parent 73b57d3 commit 54faaa8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorArtifactMetadata.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ public void storeInLocalRepository(ArtifactRepository localRepository, ArtifactR
6969
File destination = new File(
7070
localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata(this, remoteRepository));
7171

72-
destination.getParentFile().mkdirs();
72+
if (!destination.getParentFile().mkdirs()) {
73+
throw new RepositoryMetadataStoreException(
74+
"Could not create artifact directory " + destination + " in local repository");
75+
}
7376

7477
try (Writer writer = new XmlStreamWriter(destination)) {
7578
new SiteXpp3Writer().write(writer, siteModel);

0 commit comments

Comments
 (0)