We need the ability to trigger pipelines of projects that are maven dependencies. I know that the plugins say it has this feature but I couldn't make it work so far.
       
      After debugging for I while I found this log:
       

      Found 0 maven execution reports in...
      

      Looks like Jenkins maven event spy is not working properly.

       

      I can see that the jar file was set correctly:

      Load embedded maven spy jar 'META-INF/lib/pipeline-maven-spy.jar'
      
      Load META-INF/lib/pipeline-maven-spy.jar using classloader class hudson.ClassicPluginStrategy$AntClassLoader2: AntClassLoader[/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/annotation-indexer-1.9.jar:/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/groovy-sandbox-1.10.jar:/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/h2-1.4.196.jar:/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/jboss-marshalling-1.4.9.Final.jar:/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/jboss-marshalling-river-1.4.9.Final.jar:/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/joda-time-2.9.5.jar:/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/pipeline-maven.jar:/var/jenkins_home/plugins/pipeline-maven/WEB-INF/lib/xml-apis-1.4.01.jar]
      
      Generated wrapper: #!/bin/sh -e
      echo ----- withMaven Wrapper script -----
      /apps/maven/latest/bin/mvn --settings /apps/workspace/workspace/foundation@tmp/withMaven014c0f6a/settings.xml --batch-mode --show-version "$@"
      

      Env variable:

      JAVA_TOOL_OPTIONS=-Dmaven.ext.class.path="/apps/workspace/workspace/foundation@tmp/withMaven014c0f6a/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/apps/workspace/workspace/foundation@tmp/withMaven014c0f6a"
      

          [JENKINS-48262] Jenkins Maven Event Spy not working

          Bernardo Vale added a comment - - edited

          Quick update: It's related to maven version. We're using a very old maven version 3.0.5 and apparently, maven spy doesn't support that version.

           

          I've tested with the latest version and it works fine. Please don't close this yet, I will try to find the oldest working version so that we can add to the docs.

          Bernardo Vale added a comment - - edited Quick update: It's related to maven version. We're using a very old maven version 3.0.5 and apparently, maven spy doesn't support that version.   I've tested with the latest version and it works fine. Please don't close this yet, I will try to find the oldest working version so that we can add to the docs.

          You are right, the Jenkins pipeline maven event spy requires maven 3.2+

          Cyrille Le Clerc added a comment - You are right, the Jenkins pipeline maven event spy requires maven 3.2+

          Won't fix, Jenkins Maven Event Spy doesn't work with old versions of Maven, it's a known limitation.

          Cyrille Le Clerc added a comment - Won't fix, Jenkins Maven Event Spy doesn't work with old versions of Maven, it's a known limitation.

            cleclerc Cyrille Le Clerc
            bvale Bernardo Vale
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: