ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: XmlProperty, AntUnit, questions
Date Tue, 01 Nov 2005 21:53:59 GMT
I'm not Stefan, and I want his reactions on certain
points, but FWIW:

--- Dale Anson <danson@grafidog.com> wrote:

> Several questions at once, they sort of led one to
> another...
> 
> First question(s) --
> I wanted to use the XmlProperty task.  I have a
> custom task that 
> provides some xml as output in a property.  The
> XmlProperty task only 
> reads from a file, so I needed to write my property
> value to a file so I 
> could read it back in with XmlProperty, which seems
> like an unnecessary 
> step.  It's a pretty simple modification to
> XmlProperty to allow it to 
> accept xml in a property rather than a file.  Is
> there any interest in 
> this modification? Or would this question be better
> placed on the user list?

I haven't seen you around the lists for awhile until
recently, Dale... The ongoing resource collection work
in Ant HEAD seeks to address this exact type of
situation in a generic way.  The "right" fix,
therefore, IMO is to modify XmlProperty to accept its
input from a resource.  Since in the case of this task
a single resource is wanted as input it doesn't seem
right to accept a whole resource collection, although
I suppose that is one option.  This leads me to an
issue I've been waiting to present for some time: 
does Ant >= 1.7 need a mechanism for specifying a
specifically typed resource from a String, and
accompanying modifications to IntrospectionHelper
to... help with the introspection? :)  e.g.:

file:foo
url:http://ant.apache.org/index.html
property:foo

etc. ?  Hopefully replies to this email will fragment
into separate threads, but now I will address the
antunit issue.  :)

> 
> Second question --
> I went ahead and made the modifications to
> XmlProperty to read from a 
> property, and thought to submit a patch.  A while
> back, I wrote some 
> unit test tasks and use them a lot for testing
> custom tasks.

I noticed these when I was going through the split
task.  ;)

  These are 
> a lot easier and faster to write than the junit
> tests.  I just can't 
> seem to get motivated to actually write a junit test
> for an Ant task, 

I know the feeling!

> and I recalled that Stefan had mentioned that he'd
> wrote some unit 
> testing tasks also.  A quick google found them in
> the Ant Sandbox area 
> as AntUnit.  Would it be acceptable to submit a
> patch to a core task 
> that included a unit test that uses the AntUnit
> library?
> 
I hope Stefan makes it clearer (if he's taken it that
far) how we can integrate antunit into Ant's testing
to eventually replace junit (my ambitious hope
anyway).

> And last question, for Stefan --
> Do you want any help with AntUnit?  I see you've set
> the compatibility 
> level for Ant 1.7.  I commented out one line so I
> can run it with Ant 1.6.5.
> 
The only problem I see with that is that I had planned
to make antunit also support ResourceCollections... so
back to 1.7 if we did that.  I suppose we could always
retrofit after 1.7 release if we wanted a release
compatible with 1.6.5 though.

-Matt

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



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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


Mime
View raw message