<p>I would like to add a BuildListener to my headless build process, which is building an Eclipse product. The docs on how to do this are, shall we say, a bit scanty. I think I need to put my custom jar in a plugin and then use the org.eclipse.ant.core.extraClasspathEntries extension point to make that jar visible to Ant. But everything I have tried results in <pre> [myClass] which was specified to be a build listener is not an instance of org.apache.tools.ant.BuildListener.</pre></p>

<p>My class implements the BuildListener interface. Various  postings seem to indicate that this means my class is visible-to/loaded-by the Plugin classloader rather than the Ant classloader. But I thought the whole point of the extension point was to make jars visible to Ant...</p>

<p>Can anyone shed light on what I'm doing wrong?
Additional info: I am trying to run this build from the Eclipse IDE at the moment using the AntRunner application.</p>

I had this problem when I had two plugins providing an
```
ant.jar
```
.
Make sure you use the
```
org.apache.ant
```
plugin and that there is no other plugin providing another
```
ant.jar
```
.
Another thing I just stumbled upon: The jar containing your contribution must not be in the plugins classpath (Runtime -> Classpath).
See
Eclipse Bug 34466
.