Maven - Profiles (Profiles.xml)

Card Puncher Data Processing

About

Profiles give the ability of a project to change settings configuration depending on the environment where it is being built.

Example

A project built for a test environment may point to a different database than that of the final deployment. Or dependencies may be pulled from different repositories based upon the JDK version used.

Management

Execution

  • Excluding
mvn -P !public clean package
  • Including
mvn -P public clean package
  • Several
mvn  -P profile-1,profile-2

List

mvn help:all-profiles
Profile Id: repository-definition (Active: true , Source: settings.xml)
  Profile Id: get-hadoop-windows-native-lib (Active: false , Source: pom)
  Profile Id: assembly-windows-zip (Active: false , Source: pom)
  Profile Id: assembly-windows-unzip (Active: false , Source: pom)
  Profile Id: assembly-linux (Active: false , Source: pom)
  Profile Id: private-obfuscation (Active: false , Source: settings.xml)
  Profile Id: deploy (Active: false , Source: pom)

Documentation / Reference





Discover More
Card Puncher Data Processing
Maven - Configuration Files (Pom, Settings, Profiles, )

Maven configuration occurs at differents levels: Project - The pom.xml file is the core of a project's configuration in Maven. User - this is configuration specific to a particular user: (%USER_HOME%/.m2/settings.xml)...
Card Puncher Data Processing
Maven - Profile

See



Share this page:
Follow us:
Task Runner