I”m starting to use Axis2, never worked with it before.
Maven was a dependency for Axis2 samples to work. I followed the steps correctly and have created the environment variables and restarted windows 7.
When trying to run any of the axis2 samples, I get this error message:
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
I have double checked the environment variables and they are correct. There is a thing that is bugging me. When I run mvn --version on command, it returns me The syntax of the command is incorrect. and this error is related to a POM file that doesn’t exists. All samples from Axis2 have a pom.xml file.
Since it is my first contact with Java, I think it is a easy to solve problem.
Thanks in advance for any help.
EDIT
Running this:
cd /d C:\Apache\axis\samples\java_first_jaxws and then mvn install
Result:
[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_HOMEin your environment variables, not on the command line.PATHenvironment variable so that you don’t always have to runmvnby specifying the path to it.M2_HOMEin your environment variables, I guess it should be C:\Apache\maven\bin.