I have one property file called environment.properties
. In this file I have one entry:
applicationUrl = ${applicationUrlFromPom}
I want to use maven resource plugin setting in pom file, so that this value could be set at build time and I can use this value from properties file in Java.
thnx in advance
Assuming you have properties in your pom
as
<properties>
<applicationUrlFromPom>http://www.coolbeans.com/some/url</applicationUrlFromPom>
</properties>
You need to add resource filtering
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
where the <directory>
is the directory your properties file is in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With