hossein ketabi
hossein ketabi

Reputation: 510

No valid Maven installation found

I have a maven project with JavaServerFaces name in intellij . whan I want to run(clean&package) it I encounter with this error:

Error running JavaServerFaces [clean,package]: No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.

but I sure that my maven installation is correct and when check it in cmd I get this massage:

cmd: mvn -version

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 17:21:
28+0330)
Maven home: J:\maven\apache-maven-3.0.5\bin\..
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_45\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

my MAVEN_HOME: J:\maven\apache-maven-3.0.5

path: %MAVEN_HOME%\bin

what is problem? please help me. thanks

Upvotes: 1

Views: 3013

Answers (1)

Foriger
Foriger

Reputation: 459

Change name of MAVEN_HOME variable to M2_HOME or M3_HOME depending on Maven version.

Upvotes: 1

Related Questions