incubator-zeta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerome Renard <>
Subject Re: [zeta-dev] PHP based build system : Phing VS Pake
Date Wed, 20 Apr 2011 07:30:21 GMT
Hi Sebastian,

On Wed, Apr 20, 2011 at 8:52 AM, Sebastian Bergmann
<> wrote:
> Am 12.04.2011 17:02, schrieb Jerome Renard:
>> 4. the Ant build file is not as cross-platform as I hoped it was (my bad)
>> 5. the Ant build file will most likely be a PITA to maintain as well
>  Can you elaborate on this? Sorry that I am late to the party, but I do
>  not have the time to keep up with this mailinglist and only now saw this
>  thread today.

No worries.

>  I am asking because in my experience Phing, Pake, and friends turned out
>  to be half-baked (pun intended) when compared to Ant.

Well, it really depends on what you want. I would say the main problem with Ant
is there is no loops and conditionals (except <available> but this is
not what I call a
conditional). If you want those loops and conditionnals, you have to
install ant-contrib [1]
but if you want to avoid your users to avoid installing ant-contrib by
themselves (and thus
fighting with CLASSPATH issues and other when you are not used to use
Java) you have
to use Ivy [2] which adds a second level of complexity, but still
acceptable I agree.

The main problem with Ant is that it is hard to program how a build
should be done by using
XML. You can do a lot of operations but it is common to get a 1000+
lines build file, and reading
that long XML files is not really easy (I know there is <include>). I
would say that for trivial tasks,
using Ant would really be useful, but when you want to do more complex
things, like dealing with
external librairies and so on, then you have to be prepared to spend a
lot of time in finding the
library you want and make it installable through Ivy etc, etc.
When you are not used to that this is really time consuming.

Another problem with Ant is that there is no native libraries to deal
with strings, there are external
librairies to workaround that problem, for example, here is what you
can do in order to capitalize
a string in Ant :

#1 using JavaScript in your ant file [3], until you realize that Ant
will beautifully crash when running any <script> task [4]
#2 using Java's regular expressions [5] until you realize that
patterns like \\U$& just do not work in your Ant build script
#3 using XML + XSL [6], but honnetly, why in the world would you have
to install all that stuff in order to simply uppercase a word ?

At some point you always realize that Ant is not as flexible as you
thought it was, you can always workaround
but when you spend more time working around and less time writing the
real build operations I would say Ant is
not the good choice for your current problematic, and for AZC that was
clearly not a good choice.

Note :
I have nothing against Ant, I used it a lot in the past and will
probably continue to use it in the future. But when I
need a lot of flexibility I think I would go for a more specific build
system like Pake for PHP, or Rake for Ruby.


Jérôme Renard | |

View raw message