Simple Maven Project
In this tutorial we will deploy a simple java project using GItHub, Jenkins & Tomcat EC2 Server
Before you start:
- Make sure you have Jenkins installed, here the reference link
- Make sure you have pushed java code to your git repo, here the java code
- Tomcat Server up and running, here the reference link
- Jenkins up and running with git, maven & deploy on container plugin installed
- Make sure you stored tomcat credential in global credential of Jenkins, here the reference link
Jenkins Part:
- Login to your Jenkins Dashboard and click New Item
- Enter an Item name
Select Maven project
- Under Source Code Management
Select Git & input your jave program git repo URL
- Under Build
Select Maven
Goals and options: clean install package
- Select Post-build Actions
Input the path of you jar/war package: **/*.war
Credentials: Select tomcat credentials, which has to be stored in global credentials (UID: deployer, PWD: deployer)
Input your tomcat server IP address/URL
- Your job is ready, select your SimpleMavenProject Job
and click on Build Now
- Once successful check your application by browsing tomcat EC2 URL
Example: https://174.129.59.125:8090/webapp