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

Upgrade apache maven-invoker-plugin to support new buildlog attribute in reports

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • maven-invoker-plugin
    • None
    • Jenkins 2.289 running in docker
      Maven-invoker-plugin 2.4 (Jenkins)
      maven-invoker-plugin 3.2.2 (Apache)

      I get this stack in Jenkins logs :

      org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unknown attribute 'buildlog' for tag 'build-job' (position: START_TAG seen .../project/target/it/dockerfile/build.log">... @2:218) 
      	at org.apache.maven.plugins.invoker.model.io.xpp3.BuildJobXpp3Reader.checkUnknownAttribute(BuildJobXpp3Reader.java:119)
      	at org.apache.maven.plugins.invoker.model.io.xpp3.BuildJobXpp3Reader.parseBuildJob(BuildJobXpp3Reader.java:652)
      	at org.apache.maven.plugins.invoker.model.io.xpp3.BuildJobXpp3Reader.read(BuildJobXpp3Reader.java:698)
      	at org.apache.maven.plugins.invoker.model.io.xpp3.BuildJobXpp3Reader.read(BuildJobXpp3Reader.java:553)
      	at org.apache.maven.plugins.invoker.model.io.xpp3.BuildJobXpp3Reader.read(BuildJobXpp3Reader.java:567)
      	at org.apache.maven.plugins.invoker.model.io.xpp3.BuildJobXpp3Reader.read(BuildJobXpp3Reader.java:596)
      	at org.jenkinsci.plugins.maveninvoker.MavenInvokerRecorder.parseReports(MavenInvokerRecorder.java:191)
      	at org.jenkinsci.plugins.maveninvoker.MavenInvokerRecorder.perform(MavenInvokerRecorder.java:135)
      Caused: java.io.IOException: Unknown attribute 'buildlog' for tag 'build-job' (position: START_TAG seen .../project/target/it/dockerfile/build.log">... @2:218) 
      	at org.jenkinsci.plugins.maveninvoker.MavenInvokerRecorder.perform(MavenInvokerRecorder.java:152)
      	at org.jenkinsci.plugins.maveninvoker.MavenInvokerRecorder.perform(MavenInvokerRecorder.java:119)
      	at org.jenkinsci.plugins.pipeline.maven.publishers.InvokerRunsPublisher.executeReporter(InvokerRunsPublisher.java:141)
      	at org.jenkinsci.plugins.pipeline.maven.publishers.InvokerRunsPublisher.process(InvokerRunsPublisher.java:110)
      	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:153)
      	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution2$WithMavenStepExecutionCallBack.finished(WithMavenStepExecution2.java:1103)
      	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution$TailCall.lambda$onSuccess$0(GeneralNonBlockingStepExecution.java:140)
      	at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      

      and test results are not reported to the GUI

          [JENKINS-65459] Upgrade apache maven-invoker-plugin to support new buildlog attribute in reports

          benoit guerin created issue -
          benoit guerin made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          benoit guerin made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          benoit guerin made changes -
          Remote Link New: This issue links to "Pull request #10 (Web Link)" [ 26706 ]
          benoit guerin made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]

          Vincent Massol added a comment - - edited

          Hi olamy!

          We're hitting this issue on the XWiki project. We suddenly started seeing failed builds on ci.xwiki.org recently, even when everything was ok. After analyzing it we found that the Jenkins InvokerRun publisher now fails the build when there's an error: https://github.com/jenkinsci/pipeline-maven-plugin/commit/08f725b927d9ee934aeaea1f372e3562510d5a28#diff-07a0326a979930635b0f3f4bb291db752d478b8885ff7c76a5741ac866879804R146

          Our error is:

          289397 ERROR: [withMaven] invokerPublisher - exception archiving Invoker runs for Maven artifact MavenArtifact{org.xwiki.platform:xwiki-platform-tool-packager-plugin:maven-plugin:14.10.5-SNAPSHOT(       version: 14.10.5-SNAPSHOT, snapshot:true) } generated by PluginInvocation{org.apache.maven.plugins:maven-invoker-plugin:3.3.0@run  integration-test}: java.io.IOException: Unknown attribute        'buildlog' for tag 'build-job' (position: START_TAG seen ...m-tool-packager-plugin/target/it/basic-import-export/build.log" />... @2:263) . Failing the build.
          

          This looks like this issue and an error of the Jenkins Invoker publisher to support the buildlog parameter.

          I see that this issue is closed but not released.

          I have 2 questions:
          1) Any idea when it could be released?
          2) Is the Jenkins Invoker Plugin used by the Jenkins Pipeline Maven plugin or are they separate and I should report the problem on the pipeline-maven-plugin component?

          Thanks!

          Vincent Massol added a comment - - edited Hi olamy ! We're hitting this issue on the XWiki project. We suddenly started seeing failed builds on ci.xwiki.org recently, even when everything was ok. After analyzing it we found that the Jenkins InvokerRun publisher now fails the build when there's an error: https://github.com/jenkinsci/pipeline-maven-plugin/commit/08f725b927d9ee934aeaea1f372e3562510d5a28#diff-07a0326a979930635b0f3f4bb291db752d478b8885ff7c76a5741ac866879804R146 Our error is: 289397 ERROR: [withMaven] invokerPublisher - exception archiving Invoker runs for Maven artifact MavenArtifact{org.xwiki.platform:xwiki-platform-tool-packager-plugin:maven-plugin:14.10.5-SNAPSHOT( version: 14.10.5-SNAPSHOT, snapshot:true) } generated by PluginInvocation{org.apache.maven.plugins:maven-invoker-plugin:3.3.0@run integration-test}: java.io.IOException: Unknown attribute 'buildlog' for tag 'build-job' (position: START_TAG seen ...m-tool-packager-plugin/target/it/basic-import-export/build.log" />... @2:263) . Failing the build. This looks like this issue and an error of the Jenkins Invoker publisher to support the buildlog parameter. I see that this issue is closed but not released. I have 2 questions: 1) Any idea when it could be released? 2) Is the Jenkins Invoker Plugin used by the Jenkins Pipeline Maven plugin or are they separate and I should report the problem on the pipeline-maven-plugin component? Thanks!
          CloudBees Security Developers made changes -
          Status Original: Fixed but Unreleased [ 10203 ] New: Closed [ 6 ]
          CloudBees Security Developers made changes -
          Comment [ [~vmassol]release 2.5 done.
          perso I do not use this plugin anymore but ask maven-invoker-plugin to generate surefire/junit result file (there is an option for that) and tell the jenkins junit plugin to parse those files as well as the standard test reports. ]

          Olivier Lamy added a comment -

          vmassol
          release 2.5 done.
          perso I do not use this plugin anymore but ask maven-invoker-plugin to generate surefire/junit result file (there is an option for that) and tell the jenkins junit plugin to parse those files as well as the standard test reports.

          Olivier Lamy added a comment - vmassol release 2.5 done. perso I do not use this plugin anymore but ask maven-invoker-plugin to generate surefire/junit result file (there is an option for that) and tell the jenkins junit plugin to parse those files as well as the standard test reports.

          Vincent Massol added a comment - - edited

          perso I do not use this plugin anymore but ask maven-invoker-plugin to generate surefire/junit result file (there is an option for that) and tell the jenkins junit plugin to parse those files as well as the standard test reports.

          olamy This is interesting, thanks! I found https://maven.apache.org/plugins/maven-invoker-plugin/run-mojo.html#writeJunitReport which is probably the config param you were referring to. However, how do you tell withMaven to also pick up the generated BUILD-*.xml files? I've not tried it yet but I see I can use <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory> to generate the invoker test results in the same location as the surefire reports. Maybe that's enough for Jenkins to pick them up (if it's looking for all XML files rather than TEST-*.xml files).

          Vincent Massol added a comment - - edited perso I do not use this plugin anymore but ask maven-invoker-plugin to generate surefire/junit result file (there is an option for that) and tell the jenkins junit plugin to parse those files as well as the standard test reports. olamy This is interesting, thanks! I found https://maven.apache.org/plugins/maven-invoker-plugin/run-mojo.html#writeJunitReport which is probably the config param you were referring to. However, how do you tell withMaven to also pick up the generated BUILD-*.xml files? I've not tried it yet but I see I can use <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory> to generate the invoker test results in the same location as the surefire reports. Maybe that's enough for Jenkins to pick them up (if it's looking for all XML files rather than TEST-*.xml files).

            olamy Olivier Lamy
            falcon benoit guerin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: