> -----Original Message----- > From: dave.alvarado@remanresource.com > [mailto:dave.alvarado@remanresource.com] > Sent: Thursday, February 19, 2009 10:00 AM > To: Ant Users List > Subject: Re: AW: Reading a property from a file > > Again, I really appreciate all the advice I'm getting, but being so > inexperienced with Ant, I'm still missing the solution. > > The properties file I refer to is not in any way related to my Ant tasks. > But it does contain a URL I would like to use in my Ant script, so I can > keep that URL in one place. > > So what are the commands/XML to extract the key in the following key-value > pair ... > > PROVISIONING_SERVICE_WSDL_URL=http://99.99.99.99:9999/ProvisioningAccountS > ervice/ProvisioningAccountService?WSDL > > in my "file.properties" file that will allow me to plug in that URL into > the "wsdl" attribute of my "" task? > > Thanks, - Dave > We understand that your properties file is in no way related to you Ant tasks. However, the way to get the data out of is it using Ant tasks, namely the task. This is explained all very clearly in the Ant manual: http://ant.apache.org/manual/index.html See Ant Tasks->Core Tasks->Property None the less here is a simple Ant example: -raleigh > > > -------Original Message------- > > From: Jan.Materne@rzf.fin-nrw.de > > Subject: AW: Reading a property from a file > > Sent: Feb 19 '09 06:16 > > > > is a task as all others, therefore you can use that > everywhere. If your properties file contains 'just' properties for that > generation, placing the task just in front of the is a good > idea. > > Usually you have a build.properties with all properties for the build, > like java source directory, javac target, etc. Then a common place is > directly under . > > > > > > Jan > > > > > > >-----Ursprüngliche Nachricht----- > > >Von: dave.alvarado@remanresource.com > > >[mailto:dave.alvarado@remanresource.com] > > >Gesendet: Mittwoch, 18. Februar 2009 19:26 > > >An: Ant Users List > > >Betreff: Re: Reading a property from a file > > > > > >Thanks for your reply.  Regarding the property file directive, > > >"", where are you actually loading the property > > >"PROVISIONING_SERVICE_WSDL_URL" from the file and assigning it > > >to a variable? > > > > > > - Dave > > > > > >>  -------Original Message------- > > >>  From: David Weintraub > > >>  Subject: Re: Reading a property from a file > > >>  Sent: Feb 18 '09 18:10 > > >> > > >>  What about ? > > >> > > >>  What I normally do is something like this: > > >> > > >>   > >>  value="${basedir}/default_property_file_name.properties"/> > > >>   > > >> > > >>  That way, I can put the property file name on the command line, or > > >>  read in the default property file if it exists. > > >> > > >>  You can also override any property setting in your > > >build.xml by simply > > >>  placing it on the command line: > > >> > > >>  So do this: > > >> > > >>     > > >>                     > >> > > >name="${basedir}/wsdl_files/ProvisioningService.wsdl > > >>                     > >> > > >wsdl="${provisioning.service.wsdl.file}" > > >> > > >>  destFile="${deployment}/APP-INF/lib/ProvisioningServiceClient.jar" > > >> > > >>  packageName="com.myco.nps.regui.provisioning.client" > > >> > serviceName="ProvisioningService" > > >>                                     .... > > >> > > >>  Then you can do this on the command line: > > >> > > >>  $ ant > > >-Dprovisioning.service.wsdl.file=http://99.99.99.99:9999/Provis > > >ioningAccountService/ProvisioningAccountService?WSDL > > >> > > >>  The task that sets provisioning.service.wsdl.file will > be > > >>  overridden by the command line setting. > > >> > > >>  On Wed, Feb 18, 2009 at 12:17 PM, > > wrote: > > >>  > Hi, > > >>  > > > >>  > I'm uisng Ant 1.6.  I have this target ... > > >>  > > > >>  >     > > >>  >                     > >>  > > > >wsdl="${basedir}/wsdl_files/ProvisioningService.wsdl" > > >>  > > > >destFile="${deployment}/APP-INF/lib/ProvisioningServiceClient.jar" > > >>  > > > >packageName="com.myco.nps.regui.provisioning.client" > > >>  > > > >serviceName="ProvisioningService" > > >>  >                    classpath="${java.class.path}" > > >>  >                    > > > >>  >                         > > >>  >                             > > >>  >                         > > >>  >                     > > >>  >     > > >>  > > > >>  > For the property, > > >'wsdl="${basedir}/wsdl_files/ProvisioningService.wsdl"', I > > >would prefer to read this property out of a properties file I > > >have, which has the line ... > > >>  > > > >>  > > > >PROVISIONING_SERVICE_WSDL_URL=http://99.99.99.99:9999/Provision > > >ingAccountService/ProvisioningAccountService?WSDL > > >>  > > > >>  > > > >>  > How can I tell ant to get the value from there? > > >>  > > > >>  > Thanks,  - Dave > > >>  > > > >>  > > > >--------------------------------------------------------------------- > > >>  > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > >>  > For additional commands, e-mail: user-help@ant.apache.org > > >>  > > > >>  > > > >> > > >> > > >> > > >>  -- > > >>  -- > > >>  David Weintraub > > >>  qazwart@gmail.com > > >> > > >> > > >--------------------------------------------------------------------- > > >>  To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > >>  For additional commands, e-mail: user-help@ant.apache.org > > >> > > >> > > > > > >--------------------------------------------------------------------- > > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > >For additional commands, e-mail: user-help@ant.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > For additional commands, e-mail: user-help@ant.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org