Apache Maven – Profiles

By | October 27, 2020

In this post, We will talk and learn about Apache Maven – Profiles

Build Profiles:

  • Usually, maven Profiles allows us to define a multiple set of configurations and activate them based on certain conditions.
  • The maven profile is an option or alternative set of configurations that set or override default values. Profiles allow us to customize a build for different environments.

What are the different types of profiles?
 Per Project

– Defined in the POM itself (pom.xml).

Per User

– Defined in the Maven-settings (%USER_HOME%/.m2/settings.xml).


– Defined in the global Maven-settings (${maven.home}/conf/settings.xml).

How can a profile is activated?

A profile can be triggered/activated in several ways:

  • Explicitly
  • Through Maven settings
  • Based on environment variables
  • OS settings

That’s all about Apache Maven – Profiles
If you have any feedback or suggestion please feel free to drop in below comment box.

Leave a Reply

Your email address will not be published. Required fields are marked *