pipeline{ agent any tools{ maven '3.8.6' jdk 'JDK 18' } stages { stage ('Initialize') { steps { sh ''' echo "PATH = ${PATH}" echo "M2_HOME = ${M2_HOME}" ''' } } stage('Build'){ steps{ sh 'mvn -Dmaven.test.failure.ignore=true install' } post{ success{ junit 'target/surefire-reports/**/*.xml' archiveArtifacts artifacts: 'target/*.jar, *.pom', fingerprint: true, followSymlinks: false, onlyIfSuccessful: true } } } } }