refacotor the code about build.xml