ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Versioned buildfiles was:Re: Backwards compatability?
Date Sat, 20 Jul 2002 09:21:32 GMT
Other XML based vocabularies have a top-level version
attribute, let's say have
  <project version="1.0" default="package" basedir=".">

During execution you can use this to control behaviour
  public void execute()
   throws BuildException
{
   if( getVersion().equals( Version.v10 ) )
   {
     doAntCallOriginal();
   }
   else if( getVersion().later( Version.v11 ) )
   {
     doAntCallV2();
   }
   else
   {
   ...
   }
}
If you make syntax checks during parsing, the version
will have to control this as well.
Ansother possibility is simply to branch to the appropriate
reader/tree-builder/executor once the version attribute is
encountered.

Note that this version attribute does not describe the
version of ant but the version of the buildfile vocabulary
(probably, but not necessarily semantics too).

J.Pietschmann



--
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