ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "向雅" <fya...@gmail.com>
Subject Re: Contribute for ANT a new format script with a new ProjectHelper
Date Wed, 19 Nov 2008 12:31:08 GMT
Thanks Stefan.
Current I implemented an ONProjectHelper, and Patch ProjectHelper  and
ant.Main for the 2 problems.
I employe sevice magic way, so now I just run ant like before.
If there has a build.xml, run ant with xml style.
else if has build.on, run ant with on style.
if -f or -s arguments given, first try ONProjectHelper(service do it),
after patch ProjectHelper with a method accept(buildFile),
if file is xml, ONProjectHelper not accept, so all control transfer to
ant with xml.
else if file is on, ONProjectHelper do it.

through patch do it well, but I dont hope user produce some other not
happy thought,
so if ant can patch this:)
If you can add some method, it's best:)

Can I upload some source code to sanbox like?

Regards,
Qinxian


2008/11/19 Stefan Bodewig <bodewig@apache.org>:
> On 2008-11-18, 向雅 <fyaoxy@gmail.com> wrote:
>
>> Besides this, I have 2 problems:
>> 1,I want take care of some xml format file, but current ProjectHelper
>> implementation just do one helper. I hope the newInstance failed so
>> ant can make use origin ant instead of anton. if new I do it, just
>> wrapper ProjectHelper2, not a good way.
>
> This will usually happen when an <ant> task is invoked, I've seen that
> myself when I implemented the ProjectHelper in JavaFront
> http://svn.apache.org/repos/asf/ant/sandbox/javafront/
>
> So far I've neglected the issue.  I'd probably hard-code
> ProjectHelper2 and delegate to it when my ProjectHelper is asked to
> parse an XML file.
>
> Any other solution would likely lead us to breaking the ProjectHelper
> contracts in not-so-subtle ways.
>
>> 2, I want search default file build.on instead of build.xml, or search
>> build.on or build.xml. but ProjectHelper not help:)
>
> And I don't think ProjectHelper would be the right place to add
> functionality like searching for build files.
>
> We might add a method that returned the preferred extension and
> returned ".xml" in the base class.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>



-- 
致敬
向雅
Mime
View raw message