module Buildr::Emma

Provides the emma:html and emma:xml tasks. Require explicitly using require "buildr/emma".

You can generate emma reports for a single project using the project name as prefix:

project_name:emma:html

You can also specify which classes to include/exclude from instrumentation by passing a class name regexp to the emma.include or emma.exclude methods.

define 'someModule' do
   emma.include 'some.package.*'
   emma.exclude 'some.foo.util.SimpleUtil'
end

Constants

VERSION

Public Class Methods

ant() { |ant| ... } click to toggle source
# File lib/buildr/java/emma.rb, line 56
def ant

  Buildr.ant 'emma' do |ant|
    ant.taskdef :resource=>'emma_ant.properties',
      :classpath=>Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
    ant.emma :verbosity=>(trace?(:emma) ? 'verbose' : 'warning') do
      yield ant
    end
  end
end
data_file() click to toggle source
# File lib/buildr/java/emma.rb, line 52
def data_file()
  File.join(report_to, 'coverage.es')
end
dependencies() click to toggle source
# File lib/buildr/java/emma.rb, line 44
def dependencies
  @dependencies ||= ["emma:emma_ant:jar:#{version}", "emma:emma:jar:#{version}"]
end
report_to(format=nil) click to toggle source
# File lib/buildr/java/emma.rb, line 48
def report_to format=nil
  File.expand_path('reports/emma')
end
version() click to toggle source
# File lib/buildr/java/emma.rb, line 40
def version
  Buildr.settings.build['emma'] || VERSION
end