我試圖在Windows 7上使用maven,cygwin和gcc設置一個帶有空函數(.c和.h文件)的簡單項目。下面是我的環境信息:無法使用maven-nar插件構建C/C++項目
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'd,它似乎是相關的找不到gcc
編譯器。
Cannot deduce version number from: -> [Help 1]
從mvn
命令的輸出還表明,Maven是試圖建立我的項目,msvc
這是不可用我的機器上。
[INFO] Using AOL: x86-Windows-msvc
我在我的道路等的gcc
編譯器和我試圖遵循一些在this very old thread建議的步驟。
有誰知道如何解決這個問題?如果我在錯誤的論壇中,有人可以請我指出正確的一個嗎?
非常感謝。你真的幫助我。我已經堅持了這幾天。 –
我在https://github.com/jjYBdx4IL/example-maven-project-setups上放了一個實例。 – user1050755
謝謝,我把它從NAR維基鏈接起來! https://github.com/maven-nar/nar-maven-plugin/wiki/Working-examples – ctrueden