You need to install Maven on the build agent executing the job. An alternative by Jenkins is that it can install Maven for you. This can be configured in the Global Tool Configuration of the Jenkins Master.
If you are really only allowed to modify the Jenkinsfile
, you could first download and unpack maven into some local directory and then call it from there.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.