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:
- create env.properties file in src/main/resources
- for each property ‘myProp’ add this line to env.properties:
myProp=${myProp} - enable resource filtering during builds
Seems like there ought to be a way to eliminate step 2 above…
thanks,
-nikita
Use properties-maven-plugin and its write-project-properties goal.