[BUGFIX][TASK] Optimize phing build.xml file and process

backport of #145 (merged into master)