I have a maven 3 project. In the POM, I define numerous <properties>
- some under <project>
, others under specific <profile>
. is the a way in maven to export all declared properties to a .properties file?
My current way of doing so is to:
myProp=${myProp}
Seems like there ought to be a way to eliminate step 2 above...
thanks, -nikita
Maven supports a hierarchy of different properties to allow specifying defaults and overriding them at the appropriate level. The properties files in Maven are processed in the following order: Built-in properties are processed. ${basedir}/project. properties ( basedir is replaced by the directory where the project.
properties file in the maven project folder src/main/resources`. In pom. xml, add resources inside the building element and set filtering=true.
Use properties-maven-plugin and its write-project-properties goal.
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