I need to get project version from maven pom file. Before I did configs with SPRING_CONFIG_ADDITIONAL-LOCATION parameter everething was fine. Now I cant get project version from application.properties (version = @project.version@), its value is "@project.version@". Why I cant get real value anymore?
Asked
Active
Viewed 79 times
0
-
Look into Maven Ressource Filterfing https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html – Zorglube Aug 08 '19 at 08:08
-
@Zorglube For filtering param requeried resourse directory, but I cant use it, because my configs set dynamically with SPRING_CONFIG_ADDITIONAL-LOCATION – Alexey Goloschapov Aug 08 '19 at 09:08
-
Did you try this: https://stackoverflow.com/a/51419158/3981539 ? – Kavitha Karunakaran Aug 08 '19 at 09:27
-
@KavithaKarunakaran I cant use that example. Its not a problem with the delimiter and as I said, I cant use solutions with strict
parameter – Alexey Goloschapov Aug 08 '19 at 10:49 -
what was the target for spring.config.additional.location? is the .properties file which contains project.version still available in classpath? – Kavitha Karunakaran Aug 09 '19 at 07:13
-
@KavithaKarunakaran New location for target is /opt/application/application.properties Properties file still available, but should be removed soon – Alexey Goloschapov Aug 09 '19 at 11:04