Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Taskdef not recognized in Eclipse Ant build?

Posted on 2007-11-26
2
1,024 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
egit plugin on eclipse 8 82
spring jars download 1 35
how to debug htl and js pages 8 38
web project error add remove 1 27
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

809 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