ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: subant project dependency
Date Thu, 09 Oct 2003 14:43:21 GMT
> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> 
> On Thu, 9 Oct 2003, John-Mason Shackelford
> <john-mason.shackelford@pearson.com> wrote:
> 
> > Then computeBuildPath would operate as follows:
> 
> As Dominique's version needs a separate file with extra information
> as well, I'd say it is fine for the algorithm (I prefer to keep it
> pluggable) to pick up additional files.

Actually, the build path resolver's contract is to "load" the
Dependency graph and resolve it, handing the result out, but that
doesn't mean that graph cannot be specified inside the build file itself.

It was impractical before Ant 1.6, because pluggeable components could
only be configured using <param>, but no more thanks to Peter.

If you have:

public class BuildPath extends Path {
  public void addType(BuildPathResolver resolver) {...}
}

You can now do something like the following:

<project ...>
  <typedef name="antdepsresolver"
           classname="com.wunderbar.AntDepsResolver" ... />
  <buildpath id="dependencies>
    <antdepsresolver>
      <fileset dir="${dependencies.dir}" includes="*/build.xml" />
      <depend project="util" />
      <depend project="commons" />
      ...      
    </antdepsresolver>
  </buildpath>
</project>

So no need for external files, and everything done in Ant. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message