把Ant更新到1.8.2,然后更新了./build.sh的相应内容:
java -cp "lib/ant-launcher-1.8.2.jar:lib/ant-1.8.2.jar:$JAVA_HOME/lib/tools.jar" org.apache.tools.ant.launch.Launcher $*把相应的版本号改了一下,就把./build.sh提交了,然后事情就来了,Build时遇见的第一个Bug:Target "%1" does not exist in the project "LeWoLe"。
然后就不断的修改build.xml内容,直到只剩下输入一句:
结果还是报错~~即然build.xml没错,那就是build.sh语法写错了?
开始调build.sh,
#Test 1java -cp "lib/ant-launcher-1.8.2.jar:lib/ant-1.8.2.jar:$JAVA_HOME/lib/tools.jar" org.apache.tools.ant.launch.Launcher $*#Test 2java -cp "packages/ant-launcher-1.8.2.jar:packages/ant-1.8.2.jar:$JAVA_HOME/lib/tools.jar" org.apache.tools.ant.launch.Launcher -lib packages %1 %2 %2#Test 3java -cp "packages/ant-launcher-1.8.2.jar:packages/ant-1.8.2.jar:$JAVA_HOME/lib/tools.jar" org.apache.tools.ant.launch.Launcher -lib packages能试的法子,都试了一遍~~还是不行,哥凌乱在代码中~~~~~~最后干脆把内容全部换成:
cd /datals
结果更吓人~~报了个:/bin/sh^M: bad interpreter: No such file or directory。
然后Google一搜,原来Windows文件字符集有时会藏着不可见的空白符,故导致了build.sh无法执行~~吭哥呢~~~~在Linux手工写一个,终于Ok了~~