我「米開始使用Axis2的,從來沒有與它之前的工作。Axis2的使用Maven
的Maven是爲Axis2的樣品依賴於工作。我遵循正確的步驟,並已創建的環境變量並重新啓動Windows 7操作系統。
當試圖運行任何Axis2的樣品中,我得到這個錯誤信息:
cd C:\Apache\axis\samples\java_first_jaxws; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0_02" C:\\Apache\\maven\\bin\\mvn.bat
The syntax of the command is incorrect.
The syntax of the command is incorrect.
ERROR: M2_HOME not found in your environment.
Please set the M2_HOME variable in your environment to match the
location of the Maven installation
我有雙重檢查環境變量,它們是正確的有是竊聽我的事情。當我。按命令運行mvn --version
返回我The syntax of the command is incorrect.
並且此錯誤與不存在的POM文件相關。來自Axis2的所有樣本都有一個pom.xml文件。
由於這是我第一次接觸Java,我認爲這是一個容易解決的問題。
在此先感謝您的幫助。
編輯
運行此: cd /d C:\Apache\axis\samples\java_first_jaxws and then mvn install
結果: [ERROR] Unknown lifecycle phase "pom.xml". You must specify a valid lifecycle ph ase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin- artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate , initialize, generate-sources, process-sources, generate-resources, process-res ources, compile, process-classes, generate-test-sources, process-test-sources, g enerate-test-resources, process-test-resources, test-compile, process-test-class es, test, prepare-package, package, pre-integration-test, integration-test, post -integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-si te, site, post-site, site-deploy. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhase NotFoundException
我有JAVA_HOME,M2_HOME和M2_HOME \ bin,根據Maven和Axis2的安裝指南,所有的環境變量都可以。當你說「或者你從一些網頁上覆制這個」複製了什麼? – Gerep 2012-02-16 12:45:08
@Gerep:如果您運行命令提示符並運行'set',是否顯示所有變量?另外,我在說你發佈的命令('cd;「variable = something」mvn') - 這是Windows shell的非法表達式,因此整個「命令的語法不正確。」) –
JBert
2012-02-16 14:19:54
about( 'cd;「variable = something」mvn「),它是由NetBeans7生成的...並且是...'set'命令返回項目運行所需的所有變量... –
Gerep
2012-02-16 14:25:12