From: <[EMAIL PROTECTED]>

> > A task does not necessarily have to persist values that are set via the
> > setters into internal matching member variables, so I'm pretty sure 
> > that an
> > XML serialization of an instantiated task cannot reliably give you back 
> > the
> > state that was used to construct it.  Thats just the nature of Ant 1.x.
> > Maybe what Jose Alberto mentioned about UnknownElement would work for 
> > Ant
> > 1.x - I don't know.
> >
> > Perhaps this is different in Ant2 though.
> That is the crux of the problem I face.  I don't see any reason not to 
> provide the required accessors.  I know that simple values like the 
> message attribute of Echo differ from say a classpath setting, but it 
> should be possible to provide a getClasspath method that returns the 
> Path.
> 

How do you plan to enforce that every task writer provides meaningful accessors
for every setXXX and createXXX and addXXX function its task has? Certaintly not 
at compile time.
What should be the signature of the accessor for createXXX and addXXX methods?

This is not that simple, and it can be a very big pain to write. And what is 
the benefit
of all this? That I can do some "export" operation which for a task writer/user 
is of limited benefit?
Also notice that you cannot reproduce the REAL project XML from the content of 
the tasks
the reason being that tasks are not aware of property expansion. By the time 
calls are made
into the task all property expansion has already happened. The resulting XML, 
IMO, is useless.
90% of the meaning of an XML buildfile is in the properties.

In other words this is the wrong way to go. If ANT1.x decides to move into an 
all UnknownElement or
RuntimeConfigurable approach, then most of the issues above will disappear. But 
still I have a question
why do you want to reconstitute the ANT1.x XML?

Can you explain me again why is that you want to generate XML for? Didn't you 
have it already?

Jose Alberto



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to