Maven for different profiles

We are trying to upgrade from the current Ant build to Maven. In the current project, we have different rights files for each of the env say
qa.properties, prod.properties and dev.properties.

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

I am somewhat aware of the concept of Profiles in maven. However, I cannot figure out how to achieve this using maven.

Any help would be used.

Thanks Prabhjot

+3
source share
1 answer

There are several ways to implement this, but they all differ from the same functions: combine profiles with filters. Filter settings for several filters Maven2 shows one of the ways to implement such settings (a small change would be to move the filter declaration inside each profile).

see also

+4
source

Source: https://habr.com/ru/post/1769302/


All Articles