Skip to content

Commit

Permalink
Merge pull request #188 from sabaka/iss186
Browse files Browse the repository at this point in the history
Fixed #187: create target directory when run dependency update report…
  • Loading branch information
khmarbaise authored Jul 15, 2017
2 parents da37b91 + 37404a8 commit 3557933
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,13 @@ && getProject().getOriginalModel().getDependencyManagement().getDependencies() !
}
else if ( "xml".equals( format ) )
{
File outputDir = new File(getProject().getBuild().getDirectory());
if (!outputDir.exists())
{
outputDir.mkdirs();
}
String outputFile =
getProject().getBuild().getDirectory() + File.separator + getOutputName() + ".xml";
outputDir.getAbsolutePath() + File.separator + getOutputName() + ".xml";
DependencyUpdatesXmlRenderer xmlGenerator =
new DependencyUpdatesXmlRenderer( dependencyUpdates, dependencyManagementUpdates, outputFile );
xmlGenerator.render();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ protected void doGenerateReport( Locale locale, Sink sink )
}
else if ( "xml".equals( format ) )
{
File outputDir = new File(getProject().getBuild().getDirectory());
if (!outputDir.exists())
{
outputDir.mkdirs();
}
String outputFile =
getProject().getBuild().getDirectory() + File.separator + getOutputName() + ".xml";
outputDir.getAbsolutePath() + File.separator + getOutputName() + ".xml";
PluginUpdatesXmlRenderer xmlGenerator =
new PluginUpdatesXmlRenderer( pluginUpdates, pluginManagementUpdates, outputFile );
xmlGenerator.render();
Expand Down

0 comments on commit 3557933

Please sign in to comment.