I have installed Apache Maven following these steps.
JDK and JAVA_HOME Make sure JDK is installed, and “JAVA_HOME” variable is added as Windows environment variable.
Download Apache Maven Visit Maven official website, download the Maven zip file, for example : apache-maven-3.2.2-bin.zip. Unzip it to the folder you want to install Maven.
Assume you unzip to this folder – C:\Program Files\Apache\maven
- Add M2_HOME and MAVEN_HOME Add both M2_HOME and MAVEN_HOME variables in the Windows environment, and point it to your Maven folder.
M2_HOME or MAVEN_HOME
Maven document said add M2_HOME only, but some programs still reference Maven folder with MAVEN_HOME, so, it’s safer to add both.
Add To PATH Update PATH variable, append Maven bin folder – %M2_HOME%\bin, so that you can run the Maven’s command everywhere.
Verification Done, to verify it, run mvn –version in the command prompt.
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-14T01:40:2 7+05:30) Maven home: C:\Program Files\Apache Maven Java version: 1.8.0_40, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_40\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
But When I build a project in Eclipse LUNA, I get this error.
Buildfile: C:\Users\Sarnath K Jegadeesan\Documents\BroadLeafQuillingArtWorkspace\DemoSite\site\build.xml
start-db:
[echo] Starting Data Base...
jetty-demo:
[artifact:mvn] Listening for transport dt_socket at address: 8000
[artifact:mvn] -Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[artifact:mvn] Java Result: 1
BUILD SUCCESSFUL
Total time: 5 seconds
I have all the environment variables properly set. How do I resolve this issue?