Build profile
A Build profile is a set of configuration values which can be used to set or override default values of Maven build. Using a build profile, you can customize build for different environments such as Production v/s Development environments.
Profiles modify the POM at build time, and are used to give parameters different target environments (for example, the path of the database server in the development, testing, and production environments).
What are the different types of profile?
Per Project
- Defined in the POM itself (pom.xml).
Per User
- Defined in the Maven-settings (%USER_HOME%/.m2/settings.xml).
Global
- Defined in the global Maven-settings (${maven.home}/conf/settings.xml).
.
File Name Description
env.properties default configuration used if no profile is mentioned.
env.test.properties test configuration when test profile is used.
env.prod.properties production configuration when prod profile is used.