Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 19513 invoked by uid 500); 2 May 2001 15:42:07 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 19451 invoked from network); 2 May 2001 15:42:04 -0000 Message-ID: <20010502154205.60445.qmail@web13404.mail.yahoo.com> Date: Wed, 2 May 2001 08:42:05 -0700 (PDT) From: Diane Holt Subject: RE: v1.3 -- problems retrieving properties from To: ant-user@jakarta.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi James, Are the other properties in the properties file getting set correctly? Diane --- "Webb, James" wrote: > the properties are not being set when i use them. > i have tried to use them in other tasks without > success. > > also the properties from my file are > not referring to other properties. each is explicit > with its own key and value. > > also i am not using the properties from the file as the > basis for any other properties within my project. > I am using their keys directly in each task i have tried. > > > i have tried > 1. using one of the properties in a replace task > on a file with a token. > 2. using the mkdir task to create a directory named > after one of the properties > 3. using the mail task to send the value of one of the > properties as part of the message. > 4. using the echo task to output the value of the property. > > In all of these cases the output is the property name not its value > > ${weblogic.webapp.name} > > instead of > > mywebapp > > > I am not sure else what to try. > > -----Original Message----- > From: Conor MacNeill [mailto:conor@cognet.com.au] > Sent: Wednesday, May 02, 2001 7:06 AM > To: ant-user@jakarta.apache.org > Subject: Re: v1.3 -- problems retrieving properties from file="SOMEF ILE"> > > > From: "Diane Holt" > > --- Nico Seessle wrote: > > > > (Maybe this should go in the FAQ.) > > > > > > > The better place would be Bugzilla with a little testcase :-) So we > can > > > fix that and don't need to describe wrong behaviour... > > > > As I recall, it may not be fixable -- I think it has to do with the > order > > in which properties get set. That is, if you have something like: > > > > root.dir=/my/tree > > out.dir=${root.dir}/classes > > > > you will likely get a log message saying that property root.dir isn't > set. > > Conor could probably explain it in more detail. > > > > OK, when reading in from a properties file, you can ignore this message > :-) > > What happens is this: > > The properties are read in as a Properties object. They are then read > out > with an enumeration and added to Ant's collection of properties. The > order > of properties returned by that enumeration is, in general, not the same > as > the order of the properties in the file. So, there may effectively be > forward references in the order returned by the enumeration. When this > occurs, Ant will print this message but then resolve the forward > reference > within the properties object from the properties file. > > In other words, properties in a properties file are more declarative > than > those in a build file :-). > > Now I agree that the warning there is a problem. The reason I left it > in, > however, is that it is generally very difficult to catch use of > properties > which are not set. I'll probably get rid of it now. > > So, to the original poster, if you ignore the messages, can you check > that > the values are actually being set correctly. > > Sorry for the confusion. > > Conor > ===== (holtdl@yahoo.com) __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/