【发布时间】:2012-10-25 14:00:09
【问题描述】:
从 Cygwin shell(Windows 上的 bash 通过 Cygwin)使用 Maven 构建时,/usr/bin 的路径无法正确解析。
让我解释一下。 Cygwin 附带 Python,可作为 /usr/bin 的符号链接访问。 Maven 应该可以访问这个符号链接,因为它的位置在 PATH 环境变量中。 Cygwin 将 /usr/bin 添加到 PATH 环境变量中。但是,Maven 无法找到 Python。例如。
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project cloud-devcloud: Command execution failed. Cannot run program "python" (in directory "C:\cygwin\home\myuser\incubator-cloudstack\tools\devcloud"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
但是有 Python:
$ which python
/usr/bin/python
虽然是符号链接。
$ ls -al /usr/bin/python
lrwxrwxrwx 1 donall Domain Users 13 Sep 19 11:38 /usr/bin/python -> python2.6.exe
Python 是符号链接的问题吗?还是说 Maven 无法访问 /usr/bin 中的文件?
【问题讨论】: