Описание тега maven-profiles

Profiles are intended to give some extra behaviors to maven builds, with a set of properties, plugin or actions

Introduction to Build Profiles

Maven 2.0 introduces the concept of a build profile. Profiles are specified using a subset of the elements available in the POM itself (plus one extra section), and are triggered in any of a variety of ways.

They modify the POM at build time, and are meant to be used in complementary sets to give equivalent-but-different parameters for a set of target environments (providing, for example, the path of the appserver root in the development, testing, and production environments).

As such, profiles can easily lead to differing build results from different members of your team. However, used properly, profiles can be used while still preserving project portability. This will also minimize the use of -f option of maven which allows user to create another POM with different parameters or configuration to build which makes it more maintainable since it is runnning with one POM only.

What are the different types of profile? Where is each defined?

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 (%M2_HOME%/conf/settings.xml).

Profile descriptor - a descriptor located in project basedir (profiles.xml) (unsupported in Maven 3.0: see Maven 3 compatibility notes)

Sources and official site: http://maven.apache.org/guides/introduction/introduction-to-profiles.html