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

withMaven does not detect maven

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins 2.204.5
      Pipeline Maven Integration Plugin 3.8.2
      Master Ubuntu 18.04
      Agent: Ubuntu and Windows 10

      withMaven does not detect maven which was installed through tools

      {...}

      in a pipeline

      [withMaven] Options: []
      [withMaven] Available options: 
      [withMaven] using JDK installation 8
      $ where mvn.cmd
      $ where mvn.bat
      
      [withMaven] Maven installation not specified in the 'withMaven()' step and not found on the build agent
      [Pipeline] {
      [Pipeline] isUnix
      [Pipeline] bat
      
      C:\jenkins\workspace\capshe2_master>mvn -f impl/eu.pinteam.capshe/pom.xml -Dmaven.test.skip=true -Dfile.encoding=UTF-8 clean package -X 
      Skipping download of https://repos.pinteam.eu/nexus/service/local/repositories/ci/content/pinteam/openjdk8u-x64-windows-hotspot/8u232b09/openjdk8u-x64-windows-hotspot-8u232b09.zip as C:\jenkins\tools\hudson.model.JDK\8 is up to date on WJENKSL01.
      
      Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
      Maven home: C:\jenkins\tools\hudson.tasks.Maven_MavenInstallation\3.6.3\apache-maven-3.6.3\bin\..
      Java version: 1.8.0_232, vendor: AdoptOpenJDK, runtime: C:\jenkins\tools\hudson.model.JDK\8\jdk8u232-b09\jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
      [DEBUG]   Included C:\jenkins\workspace\capshe2_master@tmp\withMavenedd529ce\pipeline-maven-spy.jar
      [DEBUG] Populating class realm maven.ext
      [DEBUG]   Included C:\jenkins\workspace\capshe2_master@tmp\withMavenedd529ce\pipeline-maven-spy.jar
      
      [INFO] [jenkins-event-spy] Generate C:\jenkins\workspace\capshe2_master@tmp\withMavenedd529ce\maven-spy-20200322-101222-3544782924526790386938.log.tmp ...
      [DEBUG] Created new class realm maven.api
      [DEBUG] Importing foreign packages into class realm maven.api
      [DEBUG]   Imported: javax.annotation.* < maven.ext
      [DEBUG]   Imported: javax.annotation.security.* < maven.ext
      [DEBUG]   Imported: javax.enterprise.inject.* < maven.ext
      [DEBUG]   Imported: javax.enterprise.util.* < maven.ext
      [DEBUG]   Imported: javax.inject.* < maven.ext
      [DEBUG]   Imported: org.apache.maven.* < maven.ext
      [DEBUG]   Imported: org.apache.maven.artifact < maven.ext
      [DEBUG]   Imported: org.apache.maven.classrealm < maven.ext
      [DEBUG]   Imported: org.apache.maven.cli < maven.ext
      [DEBUG]   Imported: org.apache.maven.configuration < maven.ext
      [DEBUG]   Imported: org.apache.maven.exception < maven.ext
      [DEBUG]   Imported: org.apache.maven.execution < maven.ext
      [DEBUG]   Imported: org.apache.maven.execution.scope < maven.ext
      [DEBUG]   Imported: org.apache.maven.lifecycle < maven.ext
      [DEBUG]   Imported: org.apache.maven.model < maven.ext
      [DEBUG]   Imported: org.apache.maven.monitor < maven.ext
      [DEBUG]   Imported: org.apache.maven.plugin < maven.ext
      [DEBUG]   Imported: org.apache.maven.profiles < maven.ext
      [DEBUG]   Imported: org.apache.maven.project < maven.ext
      [DEBUG]   Imported: org.apache.maven.reporting < maven.ext
      [DEBUG]   Imported: org.apache.maven.repository < maven.ext
      [DEBUG]   Imported: org.apache.maven.rtinfo < maven.ext
      [DEBUG]   Imported: org.apache.maven.settings < maven.ext
      [DEBUG]   Imported: org.apache.maven.toolchain < maven.ext
      [DEBUG]   Imported: org.apache.maven.usability < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.* < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.authentication < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.authorization < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.events < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.observers < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.proxy < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.repository < maven.ext
      [DEBUG]   Imported: org.apache.maven.wagon.resource < maven.ext
      [DEBUG]   Imported: org.codehaus.classworlds < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.* < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.classworlds < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.component < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.configuration < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.container < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.context < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.lifecycle < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.logging < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.personality < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < maven.ext
      [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.* < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.artifact < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.collection < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.deployment < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.graph < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.impl < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.installation < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.internal.impl < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.metadata < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.repository < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.resolution < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.spi < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.transfer < maven.ext
      [DEBUG]   Imported: org.eclipse.aether.version < maven.ext
      [DEBUG]   Imported: org.fusesource.jansi.* < maven.ext
      [DEBUG]   Imported: org.slf4j.* < maven.ext
      [DEBUG]   Imported: org.slf4j.event.* < maven.ext
      [DEBUG]   Imported: org.slf4j.helpers.* < maven.ext
      [DEBUG]   Imported: org.slf4j.spi.* < maven.ext
      [DEBUG] Populating class realm maven.api
      [INFO] Error stacktraces are turned on.
      [DEBUG] Message scheme: color
      [DEBUG] Message styles: debug info warning error success failure strong mojo project
      [DEBUG] Reading global settings from C:\jenkins\tools\hudson.tasks.Maven_MavenInstallation\3.6.3\apache-maven-3.6.3\bin\..\conf\settings.xml
      [DEBUG] Reading user settings from C:\Users\jenkins\.m2\settings.xml
      [DEBUG] Reading global toolchains from C:\jenkins\tools\hudson.tasks.Maven_MavenInstallation\3.6.3\apache-maven-3.6.3\bin\..\conf\toolchains.xml
      [DEBUG] Reading user toolchains from C:\Users\jenkins\.m2\toolchains.xml
      [DEBUG] Using local repository at C:\Users\jenkins\.m2\repository
      

      Linux Agent

      Installer "Download (with basic authentication) and extract *.zip/*.tar.gz " cannot be used to install "8" on the node "Jenkins"
      $ /bin/sh -c "which mvn"
      [withMaven] Maven installation not specified in the 'withMaven()' step and not found on the build agent
      

            Unassigned Unassigned
            benbrummer Benjamin Brummer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: