Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.0.8
-
Fix Version/s: None
-
Component/s: Documentation: Guides
-
Labels:None
Description
Hi,
I had small problems to get the Maven2 installed, because I used Windows system variables for "M2_HOME" and it in "path" variable.
"Getting Started in 5 Minutes" should be excact for "stupid" users like I am.
Problem was
1) I added M2_HOME to system variables - value was "C:\Apps\apache-maven-2.0.8\bin"
--> mvn --version throwed a system message that mvn is not a valid command
2) I added M2_HOME to "path" variable
--> mvn --version throwed a good error message that my JAVA_HOME was incorrect (I had that \bin there too)
3) I fixed JAVA_HOME - took that +bin away and tried again
--> mvn --version throwed a good error message that my M2_HOME was incorrect (I had that \bin there too)
4) I fixed M2_HOME and path - took that +bin away and tried again
--> mvn --version throwed a error message that I did not understand
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
The problem was that I had "\" in the M2_HOME (M2_HOME was "C:\Apps\apache-maven-2.0.8\")
Could you change a little this document - use examples and pictures - that would be helpfull.
Thx,
-JPP
Issue Links
- relates to
-
MNG-3365
Remove trailing-backslashes from M2_HOME in mvn.bat
-
Not a doc issue but a real bug: thanks to catch it
The problem is when calling java due to the VM parameter
So, we need to remove trailing-backslashes from M2_HOME. I will open a new issue for this.