Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43651

Tool can not find maven - log message missleading

    XMLWordPrintable

Details

    • pipeline-maven-3.11.0

    Description

      in a clean jenkins (no maven plugin installed)

      In an agent without maven on the path add MAVEN_HOME to the environment variables for the node.

       

      run the follwoing pipeline

      node {
          bat "set"
          withMaven {
              git changelog: false, poll: false, url: 'https://github.com/jtnord/maven-test-project.git'
              
              bat "mvn package"
          }
      }
      

      This should work as MAVEN_HOME is in the environment as confimerd by the set command.

      However it fails with the following message

      [withMaven] use JDK installation provided by the build agent
      $ where mvn.cmd
      $ where mvn.bat
      [withMaven] use Maven installation provided by the build agent with executable null
      [Pipeline] // withMaven
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: Could not find maven executable, please set up a Maven Installation or configure MAVEN_HOME or M2_HOME environment variable

      But MAVEN_HOME is defined - so this is just plain wrong...

       

      Attachments

        Issue Links

          Activity

            People

              bguerin Benoit
              teilo James Nord
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: