Properties Maven Plugin

The Properties Maven Plugin is here to make life a little easier when dealing with properties. It provides goals to read and write properties from and to files.

It's main use-case is loading properties from files instead of declaring them in pom.xml, something that comes in handy when dealing with different environments.

If you have a properties file called with this content:


and invoke the properties:read-project-properties goal, it would be the same as declaring the following in your pom.xml:


The properties loaded from files can be used to filter resources differently for different environments. Those using Spring's PropertyPlaceholderConfigurer can see how these goals can be useful.

Goals Overview


Instructions on how to use the Properties Maven Plugin can be found here.