Solved

Taskdef not recognized in Eclipse Ant build?

Posted on 2007-11-26
2
1,016 Views
Last Modified: 2008-02-01
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
Comment
Question by:BrianMc1958
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 20352078
Make sure the classpath and fq-name are correct
0
 

Author Comment

by:BrianMc1958
ID: 20352629
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now