Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 59415 invoked from network); 22 Jun 2010 15:53:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Jun 2010 15:53:02 -0000 Received: (qmail 2963 invoked by uid 500); 22 Jun 2010 15:53:01 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 2918 invoked by uid 500); 22 Jun 2010 15:53:00 -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 2910 invoked by uid 99); 22 Jun 2010 15:53:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jun 2010 15:53:00 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=10.0 tests=AWL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of JohnW.Lewis@sas.com designates 149.173.6.152 as permitted sender) Received: from [149.173.6.152] (HELO mercav14.na.sas.com) (149.173.6.152) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jun 2010 15:52:54 +0000 X-TM-IMSS-Message-ID: <29b6349b000434af@mercav14.na.sas.com> Received: from MERCHUB01R.na.SAS.com ([10.19.10.47]) by mercav14.na.sas.com ([10.19.9.244]) with ESMTP (TREND IMSS SMTP Service 7.0; TLS: TLSv1/SSLv3,128bits,AES128-SHA) id 29b6349b000434af ; Tue, 22 Jun 2010 11:52:33 -0400 Received: from MERCMBX05D.na.SAS.com ([fe80::d4ab:f928:b661:cee0]) by MERCHUB01R.na.SAS.com ([10.19.10.47]) with mapi; Tue, 22 Jun 2010 11:52:32 -0400 From: "John W. Lewis" To: Ant Users List Subject: RE: Need cross platform way of assigning users name to a property Thread-Topic: Need cross platform way of assigning users name to a property Thread-Index: AQHLEh83GtUfuNPgoU+faNjyCyqU/pKOIVCw Date: Tue, 22 Jun 2010 15:52:31 +0000 Message-ID: References: <918084.23541.qm@web39804.mail.mud.yahoo.com> In-Reply-To: <918084.23541.qm@web39804.mail.mud.yahoo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 I had a similar problem: -----Original Message----- From: Dean Schulze [mailto:dean_w_schulze@yahoo.com]=20 Sent: Tuesday, June 22, 2010 11:25 AM To: user@ant.apache.org Subject: Need cross platform way of assigning users name to a property My build.xml starts with the following lines: =A0 =A0 This=A0imports a build.local.xml file that holds machine-specific propertie= s for each developer. =A0 The problem is that this does not work on UNIX because the username is in e= nv.USER in unix.=A0 I need a cross-platform way to assign a user.name prope= rty in Ant.=A0=20 =A0 This has to be done at the top of the build.xml so that the = is done before any other property assignments (the properties in build.loca= l.xml=A0are used if build.local.xml exists).=A0 This means that=A0the user.= name property can't be assigned=A0in a target so the condition statement is= useless here. =A0 Is there some way that I can=A0read the username from the environment in a = cross-platform way given that it has to happen at the top of the script? =A0 =A0 =20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org