Return-Path: Delivered-To: apmail-buildr-users-archive@www.apache.org Received: (qmail 83724 invoked from network); 15 Sep 2009 13:42:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Sep 2009 13:42:36 -0000 Received: (qmail 2894 invoked by uid 500); 15 Sep 2009 13:42:36 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 2840 invoked by uid 500); 15 Sep 2009 13:42:36 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Received: (qmail 2830 invoked by uid 99); 15 Sep 2009 13:42:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 13:42:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of antoine.toulme@gmail.com designates 209.85.219.219 as permitted sender) Received: from [209.85.219.219] (HELO mail-ew0-f219.google.com) (209.85.219.219) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 13:42:27 +0000 Received: by ewy19 with SMTP id 19so3856193ewy.44 for ; Tue, 15 Sep 2009 06:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=mY2QPmFZaeEwKtppvPljnQJLbvaV/wDMNwgNxa1ISC8=; b=uf9Zd4kd5veCCe7sUCYHAPwA8D5/SWls5Sfx00Ryq7/vYeky9wJtphYM7lPn4WSKvf b0lb0g9WCmnOD1k0uOUcvQEBpHopIA1ufoavnr1vqA5H+5djq3SQDOM/iCIzcw0xVUwe vvmX2Wl9uWUGMkYHiGfp55uFNsV5kzuCBvxNI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:from:date:x-google-sender-auth :message-id:subject:to:content-type; b=LFAWjekwzDCeC8K5aeF7ryRcV0M0TI2XZ6N7ZipKrDDy53RY3sRpn+Xj7PhuUyiDZN ffZGz6UcPl4hktbJ4mnKiWy/8ndkUiSIIv5kArmabEsJZq6jQ6E03AGpAGA3wIl1ZL6+ PKOzB1KWHJy0Z3jOSUxhCmHP+Apa+czuFk7Gc= MIME-Version: 1.0 Sender: antoine.toulme@gmail.com Reply-To: antoine@lunar-ocean.com Received: by 10.211.142.17 with SMTP id u17mr1585697ebn.0.1253022127117; Tue, 15 Sep 2009 06:42:07 -0700 (PDT) From: Antoine Toulme Date: Tue, 15 Sep 2009 15:41:47 +0200 X-Google-Sender-Auth: 28544e9605e2887e Message-ID: Subject: Redirecting RJB output To: users@buildr.apache.org Content-Type: multipart/alternative; boundary=00504502c78ec8566804739df2cd X-Virus-Checked: Checked by ClamAV on apache.org --00504502c78ec8566804739df2cd Content-Type: text/plain; charset=ISO-8859-1 Hi everyone, I'm trying to find a nice way to redirect the RJB output. I have some output made directly from Java that I would like to reformat and eventually colorize. >From what I read, the best solution would be to replace the PrintStreams used in System.out and System.err by something that would pipe to $stdout and $stderr respectively. >From the RJB doc, I see RJB can bind a Ruby object to a Java interface. That sounds like the right deal... but PrintStream is a class. The workaround is to have some Java code exposing an interface, with a PrintStream implementation that delegates everything to said interface, and have RJB instanciate the interface and pass output along to stdout and stderr. Was this attempted before ? Any advice on this ? Thanks, Antoine --00504502c78ec8566804739df2cd--