ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: Problems creating my own ant task
Date Thu, 04 Nov 2010 20:21:01 GMT
On Thu, Nov 4, 2010 at 3:09 PM, abridgel <Andy.Bridgelal@gmail.com> wrote:
> We need to write our own tasks because of portability issues. So I need to be
> able to source in the task somehow
>
> I created the jar and put the classes and antlib.xml in the same directory
> however when I try to pull it in it is complainning with the above error -
> here is my code (for the task)- its very simple.
>
> import java.io.*;
> import java.util.*;
>
> import org.apache.tools.ant.Task;
>
> public class Diff extends Task{
>    public void execute() {
>                System.out.println("Hello");
>    }
> }

There are several inconsistencies in the information you posted so
far. Some may be typos (like takks vs tasks) and others like the lack
of a package declaration in the code you posted above, when your
antlib declaration assumes a hello.tasks package, are more likely your
problem. Read up on packages, classpaths, etc... and you should be
able to figure it out I think. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message