4.3. Command line usage


java emma report {-in data files...} {-r report types...} [-sp sourcepath...] [common options]


[common command line options]

-in, -input meta/coverage data files...

This repeatable option selects a set of metadata and coverage data files that form the basis of coverage calculations in the generated report(s). It is an error not to include any metadata or any coverage data within this set of files.

-r, -report (txt|html|xml)...

This repeatable option selects report type(s) to be generated.

-sp, -sourcepath list of source directories...

This repeatable option sets the (optional) source path to use for report generation. It is interpreted as a list of directories (separated by the OS-specific classpath separator or comma) containing .java source files. The local path names within each directory should reflect class package names. (Currently, only the HTML report generator uses this data, and only at method report depth.)

report generation options...

Unlike its ANT equivalent, report command line tool does not have dedicated options for controlling coverage report generation. If necessary, they can be set using generic -D, -properties, and other mechanisms.

So, for example, to change the default location of the HTML report you would override the report.out.file property:

>java emma report -Dreport.html.out.file=mydir/mycoverage.html ...
(report.html.out.file can be abbreviated to report.out.file if the command generates a single report type)



The default EMMA command line tool behavior is not to use System.exit() on exit unless an explicit -exit option is specified. If that is done, the error codes returned via System.exit() are as follows:

0Successful completion.
1Failure due to incorrect option usage. This error code is also returned when command line usage (-h) is requested explicitly.
2All other failures.