我“米开始使用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