【发布时间】:2012-03-07 20:20:50
【问题描述】:
我开始使用 Axis2,以前从未使用过它。
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
【问题讨论】: