pipeline { agent { docker { image 'maven:3.8-openjdk-18' args '-v $HOME/.m2:/root/.m2' } } stages { stage('Build') { steps { checkout scm sh 'ls' sh './mvnw compile' } } stage('Test') { steps { sh './mvnw test' junit '**/target/surefire-reports/TEST-*.xml' } } stage('Package') { steps { sh './mvnw package -DskipTests' } } } }