Hello,

on a CentOS 7 system I want to use jacoco in an ant script.
In the <taskdef> element I want to avoid the nested <classpath> element.
It should not look like


   1. <taskdef uri="antlib:org.jacoco.ant" resource=
   "org/jacoco/ant/antlib.xml">
   2. <classpath path="/some/path/jacocoant.jar"/>
   3. </taskdef>

 
but simply

   1. <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" 
   />

Following the ant documentation this could be achieved by storing the 
jacocoant.jar in the lib subfolder of $ANT_HOME. On my system this results 
in/usr/share/ant/lib.

I did the same successfully with other ant addons, e.g. ant-junit. But with 
jacoco it doesn't work.

The output of the ant script when evaluating the taskdef is:
Buildfile: /tmp/build.xml
 [taskdef] Could not load definitions from resource org/jacoco/ant/antlib.
xml. It could not be found.

When executing ant -diagnostics I find this section in the output:

------------------------------------------- ANT_HOME/lib jar listing 
-------------------------------------------
ant.home: /usr/share/ant ant-bootstrap.jar (20919 bytes)
ant-launcher.jar (19065 bytes)
ant.jar (1999722 bytes)
ant-commons-net.jar (91879 bytes) 
ant-antlr.jar (12272 bytes) 
ant-jsch.jar (47207 bytes) 
ant-contrib-1.0b3.jar (196539 bytes) 
ant-junit.jar (113254 bytes) 
ant-junit4.jar (13782 bytes) 
junit.jar (290000 bytes) 
hamcrest-all.jar (122201 bytes) 
jacocoant.jar (31856 bytes)

So ant finds the jacocoant.jar.

Any help welcome! Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/55285fab-9fd6-4033-a402-2b4cdbc0cc9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to