K
K
krestjaninoff2010-09-10 12:31:43
Java
krestjaninoff, 2010-09-10 12:31:43

Getting the value of the from pom.xml in project code

Do I understand correctly that there are no reasonable ways to get the value of the <version /> element from pom.xml in the project code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MikeMirzayanov, 2010-09-10
@MikeMirzayanov

You need to make a resource, for example your-project-name.properties, which is filter-copied and contains the string "project.version=${project.version}". Then, at runtime, you can subtract this value from the properties file, just like other config values.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question