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
そして私のPATH
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.
そしてこれは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_HOME%\bin を PATH に設定するように指示されている Maven Web ページにありますが、zip をダウンロードして解凍すると、次のような構造になります。
したがって、明らかに 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
どうしたの?そして、私が得たこのディレクトリ構造はどうなっていますか? 変数はどこを指す必要がありますか?