Oct 28, 2015

How to list the profiles of a maven project?

A maven project allows the cascading of projects by using dependencies and modules.


If the profiles are defined somewhere in the chain you can use maven itself to get the list:

$ mvn help:all-profiles
...
[INFO] --- maven-help-plugin:2.2:all-profiles (default-cli) @ aggregation ---
[INFO] Listing Profiles for Project: c.h.b:war:1.0.0-SNAPSHOT
  Profile Id: nexus (Active: true , Source: settings.xml)
  Profile Id: minify (Active: false , Source: pom)
  Profile Id: debug (Active: false , Source: pom)
Listing Profiles for Project: c.h:aggregation:pom:1.0.0-SNAPSHOT
  Profile Id: nexus (Active: true , Source: settings.xml)