Projects in Maven are generally portable. This is done by allowing configuration within the POM, avoiding all filesystem references, and depending extensively on the local repository to store the required metadata.
However, this isn’t always possible as under some circumstances configuration with filesystem references become unavoidable. For these cases, Maven introduces the concept of build profiles.
Build profiles are specifications made in the POM and can be triggered as and when required. Some ways to trigger profiles are:
Profiles can be directly triggered through the command line using the
-P option. The list ...