On Wed, Jun 9, 2010 at 3:06 AM, Stefan Bodewig <bode...@apache.org> wrote:
> [I appologize for reshuffling your post but this way my response make
> mode sense, at least to me 8-)]

I sometimes ramble. Thanks! =)

> Letting the IDE force the Ant version upon you somewhat defeats the
> purpose of an IDE independent build process, doesn't it?

You mention Ant's backwards compatibility mantra and then you say that? =) =)

> I'm not sure how/why you need nameInner in your code, I'm trying to get
> results quickly but guessing that you won't need it when using
> ResourceDecorator ;-)

The reason is esoteric based on the interaction of <filelist> and
<file> and the order of instantiation. Regardless, I'll try the RD
pattern and see if that helps.

> [BTW, I'd recommend using the <echoxml> task instead of <echo> and
> looking into oato.util.XmlFragment for your <sweetenedbits> nested
> element.]

Ok!

> Whereever you do
>
>            <sfile name="${ant.jar}" scope="compile" />
>
> you'd instead use
>
>            <sfile scope="compile">
>              <file file="${ant.jar}"/>
>            </sfile>

I see where you are going, but this won't work. I need to be able to
define the attributes on the <file> element itself. For example. I
want to be able to point to the source code for each file. Wrapping
every <file> in a <sfile> is too much boilerplate typing.

> I think you are doing way to much.  Embrace ResourceCollections - oh,
> and don't extend MatchingTask, this is so Ant 1.1 ;-)

If you recall, I was the first person to use 'ant' outside of Sun, so
my knowledge will forever be stuck in the past. =) Also, the
documentation on the website is so out of date that it is hard to tell
what I should use. What do you suggest over MatchingTask?

>        theUnion.iterator()
>
> will return SweetendFileResource instances that you can cast to in order
> to access the scope attribute.  Any other thing you may want to know
> about the file is directly available from the nested resource - and the
> getName|Size... methods forward to it.

Sweet!

> One improvement might be to extract the getters of SweetendFileResource
> into an interface you could as well use Resource.as(Class) instead of
> hard-coded casts - Ant 1.8.x only.

Good to know.

> Another idea would be to write a ResourceCollection implementation that
> tags the scope attribute to any Resource contained.  Something like

The tagging is a good idea, but I think a bit overkill. I'd like to
keep this as simple as possible because I think that since src is
pretty much a one-to-one mapping to a <file>, I'd end up with a huge
amount of xml wrapping for no real gain.

> It is a code base that has grown organically and that believes in
> backwards compatibility almost dogmatically.

=)

> In your case things get worse since you come look into it with your
> knowledge of a pre-ResourceCollection-era of Ant.  If you start out with
> the concepts of Resource and ResourceCollection and completely do away
> with Path and FileList things become more easy to follow.

Ok, I think that definitely points me in the right direction. Thanks
so much for your help. It is very much appreciated.

jon

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

Reply via email to