1

Is it possible to get the version of Maven as a property?

For example, in this guide I have to choose a version of maven-core library according to the version of Maven I have installed, but it doesn't say if I should just type whatever version I have installed, or to get it programmatically. I suppose the latter, but can't find a way to do so.

gvlasov
  • 18,638
  • 21
  • 74
  • 110

1 Answers1

1

There already is such a property: maven.version

The Maven Archiver will even write the value of this property to /META-INF/MANIFEST.MF by default:

...
Created-By: Apache Maven 3.2.5
...

See the documentation for details.

hzpz
  • 7,536
  • 1
  • 38
  • 44