Saturday, May 19, 2012

How to install Apache Maven2?


What is Apache Maven2?

Apache Maven is a Java based build tool. It’s used for building and deploying Java projects.

Maven serves a similar purpose to the Apache Ant tool, but it is based on different concepts and works in a profoundly different manner. It can also be used to build and manage projects written in C#, Ruby, Scala, and other languages. 

Steps to install Apache Maven2 Tool:

1) Download the latest Maven2 distribution from http://maven.apache.org/download.html

2) Extract the zip file in some folder (say D:\ApacheMaven2).

3) Set M2_HOME Environment variable to the Maven2 location.

M2_HOME = D:\ApacheMaven2
(Right click My Computer > Choose properties > Choose Advanced Tab > Choose Environment Variables Button > In the System Variables, click New Button > Give the Variable Name: M2_HOME and Give the Value: D:\ApacheMaven2 > Click OK)

4) Edit the PATH Environment variable in System variables.

           PATH= %M2_HOME%\bin;
           Press (WinKey + Pause)
           Or
           (Right click My Computer > Choose properties > Choose Advanced Tab >
           Choose Environment Variables Button > In the System Variables, Click Edit button > Add the %M2_HOME%\bin;  in the variable value > Click OK to finish)

5) Make sure that you must have JDK installed and JAVA_HOME environment variable is set to the JDK, which is required for running Maven.

6) To make sure that Maven works correctly or not.

           Press (Winkey + R, then type cmd) and in the command prompt, type “mvn –version”.  You will see the installed Maven version.



Friday, May 18, 2012

How to install Apache Ant?

What is Apache Ant?

Apache Ant is a Java based build tool. It’s used for building and deploying Java projects.
It uses XML build file (build.xml) to build project like Compiling Source Code, Creating JAR file, Creating WAR file for WEB Application. 

Steps to install Apache Ant Tool:

1) Download the latest Ant distribution from http://ant.apache.org/bindownload.cgi

2) Extract the zip file in some folder (say D:\ApacheAnt).

3) Set ANT_HOME Environment variable to the Ant location.
ANT_HOME = D:\ApacheAnt
(Right click My Computer > Choose properties > Choose Advanced Tab > Choose Environment Variables Button > In the System Variables, click New Button > Give the Variable Name: ANT_HOME and Give the Value: D:\ApacheAnt > Click OK)

4) Edit the PATH Environment variable in System variables.

PATH= %ANT_HOME%\bin;
Press (WinKey + Pause)
Or
(Right click My Computer >  Choose properties  > Choose Advanced Tab  > Choose Environment Variables Button  > In the System Variables, Click Edit button  >  Add the %ANT_HOME%\bin;  in the variable value  > Click OK to finish) 

5) Make sure that you must have JDK installed and JAVA_HOME environment variable is set  to the JDK, which is required for running Ant.

6) To make sure that ANT works correctly or not.
Press (Winkey + R, then type cmd) and in the command prompt, type  
“ant –version”.  You will see the installed ant version.