Hi,
I'm new to
maven and have just installed maven 3.3.1 on my windows 7 computer.
I've followed the download and installation instructions given
here.
From my research on google / the web, I've setup the maven environment variables [by right-clicking my computer > properties >
advanced system settings > System properties > Advanced tab > Environment variables and under System variables] as
I've appended the
java and maven bin directories [separated by semi-colon] at the end of the System variable, Path .
From the
getting-started-guide-apache-maven-in-5-minutes page, I've also verified maven installation by
by opening the command prompt window and entering the mvn --version command which shows its successful installation.
However, when I tried to generate the first maven project [quintessential Hello World program] from another directory with
archetype:generate command, I'm getting the following
instead of the jars being downloaded from the maven central repo & the project being built. Naturally, on checking E drive, neither the
project directories (and their paths) nor the m2 [local repo] folder been constructed.
Again, looking closely
here led me to these
windows prerequisites vis-a-vis installing maven on windows O.S. As maven is java-based,
the
windows prerequisites requires
both java and maven to be installed in directory paths that do not have spaces inbetween them. While my maven installed directory
D:\apache-maven-3.3.1 conforms, the jdk installed directory is C:\Program Files\Java\jdk1.8.0_40 [i.e Program Files contains space inbetween].
Other details:
O.S: Windows 7 64-bit
Java installed:
x64 for 64-bit O.S Path: C:\Program Files\Java\jdk1.8.0_40x86 for 32-bit browsers [firefox, chrome, IE] for running applets and other 32-bit compatible apps Path: C:\Program Files (x86)\Java\jdk1.8.0_40 .
JAVA_HOME: points to the x64 jdk installed directory
Why is it I'm unable to build the project from the command prompt? Is it because of
a) the jdk location [i.e being installed in Program files] and / or
b) existence of two jdk's [32-bit & 64-bit]......
my research on the web shows a) and b) are perfectly OK vis-a-vis java download and installation
c) any other reason I'm missing
Much appreciated if any of the forum experts help me in resolving this [without, hopefully, advocating change in java jdk setup].
Thanks,
Sudhir