diff --git a/Jenkinsfile b/Jenkinsfile index 445611cb7..0cb2e4370 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,21 +1,25 @@ -pipeline{ +pipeline { agent any tools { - maven 'maven' - jdk 'java' + // Reference the Maven installation configured in Global Tool Configuration + maven 'Maven 3.9.11' // Use the name you gave your Maven installation } - stages{ - stage('checkout'){ - steps{ - checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'github access', url: 'https://github.com/sreenivas449/java-hello-world-with-maven.git']]]) + stages { + stage('Build') { + steps { + sh 'mvn clean install' } } - stage('build'){ - steps{ - bat 'mvn package' + + + stage('Test') { + steps { + sh 'mvn test' } } } -} \ No newline at end of file +} + + diff --git a/pom.xml b/pom.xml index 263eb8be6..e75d3aecb 100644 --- a/pom.xml +++ b/pom.xml @@ -2,10 +2,10 @@ 4.0.0 - org.springframework - jb-hello-world-maven + org.springfgitramework + Daarmik-Manoj jar - 0.2.0 + 2.0.0