Sebastian Bergmann wrote:
Am 20.04.2011 09:30, schrieb Jerome Renard:
I would say the main problem with Ant is there is no loops and
conditionals
  I have never needed programming structures like that in my build
  automation scripts. But I think I understand where the problem is: you
  are trying to use a build automation tool to implement an application:
  a website generator. This is wrong. What you want to do may be possible
  with Pake (or any build automation tool that supports build scripts with
  a cyclomatic complexity>  1) but that does not make it right ;-)
I surely feel like a troll in asking this, but where exactly is stated that 
build automation tools should not use loops and conditionals?

The venerable 'make' surely did allow them - and I see fail to see any added 
value in removing the possibility of using them.
To me, the main downside to make is the fact that tasks have to be written 
using shell code, which is neither really portable nor fun.
Ant is surely more portable, but even less fun.

And every "build script" becomes an "application-generator application" in the 
end (just as every application grows to the point where it can send mail ;-) )

  Have a look at how the documentation for PHPUnit's manual is built [1].
  There are a couple of PHP scripts that deal with syntax highlighting of
  examples and form a website from the HTML that comes out of DocBook/XSL.
  But the automation of these scripts happens in Ant. As it should be.

  --
  [1] https://github.com/sebastianbergmann/phpunit-documentation

Basically the ant file you use is a container for invoking external commands.
Since it contains no logic or complexity at all, it makes a good point in case 
for using ant.

But it could have been written in pake using exactly the same amount of lines / 
commands.
And pake allows to do the more complex stuff, that you put in external php 
scripts, either in-process or out of process.

The advantage would thus be that you need
. no editing of xml files
. a single runtime environment (no java)
. knowledge of a single language (php) for editing the build config
. no separate build tool + application-generating application

Ciao
Gaetano

Reply via email to