Problem reading a property file and writing to another file
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sprightee
Posted On:   Wednesday, July 25, 2012 05:13 AM

 Hi All,   I have to create an ant task that reads values from deployment.properties file and substitutes in another output.properties file. I've created the following ant task: <project name="common-NB" basedir="." default="liveEx"> <loadproperties srcfile="deployment.properties"></loadproperties> <target name="liveEx" description="Read server details from properties file">  <propertyfile file="${Path}\clv.properties" > <entry key = "driverName" value= "${driverName}"/>   </propertyfile> </target> </project> Dep   More>>

 Hi All,

  I have to create an ant task that reads values from deployment.properties file and substitutes in another output.properties file.

I've created the following ant task:

<project name="common-NB" basedir="." default="liveEx">

<loadproperties srcfile="deployment.properties"></loadproperties>

<target name="liveEx" description="Read server details from properties file">

 <propertyfile file="${Path}\clv.properties" >

<entry key = "driverName" value= "${driverName}"/>

  </propertyfile>

</target>

</project>

Deployment.properties:
 

Path = C:\\Projects\\Release

This creates another clv.properties in Release folder and writes the driverName in the property file instead of substituting drivename in existing clv.properties file.

I tried having the deployment.properties and clv.proeprties in same folder
 

<propertyfile file= "clv-web.properties" > works fine. It updates the clv.properties with correct value.

What is the problem?

 

 

 

 


Regards,
Sprightee    <<Less
About | Sitemap | Contact