Suppose you write a project that must have mandatory support for java 1.6 and higher, but you only have java 9 installed and also want the compiled classes to be compatible with JVM 1.8.
Very often, when working on projects, you need to get the version of the pom.xml application from the command line.
Here’s how you can do it:
Today we will discuss working with pom.xml. Suppose you have a web application and you want to print its current version in some part of the page.
Of course you can save the version in a separate parameter and read from there. But there is an option better. We can determine the version by reading it directly from pom.xml.
In this article we will learn how to create a simple java project with Maven. We also review project structure and the commands for building the project.