Get Maven artifact version at runtime

Let’s imagine that we need to get the value of a certain Maven property in Java code. First, let’s create a text file with any name, for example version.txt in the src/main/resources folder: Now let’s add the following block to pom.xml: Now, when building, Maven will replace the construction ${project.version} in the file with the […]

READ MORE