Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 84368 invoked from network); 24 Feb 2009 15:26:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Feb 2009 15:26:57 -0000 Received: (qmail 29083 invoked by uid 500); 24 Feb 2009 15:26:53 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 28865 invoked by uid 500); 24 Feb 2009 15:26:53 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 28854 invoked by uid 99); 24 Feb 2009 15:26:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Feb 2009 07:26:53 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of qazwart@gmail.com designates 74.125.92.149 as permitted sender) Received: from [74.125.92.149] (HELO qw-out-1920.google.com) (74.125.92.149) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Feb 2009 15:26:44 +0000 Received: by qw-out-1920.google.com with SMTP id 9so972041qwj.10 for ; Tue, 24 Feb 2009 07:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=k8JCfxyrJmRdgpV9rAt7wGKff/YcIBuRj/nydd9O85Q=; b=c1p+aeMtuw/BVBKfJugnyGN/0nDgT+GxHVq9+ewo8AvK77jrKPyyhkRrUnftowyuHo 00hYuQYw1mfLZjYPnhT2Mr/TYcw2IBQIyuoKUtKCOWGydFepNq8OUS21Iygzi8UYoMnL eEFzrXfD82Laee8YIa6fPp+64yrhs6IrRf6I4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VPsbVaduRb/1DwRFFQxaDcdforhwpSidb3hxiKF8MPoO2vrjvxMl5NlH7B+ZxedtJl QTsUNAaQKEoWODvke7o4Q/aua20PRd2O3GLUJlqV/gxKD8sXQYMTSGueEYPiQgNMl3EX 6kYYKzmhPBEjSoYI4A0M/Cuh+wU7nGag/4lCM= MIME-Version: 1.0 Received: by 10.224.6.79 with SMTP id 15mr253781qay.240.1235489183872; Tue, 24 Feb 2009 07:26:23 -0800 (PST) In-Reply-To: References: Date: Tue, 24 Feb 2009 10:26:23 -0500 Message-ID: Subject: Re: Is there a login "wait for password" target/task? From: David Weintraub To: Ant Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Ah! You have Perforce security set to level 3, so you can't pass the password via the command line or via the P4PASSWD environment variable. However, you can pass the Perforce ticket via the command line, so you could still use getoptions. See for more details. Basically, you need to get the ticket which you can get via "p4 login -p", then use that as your password. Things are a bit trickier, but you can use to get the ticket, and then the globalopts to pass the ticket. Something like this. (Not 100% sure, you'll have to experiment): You can also set your groups to use a very large timeout value. When I used Perforce, a timeout value of "0" meant that the ticket never expired. The problem is that if the user was in more than one group, Perforce used the biggest value. So, if one group had a value of '3600" and another group had a value of "0", the user's ticket would expire in one hour and not never. We solved this by using 9,999,999 which set the ticket timeout for 1/2 a year. It is possible that Perforce has solved this problem. Anyway, if you have a user who is an automatic build process, you can create a group for that user for an non-expiring ticket. Then you log in once as that user, and that user should never have to log in again. That's the way I use to handle all of my scripts. It isn't just an Ant issue. Hope this helps. On Mon, Feb 23, 2009 at 4:40 PM, Scott Stark wrote: > >>Ant has optional Perforce tasks, and these tasks use the globalopts >>setting, so you can pass a password though that. > > Hi David, yes I saw that but couldn't find anything that does what I want. > Our Perforce install does not allow you to pass a password as a command > line parameter -- it stops and prompts for human input. I was wondering if > there was a way for Ant to wait for a text string such as "pass:" and send > the password. > > thanks, > Scott > -- -- David Weintraub qazwart@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org