Inspecting various POMs I saw that sometimes they have <version> tags only in <parent> section. Sometimes they have the following code <version>${parent.version}</version> in the main section along with version in parent.
Which version value will be used in these various cases?
The version from the parent, in both cases.
See the “Introduction to the POM” for implicit version inheritance info.
See this document for further information regarding what else is inherited.