Apache maven安装问题

时间:2015-04-10 05:29:57

标签: maven maven-3

我在XP上安装了Maven 3.3.1 - 它似乎已经很好了 然而,当我之后进行mvn --version时 - 我得到了下面的奇怪回答:

C:\>mvn --version
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
......

非常感谢帮助您完成此任务。

1 个答案:

答案 0 :(得分:1)

Maven命令文件使用参数运行JVM。你有什么Java版本? JDK Maven 3.3 需要 JDK 1.7或,Maven 3.2需要JDK 1.6或更高版本,而Maven 3.0 / 3.1需要JDK 1.5或更高版本