I'm trying to install maven to my PC.(windows 7)
Following are the steps I have done.
1. Installed Java 1.8.0.11
2. Added a system variable JAVA_HOME = C:\Program Files\Java\jdk1.8.0_11
3. Appended it to the path - PATH=%JAVA_HOME%\bin;C:\Program Files\......;... etc
4. Typed "Java -version" in command line and got the java version details as usual.
5. Then I downloaded and extracted the Maven 3.3.3
6. Added the M2_HOME to system variable.M2_HOME=C:\Program Files\apache-maven-3.3.3\apache-maven-3.3.3
7. Added M2 Variable M2=%M2_HOME%\bin
8. Appended M2 to Path variable. PATH=%M2%;%JAVA_HOME%\bin;....;...etc
9. Typed mvn --version in command line.
Get the following error.
Files was unexpected at this time.
What is wrong here? Please help me to get this resolved.
Thanks in advance!
**Note - I have not use quotes for any of the paths here. also I tried with 8 char syntax for folder names like this:
set java_home="c:\Progra~1\Java"
Non of these were resolved the issue. Please read the steps I have added and help me to get this resolved.**
Finally I was able to resolved the issue.
A quoted value in the user variables has caused to the "Files were unexpected at this time" error in maven.
I spent hours of time with changing Java_home and M2_home variables with different combinations but finally checked the user variable and noted the quotes there.
Home = "C:\Program Files (x86)\Git\bin"
Removed the quotes and change the git home variable as below and now all works fine. :)
Home = C:\Program Files (x86)\Git\bin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With