You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2004/11/01 02:09:57 UTC

DO NOT REPLY [Bug 31999] New: - Easier way to declare externally-written tasks in build script

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31999>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31999

Easier way to declare externally-written tasks in build script

           Summary: Easier way to declare externally-written tasks in build
                    script
           Product: Ant
           Version: 1.6.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: kk@kohsuke.org


It is easy to write an Ant task, but the amount of build script you need to
write to use it can be made shorter.

Today, it takes the following lines of build scripts to declare a new task:

<taskdef task="taskName" classname="fully.qualified.class.Name">
  <classpath>...</classpath>
</taskdef>

Alternatively I can use property files, but it still requires a fully qualified
name of the property file.

I wonder if Ant can look for a property file in a known location (such as
/META-INF/services/org.apache.tools.ant.Task); together with Class-Path manifest
attribute, this would allow my users to just say something like:

<taskdef jar="lib/foobar.jar"/>

... which is much shorter and concise.

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