Why Phing/Ant over Bash and Make? [closed]

你说的曾经没有我的故事 提交于 2020-01-02 02:13:06

问题


I've been using Phing at work (it was set up when I got there), and thinking of using it for some personal projects. One thing I haven't got my head around yet though is what the big appeal is?

What, if any, are the killer features of Phing or Ant? What are the big reasons people choose to use them instead of (for example) just a collection of bash scripts that execute their build actions? I'm sure I'm missing the obvious, hopefully someone can help me. While I understand that some people may prefer not to use phing/ant, I'm hoping to hear from people who do prefer them about why they prefer them. Just so I can make a more informed decision.

Thanks for any direction or links.


回答1:


The main feature of Ant is to add frustration to your day, when you know you could achieve something in 30 seconds in a Makefile, but end up fighting with Ant for an hour :)

It was a fresh implementation without requiring a functional shell and all the other standard commands that you expect to be available with a shell. I think that's the real killer feature - you can use it on Windows OS.

Ant XML is far more structured and machine-readable - whereas Makefile+shell is essentially Turing complete and extremely generic. Your IDE has a hope of being able to understand Ant XML, the same can't be said in the general case for Makefiles.

Sadly, the reality after all this time seems to be that the IDEs don't make good use of this potential win. Case in point, opening build.xml in Eclipse just shows you XML.

Which I think just leaves the Windows OS rationale. If there was no Windows OS, probably there would be no Ant either.



来源:https://stackoverflow.com/questions/18564085/why-phing-ant-over-bash-and-make

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!