lib/buildr/java/tests.rb
def generate(projects, target = @target.to_s)
        html_in = File.join(target, 'html')
        rm_rf html_in ; mkpath html_in
        
        Buildr.ant('junit-report') do |ant|
          ant.taskdef :name=>'junitreport', :classname=>'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
            :classpath=>Buildr.artifacts(JUnit.ant_taskdef).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
          ant.junitreport :todir=>target do
            projects.select { |project| project.test.framework == :junit }.
              map { |project| project.test.report_to.to_s }.select { |path| File.exist?(path) }.
              each { |path| ant.fileset(:dir=>path) { ant.include :name=>'TEST-*.xml' }  }
            options = { :format=>frames ? 'frames' : 'noframes' }
            options[:styledir] = style_dir if style_dir
            ant.report options.merge(:todir=>html_in) do
              params.each { |key, value| ant.param :name=>key, :expression=>value }
            end
          end
        end
      end
# :call-seq:
#   generate(projects, target?)
#
# Generates a JUnit report for these projects (must run JUnit tests first) into the
# target directory. You can specify a target, or let it pick the default one from the
# target attribute.


Generates a JUnit report for these projects (must run JUnit tests first) into the
target directory. You can specify a target, or let it pick the default one from the
target attribute.
Generates a JUnit report for these projects ( must run JUnit tests first ) into the target directory . You can specify a target or let it pick the default one from the target attribute .
def generate(projects, target = @target.to_s)
        html_in = File.join(target, 'html')
        rm_rf html_in ; mkpath html_in
        Buildr.ant('junit-report') do |ant|
          ant.taskdef :name=>'junitreport', :classname=>'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
            :classpath=>Buildr.artifacts(JUnit.ant_taskdef).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
          ant.junitreport :todir=>target do
            projects.select { |project| project.test.framework == :junit }.
              map { |project| project.test.report_to.to_s }.select { |path| File.exist?(path) }.
              each { |path| ant.fileset(:dir=>path) { ant.include :name=>'TEST-*.xml' }  }
            options = { :format=>frames ? 'frames' : 'noframes' }
            options[:styledir] = style_dir if style_dir
            ant.report options.merge(:todir=>html_in) do
              params.each { |key, value| ant.param :name=>key, :expression=>value }
            end
          end
        end
      end
def generate ( projects , target = @target . to_s ) html_in = File . join ( target , 'html' ) rm_rf html_in ; mkpath html_in Buildr . ant ( 'junit-report' ) do | ant | ant . taskdef :name => 'junitreport' , :classname => 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator' , :classpath => Buildr . artifacts ( JUnit . ant_taskdef ) . each ( & :invoke ) . map ( & :to_s ) . join ( File :: PATH_SEPARATOR ) ant . junitreport :todir => target do projects . select { | project | project . test . framework == :junit } . map { | project | project . test . report_to . to_s } . select { | path | File . exist? ( path ) } . each { | path | ant . fileset ( :dir => path ) { ant . include :name => 'TEST-*.xml' } } options = { :format => frames ? 'frames' : 'noframes' } options [ :styledir ] = style_dir if style_dir ant . report options . merge ( :todir => html_in ) do params . each { | key , value | ant . param :name => key , :expression => value } end end end end
:call-seq:
generate(projects, target?)
: call - seq : generate ( projects target? )
projects
target
to_s