In this short tutorial, we’ll take a look at how to use variables defined inside Maven’s pom.xml from a Java application.
Throughout this example, we’ll use the Maven Properties Plugin.
This plugin will bind to the generate-resources phase and create a file containing the variables defined in our pom.xml during compilation. We can then read that file at runtime to get the values.
#maven #java