Jenkins runs into error while locating "maven" folder, for Maven type project:
Jenkins needs to know where your Maven is installed. Please do so from the system configuration.
Just about the place where pom.xml
location is to be mentioned.
In the Jenkins dashboard (Home screen), click Manage Jenkins from the left-hand side menu. Then, click on 'Configure System' from the right hand side. In the Configure system screen, scroll down till you see the Maven section and then click on the 'Add Maven' button.
Window --> Preferences --> Maven --> Installations. Click Add. Click in Directory and point to maven directory installed, for example: c:\<Maven path>\apache-maven-3.6. 3 .
Once Maven is installed, you can check the version by running mvn -v from the command-line. If Maven has been installed, you should see something resembling the following output. If you see this output, you know that Maven is available and ready to be used.
As stated in the above answer, you need to set-up maven in Global Tool Configuration. Name your Maven & check the install automatically option. Jenkins will automatically install Maven before building the project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With