Maven is designed to create portable builds that are expected to work across different platforms and in various runtime environments.
Now, there may be situations where you need to build the same project differently. For instance, you may need to build a project differently for the purpose of staging and production. You may not want to build a project that requires a Linux library on Windows.
Let's understand Maven profiles by performing the following steps:
Open
settings.xml
in theconf
subfolder of your Maven installation (as specified inM2_HOME
).View the commented section of profiles.