I worked a little bit more on the Groovy frontend, and I have some
suggestions again on the ProjectHelper.
In Ant 1.8 we introduced the ProjectHelperRepository which is
maintaining the list of available ProjectHelper in the classpath. And
we use it to find the project helper that will be able to parse a
specified build file with ProjectHelper#supportsBuildFile(...). I
suggest we should do the same for the antlib with the help of
ProjectHelper#canParseAntlibDescriptor(...) (and then maybe have some
method name consistency by renaming supportsBuildFile to
canParseBuildFile).
In the Ant and SubAnt tasks the default build file is build.xml.
Someone providing its own ProjectHelper can also provide some subclass
of Ant and SubAnt while overriding the default build file expected.
For instance I have some Gant and SubGant tasks which are specifying
that they expect some build.groovy files as default.
But I think now that it would be better to make these Ant and SubAnt
tasks behave more like the Main class behaves. Starting Ant 1.8 the
Main class is calling the ProjectHelperRepository to get the default
build files names defined by the ProjectHelpers, search for each one
on the filesystem, and use the first found. I think that the Ant and
SubAnt tasks should do the same. Then there will be no need for the
providers of ProjectHelpers to define they own subclasses of Ant and
SubAnt.
WDYT ?
Nicolas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org