ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathan gold <...@samizdatdigital.org>
Subject Re: programmatically creating and marshalling antfiles
Date Fri, 02 Sep 2005 03:14:43 GMT
Jose Alberto Fernandez wrote:
>>From: Jack Woehr [mailto:jax@well.com] 
>>
>>Steve Loughran wrote:
>>
>>
>>>Even if you could retro-fit every task out there with getters,
>>>  -what about overloaded set operatons? which one should 
>>
>>the get return?
>>
>>>  -what about property assignments. Tasks get their setters with
>>>properties expanded.
>>
>>Hmm. Ah, well. Writing out the project seems to be a fairly obvious 
>>functionality in comparison
>>to some of the exotic functionality of Ant. I guess it's just one of 
>>those things which in hindsight
>>the design should have accomodated, but which are difficult 
>>to retrofit 
>>given that the design
>>did not so accomodate.
>>
> 
> 
> Maybe we are looking at the problem the wrong way.
> What is what people want to do?
> Do they want to programatically create some project and then 
> as an after thought they decide to serialize it to XML? (which will not
> work);
> Or do they want to create a project programmatically with the intention
> of serializing it to XML.
> 
> If the later, then the obvious thing to do us to not create tasks
> directly
> but to create our wrapping objects. Actually, you could just as well
> use Jdom to compose the XML and then either serialize it into XML
> or produce the Project object out of it (we just need to generate SAX
> events
> out of it).
> 
> So, maybe there is a way to do it that is actually more natural for
> someone
> that just knows the ANT-XML syntax.
> 
> Jose Alberto
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 


hi. i'm getting back to this now, and saw that there were a few more 
responses. to answer your question -- it's the latter. i've gone the xml 
route. the problem is that i have many modules interacting to build a 
project, and it's difficult, though not impossible, to do this with DOM, 
as i am now. it's not the DOM that makes it hard -- but the lack of 
typing, thus the desire to use the java objects, with their convenient 
accessors and access to the current project structure and type safety.

jon

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


Mime
View raw message