Move the creation of the directory into the task method
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/4e6792d6 Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/4e6792d6 Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/4e6792d6 Branch: refs/heads/master Commit: 4e6792d68e8f6493d501b06ad98236f407b661a0 Parents: 46d52d7 Author: Peter Donald <[email protected]> Authored: Sat Jul 26 07:22:18 2014 +1000 Committer: Peter Donald <[email protected]> Committed: Sat Jul 26 07:22:18 2014 +1000 ---------------------------------------------------------------------- addon/buildr/findbugs.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/4e6792d6/addon/buildr/findbugs.rb ---------------------------------------------------------------------- diff --git a/addon/buildr/findbugs.rb b/addon/buildr/findbugs.rb index f6459b6..14b5a15 100644 --- a/addon/buildr/findbugs.rb +++ b/addon/buildr/findbugs.rb @@ -61,6 +61,8 @@ module Buildr args[:excludeFilter] = options[:exclude_filter] if options[:exclude_filter] args[:jvmargs] = options[:java_args] if options[:java_args] + mkdir_p File.dirname(output_file) + Buildr.ant('findBugs') do |ant| ant.taskdef :name =>'findBugs', :classname =>'edu.umd.cs.findbugs.anttask.FindBugsTask', @@ -187,7 +189,6 @@ module Buildr desc 'Generate findbugs xml report.' project.task('findbugs:xml') do puts 'Findbugs: Analyzing source code...' - mkdir_p File.dirname(project.findbugs.xml_output_file) options = { :properties => project.findbugs.properties,
