From user-return-71707-apmail-ant-user-archive=ant.apache.org@ant.apache.org Mon Jun 6 16:09:18 2011 Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B03A4571 for ; Mon, 6 Jun 2011 16:09:18 +0000 (UTC) Received: (qmail 82284 invoked by uid 500); 6 Jun 2011 16:09:17 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 82255 invoked by uid 500); 6 Jun 2011 16:09:17 -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 82247 invoked by uid 99); 6 Jun 2011 16:09:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 16:09:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sfloess@nc.rr.com designates 75.180.132.120 as permitted sender) Received: from [75.180.132.120] (HELO cdptpa-omtalb.mail.rr.com) (75.180.132.120) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 16:09:10 +0000 X-Authority-Analysis: v=1.1 cv=SOlsIBN44tkg4MqIq+y2aLZdhoA3kHpmiRsLue6rfnM= c=1 sm=0 a=JAaM5cE5HbkA:10 a=mnRBYUMModgA:10 a=kj9zAlcOel0A:10 a=Zn+JcNUfWX/buaDEYgmvyA==:17 a=FP58Ms26AAAA:8 a=NEAV23lmAAAA:8 a=HVEtHMoJW4TzvyQy5HAA:9 a=cC7vCAgYkxWRe4ShiJkA:7 a=CjuIK1q_8ugA:10 a=Zn+JcNUfWX/buaDEYgmvyA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 76.182.110.160 Received: from [76.182.110.160] ([76.182.110.160:34819] helo=flossware.homelinux.org) by cdptpa-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 15/E8-15242-09BFCED4; Mon, 06 Jun 2011 16:08:48 +0000 Received: from fedora-workstation.flossware.com (fedora-workstation.flossware.com [192.168.168.224]) by flossware.homelinux.org (Postfix) with ESMTP id 3590636688EE for ; Mon, 6 Jun 2011 12:08:48 -0400 (EDT) Date: Mon, 6 Jun 2011 12:08:48 -0400 (EDT) From: "Scot P. Floess" X-X-Sender: sfloess@fedora-workstation.flossware.com To: Ant Users List Subject: Re: How change variable based on environment variable value In-Reply-To: <004301cc2460$c8669c50$5933d4f0$@net> Message-ID: References: <004301cc2460$c8669c50$5933d4f0$@net> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org Any chance we can see the complete build.xml? On Mon, 6 Jun 2011, Brian McCann wrote: > Hi, > Below is xml from my build.xml file. I'm trying to set a property value > based on the condition > that the build.xml file is being run on the build box. I created a system > variable and set it to true on a Win XP SP3 build system. > I tested this part of the xml and the code " ${env.BUILD_BOX}" > works and returns the correct value of "True" > for the variable "${env.BUILD_BOX}". The problem is the second target > "setJOF" is not setting the "JOF" property value to > "F:/Inetpub/wwwroot/wo30". > The xml "${JOF}" returns no value. > > In a nutshell I'm trying to do is check if the buld.xml is running on the > buildbox (not a developers box). If it's running on the buildbox change the > value of a property to > a path unique to the buildbox which overrides the path property value in the > build.user.properties file. If it's not running on the buildbox use the > value of the > property set in the build.user.properties file. > > Any help on this would be greatly appreciated. > Thanks, > > BPM > > Build.xml : > > > > > > > > environment="env"/> > > value="${env.BUILD_BOX}"/> > > > ${env.BUILD_BOX} > > > > > > > > > > ${JOF} > > > > > > build.userproperties: > JOF=C:/Inetpub/wwwroot/wo30 > > > > Scot P. Floess RHCT (Certificate Number 605010084735240) Chief Architect FlossWare http://sourceforge.net/projects/flossware http://flossware.sourceforge.net https://github.com/organizations/FlossWare --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org