DevOps / Maven Interview questions II
Explain Build Profile in Maven.
A Build profile represents a set of configuration that is used to set or override default values of a Maven build. Using a build profile, a maven build can be customized for various application environments such as Production, Testing, Staging and development.
There are 4 different types of build profile.
- Per Project. Defined in the project's POM itself (pom.xml).
- Per User. Defined in the Maven-settings xml file (%USER_HOME%/.m2/settings.xml).
- Global. Defined in the global Maven-settings (${maven.home}/conf/settings.xml).
- Profile descriptor. a descriptor located in project basedir (profiles.xml).
A profile can be triggered or activated in several ways.
- Explicitly.
- Through Maven settings.
- Based on environment variables.
- OS settings.
- Present or missing files.
More Related questions...