How to create ZK Maven Project - Setup Maven 3, Tomcat 7 and Environment variables

        

Maven Folder
In the c drive , create a folder called Maven

Extract the “apache-maven-3.2.5-bin” into the folder Maven. The folder should look as follows.

clip_image002


Tomcat 7 Folder

In the c drive , create a folder called Tomcat7

Extract the “apache-tomcat-7.0.59-windows-x86” into the folder Tomcat7. The folder should look as follows.

clip_image002[4]

Setting up the Environment Variables

Open My Computer Properties

clip_image002[6]

Click on “Advance system settings”. This would open up a window as shown

clip_image002[8]

Click on “Environment Variables”. This would open up a window as shown

clip_image004

Click on “New” button under “System variables”. This would open up a window as shown

Create following variables in the under the system variables section

JAVA_HOME

Create an environment variable called “JAVA_HOME”.

The Variable name should be “JAVA_HOME”.

Variable value should be the folder path you installed Java JDK. e.g. “C:\Program Files\Java\jdk1.7.0_75"

clip_image006


MAVEN_HOME

Create another environment variable called “MAVEN_HOME”.

The Variable name should be “MAVEN_HOME”.

Variable Value : C:\Maven

clip_image008

Path Variable

Select “Path” variable from “System Variables” and click Edit.

clip_image010

The default path will be as follows

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

Note : It may vary computer to computer.

Now let us append java and Maven folder to the above path as shown here.

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_21\bin;c:\maven\bin;

Click Ok to save and close.

Now let us verify Both Java and Maven Path are set correctly.

Open command prompt and Enter “Java –Version” and “mvn –version”

clip_image012