ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <j_a_fernan...@yahoo.com>
Subject Re: ClassLoaders ( was: Re: We need to stop the lies)
Date Sat, 02 Mar 2002 15:14:08 GMT
From: "Conor MacNeill" <conor@cortexebusiness.com.au>

> Jose Alberto Fernandez wrote:
> 
> > How does Mutant implement <ant>?
> > 
> > Is it consider part of the core or not? I guess this is the point where
> > I always have dificulty with proposals on having different syntax
> > for project files. How does the <ant> task knows what syntax to parse?
> > 
> > Jose Alberto
> > 
> 
> 
> Jose Alberto,
> 
> Good question. Mutant provides two core services for running sub-builds
> 
>      void runBuild(File antFile, Map properties, List targets)
>           throws ExecutionException;
> 
> 
>      void runBuild(Project model, Map properties, List targets)
>           throws ExecutionException;
> 
> 
> The first is for processing XML build files. The mutant core does 
> provide support for the parsing of XML build files. In the second, the 
> task requesting the subbuild can provide its own Project model 
> constructed in some other way. The first version is implemented by 
> converting the XML version to a Project model and then calling the 
> second version.
> 
>          XMLProjectParser parser = new XMLProjectParser();
>          Project project
>               = parser.parseBuildFile(InitUtils.getFileURL(antFile));
>          runBuild(project, properties, targets);
> 
> So the implementation of <ant> uses the first.
> 
> While the core provides the XML parsing service, it is decoupled from 
> the rest of the core.

This is fine. But still, the main drive of my question stands:

    For people that are proposing alternative syntax for ANT, how
    would they tell a basic task like <ant> to use a different parser?
    
    Would they have to provide their own <ant> implementation and
    replace the default <ant>? 

    If an IDE constructs a model on the fly (no XML file) how can <antcall>
    work (have you change the implementation?) since it only calls <ant>.
    
This is where I kind of get puzzled on how worth is allowing IDEs to
pass their own pre-build model. It seems to me you will need the written
XML for any real build, and if that is the case then we should really define
the interface to be the XML and not the Project instance.

Jose Alberto



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


Mime
View raw message