Hi Diane,

Thanks for your help. You're right, it does look reasonably straight 
forward. One question, though. Shouldn't we read in the properties file 
AFTER the individual settings, thereby overwriting the defaults? 
Otherwise, won't the properties get set to the defaults every time?

Chuck

> -----Original Message-----
> From: holtdl [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 03, 2001 1:37 PM
> To: ant-user
> Cc: holtdl
> Subject: RE: problem with propertyfile task
> 
> 
> --- [EMAIL PROTECTED] wrote:
> > ouch. messy workaround. i'll wait for the new 
> functionality. thanks. 
> 
> Not so messy really -- you only had 4 properties that needed 
> a default,
> right? So, before your <propertyfile> task, you'd just need to add:
> 
> <property file="${classes.home}/com/sprint/fms/constants.properties"/>
> <property name="CICS_TRANSACTION_GATEWAY_HOST" 
> value="199.14.219.100"/>
> <property name="CICS_TRANSACTION_GATEWAY_PORT" value="2006"/>
> <property name="CICS_SERVER_NAME" value="DA131"/>
> <property name="CICS_PROGRAM_NAME" value="FHXM0P"/>
> 
> and change the <entry>s for those properties in your 
> <propertyfile> task
> to
> reference the property names instead:
>      
> <propertyfile
>    file="${classes.home}/com/sprint/fms/constants.properties">
>      <entry key="CICS_TRANSACTION_GATEWAY_HOST"
>           value="${CICS_TRANSACTION_GATEWAY_HOST}"/>
>      <entry key="CICS_TRANSACTION_GATEWAY_PORT"
>             value="${CICS_TRANSACTION_GATEWAY_PORT}"/>
>      <entry key="CICS_SERVER_NAME"
>             value="${CICS_SERVER_NAME}"/>
>      <entry key="CICS_PROGRAM_NAME"
>             value="${CICS_PROGRAM_NAME}"/>
>      ...
> </propertyfile>
> 
> If any of the properties are defined on the command-line, 
> that's the value
> they'll be given in the properties file. Or, if they're not 
> defined on the
> command-line, but are already in the properties file 
> (assuming it exists),
> that's the value they'll stay at. Otherwise, they'll be set to your
> default values.
> 
> Diane
> 
> =====
> ([EMAIL PROTECTED])
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com
> 

Reply via email to