• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1044
  • Last Modified:

Taskdef not recognized in Eclipse Ant build?

Dear Experts,

A demo Ant is generating an error in Eclipse.  This is the error message:

Error - Element type "mytask" must be declared.

And this is the Ant:

<?xml version="1.0"?>
<project name="OwnTaskExample" default="main" basedir=".">
  <taskdef name="mytask" classname="com.mydomain.MyVeryOwnTask"/>
  <target name="main">
    <mytask message="Hello World! MyVeryOwnTask works!"/>
  </target>
</project>

Any ideas?

Thanks!
BrianMc1958
0
BrianMc1958
Asked:
BrianMc1958
1 Solution
 
CEHJCommented:
Make sure the classpath and fq-name are correct
0
 
BrianMc1958Author Commented:
For anyone reading this, CEHJ was right, and I found this link elsewhere that explains how to fix the problem:

http://www.nabble.com/Error-with-Ant-and-XMLBean-t1918288.html

Thanks...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now