0% found this document useful (0 votes)
23 views

Creating Web Application and Pushing It To GitHub Repository Using Eclipse IDE

Uploaded by

skshameem666
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Creating Web Application and Pushing It To GitHub Repository Using Eclipse IDE

Uploaded by

skshameem666
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Creating Web Application and Pushing it to GitHub Repository using Eclipse IDE

1. Open Start menu -> Search for Eclipse -> Click Eclipse IDE for Enterprise Java and Web
Developers

2. Set your Z drive (Z:) as default workspace then click on Launch button
3. Create a new Maven Project using menu File -> New -> Maven Project

4. In New Maven Project Popup window choose the following settings


a. Use default Workspace location -> Click on Next Button
b. Choose ArchetypeID as maven-archetype-webapp then Click on Next Button

c. Provide Group Id as com.example, Artifact Id as sample-webapp leave remaining


fields as it is and then click on Finish Button.
5. Run the application by opening Run menu then click on Run Menu Item and then choose
Run on Server then click ok

6. Choose Apache Tomcat 9.0 Server


7. In the next step install Tomcat if needed
8. Then click on Finish to run the application
Uploading the Created Project to the GitHub
1. Right click on Project -> Team -> Share Project -> Select Use or create repository in
parent folder of project -> Click Finish
2. Right click on the Newly Created Repository -> Team -> Commit -> Add unstaged
files to index -> Add commit and Push message -> Click on commit

3. Click on Push Head then provide necessary details like GitHub Repository URL,
Username, Password (Personal access code-classic) then click on preview
4. In next screen provide username and password (Personal access code-classic) press
login
5. Then click on push.
6. Close the final window.
Installing and configuring Jenkins
1. Execute the following commands
a. sudo su
b. wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-
stable/jenkins.repo
c. rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
d. sudo yum upgrade
e. yum install jenkins -y
f. systemctl enable Jenkins
g. systemctl start Jenkins
2. Connect to the Jenking using Browser and the url: <Pulic IP>:8080
3. Copy admin initial password from the location
/var/lib/jenkins/secrets/initialAdminPassword and paste it in password box then
click on continue.
4. Choose Install Select plugins to install -> Deselect all default plugins -> click
install
5. Then Create Admin User by providing necessary details and then click Save and
Continue button.

6. Then Click on Save and Finish Button.


7. In the next screen click on Start using Jenkins Button.
Installing GitHub and Maven Plugin
1. Click on Manage Jenkins

2. Choose Plugins
3. Choose available plugins and then search for GitHub plugin then click on Install
Button.
4. Then go to Dashboard and then Click on Manage Jenkins.

5. Choose Plugins
6. Choose available plugins and then search for Maven Integration plugin then click
on Install Button.

i. Configure Maven and Git using Tools Button in Manage Jenkins Tab
ii. Add JDK

iii. Add Git


iv. Add Maven

v. Click Save and then Apply


7. To Test Maven, Click on New Item
8. Provide name as sample-webapp then choose Maven Project -> click on OK
9. Choose the following options
i. Provide description
ii. Choose Source Code Management as Git -> paste the git URL.
10. Specify Build triggers

i. For Manual Build

ii. For Polling Continuously


11. Apply Build Goals and Options as “clean install”

12. Click Apply then Save


13. Then click on Build now to check whether project build successfully or not.

You might also like