• 1362.vee39a_d4b_02b_1

      On CI systems using cloudy agents, it is typical for the local Maven repository to be empty at the start of a build, resulting in thousands of artifacts being downloaded. You can set up a proxy mirror to make this fast, but you still get tons of noise in the log. Jenkins devs have started to work around this using -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn to suppress messages about successful downloads, but even if you know about this workaround, it is not ideal: you then lack information in the log file which would be useful diagnostics if, for example, the build hanged in the middle of a socket connection.

      Suggest having this plugin define a ConsoleAnnotatorFactory to hide these lines by default in a collapsing CSS box, so you can see that there were some downloads but do not need to look at all of them. Alternately, make withMaven define a ConsoleLogFilter that adds a ConsoleNote to each such line when it is emitted, akin to core MavenConsoleAnnotator.

          [JENKINS-51182] Conceal console lines from Maven downloads

          Jesse Glick added a comment -

          Or could live in another plugin if JENKINS-26462 moves forward.

          Jesse Glick added a comment - Or could live in another plugin if JENKINS-26462 moves forward.

          jglick do you have an example of a ConsoleAnnotatorFactory to " hide these lines by default in a collapsing CSS box"?

          Cyrille Le Clerc added a comment - jglick do you have an example of a ConsoleAnnotatorFactory to " hide these lines by default in a collapsing CSS box"?

          Jesse Glick added a comment -

          Not precisely that. There is a collapsing console sections plugin. Also here I did something sort of related with CSS tricks.

          Jesse Glick added a comment - Not precisely that. There is a collapsing console sections plugin. Also here I did something sort of related with CSS tricks.

          Jesse Glick added a comment -

          -ntp is a bit better but has the same issue with not being to diagnose a download hang. On the other hand this is arguably something that should be implemented upstream in Maven, not in Jenkins.

          Jesse Glick added a comment - -ntp is a bit better but has the same issue with not being to diagnose a download hang. On the other hand this is arguably something that should be implemented upstream in Maven, not in Jenkins.

          Jesse Glick added a comment -

          At this point I feel there is nothing that should be done in Jenkins; Maven’s -ntp ought to be improved to print a warning if a particular download is still incomplete after (say) one minute.

          Jesse Glick added a comment - At this point I feel there is nothing that should be done in Jenkins; Maven’s -ntp ought to be improved to print a warning if a particular download is still incomplete after (say) one minute.

          Benoit added a comment -

          I got your point jglick but as you said, it is a thing (warn after some timeout) that should be done in Maven, not elsewhere.

          Now imagine Maven has this improvement, I think we should, by default, hide those download lines which add nothing to the build log.
          And by the way, the pipeline-maven plugin has a global traceability / verbosity switch. -ntp option is only activated is verbosity is off.
          So I the build hang, you can kill it, relaunch it with verbosity and see at which artefact it hangs (if it is a permanent error). Ok, it is all manual, but that is already the case right now

          Benoit added a comment - I got your point jglick but as you said, it is a thing (warn after some timeout) that should be done in Maven, not elsewhere. Now imagine Maven has this improvement, I think we should, by default, hide those download lines which add nothing to the build log. And by the way, the pipeline-maven plugin has a global traceability / verbosity switch. -ntp option is only activated is verbosity is off. So I the build hang, you can kill it, relaunch it with verbosity and see at which artefact it hangs (if it is a permanent error). Ok, it is all manual, but that is already the case right now

          jerome g added a comment -

          Just chucking that here hoping it will help fellow jenkins users and their google searches:

          This update breaks all builds with maven < 3.6.1, with error:

          Unable to parse command line options: Unrecognized option: --no-transfer-progress

          => just upgrade your maven version if you get this.

          (disclaimer: I don't approve this forced change - just trying to help people using search engines)

          Associated PR is https://github.com/jenkinsci/pipeline-maven-plugin/pull/716

           

          jerome g added a comment - Just chucking that here hoping it will help fellow jenkins users and their google searches: This update breaks all builds with maven < 3.6.1, with error: Unable to parse command line options: Unrecognized option: --no-transfer-progress => just upgrade your maven version if you get this. (disclaimer: I don't approve this forced change - just trying to help people using search engines) Associated PR is https://github.com/jenkinsci/pipeline-maven-plugin/pull/716  

            bguerin Benoit
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: