diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 00000000..62cc896f
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,58 @@
+pipeline {
+ agent any
+ tools {
+ maven 'maven3'
+ jdk 'jdk-21'
+ }
+ environment {
+ SONAR_HOME = tool 'sonar-scanner'
+ }
+ stages {
+ stage('checkout') {
+ steps {
+ git branch: 'main', credentialsId: 'github', url: 'https://github.com/Ramlu/Multi-Tier-With-Database.git'
+ }
+ }
+ stage('Compile') {
+ steps {
+ sh 'mvn clean compile'
+ }
+ }
+ stage('Test') {
+ steps {
+ sh 'mvn test -DSkipTests'
+ }
+ }
+ stage('Scan') {
+ steps {
+ sh 'trivy fs --format table -o fs.html .'
+ }
+ }
+ // stage('Sonar Analysis') {
+ // steps {
+ // withSonarQubeEnv('sonar-server') {
+ // sh "${SONAR_HOME}/bin/sonar-scanner " +
+ // "-Dsonar.projectKey=bankapp " +
+ // "-Dsonar.projectName=BankApp " +
+ // "-Dsonar.sources=src/main/java " +
+ // "-Dsonar.tests=src/test/java " +
+ // "-Dsonar.java.binaries=target/classes " +
+ // "-Dsonar.junit.reportPaths=target/surefire-reports " +
+ // "-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml"
+ // }
+ // }
+ // }
+ // stage('Deploy') {
+ // steps {
+ // withMaven(globalMavenSettingsConfig: '5ecbebcf-4fa0-413f-a9de-1cd928c6b445', jdk: 'jdk-21', maven: 'maven3', mavenSettingsConfig: '', traceability: true) {
+ // sh 'mvn deploy'
+ // }
+ // }
+ // }
+ stage('Package') {
+ steps {
+ sh 'mvn package'
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 19a32321..6e214563 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,8 +27,8 @@
- 17
- 0.8.7
+ 21
+ 0.8.11
jacoco
reuseReports
${project.basedir}/../target/jacoco.exec
@@ -86,6 +86,16 @@
spring-boot-maven-plugin
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.13.0
+
+ ${java.version}
+ ${java.version}
+ ${java.version}
+
+
+
org.jacoco
jacoco-maven-plugin
${jacoco.version}
@@ -112,11 +122,11 @@
maven-releases
- http://13.233.143.130:8081/repository/maven-releases/
+ http://3.108.60.10:8081/repository/maven-releases/
maven-snapshots
- http://13.233.143.130:8081/repository/maven-snapshots/
+ http://3.108.60.10:8081/repository/maven-snapshots/