diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..bc4190f84 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,44 @@ +pipeline { + agent any + + tools { + jdk 'jdk11' + maven 'maven3' + } + + stages { + + stage('Git Checkout') { + steps { + git 'https://github.com/sanjudhyan/hello-world-war.git' + } + } + + stage('Compile') { + steps { + sh "mvn compile" + } + } + + stage('Package') { + steps { + sh "mvn package" + } + } + + stage('Install') { + steps { + sh "mvn install" + } + } + } + + post { + success { + echo "Build completed successfully!" + } + failure { + echo "Build failed!" + } + } +} diff --git a/pom.xml b/pom.xml index 85f2e2e2a..3163a7df1 100644 --- a/pom.xml +++ b/pom.xml @@ -21,9 +21,9 @@ org.apache.maven.plugins maven-war-plugin - 2.1.1 + 3.4.0 - \ No newline at end of file +