Re: How to access value of propertyfile command line inside script

2009-04-06 Thread David Weintraub
I just played around with the -properties parameter. Whatever propertyfile file you select with -propertfile takes presidence over any properties loaded with the task, but any properties specified with the -D command line parameter takes presidence over the ones set via the -propertyfile p

Re: How to access value of propertyfile command line inside script

2009-04-06 Thread goelshek
Thanks David. I got essentially the same information from supareno above. But yours goes into much more details and I'm sure that would be helpful to other people who are even newer to ant than I am. My original question/curiosity remains: Is there no way to access the name of the file passed in

Re: How to access value of propertyfile command line inside script

2009-04-06 Thread David Weintraub
My build.xml files include something like this: [...] This way, the default name of the build properties file is build.properties, so if the user uses that as their build properties file, they don't have to put anything on the command line. If the user wants to use a different one

Re: How to access value of propertyfile command line inside script

2009-04-06 Thread goelshek
hmm... That's an interesting solution. I'm not a big fan of specifying a property on the command line. Especially with the -D. But this would be a way to get things done. Thanks. I just feel that saying: ant -propertyfile filename.properties test looks a lot better/user-friendly than ant

Re: How to access value of propertyfile command line inside script

2009-04-06 Thread supareno
goelshek, you can use this: ant -D= which in your case will produce ant -Duser.property.file=foo.properties test property file name: ${user.property.file} if in your properties file you define some properties e.g. prop1=foo prop2=bar then, you can access them in ant wi