File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# Stage 1
33# ----------------------------------
44
5- # Import docker image with maven installed
6- FROM maven:3.8.3-openjdk-17 as builder
5+ # Import docker image with maven installed (Java 11 for migration)
6+ FROM maven:3.8.8-eclipse-temurin-11 as builder
77
88# Add maintainer, so that new user will understand who had written this Dockerfile
99MAINTAINER Madhup Pandey<madhuppandey2908@gmail.com>
@@ -24,8 +24,8 @@ RUN mvn clean install -DskipTests=true
2424# Stage 2
2525# --------------------------------------
2626
27- # Import small size java image
28- FROM openjdk:17 -alpine as deployer
27+ # Import small size java image (Java 11 for migration)
28+ FROM eclipse-temurin:11-jre -alpine as deployer
2929
3030# Copy build from stage 1 (builder)
3131COPY --from=builder /src/target/*.jar /src/target/bankapp.jar
Original file line number Diff line number Diff line change 22pipeline {
33 agent any
44
5+ tools {
6+ jdk ' JDK11' // Configure JDK 11 in Jenkins Global Tool Configuration
7+ maven ' Maven3' // Ensure Maven 3.x is configured
8+ }
9+
510 environment{
611 SONAR_HOME = tool " Sonar"
12+ JAVA_HOME = " ${ tool 'JDK11'} "
13+ PATH = " ${ JAVA_HOME} /bin:${ env.PATH} "
714 }
815
916 parameters {
Original file line number Diff line number Diff line change 8888 <version >3.11.0</version >
8989 <configuration >
9090 <release >11</release >
91+ <compilerArgs >
92+ <arg >-Xlint:all</arg >
93+ </compilerArgs >
9194 </configuration >
9295 </plugin >
9396 <plugin >
You can’t perform that action at this time.
0 commit comments