From 29ef9745c952f759d8ad302ba7236002376a12cf Mon Sep 17 00:00:00 2001
From: helpingpeopletolearn
<95265991+helpingpeopletolearn@users.noreply.github.com>
Date: Sun, 2 Nov 2025 12:21:42 +0530
Subject: [PATCH 1/2] Update Maven compiler plugin configuration
---
pom.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pom.xml b/pom.xml
index 56cd7c17..ee101748 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,6 +27,10 @@
org.apache.maven.plugins
maven-compiler-plugin
3.10.1
+
+ 1.8
+ 1.8
+
org.apache.maven.plugins
From 4b351a5781bee2b6475e7a549e413932064bdf79 Mon Sep 17 00:00:00 2001
From: dodoajowa <94541003+dodoajowa@users.noreply.github.com>
Date: Sat, 9 May 2026 12:18:28 +0100
Subject: [PATCH 2/2] Create CI/CD pipeline with Maven and Jenkins
Set up a CI/CD pipeline using Maven and Jenkins on an Ubuntu server, including steps for cloning the repo, installing Java and Maven, building the project, deploying to Tomcat, and triggering a Jenkins job.
---
CICD pipeline with maven and jenkins | 79 ++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 CICD pipeline with maven and jenkins
diff --git a/CICD pipeline with maven and jenkins b/CICD pipeline with maven and jenkins
new file mode 100644
index 00000000..c2f1bf28
--- /dev/null
+++ b/CICD pipeline with maven and jenkins
@@ -0,0 +1,79 @@
+name: CICD pipline with maven and jenkins
+
+on: [push, workflow_dispatch]
+
+jobs:
+
+CICDjob:
+
+runs-on: ubuntu-latest
+
+steps:
+
+- name: clone the repo on ubuntu server
+
+uses: actions/checkout@v4
+
+- name: install java and maven on ubuntu server
+
+uses: actions/setup-java@v3
+
+with:
+
+java-version: 11
+
+cache: 'maven'
+
+distribution: 'temurin'
+
+- name: Build the source code and .war file
+
+run: mvn package
+
+- name: connect to lab and depoloy code on tomcat9
+
+uses: cross-the-world/ssh-scp-ssh-pipelines@latest
+
+with:
+
+host: '3.109.48.70'
+
+port: 22
+
+user: 'labuser'
+
+pass: 'Nuvelabs123$'
+
+connect_timeout: 10s
+
+first_ssh: |
+
+sudo chmod 777 /var/lib/tomcat9/webapps
+
+scp: |
+
+'./target/*.war' => /var/lib/tomcat9/webapps
+
+last_ssh: |
+
+sudo systemctl restart tomcat9
+
+- name: Connect to lab and trigger Jenkins job to deploy code on tomcat9
+
+uses: cross-the-world/ssh-scp-ssh-pipelines@latest
+
+with:
+
+host: '3.109.48.70'
+
+port: 22
+
+user: 'labuser'
+
+pass: 'Nuvelabs123$'
+
+connect_timeout: 10s
+
+first_ssh: |
+
+sudo curl -l -u admin:115593825ca2975f5fdd181a936862d4db