module Buildr::Cobertura
Provides the cobertura:html
, cobertura:xml
and
cobertura:check
tasks. Require explicitly using require
"buildr/java/cobertura"
.
You can generate cobertura reports for a single project using the project name as prefix:
project_name:cobertura:html
You can also specify which classes to include/exclude from instrumentation
by passing a class name regexp to the cobertura.include
or
cobertura.exclude
methods.
define 'someModule' do cobertura.include 'some.package.*' cobertura.include /some.(foo|bar).*/ cobertura.exclude 'some.foo.util.SimpleUtil' cobertura.exclude /*.Const(ants)?/i end
You can also specify the top level directory to which the top level
cobertura tasks will generate reports by setting the value of the
Buildr::Cobertura.report_dir
configuration parameter.
Constants
- REQUIRES
- VERSION
Attributes
report_dir[W]
Public Class Methods
data_file()
click to toggle source
# File lib/buildr/java/cobertura.rb, line 78 def data_file File.expand_path("#{report_dir}.ser") end
dependencies()
click to toggle source
# File lib/buildr/java/cobertura.rb, line 60 def dependencies if (VersionRequirement.create('>=1.9.1').satisfied_by?(REQUIRES.cobertura.version)) [:asm, :asm_tree].each { |s| REQUIRES[s] = '3.0' unless REQUIRES[s].selected? } end REQUIRES.artifacts end
report_dir()
click to toggle source
# File lib/buildr/java/cobertura.rb, line 70 def report_dir @report_dir || "reports/cobertura" end
report_to(file = nil)
click to toggle source
# File lib/buildr/java/cobertura.rb, line 74 def report_to(file = nil) File.expand_path(File.join(*[report_dir, file.to_s].compact)) end
version()
click to toggle source
# File lib/buildr/java/cobertura.rb, line 46 def version Buildr.settings.build['cobertura'] || VERSION end