ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Kenneth Albert (Kenneth)** CTR **" <>
Subject RE: [DISC] workspace/subbuild issues
Date Fri, 30 Mar 2001 23:24:49 GMT
I like this idea - but not for the same reason that Stephane was thinking.
It would be nice if there was a way you can differentiate between tasks
which can be called from the command line and tasks which are simply called
by other tasks.

By using this, you could expose a clean "public interface" to your build
script for users to see.  As it stands, you have to look at the entire build
script and pick out the target names.  I know there is a way in the current
ant to list all the target names, but I don't think it's obvious how to do
that.  I think most Ant users would just go ahead and start poking around in
the build.xml first anyways.  If there was a separate interface file, or at
least an interface definition at the top of your build file, that would be a
good place for new users of the build script to look.  This would also be a
good place for documentation on how to build the system.  I myself wished
there was something like this while looking through the relatively clean
build scripts for Ant itself.

I know there was some discussion about this not too long ago.

> I expressed this without really thinking, it was just an idea.
> What I had in mind in fact would be to provide an interface 
> that others
> projects were forced to implements so that I'm sure that all 
> subprojects
> inheriting from it have the targets defined in the interface.
> This way I can assume I'm calling all builds with the same 'target'.
> ** project-interface.xml **
> <project name="interface">
> 	<target name="dist"/>
> 	<target name="clean"/>
> <project>
> ** build.xml **
> <project implements="project-interface.xml">
> 	<target name="dist" description="implementing interface">
> 	</target>
> 	<target name="clean" description="implementing interface"/>
> 	</target>
> </project>
> Probably too much work for a not so needed 'feature'.
> Same can be achieved if the build writers respect the 
> contract of using the
> same target name.
> -- 
>  St├ęphane Bailliez 
>  Software Engineer, Paris - France 
>  iMediation - 
>  Disclaimer: All the opinions expressed above are mine and 
> not those from my
> company. 

View raw message