There are variants of <taskdef> that allows defining more than one task
using a properties file either as a resource or filesystem file.
<taskdef file="..."/>
<taskdef resource="..." classpath="..."/>
So, BEA (and others) should simply include a properties file that says:
<taskname>=<fully qualified class name>
for each task and stick it in their weblogic.jar.
Erik
----- Original Message -----
From: "Tim Dawson" <[EMAIL PROTECTED]>
To: "'Ant Developers List'" <[EMAIL PROTECTED]>
Sent: Wednesday, January 23, 2002 5:31 PM
Subject: <antlib> (was RE: Ant 1.9 & Task Packaging)
> Stefan writes:
> > > BEA should be able to provide a "weblogic.jar" that could just be
> > > referenced in a build file, and used with whatever recent version of
> > > Ant you've downloaded.
> >
> > You are absolutely correct, they should be. Why don't they? All
> > people would have to do was to add a single <taskdef> line.
>
> They actually have eight tasks, and it would be more than a single line...
> you'd have to add
>
> <taskdef name="ddinit"
> classname="weblogic.ant.taskdefs.ejb.DDInit"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
> <taskdef name="wsgen"
> classname="weblogic.ant.taskdefs.ejb.WSGen"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
> <taskdef name="wsdl2java"
> classname="weblogic.ant.taskdefs.soap.WSDL2Java"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
> <taskdef name="java2wsdl"
> classname="weblogic.ant.taskdefs.soap.Java2WSDL"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
> <taskdef name="ddget"
> classname="weblogic.ant.taskdefs.j2ee.DDGet"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
> <taskdef name="p4changes"
> classname="weblogic.ant.taskdefs.perforce.P4Changes"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
> <taskdef name="p4versionstring"
> classname="weblogic.ant.taskdefs.perforce.P4VersionString"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
> <taskdef name="createidl"
> classname="weblogic.ant.taskdefs.iiop.CppIdlSetup"
> classpath="/bea/wlserver6.1/lib/weblogic.jar"/>
>
> This is ugly enough that you probably don't want to copy it among all your
> ant files. Plus, they have a ton of examples, all of which use Ant, and it
> would be a lot of maintenance of those build files to keep this up to
date,
> say if they added a new taskdef or changed a classname or whatever.
>
> If we could condense this to one line, i.e.
>
> <antlib location="${weblogic.home}/lib/weblogic.jar"/>
>
> I think they'd probably be happy to add that to each of the build.xml
files
> in exchange for not having to include a version of ant inside their
> weblogic.jar file.
>
> So what's holding us back with implementing <antlib>? There were some
> proposals a while back but nothing ever really happened with them, it
seemed
> there was some concern about forward-compatibility with Ant2 - is that
still
> the concern?
>
> Tim
>
> > -----Original Message-----
> > From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 22, 2002 7:14 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Ant 1.9 & Task Packaging
> >
> >
> > On Mon, 21 Jan 2002, Tim Dawson <[EMAIL PROTECTED]> wrote:
> >
> > > currently we have a few packages, "taskdefs", for the - supposedly -
> > > core stuff, and taskdefs.compilers, taskdefs.condition,
> > > taskdefs.rmic, and then a catchall, taskdefs.optional.* where
> > > everything else is bunched. This is a bit confusing as some tasks
> > > haven't been migrated to a hierarchy, etc.
> >
> > It is not strictly a matter of migration (the compiler, rmic and
> > condition subpackages just happened to suddenly be there 8-). Moving
> > classes into different packages can create backwards compatibility
> > problems as well (there is at least one link on our external tools
> > page to a task that "extends org.apache.tools.ant.taskdefs.Javac").
> >
> > Of course we are free to chose new packages for Ant2 as we like.
> >
> > > org.apache.tools.ant2
> > > (main engine, interfaces, abstract superclasses)
> >
> > make that org.apache.ant, no need for the 2 IMHO as Ant 1.x is in the
> > tools subpackage.
> >
> > Most (all?) proposals use that package as well.
> >
> > > Anything inside of core and included in the build would have to pass
> > > a strict "can this run without ANY 3rd party jars?"
> >
> > A very hard rule and we won't hold it, I'm sure. Crimson is a 3rd
> > party jar.
> >
> > > Further, if we're really moving to a container architecture with
> > > Ant2, then we should define a spec for the build file, execution
> > > engine, and task extensions API through a JSR
> >
> > Has been proposed by others (Conor) before.
> >
> > > BEA should be able to provide a "weblogic.jar" that could just be
> > > referenced in a build file, and used with whatever recent version of
> > > Ant you've downloaded.
> >
> > You are absolutely correct, they should be. Why don't they? All
> > people would have to do was to add a single <taskdef> line.
> >
> > Stefan
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>