java - Mvn is not recognized as internal or external in jenkins -
when jenkins tries build program, jenkins build fails error mvn
not recognized internal or external command. here jenkins runs :
cmd.exe /c "mvn -f spring-boot-samples\spring-boot-sample-atmosphere\pom.xml compile && exit %%errorlevel%%"
maven correctly set in computer, when execute previous command manually jenkins workspace, build works , jar file generated
seems jenkins needs 1 environment variable ?
thank you, regards
duplicate. see 'mvn' not recognized internal or external command, or apache maven install "'mvn' not recognized internal or external command" after setting os environmental variables? or maven not recognized in jenkins
i recommend not relying on jenkins' host configuration. jenkins @ sandboxing jobs , outsourcing execution agents, might not have tools installed on host directly. instead use jenkins' provisioning mechanism , plugins if possible. instance maven project plugin: https://wiki.jenkins.io/display/jenkins/maven+project+plugin
Comments
Post a Comment