views:

19

answers:

1

Hi There,

We're trying to migrate from current Ant build to Maven. In the current project, we've different properites files for each of the env say
qa.properties, prod.properties & dev.properties.

The property values present in these files, are used to replace wherever these properties are being referred through config files (present in src\main\resources\config ). The current Ant build process replaces all these properties which are being referred in config files with their corresponding value for the current build env.

I'm somewhat aware of the Profiles concept in maven. However, I'm not able to figure how to achieve this using maven.

Any help would be appreicated.

Thanks, Prabhjot

+1  A: 

There are several ways to implement this but they are all variations around the same features: combine profiles with filtering. A Maven2 multi-environment filter setup shows one way to implement such a setup (a little variation would be to move the filter declaration inside each profile).

See also

Pascal Thivent
This helped. I had to change the properties name from ~~xxx~~ to XXX and then refer in config file using ${xxx}. Thanks, Pascal
@user474249 You're welcome.
Pascal Thivent