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

            teilo James Nord created issue -
            teilo James Nord made changes -
            Field Original Value New Value
            Summary Tool ca not find maven - log message missleading Tool can not find maven - log message missleading
            teilo James Nord made changes -
            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
            {code}
            node {
                bat "set"
                withMaven {
                    git changelog: false, poll: false, url: 'https://github.com/jtnord/maven-test-project.git'
                    
                    bat "mvn package"
                }
            }
            {code}

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

            However it fails with the following message
            {{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...

             
            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
            {code}
            node {
                bat "set"
                withMaven {
                    git changelog: false, poll: false, url: 'https://github.com/jtnord/maven-test-project.git'
                    
                    bat "mvn package"
                }
            }
            {code}

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

            However it fails with the following message
            {quote}
            [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
            {quote}
            But MAVEN_HOME is defined - so this is just plain wrong...

             
            alobato Alvaro Lobato made changes -
            Assignee Alvaro Lobato [ alobato ]
            repolevedavaj Jonas Bamberger made changes -
            Link This issue is related to JENKINS-61612 [ JENKINS-61612 ]
            bguerin Benoit made changes -
            Link This issue is duplicated by JENKINS-61612 [ JENKINS-61612 ]
            bguerin Benoit made changes -
            Remote Link This issue links to "Pull request 388 (Web Link)" [ 27286 ]
            bguerin Benoit made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            bguerin Benoit made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            bguerin Benoit made changes -
            Assignee Benoit [ JIRAUSER133917 ]
            bguerin Benoit made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            bguerin Benoit made changes -
            Status Resolved [ 5 ] Fixed but Unreleased [ 10203 ]
            bguerin Benoit made changes -
            Released As pipeline-maven-3.11.0
            bguerin Benoit made changes -
            Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: