Create directory structure for generated report files

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168216 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2005-05-05 00:14:31 +00:00
parent d4af503a5c
commit 94a31ffa02
1 changed files with 7 additions and 1 deletions

View File

@ -61,7 +61,13 @@ public abstract class AbstractMavenReport
public Sink getSink( String outputName ) public Sink getSink( String outputName )
throws IOException throws IOException
{ {
FileWriter writer = new FileWriter( new File( config.getOutputDirectory(), "xdoc/" + outputName + ".xml" ) ); File outputDir = new File( config.getOutputDirectory(), "xdoc/" );
outputDir.mkdirs();
File outputFile = new File( outputDir, outputName + ".xml" );
FileWriter writer = new FileWriter( outputFile );
return new XdocSink( writer ); return new XdocSink( writer );
} }