Link to home
Start Free TrialLog in
Avatar of nlrreddy
nlrreddy

asked on

copy environment specific property files using ant

Hi,

I'm trying to copy property files to their right environment using ant.

Suppose, I have three files like below

jsp-dev.properties, jsp-test.properties, jsp-prod.properties.

Now, I would like my ant script to copy right file to the right environment.

if I give env in build.properties as dev, it should trim "-dev" from the file and copy the file to dev.
like copy jsp-dev.properties to jsp.properties and push to dev environment.

Can anyone help me here?

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nlrreddy
nlrreddy

ASKER

but how can I rename the file to jsp.properties?

In the code, jsp.properties is being used
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
:)