意外的maven目录

esk*_*era 1 path java-home system-variable maven

我刚刚下载了Maven 3.0.4.

我的变量是:

M2_HOME C:\Program Files (x86)\apache-maven-3.0.4
JAVA_HOME C:\Program Files\Java\jdk1.6.0_35

和我的路径

C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;%FRASCATI_HOME%/bin;%JAVA_HOME%\bin;%M2_HOME%\bin

不在maven目录时我收到此错误:

C:\Users\rmescalera>mvn -version
"mvn" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
Run Code Online (Sandbox Code Playgroud)

和另一个来自maven目录:

ERROR: M2_HOME is set to an invalid directory. M2_HOME = "C:\Program Files (x86)\apache-maven-3.0.4\bin" Please set the M2_HOME variable in your environment to match the location of the Maven installation

关键在于maven 网页,它说在PATH中设置%MAVEN_HOME%\ bin但是当我下载并解压缩zip时,这就是我得到的结构:

maven目录

所以,显然apache-maven-3.0.4中没有bin目录!

我曾尝试将内部复制
C:\Program Files (x86)\apache-maven-3.0.4\apache-maven\src 到新内容中C:/maven directory and setting the right variables

怎么了?我得到的这个目录结构是什么?我的变量应该指向哪里?

bas*_*mes 6

好像你已经下载了maven源代码.从这里下载.确保你正在下载(二进制邮编)