ls -al /Users/me/java/emma/lib
total 896
drwxr-xr-x 4 me me 136 24 May 21:24 .
drwxr-xr-x 8 me me 272 24 May 18:50 ..
-rw-r--r-- 1 me me 420944 19 May 23:22 emma.jar
-rw-r--r-- 1 me me 35857 19 May 23:22 emma_ant.jar
ant emma
Buildfile: build.xml
emma:
BUILD FAILED
/Users/me/java/project/build.xml:68: Could not create task or type of type: instr.
Do you see what I'm missing?
Thanks
Jay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am almost certain I know what you are missing. The thing is, <instr> is not a real first-level ANT task: it is a subtask of the "umbrella" <emma> task. This will not work:
<instr ...>
</instr>
it should be like this:
<emma ...>
<instr ...>
</instr>
</emma>
See the two build-***.xml files in the examples/ directory of the emma-x.x.xxx.zip download.
The only two "real" ANT tasks in EMMA are <emma> and <emmajava>, the rest are subtasks nested inside those. I know this design is a little unusual but I had my own reasons for it. Again, all user guide examples make sure to show the parent <emma> task everywhere, e.g. http://emma.sourceforge.net/userguide/ar01s03s03.html
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The file emma_ant.properties file isn't present in any of the files I've downloaded. Can you please post the contents of that file?
Ant doesn't know about the instr tag without it.
Thanks
emma_ant.properties is packaged in emma.jar (which I have just verified in the release build files)
When you use an ANT construct like what's shown in the samples:
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
the resource file is pulled out of classpath as referenced by emma.lib. Are you sure you have emma.lib defined correctly? The samples use
<path id="emma.lib" >
<pathelement location="${emma.dir}/emma.jar" />
<pathelement location="${emma.dir}/emma_ant.jar" />
</path>
and the user guide uses a "*.jar" pattern, but they all results in the same thing (emma.jar being part of emma.lib).
Thanks,
Vlad.
I'm pretty sure it's correct, but it can't find the instr task.
Here's the part from my build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="default" name="project">
<property name="emma.dir" value="/Users/me/java/emma/lib"/>
<path id="emma.lib">
<pathelement location="${emma.dir}/emma.jar"/>
<pathelement location="${emma.dir}/emma_ant.jar"/>
</path>
<taskdef resource="emma_ant.properties" classpathref="emma.lib"/>
ls -al /Users/me/java/emma/lib
total 896
drwxr-xr-x 4 me me 136 24 May 21:24 .
drwxr-xr-x 8 me me 272 24 May 18:50 ..
-rw-r--r-- 1 me me 420944 19 May 23:22 emma.jar
-rw-r--r-- 1 me me 35857 19 May 23:22 emma_ant.jar
ant emma
Buildfile: build.xml
emma:
BUILD FAILED
/Users/me/java/project/build.xml:68: Could not create task or type of type: instr.
Do you see what I'm missing?
Thanks
Jay
I am almost certain I know what you are missing. The thing is, <instr> is not a real first-level ANT task: it is a subtask of the "umbrella" <emma> task. This will not work:
<instr ...>
</instr>
it should be like this:
<emma ...>
<instr ...>
</instr>
</emma>
See the two build-***.xml files in the examples/ directory of the emma-x.x.xxx.zip download.
The only two "real" ANT tasks in EMMA are <emma> and <emmajava>, the rest are subtasks nested inside those. I know this design is a little unusual but I had my own reasons for it. Again, all user guide examples make sure to show the parent <emma> task everywhere, e.g. http://emma.sourceforge.net/userguide/ar01s03s03.html
OK, that was it. I got it working.
Thanks for your help. It looks great!
Jay