ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <>
Subject Re: A groovy frontend for Ant
Date Sun, 27 Sep 2009 11:17:09 GMT

Le 13 sept. 09 à 16:44, Nicolas Lalevée a écrit :

> Le 11 sept. 09 à 18:46, Jean-Louis Boudart a écrit :
>> Hi,
>>>> I know Jean-Louis BOUDART has been working on plugging different
>>>> frontends into EasyAnt so maybe we could join forces - Jean- 
>>>> Louis, are
>>>> you reading this?
>> Sorry  for long responding i was on holidays :).
>> I was thinking a few time ago to introduce an abstraction layer in  
>> the
>> project helper.
>> As stefan highlighted <ant> and <subant> task are configured  
>> through the
>> ProjectHelper that's why i wanted to put the abstraction layer here.
>> Why adding a new abstraction layer ?
>> As everyone knows the only way to write an ant script is XML. It  
>> could be
>> really interesting to support others languages like Java or groovy.
>> Then if users want to write their own ant script they are able to  
>> write it
>> in XML (with ant syntax has everyone know in the world :)) or in  
>> Java (maybe
>> Groovy ? or whatever).
>> I thought about writing a ProjectHelper that will be in charge to  
>> determine
>> which "dialect" will be used (maybe based on conventions on  
>> extensions .ant
>> .java .jar .groovy) and to delegate to a class that will be in  
>> charge to do
>> all the specific stuff.
>> I didn't get time to start a POC on this but i will do it in the  
>> next few
>> days.
>> It could be cool if we could join forces on this.
> Here is a simple first patch:
> As noted there I still have some issues, probably in the groovy  
> frontend.

So I have implemented a ProjectHelperRepository which will help Ant to  
choose a ProjectHelper to use (svn r819284). I have added some doc  
about it, see:

So with this implementation, we would be able to just drop an  
implementation of ProjectHelper in a standard Ant distribution, and  
Ant will be able to parse new kinds of files, while still being able  
to build classical build.xml files.

Just one thing is worrying me: the ProjectHelper#parse method is  
expecting an Object as source, which as the javadoc specifies it can  
be a File, an URL, an InputStream, or even a specialized type as  
InputSource. Does it really used with something else than a File or an  
URL ? Should we continue to support that ? Shouldn't we better support  
only URL ? something that we can get content from and have a name.
And by the way shouldn't ProjectHelper be an abstract class ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message