Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all activated profiles in mvn in a multimodule project

Tags:

mvn help:active-profiles only list the profiles activate within the project + system settings you call it in.

It does not list the profiles that have been enabled/activated from i.e. the parent pom.

Any any way to actually see the full list of activated profiles by other means than trial-and-error to look at what properties are enabled or not ?

like image 241
Max Rydahl Andersen Avatar asked Oct 28 '12 15:10

Max Rydahl Andersen


People also ask

Where are profiles configured in Maven?

Profiles are specified in pom. xml file using its activeProfiles/profiles elements and are triggered in variety of ways.

How do I run a specific profile in Maven?

What you should do is check the profile behavior by doing the following : set activeByDefault to true in the profile configuration, run mvn help:active-profiles (to make sure it is effectively activated even without -Pdev1 ), run mvn install .


1 Answers

Another option is mvn help:all-profiles, which also list inherited profiles.

Displays a list of available profiles under the current project. Note: it will list all profiles for a project. If a profile comes up with a status inactive then there might be a need to set profile activation switches/property.

More details in Maven's help plugin page

like image 107
Quaestor Lucem Avatar answered Oct 31 '22 12:10

Quaestor Lucem