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).

Global

– 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

You May Also Like:

What is Maven?
How to install and setup Maven Environment on windows?
Create a maven project using the command line
How to import the maven project in Eclipse?
How to Create a New Maven Project in Eclipse
How to create a maven web application project in Eclipse
How to create a multi-module project using maven?
How to Fix missing src/main/java & src/test/java folders in the Eclipse Maven web Project?
How to create user-defined properties in Maven?
What is the maven local repository location & how to change it?
How to add or update the maven settings.xml file in eclipse?
Importing maven remote Archetype Catalogs in eclipse ?
What is POM in the maven Project?
What is Super POM in Maven Project?
Understanding the purpose of Maven Plugin
Compiling the Maven project with different JDK versions? 
Understanding of settings.xml in maven
How to enable a proxy setting in Maven?
Maven Dependency Scopes
How to generate javadoc in the maven Project
How to create a runnable JAR file with Maven?
How to add local jar files to a Maven project?
How to convert an existing Java Project to Maven in Eclipse?
How to exclude dependency in maven?
Managing External Dependencies in maven
Understanding of Maven Repositories
What is an archetype in Maven?
Snapshot Vs Version in maven

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.