How to configure Maven installation in Jenkins per individual Slave node?

后端 未结 4 1509
长情又很酷
长情又很酷 2021-01-01 12:03

Symptom

If I create a Maven job in Jenkins (New Item => Maven project, using the maven plugin) with all defaults and run it, I get this error:

4条回答
  •  借酒劲吻你
    2021-01-01 12:45

    For me, the solution was to go to Manage Jenkins -> Global Tool Configuration, and set up maven there. You can access this via /configureTools (ex: http://your-ip:8080/jenkins/configureTools )

    Example: Maven installations

    • Name: my_maven_3.3.9
    • MAVEN_HOME: /usr/share/maven

    Additional configurations for other common tools at /configureTools :

    Git installations

    • Name: my_git_2.11.0
    • Path to Git executable: /usr/bin/git

    JDK installations

    • Name: my_jdk_1.8.0_161
    • JAVA_HOME: /opt/jdk/jdk1.8.0_161

提交回复
热议问题