1.Run Apache server and run http://localhost:8080/jenkins/
2. Install Maven 3 by below commands
sudo apt-get purge maven maven2 maven3
sudo apt-add-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3
3.Go to Manage Jenkins Displayed a button that “Setup Security” Click on it or you can Dismiss it.
4.if want to Setup the “Setup Security” thank Click on “Enable Security”
5.In Security Realm Choose “Jenkins own user databases”
6.Choose Logged in users can do anything (you can choose according to your requirement
7.Click on Save and Apply
8.After run maven Go to “Manage jenkins > Manage plugins > Available ”
9.Check on “Git Plugin” than click on Install without restart.
10.Wait until plugin install.
11.Click on New Item >> Choose Maven Project give name of project.
12.Come to Source Code Management choose Git.
Enter your git repository url and add user name and password.
13. Leave “Branch to build” as it as.
14. Build Triggers , Choose according to your need . e.g. Build when a change is pushed to GitHub
15. Come to “Build” and displayed a error message that “Jenkins needs to know where your Maven is installed . Please do so from the system configuration “ click on “the system configuration” .
16.Come to JDK > Add Jdk >> ucheck Intall automatically and enter System JDK home
Name : java 1.7
JAVA_HOME : /usr/lib/jvm/java-7-openjdk-amd64
17.After go to Git and enter git path .
18.Come to maven uncheck “Install automatically” and enter maven path .
Name : Maven
Maven_Home : /usr/share/maven3/
19. Come to Git plugin and enter git user-name and git email id.
Click on save and Apply .
Come to “Build” and enter Pom.xml file path into “Root POM” After project name enter path .
20.Click Save and Apply .