> 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:[EMAIL PROTECTED]] > 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 <[EMAIL PROTECTED]> > To: Ant Users List <[EMAIL PROTECTED]> > Sent: Thursday, December 20, 2001 12:02 PM > Subject: Re: Proper use of <uptodate> (a little off-topic) > > > > > > ----- Original Message ----- > > From: "DONNIE HALE" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > 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:[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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
