我正在尝试使用 maven、cygwin 和 gcc 在 Windows 7 上设置一个带有空函数(.c 和 .h 文件)的简单项目。以下是有关我的环境的详细信息:
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 22:51:28+0900)
Maven home: C:\Program Files\apache-maven-3.0.5
Java version: 1.6.0_37, vendor: Sun Microsystems Inc.
Java home: C:\Progra~1\Java\jdk1.6.0_37\jre
Default locale: ko_KR, platform encoding: MS949
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
gcc (GCC) 4.5.3
当我尝试使用 maven-nar 插件进行构建时,出现以下错误:
$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test-maven 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ test-maven ---
[INFO]
[INFO] --- maven-nar-plugin:2.1-SNAPSHOT:nar-validate (default-nar-validate) @ test-maven ---
[INFO] Using AOL: x86-Windows-msvc
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.600s
[INFO] Finished at: Thu May 30 18:03:18 KST 2013
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-nar-plugin:2.1-SNAPSHOT:nar-validate (default-nar-validate) on project test-maven: Cannot deduce version number from: -> [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/MojoFailureException
我已经google了,它似乎与maven找不到gcc
编译器有关。
Cannot deduce version number from: -> [Help 1]
该mvn
命令的输出还表明 maven 正在尝试构建我的项目,msvc
而该项目在我的机器上不可用。
[INFO] Using AOL: x86-Windows-msvc
我的路径中有gcc
编译器等,我尝试遵循这个非常古老的线程中建议的一些步骤。
有谁知道如何克服这个问题?如果我在错误的论坛中,有人可以指点我正确的吗?