From 19d3d90c5089e8d05313c581dc02b92b4d863c0f Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 28 Nov 2008 18:03:41 +0000 Subject: [PATCH] o Fixed IT plugin to create missing parent directories of output file git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@721543 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/plugin/coreit/UsesPropertiesMojo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java index 0157b41a6c..0369f0da5c 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-uses-properties/src/main/java/org/apache/maven/plugin/coreit/UsesPropertiesMojo.java @@ -48,7 +48,9 @@ public class UsesPropertiesMojo { try { - FileOutputStream fos = new FileOutputStream( new File( basedir, "target/project.properties" ) ); + File file = new File( basedir, "target/project.properties" ); + file.getParentFile().mkdirs(); + FileOutputStream fos = new FileOutputStream( file ); properties.store( fos, "# Properties generated by the execution of a mojo that uses interpolated POM values for configuration." ); }