Interpolation and Variables
This lesson explains how variable substitution works in Maven and the variables that come default with Maven.
We'll cover the following...
Maven allows using predefined and user-defined variables in a POM file. This avoids repeating values across child POMs and also makes modifications easy as any change only needs to be applied at one place.
Any elements with a single value present in the project model (the XSD that defines the structure of a POM file) can be accessed using the prefix project.
. For instance, we can access the version of the project using project.version
. Similarly, if we want to access the default value of the source directory defined in the ...