Maven: check what it really executes

 

 

 

  • How to aggregate your pom?

Sometimes, the need arises to debug a pom file and then you want to have a clear idea of what Maven really executes. This command shows your pom file after the inheritance, profiles and variable substitutions have been applied.

    mvn help:effective-pom
  • How to aggregate your settings?

There is a similar command for the settings.xml file.

    mvn help:effective-settings
  • How to list the profiles that are activated?
    mvn help:active-profiles
    This command is particularly useful to check the profiles activated by default, when using the -P option, when using an environment variable, or any combination of these like in the following example:
    mvn -Denv_variable=value help:active-profiles -P profileToActivate
Advertisements

About nidget

Technology enthousiast, Java and JEE expert, IT architect.
This entry was posted in Tips and tricks and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s