code: private void print(TaskListener listener, int depth) {
          indent(listener, depth);
          Run<?, ?> upstreamRun = getUpstreamRun();
  
          if (upstreamRun == null) {
              listener.getLogger().println("Started by upstream build " + ModelHyperlinkNote.encodeTo('/' + getUpstreamUrl(), getUpstreamProject()) +
                      "\" #" + ModelHyperlinkNote.encodeTo('/' + getUpstreamUrl() + getUpstreamBuild(), Integer.toString(getUpstreamBuild())) +
                      " generating Maven artifact: " + getMavenArtifactsDescription());
          } else {
              listener.getLogger().println("Started by upstream build " +
                      ModelHyperlinkNote.encodeTo('/' + upstreamRun.getUrl(), upstreamRun.getFullDisplayName()) + " generating Maven artifacts: " + getMavenArtifactsDescription());
          }
  
          if (getUpstreamCauses() != null && !getUpstreamCauses().isEmpty()) {
              indent(listener, depth);
              listener.getLogger().println("originally caused by:");
              for (Cause cause : getUpstreamCauses()) {
                  if (cause instanceof MavenDependencyUpstreamCause) {
                      ((MavenDependencyUpstreamCause) cause).print(listener, depth + 1);
                  } else {
                      indent(listener, depth + 1);
                      cause.print(listener);
                  }
              }
          }
      }
docs: TODO create a PR on jenkins-core to make {@link hudson.model.Cause.UpstreamCause#print(TaskListener, int)} protected instead of private
  <p>
  Mimic {@link hudson.model.Cause.UpstreamCause#print(TaskListener, int)} waiting for this method to become protected instead of private
  
  @see UpstreamCause#print(TaskListener, int)