Skip to content

Commit 386e16e

Browse files
HannesWellakurtakov
authored andcommitted
Ensure parent directory exists when writing destination in scanner-mojos
Fixes #748
1 parent 34f70a3 commit 386e16e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

maven-plugins/eclipse-cbi-plugin/src/main/java/org/eclipse/cbi/mojo/AbstractPluginScannerMojo.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public void execute() throws MojoExecutionException {
5858
processPlugins(properties, manifests);
5959
}
6060

61-
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(getDestination()))) {
61+
File destination = getDestination();
62+
destination.getParentFile().mkdirs();
63+
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(destination))) {
6264
properties.store(os, null);
6365
}
6466
} catch (Exception e) {

0 commit comments

Comments
 (0)