Return-Path: Delivered-To: apmail-ant-notifications-archive@locus.apache.org Received: (qmail 9790 invoked from network); 28 Oct 2008 21:09:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2008 21:09:04 -0000 Received: (qmail 16377 invoked by uid 500); 28 Oct 2008 21:09:09 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 16354 invoked by uid 500); 28 Oct 2008 21:09:09 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 16345 invoked by uid 99); 28 Oct 2008 21:09:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 14:09:09 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 21:07:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 072952388988; Tue, 28 Oct 2008 14:08:06 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r708670 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java Date: Tue, 28 Oct 2008 21:08:05 -0000 To: notifications@ant.apache.org From: jglick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081028210806.072952388988@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jglick Date: Tue Oct 28 14:08:05 2008 New Revision: 708670 URL: http://svn.apache.org/viewvc?rev=708670&view=rev Log: Suppress displaying the stderr prompt for storepass/keypass when we in fact are passing it on stdin. Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java?rev=708670&r1=708669&r2=708670&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java Tue Oct 28 14:08:05 2008 @@ -24,10 +24,12 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; +import org.apache.tools.ant.filters.LineContainsRegExp; import org.apache.tools.ant.types.Environment; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.RedirectorElement; +import org.apache.tools.ant.types.RegularExpression; import org.apache.tools.ant.util.JavaEnvUtils; /** @@ -244,6 +246,14 @@ } result.setInputString(input.toString()); result.setLogInputString(false); + // Try to avoid showing password prompts on log output, as they would be confusing. + LineContainsRegExp filter = new LineContainsRegExp(); + RegularExpression rx = new RegularExpression(); + // XXX only handles English locale, not ja or zh_CN + rx.setPattern("^(Enter Passphrase for keystore: |Enter key password for .+: )$"); + filter.addConfiguredRegexp(rx); + filter.setNegate(true); + result.createErrorFilterChain().addLineContainsRegExp(filter); } return result; }