0

I've been following this tutorial on 3. Getting Started (ANT), and it says <taskdef resource="emma_ant.properties" classpathref="emma.lib" /> but does not give any reference to the contents of emma_ant.properties. Any ideas?

Other websites such as 3.4. How do I change an EMMA property default setting? also leave things to be desired (and is based on the command prompt and not a digital file). I've found another website Using EMMA with ANT for JUnit test coverage reporting, but again it leaves the properties file to the imagination (doesn't even provide an example file).

Any ideas on how to manipulate the emma_ant.properties to Load and custom tasks for ANT?

classicjonesynz
  • 4,012
  • 5
  • 38
  • 78

1 Answers1

1

but does not give any reference to the contents of emma_ant.properties. Any ideas?

Check for emma.jar & emma_ant.jar which you have placed in the path specified you will find emma_ant.properties

Any ideas on how to manipulate the emma_ant.properties to Load and custom tasks for ANT?

You need not to manipulate the properties file to use the tasks.

To use emma tasks you should

<!-- directory that contains emma.jar and emma_ant.jar -->
<property name="emma.dir" value="${YOUR_BASE_DIR}/lib/emma" />

<!-- Set emma.lib to refer to the list of EMMA jar files -->
<path id="emma.lib">
    <fileset dir="${emma.dir}">
        <include name="*.jar" />
    </fileset>
</path>

and

<!-- Load <emma> custom tasks so that they can be used in ANT -->
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />

and you should be able to use emma tasks.

Here are the contents of emma_ant.properties inside emma.jar

# -------------------------------------------------------------

emma:       com.vladium.emma.emmaTask
emmajava:   com.vladium.emma.emmajavaTask

# -------------------------------------------------------------
# end of file

Also Check out Emma Property Summary if it helps you...

Bharat Sinha
  • 13,973
  • 6
  • 39
  • 63
  • I'm not sure how I'm meant to manipulate the `emma_ant.properties` to Load and custom tasks, leaves a lot to the imagination. Are you able to provide abetter explanation? (instead of just sending me to a site, I've already been too?) – classicjonesynz Aug 29 '12 at 04:10
  • Did you put in `emma.jar` file in the path specified as `emma.lib`? – Bharat Sinha Aug 29 '12 at 04:13
  • Thanks SiB, for updating your question :) makes a lot more sense now! :) – classicjonesynz Aug 29 '12 at 04:24
  • Hey SiB, I was wondering could you look into my question [here](http://stackoverflow.com/questions/12171438/emma-instrumentation-classes-junit-testing-failing) – classicjonesynz Aug 29 '12 at 05:48