Build Profiles
This lesson explains the concept of build profiles in Maven that can be used to customize a build for a targeted environment such as production or test.
We'll cover the following...
The notion of a profile when building Maven projects stems from the need for build portability. The ease with which a particular project can be built for different environments is referred to as build portability. For example, if you are working on a project on your local machine, can another developer easily clone your project on their machine and build it successfully? If your project has dependencies only found on your machine, other developers will not be able to build your project and the project will not be considered portable. Build portability isn’t a binary attribute, rather it spans a spectrum as shown below:
A build can be non-portable, that is the project can only be built under specific circumstances and criteria. A build can be portable across environments, that is the project can be built in test, stage, or production environments. A project build may be portable within an organization, e.g., dependencies are only available within the organization’s local repository. Finally, a build can be universally portable, i.e., anyone can download the source code for such a project and build it. ...