My test is working fine as Maven project. It fetches code from Git.
I wanted to execute the same in Pipeline so I wrote the below script for pipeline project.
pipeline {
agent any
stages {
stage('Getting the project from GIT') {
steps {
echo 'Pulling..';
git branch: 'main',
url: 'https://github.com/user/project.git';
}
}
stage('Cleaning the project') {
steps {
echo 'cleaning project ...'
sh 'mvn clean'
}
}
stage('Artifact Construction') {
steps {
echo "artificat contruction"
sh 'mvn package'
}
}
}
}
But when I execute , the third stage seems not to work.
Maven configuration :
This is the version of Maven
I tried everything to solve this issue, can you guys help me? Is it a maven version problem?
CodePudding user response:
You are running maven version - 3.0.5. Maven resource plugin -3.2.0 is not compatible with this version of maven.
Upgrade maven installation to higher version. You can refer below plugin documentation page: https://maven.apache.org/plugins-archives/maven-resources-plugin-3.2.0/plugin-info.html