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

Do not use System.out

XMLWordPrintable

      https://github.com/jenkinsci/pipeline-maven-plugin/blob/bbec59598d580732667e5cd20ee6eadacbe637c4/maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/JenkinsMavenEventSpy.java#L96 uses System.out to log the spy being disabled. This breaks Maven integration testing and the `-q` feature that can legitimately be used to suppress a lot of logging output.

      See:
      https://builds.apache.org/view/M-R/view/Maven/job/maven-wip/job/maven/job/master/18/testReport/org.apache.maven.it/MavenITmng4387QuietLoggingTest/testit/

      Error Message
      expected:<[]> but was:<[[jenkins-maven-event-spy] INFO Jenkins Maven Event Spy is disabled]>
      Stacktrace
      junit.framework.AssertionFailedError: expected:<[]> but was:<[[jenkins-maven-event-spy] INFO Jenkins Maven Event Spy is disabled]>
      	at junit.framework.Assert.fail(Assert.java:47)
      	at junit.framework.Assert.failNotEquals(Assert.java:283)
      	at junit.framework.Assert.assertEquals(Assert.java:64)
      	at junit.framework.Assert.assertEquals(Assert.java:71)
      	at org.apache.maven.it.MavenITmng4387QuietLoggingTest.testit(MavenITmng4387QuietLoggingTest.java:71)
      Standard Output
      mng4387QuietLogging(it).....................................FAILURE (0.1 s)
      

            alobato Alvaro Lobato
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: