ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donnie Hale" <don...@haleonline.net>
Subject RE: Proper use of <uptodate> (a little off-topic)
Date Fri, 21 Dec 2001 01:33:07 GMT
> So here you'd have <target classname="mytarget">

That's essentially what I was thinking. Derive from the base target class,
specify the classname in the <target> element, and have the build.xml file
reader be smart enough to attempt introspection on the derived class if it
encounters non-standard <target> attributes.

Of course, then the question becomes: "Does the derived target have enough
access to other core pieces of Ant to extend its behavior?" For example, if
I wanted to add a "quiet" attribute to a derived target class (e.g. <target
name="whatever" quiet="yes">), can my class access whatever it needs to
achieve the desired semantics?

Donnie


> -----Original Message-----
> From: Cecil, Paula New [mailto:cnew@fuse.net]
> Sent: Thursday, December 20, 2001 6:16 PM
> To: Ant Users List
> Subject: Re: Proper use of <uptodate> (a little off-topic)
>
>
> This reminds me of a project we have in-house.
>
> First, we created interfaces for all the important classes.
> Then, in the XML, we have an optional attribute where the classname may be
> specified.
>
> This allows the developers to extend our classes or completely
> replace them.
>
> So here you'd have <target classname="mytarget">
>
> ----- Original Message -----
> From: Steve Loughran <steve_l@iseran.com>
> To: Ant Users List <ant-user@jakarta.apache.org>
> Sent: Thursday, December 20, 2001 12:02 PM
> Subject: Re: Proper use of <uptodate> (a little off-topic)
>
>
> >
> > ----- Original Message -----
> > From: "DONNIE HALE" <DHALE@longaberger.com>
> > To: <ant-user@jakarta.apache.org>
> > Sent: Thursday, December 20, 2001 11:18 AM
> > Subject: Re: Proper use of <uptodate> (a little off-topic)
> >
> >
> > Thanks for the info. I understand the point, though I tend to agree with
> > you - just move the line in the sand past equality but short of all the
> > other things he's worried about. :)
> >
> > Since I have your attention, 2 questions (1 related):
> >
> > >1) I know that tasks are extensible. How about <target>s? So someone
> could
> > post a contributed, >enhanced <target> without changing the core.
> >
> > I dont think anyone has tried. anything which can be a direct child of
> > <project> is special; they are hard coded into some file or other, then
> > there is the whole graph creation and traversal code which
> probably looks
> > for target only...that might need to be tweaked to use instanceof checks
> or
> > something.,
> >
> > -steve
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>



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



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


Mime
View raw message