Module: Buildr::Cobertura
- Defined in:
- lib/buildr/java/cobertura.rb
Overview
Provides the cobertura:html, cobertura:xml and cobertura:check tasks. Require explicitly using require "buildr/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
Defined Under Namespace
Modules: CoberturaExtension Classes: CoberturaCheck, CoberturaConfig
Constant Summary collapse
- VERSION =
'1.9.4.1'- REQUIRES =
ArtifactNamespace.for(self).tap do |ns| ns.cobertura! "net.sourceforge.cobertura:cobertura:jar:#{version}", '>=1.9' ns.log4j! 'log4j:log4j:jar:1.2.9', ">=1.2.9" ns.asm! 'asm:asm:jar:2.2.1', '>=2.2.1' ns.asm_tree! 'asm:asm-tree:jar:2.2.1', '>=2.2.1' ns.oro! 'oro:oro:jar:2.0.8', '>=2.0.8' end
Class Method Summary collapse
Class Method Details
.data_file ⇒ Object
72 73 74 |
# File 'lib/buildr/java/cobertura.rb', line 72 def data_file() File.("reports/cobertura.ser") end |
.dependencies ⇒ Object
60 61 62 63 64 65 66 |
# 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_to(file = nil) ⇒ Object
68 69 70 |
# File 'lib/buildr/java/cobertura.rb', line 68 def report_to(file = nil) File.(File.join(*["reports/cobertura", file.to_s].compact)) end |