我看过这两个帖子..他们没有帮助:
如果我在 shell 提示符下运行 phploc,它工作得很好。所以它一定与我的build.xml
文件有关……但我不知道是什么。
<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc">
<arg path="${basedir}/../src" />
<arg value="--log-csv" />
<arg value="${basedir}/build/logs/phploc.csv" />
</exec>
</target>
这工作正常:
C:\projects\project1\build>phploc ../src
phploc 2.0.6 by Sebastian Bergmann.
我的文件夹结构是
c:\projects\project1
build
...
vendor
bin
...
src
tests
c:\projects\project1\build>ant phploc:
BUILD FAILED
C:\projects\project1\build\build.xml:55: Execute failed: java.io.IOException:
Cannot run program "phploc": CreateProcess error=2, The system cannot find the
file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Jav
更新
C:\>where phploc
INFO: Could not find files for the given pattern(s).
我错过了什么?