Github Repo
Jenkins setup
Install Git
Install Maven
Goto github --> settings --> webhook --> Add webhook Provide Jenkins url as shown in below image
Click on Add Webook
Create Jenkins job with Jenkinsfile content and click on GitHub hook trigger for GITScm polling as shown below
Click on Build
Build will happen automatically as show in below image