Get Started With Apache Maven

What is Apache Maven? 

Apache Maven is a Software Project Management and Comprehension tool, Based on the concept of a Project Object Model(POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
-http://maven.apache.org

So basically Apache Maven is a project management tool with  a project object model. And it follows a set of standards. And it includes a projects life cycle. And it also act as  a dependency management system. Maven uses logic for executing plugin goals at life cycle phases. 

With Maven your project follow a consistent structure. And your projects are IDE agnostic. Maven allows for easy modification to the project. Maven simplifies the declaration of project dependencies. And it uses a Project Object Model (POM) as mentioned above. 

Installing and configuring Apache Maven. 

Lets look at how to install and configure apache maven in your computer. 

Before all of the bellow steps ensure that you have installed the latest JDK installed in your computer and (Latest Maven package needs java version 1.7 or higher installed) it is pointed to JAVA_HOME environmental variable.

In Windows  

1. Download the Apache Maven package from here or you can visit http://maven.apache.org. 


2. Then unzip the file and copy the unziped file to the program files in C.

C:\Program Files\
    
3. Then go to system variables and add the bellow path to your system variable paths.  

C:/Program Files/apache-maven-3.3.9/bin

4. Then to see whether maven has installed successfully in your computer open up a command prompt and type mvn -v . and it'll print out something like this.


For Unix Based Operating System (Linux, Solaris or Mac OS X)

check environmental variables 

echo $JAVA_HOME


Add your maven package path


export PATH=/opt/apache-maven-3.3.9/bin:$PATH 

After that open up a new terminal and type mvn -v and you'll get something as mentioned above.


If you have any problems feel free to put them on the comment section.

Comments