Hi,

I've been working with ant for several weeks now and I'm starting to hack it
to meet my needs.

When someone creates a new (useful) task, the task is added to the main ant
source code.
If the user wants to add its own task, he creates a taskdef in its build
file.

I added a new feature to ant that you might find useful.

When I create new tasks, I package them in a jar file with the given
structure (example)

customtask.jar
        -- meta-inf/manifest
        -- com/mydomain/MyVeryOwnTask.class
        -- com/mydomain/FtpTask.class
        -- com/mydomain/ftp/FtpClient.class

        the manifest content is:
                Name: com/mydomain/MyVeryOwnTask.class
                Ant-Task: True
                Ant-TaskName: mytask

                Name: com/mydomain/FtpTask.class
                Ant-Task: True
                Ant-TaskName: ftp

I put the customtask.jar in jakarta-ant/lib/addin

Then when I start the build, Ant looks in the addin directory for jar files
and manifest
and add  the tasks defined in these jars at runtime. In my buildfile, there
is no more taskdef task,
neither additional CLASSPATH settings (the patch uses the AntClassLoader to
load the classes
inside the jars).

Tell me if you are interested.

Best Regards,

Frederic Lavigne, [EMAIL PROTECTED]
java software at http://www.L2FProd.com

Reply via email to